use of uk.ac.bbsrc.tgac.miso.core.data.BoxUse in project miso-lims by miso-lims.
the class Dtos method to.
public static BoxUse to(@Nonnull BoxUseDto from) {
BoxUse to = new BoxUse();
setLong(to::setId, from.getId(), false);
setString(to::setAlias, from.getAlias());
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.BoxUse in project miso-lims by miso-lims.
the class BoxRestControllerTest method makeEmptyBox.
private Box makeEmptyBox() {
Box box = new BoxImpl();
box.setId(1L);
box.setAlias("box");
BoxSize size = new BoxSize();
size.setRows(8);
size.setColumns(12);
box.setSize(size);
BoxUse use = new BoxUse();
use.setAlias("use");
box.setUse(use);
box.setLocationBarcode("freezer");
User user = new UserImpl();
user.setId(1L);
box.setLastModifier(user);
return box;
}
use of uk.ac.bbsrc.tgac.miso.core.data.BoxUse in project miso-lims by miso-lims.
the class HibernateBoxUseDaoIT method testGet.
@Test
public void testGet() throws IOException {
long id = 1L;
BoxUse stain = sut.get(id);
assertNotNull(stain);
assertEquals(id, stain.getId());
}
use of uk.ac.bbsrc.tgac.miso.core.data.BoxUse in project miso-lims by miso-lims.
the class HibernateBoxUseDaoIT method testGetByAlias.
@Test
public void testGetByAlias() throws IOException {
String alias = "boxuse2";
BoxUse boxUse = sut.getByAlias(alias);
assertNotNull(boxUse);
assertEquals(alias, boxUse.getAlias());
}
use of uk.ac.bbsrc.tgac.miso.core.data.BoxUse in project miso-lims by miso-lims.
the class HibernateBoxUseDaoIT method testCreate.
@Test
public void testCreate() throws IOException {
String alias = "New BoxUse";
BoxUse boxUse = new BoxUse();
boxUse.setAlias(alias);
long savedId = sut.create(boxUse);
clearSession();
BoxUse saved = (BoxUse) getSessionFactory().getCurrentSession().get(BoxUse.class, savedId);
assertEquals(alias, saved.getAlias());
}
Aggregations