use of uk.ac.bbsrc.tgac.miso.core.data.Stain in project miso-lims by miso-lims.
the class HibernateStainDaoIT method testGetByName.
@Test
public void testGetByName() throws IOException {
String name = "Stain One";
Stain stain = sut.getByName(name);
assertNotNull(stain);
assertEquals(name, stain.getName());
}
use of uk.ac.bbsrc.tgac.miso.core.data.Stain in project miso-lims by miso-lims.
the class HibernateStainDaoIT method testUpdate.
@Test
public void testUpdate() throws IOException {
long id = 1L;
String name = "New Name";
Stain stain = (Stain) getSessionFactory().getCurrentSession().get(Stain.class, id);
assertNotEquals(name, stain.getName());
stain.setName(name);
sut.update(stain);
clearSession();
Stain saved = (Stain) getSessionFactory().getCurrentSession().get(Stain.class, id);
assertEquals(name, saved.getName());
}
use of uk.ac.bbsrc.tgac.miso.core.data.Stain in project miso-lims by miso-lims.
the class HibernateStainDaoIT method testGetUsage.
@Test
public void testGetUsage() throws IOException {
Stain stain = (Stain) getSessionFactory().getCurrentSession().get(Stain.class, 1L);
assertEquals("Stain One", stain.getName());
assertEquals(0L, sut.getUsage(stain));
}
Aggregations