public void testExperimentNameUnique(){
TestbedManager manager = TestbedManagerImpl.getInstance();
BasicProperties props = new BasicPropertiesImpl();
ExperimentSetup expSetup = new ExperimentSetupImpl();
Experiment exp1 = new ExperimentImpl();
//Test1:
long expID = manager.registerExperiment(exp1);
exp1 = manager.getExperiment(expID);
String sTestname= "TestName12334234445";
boolean bUnique = manager.isExperimentNameUnique(sTestname);
//check if the two methods deliver the same results
assertEquals(bUnique, props.checkExperimentNameUnique(sTestname));
try {
props.setExperimentName(sTestname);
} catch (InvalidInputException e) {
assertEquals(true,false);
}
assertEquals(sTestname,props.getExperimentName());
expSetup.setBasicProperties(props);
exp1.setExperimentSetup(expSetup);
manager.updateExperiment(exp1);
assertEquals(false, props.checkExperimentNameUnique(sTestname));
assertEquals(false, manager.isExperimentNameUnique(sTestname));