예제 #1
0
 @Test
 public void testCreatingMultipleEvaluations() {
   Date date = new Date();
   String firstName = "Test Evaluation List #1 " + date.toString();
   String secondName = "Test Evaluation List #2 " + date.toString();
   user = populateUser();
   evaluation = factory.createEvalution();
   evaluation.setName(firstName);
   secondEvaluation = factory.createEvalution();
   secondEvaluation.setName(secondName);
   user.addEvaluation(evaluation);
   user.addEvaluation(secondEvaluation);
   service.saveUser(user);
   user = service.getUserByUserName(user.getUsername());
   assertTrue(user.getEvaluationSet().size() == 2);
 }
예제 #2
0
 @Test
 public void testCreatingEvaluation() {
   user = populateUser();
   evaluation = factory.createEvalution();
   evaluation.setName("Test Evaluation #1");
   evaluation.setUser(user);
   user.addEvaluation(evaluation);
   service.saveUser(user);
   user = service.getUserByUserName(user.getUsername());
 }