Esempio n. 1
0
 @Before
 public void init() {
   student = new Student();
   student.setName("aaaa");
   Classes c = new Classes();
   c.setClassesName("bbbbb");
   student.setClasses(c);
 }
Esempio n. 2
0
  @Test
  public void testSaveClasses() {
    assertTrue(classesDAO.count() == 0);
    Student tt = studentDAO.save(student);
    assertNotNull(tt);
    assertNotNull(tt.getClasses());
    assertEquals(tt.getClasses().getClassesName(), "bbbbb");

    classesDAO.findAll();
    assertTrue(classesDAO.count() > 0);
  }