Package com.streamreduce

Examples of com.streamreduce.InvalidUserAliasException



        UserService mockUserService = mock(UserService.class);
        when(mockUserService.isAliasAvailable(any(Account.class), anyString())).thenReturn(true);
        when(mockUserService.getUserFromSignupKey(anyString(),anyString())).thenReturn(user);
        when(mockUserService.createUser(user)).thenThrow(new InvalidUserAliasException("worst test ever"));

        ReflectionTestUtils.setField(adminUserVerificationResource,"userService",mockUserService);

        Response response = adminUserVerificationResource.completeUserSignupProcess("", new ObjectId().toString(),
                new JSONObjectBuilder()
View Full Code Here



        UserService mockUserService = mock(UserService.class);
        when(mockUserService.isAliasAvailable(any(Account.class), anyString())).thenReturn(true);
        when(mockUserService.getUserFromInvite(anyString(),anyString())).thenReturn(user);
        when(mockUserService.createUser(user)).thenThrow(new InvalidUserAliasException("worst test ever"));

        ReflectionTestUtils.setField(adminUserVerificationResource,"userService",mockUserService);

        Response response = adminUserVerificationResource.completeUserInviteProcess("", new ObjectId().toString(),
                new JSONObjectBuilder()
View Full Code Here

     * @throws IllegalArgumentException if user.getAlias contains characters other than alphanumeric characters, "_" and
     *                                  "-"
     */
    void validateUserAlias(User user) {
        if (!User.isValidUserAlias(user.getAlias())) {
            throw new InvalidUserAliasException("User alias contains characters that aren't alphanumeric, dashes, or " +
                    "underscores");
        }
    }
View Full Code Here

TOP

Related Classes of com.streamreduce.InvalidUserAliasException

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.