Project

General

Profile

« Previous | Next » 

Revision 4417

Added by daigle over 15 years ago

Added debug statements that tell which subtest is being run.

View differences:

test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java
148 148
	 * Test the login to neceas succesfully
149 149
	 */
150 150
	public void testNCEASLogin() {
151
		debug("\nRunning: testNCEASLogin test");
151 152
		String user = "uid=john,o=NCEAS,dc=ecoinformatics,dc=org";
152 153
		String passwd = "123456";
153 154
		assertTrue(logIn(user, passwd));
......
158 159
	 * Test the login to neceas failed
159 160
	 */
160 161
	public void testNCEASLoginFail() {
162
		debug("\nRunning: testNCEASLoginFail test");
161 163
		String user = "uid=john,o=NCEAS,dc=ecoinformatics,dc=org";
162 164
		String passwd = "12345678";
163 165
		assertTrue(!logIn(user, passwd));
......
168 170
	 * Test the login to lter failed
169 171
	 */
170 172
	public void testLterReferralLoginFail() {
173
		debug("\nRunning: testLterReferralLoginFail test");
171 174
		String user = "uid=jtao,o=LTER,dc=ecoinformatics,dc=org";
172 175
		String passwd = "qVyGpveb";
173 176
		assertTrue(!logIn(user, passwd));
......
178 181
	 * Test insert a xml document successfully
179 182
	 */
180 183
	public void testInsertXMLDocument() throws PropertyNotFoundException {
184
		debug("\nRunning: testInsertXMLDocument test");
181 185
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
182 186
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
183 187
		logMetacat.info("insert docid: " + name);
......
201 205
	 * In the String, there is no <!Doctype ... Public/System/>
202 206
	 */
203 207
	public void testInsertInvalidateXMLDocument() throws PropertyNotFoundException  {
208
		debug("\nRunning: testInsertInvalidateXMLDocument test");
204 209
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
205 210
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
206 211
		logMetacat.info("insert docid: " + name);
......
220 225
	 * There is no </acl> in this string
221 226
	 */
222 227
	public void testInsertNonWellFormedXMLDocument() throws PropertyNotFoundException  {
228
		debug("\nRunning: testInsertNonWellFormedXMLDocument test");
223 229
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
224 230
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
225 231
		logMetacat.info("insert non well-formed docid: " + name);
......
239 245
	 * Test read a xml document  in xml format successfully
240 246
	 */
241 247
	public void testReadXMLDocumentXMLFormat() throws PropertyNotFoundException  {
248
		debug("\nRunning: testReadXMLDocumentXMLFormat test");
242 249
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
243 250
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
244 251
		assertTrue(handleReadAction(name, "xml"));
......
249 256
	 * Test read a xml document  in html format successfully
250 257
	 */
251 258
	public void testReadXMLDocumentHTMLFormat() throws PropertyNotFoundException {
259
		debug("\nRunning: testReadXMLDocumentHTMLFormat test");
252 260
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
253 261
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
254 262
		assertTrue(handleReadAction(name, "html"));
......
259 267
	 * Test read a xml document  in zip format successfully
260 268
	 */
261 269
	public void testReadXMLDocumentZipFormat() throws PropertyNotFoundException {
270
		debug("\nRunning: testReadXMLDocumentZipFormat test");
262 271
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
263 272
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
264 273
		assertTrue(handleReadAction(name, "zip"));
......
269 278
	 * Test insert a xml document successfully
270 279
	 */
271 280
	public void testUpdateXMLDocument() throws PropertyNotFoundException {
281
		debug("\nRunning: testUpdateXMLDocument test");
272 282
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
273 283
				+ PropertyService.getProperty("document.accNumSeparator") + "2";
274 284
		logMetacat.info("update docid: " + name);
......
291 301
	 * Test insert a data file successfully
292 302
	 */
293 303
	public void testInertDataFile() throws PropertyNotFoundException {
304
		debug("\nRunning: testInertDataFile test");
294 305
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
295 306
				+ PropertyService.getProperty("document.accNumSeparator") + "1";
296 307
		logMetacat.info("insert data file docid: " + name);
......
304 315
	 * Test delete a xml document successfully
305 316
	 */
306 317
	public void testDeleteXMLDocument() throws PropertyNotFoundException {
318
		debug("\nRunning: testDeleteXMLDocument test");
307 319
		String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber
308 320
				+ PropertyService.getProperty("document.accNumSeparator") + "2";
309 321
		logMetacat.info("delete docid: " + name);
......
315 327
	 * Test logout action
316 328
	 */
317 329
	public void testLogOut() {
318

  
330
		debug("\nRunning: testLogOut test");
319 331
		assertTrue(handleLogOut());
320 332

  
321 333
	}

Also available in: Unified diff