Search in sources :

Example 6 with SampleType

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

Example 7 with SampleType

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

Example 8 with SampleType

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

Aggregations

SampleType (uk.ac.bbsrc.tgac.miso.core.data.SampleType)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 SampleClass (uk.ac.bbsrc.tgac.miso.core.data.SampleClass)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 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1