Project

General

Profile

« Previous | Next » 

Revision 3562

Added by Jing Tao about 17 years ago

delete some duplicated test to MetacatClientTest

View differences:

test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java
107 107
    
108 108
    TestSuite suite = new TestSuite();
109 109
    suite.addTest(new MetaCatServletNetTest("initialize"));
110
    suite.addTest(new MetaCatServletNetTest("testLterReferralLogin"));
111
    suite.addTest(new MetaCatServletNetTest("testLterReferralLoginFail"));
112
    suite.addTest(new MetaCatServletNetTest("testPiscoReferralLogin"));
113
    suite.addTest(new MetaCatServletNetTest("testPiscoReferralLoginFail"));
114 110
    suite.addTest(new MetaCatServletNetTest("testNCEASLoginFail"));
115 111
    //Should put a login successfully at the end of login test
116 112
    //So insert or update can have cookie.
......
144 140
    //insert data file  
145 141
    number = Math.random()*100000;
146 142
    serial = Integer.toString(((new Double(number)).intValue()));
147
    suite.addTest(new MetaCatServletNetTest("testInertDataFile", serial));
148
    
149 143
    suite.addTest(new MetaCatServletNetTest("testLogOut"));                   
150 144
                              
151 145
    return suite;
......
184 178
    
185 179
  }
186 180
  
187
  /**
188
   * Test the login to lter succesfully
189
   */
190
  public void testLterReferralLogin()
191
  {
192
    String user="uid=jtao,o=LTER,dc=ecoinformatics,dc=org";
193
    String passwd="qVyGpVeb";
194
    assertTrue(logIn(user,passwd));
195
    
196
  }
181

  
197 182
  
198 183
  /**
199 184
   * Test the login to lter failed
......
206 191
    //assertTrue( withProtocol.getProtocol().equals("http"));
207 192
  }
208 193
  
209
 /**
210
   * Test the login to pisco succesfully
211
   */
212
   public void testPiscoReferralLogin()
213
  {
214
    String user="uid=tao,o=PISCO,dc=ecoinformatics,dc=org";
215
    String passwd="purple";
216
    assertTrue(logIn(user,passwd));
217
    //assertTrue( withProtocol.getProtocol().equals("http"));
218
  }
219 194
  
220 195
 /**
221
   * Test the login to pisco failed
222
   */
223
  public void testPiscoReferralLoginFail()
224
  {
225
    String user="uid=tao,o=PISCO,dc=ecoinformatics,dc=org";
226
    String passwd="hello";
227
    assertTrue(!logIn(user,passwd));
228
    //assertTrue( withProtocol.getProtocol().equals("http"));
229
  }
230
  
231
 /**
232 196
   * Test insert a xml document successfully
233 197
   */
234 198
  public void testInsertXMLDocument()
......
377 341
                     +serialNumber+MetaCatUtil.getOption("accNumSeparator")+"1";
378 342
    logMetacat.info("insert data file docid: "+name);
379 343
    logMetacat.info("insert data file ");
380
    File hello = new File("test/edu/ucsb/nceas/metacatnettest/hello.txt");
344
    File hello = new File("test/jones.204.22.xml");
381 345
   
382 346
    assertTrue(insertDataFile(name, hello));
383 347
  }
......
612 576

  
613 577
      Properties dataStreams = new Properties();
614 578
      String filename = file.getAbsolutePath();
615
   
579
      System.out.println("the absolute path is "+filename);
616 580
      dataStreams.put("datafile", filename);
617 581
       
618 582
  

Also available in: Unified diff