コード例 #1
0
 @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());
 }
コード例 #2
0
 @Test
 public void testFindById() {
   UnitOfMeasure actual = repository.findOne(1L);
   assertNotNull("did not find expected entity", actual);
   assertEquals((double) 1L, (double) actual.getId(), 0L);
 }