Package org.jtalks.jcommune.service.exceptions

Examples of org.jtalks.jcommune.service.exceptions.UserTriesActivatingAccountAgainException


    public void testActivateAccountAgain() throws Exception {

        JCUser user = new JCUser("username", "password", null);
        user.setEnabled(true);
        when(userService.getByUuid(USER_NAME)).thenReturn(user);
        doThrow(new UserTriesActivatingAccountAgainException()).when(userService).activateAccount(anyString());

        String viewName = userController.activateAccount(USER_NAME, request, response);
        assertEquals("redirect:/", viewName);
    }
View Full Code Here


            this.getDao().saveOrUpdate(user);
            LOGGER.info("User [{}] successfully activated", user.getUsername());
        } else {
            LOGGER.info("User [{}] tried to activate his account again, but that's impossible. Either he clicked the " +
                    "link again, or someone looks for vulnerabilities in the forum.", user.getUsername());
            throw new UserTriesActivatingAccountAgainException();
        }
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.service.exceptions.UserTriesActivatingAccountAgainException

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.