Show FSRobotTest.java syntax highlighted
/*
* Created on 19/05/2004
*
*/
package com.kneobase.driver.fs;
import junit.framework.TestCase;
import com.kneobase.*;
import com.kneobase.driver.Robot;
import com.kneobase.driver.SourceConfiguration;
import com.kneobase.server.I_IndexConstants;
import com.kneobase.server.IndexSessionAux;
/**
* @author Ernesto De Santis
*
*/
public class FSRobotTest extends TestCase {
private static final String TESTFOLDER = "testfolder";
private IndexSessionAux indexSession;
public void doIndex(){
try{
indexSession = new IndexSessionAux();
Robot robot = new Robot();
SourceConfiguration configuration = new SourceConfiguration(FSTests.CONFIGURATIONPATH);
robot.setConfiguration(configuration);
indexSession.setRobot(robot);
indexSession.doIndex();
}catch(Exception e){
fail();
}
}
public void testIterator(){
this.doIndex();
while(!indexSession.getStatus().equals(I_IndexConstants.INDEXATION_RUNNING)){
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
fail();
}
}
assertTrue(0 != indexSession.getContentsIndexed());
assertTrue(0 != indexSession.getContentsProcessed());
assertTrue(0 == indexSession.getContentsSkipped());
assertEquals(indexSession.getStatus(), I_IndexConstants.INDEXATION_FINISHOK);
}
}
See more files for this project here