Package info.galleria.domain

Examples of info.galleria.domain.User


 
  @Test
  public void testFindAllUsers() throws Exception
  {
    //Setup
    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    em.persist(user);
   
    String secondUserId = "TEST_USER #2";
    char[] secondUserPassword = "NEWPASSWORD".toCharArray();
    User secondUser = new User(secondUserId, secondUserPassword);
    em.persist(secondUser);
   
    em.flush();
    em.clear();
   
View Full Code Here


 
  @Test
  public void testModifyGroupAddUser() throws Exception
  {
    //Setup
    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    em.persist(user);
   
    Group group = new Group(TEST_GROUP_ID);
    em.persist(group);
   
View Full Code Here

  @Test
  public final void testCreateUserWithNullValues() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());
    User user = new User(null, null);
    try
    {
      userService.signupUser(user);
    }
    catch (UserException userEx)
View Full Code Here

  public final void testCreateUserWithEmptyValues() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());
    try
    {
      User user = new User("", "".toCharArray());
      userService.signupUser(user);
    }
    catch (UserException userEx)
    {
      assertNotNull(userEx.getViolations());
View Full Code Here

    char[] userId = new char[1000];
    Arrays.fill(userId, '0');

    try
    {
      User user = new User(new String(userId), TEST_PASSWORD);
      userService.signupUser(user);
    }
    catch (UserException userEx)
    {
      assertNotNull(userEx.getViolations());
View Full Code Here

  @Test
  public final void testCreateUser() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());
    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    User actualUser = userService.signupUser(user);
    assertTrue(actualUser != null);
    assertEquals(TEST_USER_ID, actualUser.getUserId());
    assertFalse(Arrays.equals(TEST_PASSWORD, actualUser.getPassword()));
    logger.info("Finished executing test method {}", testMethod.getMethodName());
  }
View Full Code Here

  @Test(expected = UserException.class)
  public final void testCreateDuplicateUser() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());

    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    User actualUser = userService.signupUser(user);
    assertTrue(actualUser != null);

    User duplicateUser = new User(TEST_USER_ID, TEST_PASSWORD);
    userService.signupUser(duplicateUser);
    fail("The execution control flow must not arrive here.");

    logger.info("Finished executing test method {}", testMethod.getMethodName());
  }
View Full Code Here

  @Test
  public final void testRemoveUser() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());
    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    userService.signupUser(user);

    ProgrammaticLogin login = new ProgrammaticLogin();
    login.login(TEST_USER_ID, TEST_PASSWORD, "GalleriaRealm", true);
    userService = (UserService) context.lookup("java:global/galleria/galleria-ejb/UserService");
View Full Code Here

  @Test(expected = SecurityException.class)
  public final void testRemoveNonexistentUser() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());
    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    userService.signupUser(user);

    ProgrammaticLogin login = new ProgrammaticLogin();
    login.login("User #2", TEST_PASSWORD, "GalleriaRealm", true);
    fail("The execution control flow must not arrive here.");
View Full Code Here

  @Test(expected = UserException.class)
  public final void testRemoveDeletedUser() throws Exception
  {
    logger.info("About to execute test method {}", testMethod.getMethodName());
    User user = new User(TEST_USER_ID, TEST_PASSWORD);
    userService.signupUser(user);

    ProgrammaticLogin login = new ProgrammaticLogin();
    login.login(TEST_USER_ID, TEST_PASSWORD, "GalleriaRealm", true);
    userService = (UserService) context.lookup("java:global/galleria/galleria-ejb/UserService");
View Full Code Here

TOP

Related Classes of info.galleria.domain.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.