use of uk.ac.bbsrc.tgac.miso.core.data.SampleType in project miso-lims by miso-lims.
the class HibernateSampleTypeDaoIT method testUpdate.
@Test
public void testUpdate() throws IOException {
long typeId = 1L;
String newName = "New Name";
SampleType st = (SampleType) getSessionFactory().getCurrentSession().get(SampleType.class, typeId);
assertNotEquals(newName, st.getName());
st.setName(newName);
assertEquals(typeId, sut.update(st));
clearSession();
SampleType saved = (SampleType) getSessionFactory().getCurrentSession().get(SampleType.class, typeId);
assertEquals(newName, saved.getName());
}
use of uk.ac.bbsrc.tgac.miso.core.data.SampleType in project miso-lims by miso-lims.
the class HibernateSampleTypeDaoIT method testGet.
@Test
public void testGet() throws IOException {
long typeId = 1L;
SampleType st = sut.get(typeId);
assertNotNull(st);
assertEquals(typeId, st.getId());
}
use of uk.ac.bbsrc.tgac.miso.core.data.SampleType in project miso-lims by miso-lims.
the class HibernateSampleTypeDaoIT method testGetByName.
@Test
public void testGetByName() throws IOException {
SampleType st = sut.getByName("GENOMIC");
assertNotNull(st);
assertEquals("GENOMIC", st.getName());
}
Aggregations