@Test public void testCreate() { UnitOfMeasure created = new UnitOfMeasure(); created.setUnitType("test"); UnitOfMeasure actual = repository.save(created); assertNotNull("create did not work", actual); assertNotNull("couldn't generate id", actual.getId()); assertEquals("Common name is correct", "test", actual.getUnitType()); }
@Test public void testFindById() { UnitOfMeasure actual = repository.findOne(1L); assertNotNull("did not find expected entity", actual); assertEquals((double) 1L, (double) actual.getId(), 0L); }