Package org.jtalks.jcommune.model.entity

Examples of org.jtalks.jcommune.model.entity.JCUser


        setupRequestAttributes();

        String cyrillicCharsUserName = "Иванов";
        String cyrillicCharsUserNameWithSpaces = "П е т р о в";

        JCUser cyrillicCharsUser = getUser(cyrillicCharsUserName, 100L);
        when(userDao.getByUsername(cyrillicCharsUserName)).thenReturn(cyrillicCharsUser);
        JCUser notifiedMentionedUser = getUser(cyrillicCharsUserNameWithSpaces, 101L);
        when(userDao.getByUsername(cyrillicCharsUserNameWithSpaces)).thenReturn(notifiedMentionedUser);
        //
        String cyrillicCharsUserProfile = "/forum/users/" + cyrillicCharsUser.getId();
        String cyrillicCharsUserWithSpaceProfile = "/forum/users/" + notifiedMentionedUser.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, cyrillicCharsUserName, cyrillicCharsUserNameWithSpaces);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here


        setupRequestAttributes();

        String userNameWithOpenBracket = "]yak";
        String userNameWithCloseBracket = "yak";

        JCUser userWithOpenBracketInName = getUser(userNameWithOpenBracket, 100L);
        when(userDao.getByUsername(userNameWithOpenBracket)).thenReturn(userWithOpenBracketInName);
        JCUser userWithCloseBracketInName = getUser(userNameWithCloseBracket, 101L);
        when(userDao.getByUsername(userNameWithCloseBracket)).thenReturn(userWithCloseBracketInName);
        //
        String withOpenBracketUserProfile = "/forum/users/" + userWithOpenBracketInName.getId();
        String withCloseBracketUserProfile = "/forum/users/" + userWithCloseBracketInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithOpenBracket, userNameWithCloseBracket);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String userNameWithSlash = "/yak";
        String userNameWithBackSlash = "\\yak";

        JCUser userWithSlashInName = getUser(userNameWithSlash, 100L);
        when(userDao.getByUsername(userNameWithSlash)).thenReturn(userWithSlashInName);
        JCUser userWithBackSlashInName = getUser(userNameWithBackSlash, 101L);
        when(userDao.getByUsername(userNameWithBackSlash)).thenReturn(userWithBackSlashInName);
        //
        String withSlashUserProfile = "/forum/users/" + userWithSlashInName.getId();
        String withBackSlashUserProfile = "/forum/users/" + userWithBackSlashInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithSlash, userNameWithBackSlash);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String userNameWithLower = "<yak";
        String userNameWithGreater = ">yak";

        JCUser userWithLowerInName = getUser(userNameWithLower, 100L);
        when(userDao.getByUsername(userNameWithLower)).thenReturn(userWithLowerInName);
        JCUser userWithGreaterInName = getUser(userNameWithGreater, 101L);
        when(userDao.getByUsername(userNameWithGreater)).thenReturn(userWithGreaterInName);
        //
        String withLowerUserProfile = "/forum/users/" + userWithLowerInName.getId();
        String withGreaterUserProfile = "/forum/users/" + userWithGreaterInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithLower, userNameWithGreater);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String userNameWithPercents = "%yak";
        String userNameWithPipeSymbol = "|yak";

        JCUser userWithPercentsInName = getUser(userNameWithPercents, 100L);
        when(userDao.getByUsername(userNameWithPercents)).thenReturn(userWithPercentsInName);
        JCUser userWithPipeSymbolInName = getUser(userNameWithPipeSymbol, 101L);
        when(userDao.getByUsername(userNameWithPipeSymbol)).thenReturn(userWithPipeSymbolInName);
        //
        String withPercentsUserProfile = "/forum/users/" + userWithPercentsInName.getId();
        String withPipeSymbolUserProfile = "/forum/users/" + userWithPipeSymbolInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithPercents, userNameWithPipeSymbol);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String cyrillicCharsUserName = "%D0%98%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2";
        String cyrillicCharsUserNameWithSpaces = "%D0%9F %D0%B5 %D1%82 %D1%80 %D0%BE %D0%B2";

        JCUser cyrillicCharsUser = getUser("Иванов", 100L);
        when(userDao.getByUsername(cyrillicCharsUser.getUsername())).thenReturn(cyrillicCharsUser);
        JCUser cyrillicCharsWithSpacesUser = getUser("П е т р о в", 101L);
        when(userDao.getByUsername(cyrillicCharsWithSpacesUser.getUsername())).thenReturn(cyrillicCharsWithSpacesUser);
        //
        String cyrillicCharsUserProfile = "/forum/users/" + cyrillicCharsUser.getId();
        String cyrillicCharsUserWithSpaceProfile = "/forum/users/" + cyrillicCharsWithSpacesUser.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, cyrillicCharsUserName, cyrillicCharsUserNameWithSpaces);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String userNameWithOpenBracket = "@ywdffgg434y@yak";
        String userNameWithCloseBracket = "@w0956756wo@yak";

        JCUser userWithOpenBracketInName = getUser("[yak", 100L);
        when(userDao.getByUsername("[yak")).thenReturn(userWithOpenBracketInName);
        JCUser userWithCloseBracketInName = getUser("]yak", 101L);
        when(userDao.getByUsername("]yak")).thenReturn(userWithCloseBracketInName);
        //
        String withOpenBracketUserProfile = "/forum/users/" + userWithOpenBracketInName.getId();
        String withCloseBracketUserProfile = "/forum/users/" + userWithCloseBracketInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithOpenBracket, userNameWithCloseBracket);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String userNameWithLower = "gertfgertgf@@@@@#4324234yak";
        String userNameWithGreater = ">yak";

        JCUser userWithLowerInName = getUser("<yak", 100L);
        when(userDao.getByUsername("<yak")).thenReturn(userWithLowerInName);
        JCUser userWithGreaterInName = getUser(">yak", 101L);
        when(userDao.getByUsername(">yak")).thenReturn(userWithGreaterInName);
        //
        String withLowerUserProfile = "/forum/users/" + userWithLowerInName.getId();
        String withGreaterUserProfile = "/forum/users/" + userWithGreaterInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithLower, userNameWithGreater);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

        setupRequestAttributes();

        String userNameWithSlash = "/yak";
        String userNameWithBackSlash = "14@123435vggv4fyak";

        JCUser userWithSlashInName = getUser(userNameWithSlash, 100L);
        when(userDao.getByUsername(userNameWithSlash)).thenReturn(userWithSlashInName);
        JCUser userWithBackSlashInName = getUser("\\yak", 101L);
        when(userDao.getByUsername("\\yak")).thenReturn(userWithBackSlashInName);
        //
        String withSlashUserProfile = "/forum/users/" + userWithSlashInName.getId();
        String withBackSlashUserProfile = "/forum/users/" + userWithBackSlashInName.getId();
        String notProcessedSource = format(MENTIONING_TEMPLATE, userNameWithSlash, userNameWithBackSlash);

        MentionedUsers mentionedUsers = MentionedUsers.parse(notProcessedSource);

        String expectedAfterProcess = format(MENTIONING_WITH_LINK_TO_PROFILE_TEMPALTE,
View Full Code Here

                securityService, userService);
        aclBuilder = mockAclBuilder();
        Mockito.when(aclBuilder.restrict(Mockito.any(JtalksPermission.class))).thenReturn(aclBuilder);
        Mockito.when(aclBuilder.on(Mockito.any(Poll.class))).thenReturn(aclBuilder);
        Mockito.when(securityService.<User>createAclBuilder()).thenReturn(aclBuilder);
        jcUser = new JCUser("name", "email", "password");
        Mockito.when(userService.getCurrentUser()).thenReturn(jcUser);
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.model.entity.JCUser

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.