コード例 #1
0
 @Test
 public void testSave() {
   SimpleStudentRepository smRepository = new SimpleStudentRepository();
   Student s1 = new Student();
   s1.setNumber(20);
   s1.setFirstName("Upeksha");
   s1.setLastName("Dimuthu");
   s1.setAddress("Home");
   smRepository.save(s1);
   Student s2 = smRepository.find(20);
   assertEquals("Errorrr ", s1.getNumber(), s2.getNumber());
   assertEquals("Errorrr ", s1.getFirstName(), s2.getFirstName());
   assertEquals("Errorrr ", s1.getLastName(), s2.getLastName());
   assertEquals("Errorrr ", s1.getAddress(), s2.getAddress());
 }