示例#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);
  }