@Test @ExpectedException(java.lang.AssertionError.class) public void testFieldStaffByInvalidCode() { @SuppressWarnings("unused") final FieldStaff fs = repo.findByCode(DOES_NOT_EXIST); fail("Didn't throw ExpectedException"); }
/** Test method for {@link org.spc.ofp.observer.domain.FieldStaffRepository#allFieldStaff()}. */ @Test public void testAllFieldStaff() { final List<FieldStaff> staffList = repo.allFieldStaff(); assertNotNull(staffList); assertFalse(staffList.isEmpty()); }
/** * Test method for {@link * org.spc.ofp.observer.domain.FieldStaffRepository#findByCode(java.lang.String)}. */ @Test public void testFindByCode() { final FieldStaff fs = repo.findByCode(DOES_EXIST); assertNotNull(fs); assertEquals(DOES_EXIST, fs.getStaffCode()); }