Package ch.bfh.swos.gandalf.model

Examples of ch.bfh.swos.gandalf.model.Student


  @Inject
  private StudentDao studentDao;

  @Test
  public void test() {
    Student student = studentDao.create();
    student.setName("Müller");
    student.setPrename("Hugo");
    student.setLogin("hm");
    student.setPassword("123456");

    List<StudentModule> listSM = new ArrayList<StudentModule>();
    listSM.add(new StudentModule());
    listSM.add(new StudentModule());
    student.setStudentModules(listSM);

    Student managedStudent = studentDao.update(student);
    Student foundStudent = studentDao.read(managedStudent.getId());
    Assert.assertTrue(student.getPrename()
        .equals(foundStudent.getPrename()));
    Assert.assertTrue(student.getPassword().equals(
        foundStudent.getPassword()));
    Assert.assertTrue(student.getLogin().equals(foundStudent.getLogin()));
    foundStudent.getLogin();
    foundStudent.getPrename();
    foundStudent.getPassword();
    studentDao.delete(foundStudent);
  }
View Full Code Here


  @PersistenceContext
  protected EntityManager em;

  public Student create() {
    // TODO Auto-generated method stub
    return new Student();
  }
View Full Code Here

TOP

Related Classes of ch.bfh.swos.gandalf.model.Student

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.