Package at.fhj.itm.business

Examples of at.fhj.itm.business.ServiceException


    //SetUp input data
    String email = "email";
    String phonenumber = "phonenumber";
   
    //SetUp mocks
    EasyMock.expect(mockServiceUser.recoverUserPassword(email, phonenumber)).andThrow(new ServiceException("ServiceException"));
    EasyMock.replay(mockServiceUser);
   
    //Do Test
    ForgotPassword forgotPassword = new ForgotPassword();
    forgotPassword.setEmail(email);
View Full Code Here


    HashMap<String, String> map = new HashMap<String, String>();
    map.put("sessId", "sessId");
   
    //SetUp mocks
    EasyMock.expect(mockJsfUtil.getRequestParameterMap()).andReturn(map);
    EasyMock.expect(mockServiceUser.setPassword(newPassword, "sessId")).andThrow(new ServiceException("ServiceExeption"));
    EasyMock.replay(mockJsfUtil);
    EasyMock.replay(mockServiceUser);
   
    //Do Test
    ForgotPassword forgotPassword = new ForgotPassword();
View Full Code Here

  public void testLoginButtonClickedServiceException() {
    // Configure
    EasyMock.expect(
        mockServiceUser.doLogin(mockUser.getEmail(),
            mockUser.getPassword())).andThrow(
        new ServiceException(""));

    EasyMock.replay(mockServiceUser);

    // Run Test
    Login login = new Login();
View Full Code Here

  @Test
  public void testRegButtonClickedServiceException() {
      EasyMock.expect(mockServiceUser.doRegistration(mockUser.getFirstName(), mockUser.getLastName(),
        mockUser.getUsername(), mockUser.getPassword(), mockUser.getEmail(),
        mockUser.getPhone(), (int) mockLocation.getZip(), mockLocation.getCity()))
        .andThrow(new ServiceException("DatabaseError"));
      EasyMock.replay(mockServiceUser);
   
      Registration registration = new Registration();
      registration.setfName(mockUser.getFirstName());
      registration.setlName(mockUser.getLastName());
View Full Code Here

TOP

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

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.