Search in sources :

Example 6 with Stain

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());
}
Also used : Stain(uk.ac.bbsrc.tgac.miso.core.data.Stain) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 7 with Stain

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());
}
Also used : Stain(uk.ac.bbsrc.tgac.miso.core.data.Stain) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 8 with Stain

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));
}
Also used : Stain(uk.ac.bbsrc.tgac.miso.core.data.Stain) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

Stain (uk.ac.bbsrc.tgac.miso.core.data.Stain)8 Test (org.junit.Test)5 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)5 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)2 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)2 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)2 SampleSlide (uk.ac.bbsrc.tgac.miso.core.data.SampleSlide)2 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)2 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)2 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)2 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)2 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)2 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)2 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)2 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)2 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)2 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)2 DetailedSample (uk.ac.bbsrc.tgac.miso.core.data.DetailedSample)1 Sample (uk.ac.bbsrc.tgac.miso.core.data.Sample)1 SampleAliquot (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot)1