예제 #1
0
 public void testGetExternalUser() throws Exception {
   User user = dao.get(1L);
   assertTrue("External field was not populated correctly.", !user.isExternal());
   assertTrue(!user.isHasProfile());
   user = dao.get(5L);
   assertTrue("External field was not populated.", user.isExternal());
   assertTrue(!user.isHasProfile());
 }
예제 #2
0
  public void testGetUser() throws Exception {
    User user = dao.get(1L);

    assertNotNull(user);
    assertEquals(1, user.getRoles().size());
    assertTrue(user.isEnabled());
    assertNotNull(user.getAccount());
    assertEquals(1L, (long) user.getAccount().getId());
    assertEquals("Tek42", user.getAccount().getName());
    assertEquals("US/Eastern", user.getTimeZone());
    assertTrue(!user.isHasProfile());
    user.setAccount(adao.get(1L));

    endTransaction();

    dao.save(user);
  }
예제 #3
0
 public void testGetUserHasProfile() throws Exception {
   User user = dao.get(2L);
   assertNotNull(user);
   assertTrue(user.isHasProfile());
 }