Project

General

Profile

« Previous | Next » 

Revision 1504

Added by Jing Tao almost 22 years ago

Change assert to assertTrue

View differences:

test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java
144 144
   */
145 145
  public void initialize()
146 146
  {
147
    assert(1 == 1);
147
    assertTrue(1 == 1);
148 148
  }
149 149

  
150 150
  /**
......
154 154
  {
155 155
    String user="uid=john,o=NCEAS,dc=ecoinformatics,dc=org";
156 156
    String passwd="123456";
157
    assert(logIn(user,passwd));
158
    //assert( withProtocol.getProtocol().equals("http"));
157
    assertTrue(logIn(user,passwd));
158
    //assertTrue( withProtocol.getProtocol().equals("http"));
159 159
  }
160 160
  
161 161
  /**
......
165 165
  {
166 166
    String user="uid=john,o=NCEAS,dc=ecoinformatics,dc=org";
167 167
    String passwd="12345678";
168
    assert(!logIn(user,passwd));
168
    assertTrue(!logIn(user,passwd));
169 169
    
170 170
  }
171 171
  
......
176 176
  {
177 177
    String user="uid=jtao,o=LTER,dc=ecoinformatics,dc=org";
178 178
    String passwd="qVyGpVeb";
179
    assert(logIn(user,passwd));
179
    assertTrue(logIn(user,passwd));
180 180
    
181 181
  }
182 182
  
......
187 187
  {
188 188
    String user="uid=jtao,o=LTER,dc=ecoinformatics,dc=org";
189 189
    String passwd="qVyGpveb";
190
    assert(!logIn(user,passwd));
191
    //assert( withProtocol.getProtocol().equals("http"));
190
    assertTrue(!logIn(user,passwd));
191
    //assertTrue( withProtocol.getProtocol().equals("http"));
192 192
  }
193 193
  
194 194
 /**
......
198 198
  {
199 199
    String user="uid=tao,o=PISCO,dc=ecoinformatics,dc=org";
200 200
    String passwd="purple";
201
    assert(logIn(user,passwd));
202
    //assert( withProtocol.getProtocol().equals("http"));
201
    assertTrue(logIn(user,passwd));
202
    //assertTrue( withProtocol.getProtocol().equals("http"));
203 203
  }
204 204
  
205 205
 /**
......
209 209
  {
210 210
    String user="uid=tao,o=PISCO,dc=ecoinformatics,dc=org";
211 211
    String passwd="hello";
212
    assert(!logIn(user,passwd));
213
    //assert( withProtocol.getProtocol().equals("http"));
212
    assertTrue(!logIn(user,passwd));
213
    //assertTrue( withProtocol.getProtocol().equals("http"));
214 214
  }
215 215
  
216 216
 /**
......
237 237
                   +"</allow>"
238 238
                   +"</acl>";
239 239
     MetaCatUtil.debugMessage("xml document: "+content, 55);
240
     assert(handleXMLDocument(content, name, "insert"));
240
     assertTrue(handleXMLDocument(content, name, "insert"));
241 241
   
242 242
  }
243 243
  
......
263 263
                   +"</allow>"
264 264
                   +"</acl>";
265 265
     MetaCatUtil.debugMessage("xml document: "+content, 55);
266
     assert(handleXMLDocument(content, name, "insert"));
266
     assertTrue(handleXMLDocument(content, name, "insert"));
267 267
  }
268 268
  
269 269
   /**
......
288 288
                   +"</allow>";
289 289
  
290 290
     MetaCatUtil.debugMessage("xml document: "+content, 55);
291
     assert(!handleXMLDocument(content, name, "insert"));
291
     assertTrue(!handleXMLDocument(content, name, "insert"));
292 292
  } 
293 293

  
294 294
  /**
......
298 298
  {
299 299
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
300 300
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1";
301
    assert(handleReadAction(name, "xml"));
301
    assertTrue(handleReadAction(name, "xml"));
302 302
   
303 303
  } 
304 304

  
......
309 309
  {
310 310
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
311 311
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1";
312
    assert(handleReadAction(name, "html"));
312
    assertTrue(handleReadAction(name, "html"));
313 313
   
314 314
  }
315 315

  
......
321 321
  {
322 322
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
323 323
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1";
324
    assert(handleReadAction(name, "zip"));
324
    assertTrue(handleReadAction(name, "zip"));
325 325
   
326 326
  }
327 327
  
......
349 349
                   +"</allow>"
350 350
                   +"</acl>";
351 351
     MetaCatUtil.debugMessage("xml document: "+content, 55);
352
     assert(handleXMLDocument(content, name, "update"));
352
     assertTrue(handleXMLDocument(content, name, "update"));
353 353
   
354 354
  }
355 355
  
......
364 364
    MetaCatUtil.debugMessage("insert data file ", 55);
365 365
    File hello = new File("test/edu/ucsb/nceas/metacatnettest/hello.txt");
366 366
   
367
    assert(insertDataFile(name, hello));
367
    assertTrue(insertDataFile(name, hello));
368 368
  }
369 369
  
370 370
  /**
......
375 375
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
376 376
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"2";
377 377
    MetaCatUtil.debugMessage("delete docid: "+name, 20);
378
    assert(handleDeleteFile(name));
378
    assertTrue(handleDeleteFile(name));
379 379
   
380 380
  }
381 381
  
......
387 387
  public void testLogOut()
388 388
  {
389 389
    
390
    assert(handleLogOut());
390
    assertTrue(handleLogOut());
391 391
   
392 392
  }
393 393
  

Also available in: Unified diff