Example #1
0
 @Test
 public void testTime() {
   assertTrue(validEntry.getTime() != null);
   assertTrue(validEntry.getTime().compareTo(new GregorianCalendar()) <= 0);
   GregorianCalendar date = new GregorianCalendar(2009, 8, 10);
   validEntry.setTime(date);
   assertEquals(date, validEntry.getTime());
 }
Example #2
0
  @Test
  public void testToString() {
    validEntry.setValue("Value");
    validEntry.setUsername("username");
    validEntry.setClazz(TrialSite.class);
    validEntry.setAction(ActionType.LOGIN);
    validEntry.setIdentifier(1000);
    assertNotNull(validEntry.toString());
    assertTrue(validEntry.toString().length() > 0);

    validEntry = new LogEntry();
    validEntry.setUsername("username");
    validEntry.setAction(ActionType.LOGIN);
    assertNotNull(validEntry.toString());
    assertTrue(validEntry.toString().length() > 0);
  }
Example #3
0
 @Test
 public void testValue() {
   assertTrue(validEntry.getValue() == null);
   validEntry.setValue("Value");
   assertEquals("Value", validEntry.getValue());
 }
Example #4
0
 @Test
 public void testUsername() {
   assertTrue(validEntry.getUsername() == null);
   validEntry.setUsername("username");
   assertEquals("username", validEntry.getUsername());
 }
Example #5
0
 @Test
 public void testClass() {
   assertTrue(validEntry.getClazz() == null);
   validEntry.setClazz(TrialSite.class);
   assertEquals(TrialSite.class, validEntry.getClazz());
 }
Example #6
0
 @Test
 public void testAction() {
   assertTrue(validEntry.getAction() == null);
   validEntry.setAction(ActionType.LOGIN);
   assertEquals(ActionType.LOGIN, validEntry.getAction());
 }
Example #7
0
 @Test
 public void testIdentifier() {
   assertTrue(validEntry.getIdentifier() <= 0);
   validEntry.setIdentifier(1000);
   assertTrue(validEntry.getIdentifier() == 1000);
 }