Package at.fhj.itm.business

Examples of at.fhj.itm.business.ServiceUserImpl


    mockJsfUtil.userLoggedIn(mockUser);
    EasyMock.expectLastCall();
    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);
    User user = serviceUser.doLogin(email, password);

    // Verify:
    long now = System.currentTimeMillis();
    long actualTime = user.getLastLoginDate().getTime();
    // the time set was prior now
View Full Code Here


    mockCloseConnection();

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    try {
      serviceUser.doLogin(email, password);
      Assert.fail("ServiceException didn't occure");
    } catch (ServiceException e) {
    }
    verifyMocks();
  }
View Full Code Here

    mockCloseConnection();

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    try {
      serviceUser.doLogin(email, password);
      Assert.fail("ServiceException didn't occure");
    } catch (ServiceException e) {
    }
    verifyMocks();
  }
View Full Code Here

    mockCloseConnection();

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);
    User nullUser = serviceUser.doLogin(email, password);

    // Verify:
    Assert.assertNull(nullUser);
    verifyMocks();
  }
View Full Code Here

    // Setup Mocks:
    mockBeginNoConnection();
    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    try {
      serviceUser.doLogin(email, password);
      Assert.fail("ServiceException didn't occure");
    } catch (ServiceException e) {
    }
    verifyMocks();
  }
View Full Code Here

    EasyMock.expectLastCall();

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    serviceUser.doLogin(email, password);
    // if the last login date is off, just log. no critical error.

    verifyMocks();
  }
View Full Code Here

    EasyMock.expectLastCall();

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    serviceUser.doLogin(email, password);
    verifyMocks();
  }
View Full Code Here

    mockJsfUtil.userLoggedOut();
    EasyMock.expectLastCall();
    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);
    serviceUser.doLogout(mockUser);

    // Verify:
    verifyMocks();
  }
View Full Code Here

    EasyMock.expect(this.mockRandUtil.getRandSessionID()).andReturn("djfdkfjreiru");

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    Assert.assertTrue(!mockUser.getSessionID().equals(
        serviceUser.recoverUserPassword(email, phone)));
    verifyMocks();
  }
View Full Code Here

    mockBeginNoConnection();

    replayMocks();

    // Do Test:
    ServiceUser serviceUser = new ServiceUserImpl(mockUserDao,
        mockDataSource, mockJsfUtil, mockRandUtil, mockMailUtil);

    // Verify:
    try {
      serviceUser.recoverUserPassword(email, phone);
      Assert.fail("ServiceException didn't occure");
    } catch (ServiceException e) {
    }
    verifyMocks();
  }
View Full Code Here

TOP

Related Classes of at.fhj.itm.business.ServiceUserImpl

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.