예제 #1
0
 @Override
 public Faculty merge(Faculty entity) {
   if (entity.getID() != null) {
     return facultyRepository.save(entity);
   }
   return null;
 }
예제 #2
0
  @Test
  public void testUpdate() throws Exception {
    Faculty fac = new Faculty.Builder().FacultyID(101).Name("Informatics And Design").build();

    Assert.assertEquals(fac.getName(), "Informatics And Design");
  }
예제 #3
0
  // TODO add test methods here.
  // The methods must be annotated with annotation @Test. For example:
  //
  @Test
  public void testCreation() throws Exception {
    Faculty fac = new Faculty.Builder().FacultyID(101).Name("ND: Information Technology").build();

    Assert.assertEquals(fac.getFacultyID(), 101);
  }