Revision 1118
Added by Jing Tao over 22 years ago
test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java | ||
---|---|---|
25 | 25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
26 | 26 |
*/ |
27 | 27 |
|
28 |
package edu.ucsb.nceas.metacatjunittests;
|
|
28 |
package edu.ucsb.nceas.metacattest;
|
|
29 | 29 |
|
30 | 30 |
import edu.ucsb.nceas.metacat.*; |
31 | 31 |
//import edu.ucsb.nceas.morpho.framework.*; |
... | ... | |
91 | 91 |
|
92 | 92 |
|
93 | 93 |
TestSuite suite = new TestSuite(); |
94 |
/*suite.addTest(new MetaCatServletTest("initialize"));
|
|
94 |
suite.addTest(new MetaCatServletTest("initialize")); |
|
95 | 95 |
suite.addTest(new MetaCatServletTest("testLterReferralLogin")); |
96 | 96 |
suite.addTest(new MetaCatServletTest("testLterReferralLoginFail")); |
97 | 97 |
suite.addTest(new MetaCatServletTest("testPiscoReferralLogin")); |
98 | 98 |
suite.addTest(new MetaCatServletTest("testPiscoReferralLoginFail")); |
99 |
suite.addTest(new MetaCatServletTest("testNCEASLoginFail"));*/
|
|
99 |
suite.addTest(new MetaCatServletTest("testNCEASLoginFail")); |
|
100 | 100 |
//Should put a login successfully at the end of login test |
101 | 101 |
//So insert or update can have cookie. |
102 | 102 |
suite.addTest(new MetaCatServletTest("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 MetaCatServletTest("testInsertXMLDocument", serial)); |
... | ... | |
117 | 117 |
suite.addTest(new MetaCatServletTest("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 MetaCatServletTest("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 MetaCatServletTest("testInsertNonWellFormedXMLDocument", |
128 | 128 |
serial)); |
Also available in: Unified diff
Change package name. Factor of docid change from 10000 to 100000.