示例#1
0
  /** Check if the state was saved successfully to the user profile. */
  @Test
  public void statesAreSaved() {
    User actual = fileUserManager.getUser("xuser");
    Question actualQuestion = actual.getState().getCurrentQuestion();
    QuestionLevel actualLevel = actual.getState().getCurrentLevel();

    assertEquals(actualQuestion, expectedQuestion);
  }
示例#2
0
 /** Check if the user was added successfully to database. */
 @Test
 public void usersAreAdded() {
   User actual = fileUserManager.getUser("xuser");
   assertEquals(actual.getName(), expectedUser.getName());
   assertEquals(actual.getId(), expectedUser.getId());
 }
示例#3
0
 /** Delete the user from the database. */
 @After
 public void usersAreDeleted() {
   fileUserManager.deleteUser("xuser");
   User testUser = fileUserManager.getUser("xuser");
   assertEquals(testUser, null);
 }