use of ubic.gemma.web.remote.EntityDelegator in project Gemma by PavlidisLab.
the class ExperimentalDesignControllerTest method testCreateExperimentalFactor.
@Test
public void testCreateExperimentalFactor() throws Exception {
ExpressionExperiment ee = this.getTestPersistentCompleteExpressionExperiment(false);
ee = this.eeService.thawLite(ee);
ExperimentalFactorValueObject evvo = new ExperimentalFactorValueObject(-1L);
evvo.setCategory("foo");
experimentalDesignController.createExperimentalFactor(new EntityDelegator(ee.getExperimentalDesign()), evvo);
}
use of ubic.gemma.web.remote.EntityDelegator in project Gemma by PavlidisLab.
the class ExperimentalDesignControllerTest method testAddCharacteristicToFactorValue.
@Test
public void testAddCharacteristicToFactorValue() throws Exception {
ExpressionExperiment ee = this.getTestPersistentCompleteExpressionExperiment(false);
ee = this.eeService.thawLite(ee);
ExperimentalFactor ef = ee.getExperimentalDesign().getExperimentalFactors().iterator().next();
EntityDelegator e = new EntityDelegator(ef.getFactorValues().iterator().next());
VocabCharacteristic vc = VocabCharacteristic.Factory.newInstance();
vc.setValue("foo");
vc.setCategory("bar");
vc.setCategoryUri("bar");
vc.setValueUri("foo");
experimentalDesignController.createFactorValueCharacteristic(e, vc);
assertEquals(2, ef.getFactorValues().size());
// new empty
experimentalDesignController.createFactorValue(new EntityDelegator(ef));
experimentalDesignController.createFactorValue(new EntityDelegator(ef));
experimentalDesignController.createFactorValue(new EntityDelegator(ef));
ef = experimentalFactorService.load(ef.getId());
assertEquals(5, ef.getFactorValues().size());
}
Aggregations