agent2ID = createAssuranceUser("a", "d", createUniqueName() + "@example.com", TEST_PASSWORD);
applicantID = createVerifiedUser("a", "c", createUniqueName() + "@example.com", TEST_PASSWORD);
applicant = User.getById(applicantID);
agent2ID = createAssuranceUser("a", "d", createUniqueName() + "@example.com", TEST_PASSWORD);
applicantID = createVerifiedUser("a", "c", createUniqueName() + "@example.com", TEST_PASSWORD);
applicant = User.getById(applicantID);
applicantMultID = createVerifiedUser("a", "e", createUniqueName() + "@example.com", TEST_PASSWORD);
}
@Test
public void testVerificationYesterday() throws IOException {
applicantMultID = createVerifiedUser("a", "e", createUniqueName() + "@example.com", TEST_PASSWORD);
}
@Test
public void testVerificationYesterday() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testApprox24MonthAgo() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testApprox24MonthAgo() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testApprox39MonthAgo() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testApprox39MonthAgo() throws IOException {
assertFalse(applicant.isInVerificationLimit());
}
@Test
public void testTomorrowExpired() throws IOException {
assertFalse(applicant.isInVerificationLimit());
}
@Test
public void testTomorrowExpired() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testYesterdayExpired() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testYesterdayExpired() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testDeletedYesterday() throws IOException {
assertTrue(applicant.isInVerificationLimit());
}
@Test
public void testDeletedYesterday() throws IOException {
assertFalse(applicant.isInVerificationLimit());
}
@Test
public void testMultipleAssurancePossible() throws IOException {
assertFalse(applicant.isInVerificationLimit());
}
@Test
public void testMultipleAssurancePossible() throws IOException {
assertEquals(applicantMult.getAssurancePoints(), 10);
// enter second entry to check correct calculation with larger points
assertEquals(applicantMult.getAssurancePoints(), 10);
// enter second entry to check correct calculation with larger points
- enterAssuranceWhen(agentID, applicantMultID, min24month, 20);
+ enterAssuranceWhen(agentID, applicantMult.getPreferredName().getId(), min24month, 20);
assertEquals(applicantMult.getAssurancePoints(), 20);
// test correct XP calculation
assertEquals(agent.getExperiencePoints(), xPoints);
// enter third entry to check correct calculation with less points
assertEquals(applicantMult.getAssurancePoints(), 20);
// test correct XP calculation
assertEquals(agent.getExperiencePoints(), xPoints);
// enter third entry to check correct calculation with less points
- enterAssuranceWhen(agentID, applicantMultID, yesterday, 15);
+ enterAssuranceWhen(agentID, applicantMult.getPreferredName().getId(), yesterday, 15);
assertEquals(applicantMult.getAssurancePoints(), 15);
// test correct XP calculation
assertEquals(agent.getExperiencePoints(), xPoints);
// enter expired entry
assertEquals(applicantMult.getAssurancePoints(), 15);
// test correct XP calculation
assertEquals(agent.getExperiencePoints(), xPoints);
// enter expired entry
assertEquals(applicantMult.getAssurancePoints(), 15);
// enter deleted entry same agent
assertEquals(applicantMult.getAssurancePoints(), 15);
// enter deleted entry same agent
assertEquals(applicantMult.getAssurancePoints(), 15);
// enter expired entry future
assertEquals(applicantMult.getAssurancePoints(), 15);
// enter expired entry future
assertEquals(applicantMult.getAssurancePoints(), 10);
// test correct XP calculation
assertEquals(agent.getExperiencePoints(), xPoints);
// enter entry from different agent
assertEquals(applicantMult.getAssurancePoints(), 10);
// test correct XP calculation
assertEquals(agent.getExperiencePoints(), xPoints);
// enter entry from different agent
assertEquals(applicantMult.getAssurancePoints(), 20);
// enter entry for second applicant
assertEquals(applicantMult.getAssurancePoints(), 20);
// enter entry for second applicant