use of uk.ac.bbsrc.tgac.miso.core.data.TissueType in project miso-lims by miso-lims.
the class OicrSampleAliasGeneratorTest method makeTissueFromTissue.
private SampleTissue makeTissueFromTissue() throws Exception {
SampleTissue parent = (SampleTissue) makeFullTissue();
parent.setAlias("PROJ_0001_Bn_P_nn_1-1");
parent.setParent(makeIdentity());
SampleTissue child = new SampleTissueImpl();
SampleClass sc = new SampleClassImpl();
sc.setSampleCategory(SampleTissue.CATEGORY_NAME);
child.setSampleClass(sc);
child.setParent(parent);
child.setTimesReceived(1);
child.setTubeNumber(1);
TissueOrigin to = new TissueOriginImpl();
to.setAlias("Bn");
child.setTissueOrigin(to);
TissueType tt = new TissueTypeImpl();
tt.setAlias("O");
child.setTissueType(tt);
return child;
}
use of uk.ac.bbsrc.tgac.miso.core.data.TissueType in project miso-lims by miso-lims.
the class OicrSampleAliasGeneratorTest method makeFullTissue.
private Sample makeFullTissue() {
SampleTissue tissue = makeMinimalTissue();
TissueOrigin to = new TissueOriginImpl();
to.setAlias("Bn");
tissue.setTissueOrigin(to);
TissueType tt = new TissueTypeImpl();
tt.setAlias("P");
tissue.setTissueType(tt);
tissue.setPassageNumber(32);
tissue.setTimesReceived(2);
tissue.setTubeNumber(3);
return tissue;
}
use of uk.ac.bbsrc.tgac.miso.core.data.TissueType in project miso-lims by miso-lims.
the class OicrLibraryAliasValidatorTest method makeTissueTypes.
private static List<TissueType> makeTissueTypes() {
return makeList(new String[] { "P", "R" }, alias -> {
TissueType tt = new TissueTypeImpl();
tt.setAlias(alias);
return tt;
});
}
use of uk.ac.bbsrc.tgac.miso.core.data.TissueType in project miso-lims by miso-lims.
the class HibernateAssayTestDaoIT method getCreateItem.
@Override
public AssayTest getCreateItem() {
AssayTest test = new AssayTest();
test.setAlias("Test test");
TissueType tissueType = (TissueType) currentSession().get(TissueTypeImpl.class, 1L);
test.setTissueType(tissueType);
SampleClass extractionClass = (SampleClass) currentSession().get(SampleClassImpl.class, 3L);
test.setExtractionClass(extractionClass);
LibraryDesignCode code = (LibraryDesignCode) currentSession().get(LibraryDesignCode.class, 2L);
test.setLibraryDesignCode(code);
test.setLibraryQualificationMethod(AssayTest.LibraryQualificationMethod.LOW_DEPTH_SEQUENCING);
return test;
}
use of uk.ac.bbsrc.tgac.miso.core.data.TissueType in project miso-lims by miso-lims.
the class HibernateTissueTypeDaoIT method testUpdate.
@Test
public void testUpdate() throws IOException {
long id = 1L;
String alias = "New Name";
TissueType tt = (TissueType) getSessionFactory().getCurrentSession().get(TissueTypeImpl.class, id);
assertNotEquals(alias, tt.getAlias());
tt.setAlias(alias);
sut.update(tt);
clearSession();
TissueType saved = (TissueType) getSessionFactory().getCurrentSession().get(TissueTypeImpl.class, id);
assertEquals(alias, saved.getAlias());
}
Aggregations