Project

General

Profile

« Previous | Next » 

Revision 1505

Added by Jing Tao almost 22 years ago

Change assert to assertTrue.

View differences:

test/edu/ucsb/nceas/metacattest/MetaCatURLTest.java
94 94
   */
95 95
  public void initialize()
96 96
  {
97
    assert(1 == 1);
97
    assertTrue(1 == 1);
98 98
  }
99 99

  
100 100
  /**
......
102 102
   */
103 103
  public void testGetProtocol()
104 104
  {
105
    assert( withProtocol.getProtocol().equals("http"));
105
    assertTrue( withProtocol.getProtocol().equals("http"));
106 106
  }
107 107
  
108 108
  /**
......
110 110
   */
111 111
  public void testToString()
112 112
  {
113
    assert((withProtocol.toString()).equals(withHttp));
113
    assertTrue((withProtocol.toString()).equals(withHttp));
114 114
  }
115 115
  
116 116
  /**
......
120 120
  {
121 121
    String [] str= new String[2];
122 122
    str=withProtocol.getParam(0);
123
    assert(str[0].equals("httpurl"));
124
    assert(str[1].equals("http://dev.nceas.ucsb.edu/tao/test.txt"));
123
    assertTrue(str[0].equals("httpurl"));
124
    assertTrue(str[1].equals("http://dev.nceas.ucsb.edu/tao/test.txt"));
125 125
    str=withProtocol.getParam(1);
126
    assert(str[0].equals("filename"));
127
    assert(str[1].equals("test.txt"));
126
    assertTrue(str[0].equals("filename"));
127
    assertTrue(str[1].equals("test.txt"));
128 128
  }
129 129
  
130 130

  
test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java
141 141
   */
142 142
  public void initialize()
143 143
  {
144
    assert(1 == 1);
144
    assertTrue(1 == 1);
145 145
  }
146 146

  
147 147
  /**
......
151 151
  {
152 152
    String user="uid=john,o=NCEAS,dc=ecoinformatics,dc=org";
153 153
    String passwd="123456";
154
    assert(logIn(user,passwd));
155
    //assert( withProtocol.getProtocol().equals("http"));
154
    assertTrue(logIn(user,passwd));
155
    //assertTrue( withProtocol.getProtocol().equals("http"));
156 156
  }
157 157
  
158 158
  /**
......
162 162
  {
163 163
    String user="uid=john,o=NCEAS,dc=ecoinformatics,dc=org";
164 164
    String passwd="12345678";
165
    assert(!logIn(user,passwd));
165
    assertTrue(!logIn(user,passwd));
166 166
    
167 167
  }
168 168
  
......
173 173
  {
174 174
    String user="uid=jtao,o=LTER,dc=ecoinformatics,dc=org";
175 175
    String passwd="qVyGpVeb";
176
    assert(logIn(user,passwd));
176
    assertTrue(logIn(user,passwd));
177 177
    
178 178
  }
179 179
  
......
184 184
  {
185 185
    String user="uid=jtao,o=LTER,dc=ecoinformatics,dc=org";
186 186
    String passwd="qVyGpveb";
187
    assert(!logIn(user,passwd));
188
    //assert( withProtocol.getProtocol().equals("http"));
187
    assertTrue(!logIn(user,passwd));
188
    //assertTrue( withProtocol.getProtocol().equals("http"));
189 189
  }
190 190
  
191 191
 /**
......
195 195
  {
196 196
    String user="uid=tao,o=PISCO,dc=ecoinformatics,dc=org";
197 197
    String passwd="purple";
198
    assert(logIn(user,passwd));
199
    //assert( withProtocol.getProtocol().equals("http"));
198
    assertTrue(logIn(user,passwd));
199
    //assertTrue( withProtocol.getProtocol().equals("http"));
200 200
  }
201 201
  
202 202
 /**
......
206 206
  {
207 207
    String user="uid=tao,o=PISCO,dc=ecoinformatics,dc=org";
208 208
    String passwd="hello";
209
    assert(!logIn(user,passwd));
210
    //assert( withProtocol.getProtocol().equals("http"));
209
    assertTrue(!logIn(user,passwd));
210
    //assertTrue( withProtocol.getProtocol().equals("http"));
211 211
  }
212 212
  
213 213
 /**
......
234 234
                   +"</allow>"
235 235
                   +"</acl>";
236 236
     MetaCatUtil.debugMessage("xml document: "+content, 55);
237
     assert(handleXMLDocument(content, name, "insert"));
237
     assertTrue(handleXMLDocument(content, name, "insert"));
238 238
   
239 239
  }
240 240
  
......
260 260
                   +"</allow>"
261 261
                   +"</acl>";
262 262
     MetaCatUtil.debugMessage("xml document: "+content, 55);
263
     assert(handleXMLDocument(content, name, "insert"));
263
     assertTrue(handleXMLDocument(content, name, "insert"));
264 264
  }
265 265
  
266 266
   /**
......
285 285
                   +"</allow>";
286 286
  
287 287
     MetaCatUtil.debugMessage("xml document: "+content, 55);
288
     assert(!handleXMLDocument(content, name, "insert"));
288
     assertTrue(!handleXMLDocument(content, name, "insert"));
289 289
  } 
290 290

  
291 291
  /**
......
295 295
  {
296 296
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
297 297
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1";
298
    assert(handleReadAction(name, "xml"));
298
    assertTrue(handleReadAction(name, "xml"));
299 299
   
300 300
  } 
301 301

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

  
......
318 318
  {
319 319
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
320 320
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1";
321
    assert(handleReadAction(name, "zip"));
321
    assertTrue(handleReadAction(name, "zip"));
322 322
   
323 323
  }
324 324
  
......
346 346
                   +"</allow>"
347 347
                   +"</acl>";
348 348
     MetaCatUtil.debugMessage("xml document: "+content, 55);
349
     assert(handleXMLDocument(content, name, "update"));
349
     assertTrue(handleXMLDocument(content, name, "update"));
350 350
   
351 351
  }
352 352
  
......
358 358
    String name = "john"+MetaCatUtil.getOption("accNumSeparator")
359 359
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"2";
360 360
    MetaCatUtil.debugMessage("delete docid: "+name, 20);
361
    assert(handleDeleteFile(name));
361
    assertTrue(handleDeleteFile(name));
362 362
   
363 363
  }
364 364
       
......
368 368
  public void testLogOut()
369 369
  {
370 370
    
371
    assert(handleLogOut());
371
    assertTrue(handleLogOut());
372 372
   
373 373
  }
374 374
  

Also available in: Unified diff