Revision 1117
Added by Jing Tao over 22 years ago
test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java | ||
---|---|---|
25 | 25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
26 | 26 |
*/ |
27 | 27 |
|
28 |
package edu.ucsb.nceas.metacatjunitnettests;
|
|
28 |
package edu.ucsb.nceas.metacatnettest;
|
|
29 | 29 |
|
30 | 30 |
import edu.ucsb.nceas.metacat.*; |
31 | 31 |
import edu.ucsb.nceas.morpho.framework.*; |
... | ... | |
102 | 102 |
suite.addTest(new MetaCatServletNetTest("testNCEASLogin")); |
103 | 103 |
|
104 | 104 |
//create random number for docid, so it can void repeat |
105 |
number = Math.random()*10000; |
|
105 |
number = Math.random()*100000;
|
|
106 | 106 |
serial = Integer.toString(((new Double(number)).intValue())); |
107 | 107 |
MetaCatUtil.debugMessage("serial: "+serial, 1); |
108 | 108 |
suite.addTest(new MetaCatServletNetTest("testInsertXMLDocument", serial)); |
... | ... | |
117 | 117 |
suite.addTest(new MetaCatServletNetTest("testDeleteXMLDocument",serial)); |
118 | 118 |
|
119 | 119 |
//insert invalid xml document |
120 |
number = Math.random()*10000; |
|
120 |
number = Math.random()*100000;
|
|
121 | 121 |
serial = Integer.toString(((new Double(number)).intValue())); |
122 | 122 |
suite.addTest(new MetaCatServletNetTest("testInsertInvalidateXMLDocument", |
123 | 123 |
serial)); |
124 | 124 |
//insert non well formed document |
125 |
number = Math.random()*10000; |
|
125 |
number = Math.random()*100000;
|
|
126 | 126 |
serial = Integer.toString(((new Double(number)).intValue())); |
127 | 127 |
suite.addTest(new MetaCatServletNetTest("testInsertNonWellFormedXMLDocument", |
128 | 128 |
serial)); |
129 | 129 |
//insert data file |
130 |
number = Math.random()*10000; |
|
130 |
number = Math.random()*100000;
|
|
131 | 131 |
serial = Integer.toString(((new Double(number)).intValue())); |
132 | 132 |
suite.addTest(new MetaCatServletNetTest("testInertDataFile", serial)); |
133 | 133 |
|
... | ... | |
362 | 362 |
+serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1"; |
363 | 363 |
MetaCatUtil.debugMessage("insert data file docid: "+name, 20); |
364 | 364 |
MetaCatUtil.debugMessage("insert data file ", 55); |
365 |
File hello = new File("junitnettests/edu/ucsb/nceas/" |
|
366 |
+"metacatjunitnettests/hello.txt"); |
|
365 |
File hello = new File("test/edu/ucsb/nceas/metacatnettest/hello.txt"); |
|
367 | 366 |
|
368 | 367 |
assert(insertDataFile(name, hello)); |
369 | 368 |
} |
Also available in: Unified diff
Change package name and data file path. The factor for docid change from 10000 to 100000.