use of uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus in project miso-lims by miso-lims.
the class Dtos method to.
public static DetailedQcStatus to(@Nonnull DetailedQcStatusDto from) {
DetailedQcStatus to = new DetailedQcStatusImpl();
setLong(to::setId, from.getId(), false);
setBoolean(to::setStatus, from.getStatus(), true);
setString(to::setDescription, from.getDescription());
setBoolean(to::setNoteRequired, from.isNoteRequired(), false);
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus in project miso-lims by miso-lims.
the class HibernateDetailedQcStatusDaoIT method testGetUsageByLibraryAliquots.
@Test
public void testGetUsageByLibraryAliquots() throws IOException {
DetailedQcStatus status = (DetailedQcStatus) getSessionFactory().getCurrentSession().get(DetailedQcStatusImpl.class, 1L);
assertEquals("Passed", status.getDescription());
assertEquals(0L, sut.getUsageByLibraryAliquots(status));
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus in project miso-lims by miso-lims.
the class HibernateDetailedQcStatusDaoIT method testGetUsageBySamples.
@Test
public void testGetUsageBySamples() throws IOException {
DetailedQcStatus status = (DetailedQcStatus) getSessionFactory().getCurrentSession().get(DetailedQcStatusImpl.class, 1L);
assertEquals("Passed", status.getDescription());
assertEquals(24L, sut.getUsageBySamples(status));
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus in project miso-lims by miso-lims.
the class HibernateDetailedQcStatusDaoIT method testCreate.
@Test
public void testCreate() throws IOException {
String desc = "Unknown";
DetailedQcStatus status = new DetailedQcStatusImpl();
status.setDescription(desc);
status.setStatus(null);
status.setNoteRequired(true);
User user = (User) getSessionFactory().getCurrentSession().get(UserImpl.class, 1L);
status.setChangeDetails(user);
long savedId = sut.create(status);
clearSession();
DetailedQcStatus saved = (DetailedQcStatus) getSessionFactory().getCurrentSession().get(DetailedQcStatusImpl.class, savedId);
assertEquals(desc, saved.getDescription());
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus in project miso-lims by miso-lims.
the class HibernateDetailedQcStatusDaoIT method testGet.
@Test
public void testGet() throws IOException {
long id = 1L;
DetailedQcStatus status = sut.get(id);
assertNotNull(status);
assertEquals(id, status.getId());
}
Aggregations