Package org.jtalks.jcommune.plugin.api.service

Examples of org.jtalks.jcommune.plugin.api.service.UserReader


    @Test
    public void testGetCreateTopicBtnDto() {
        JCUser currentUser = new JCUser("name", "email@example.com", "password");
        currentUser.setLanguage(Language.ENGLISH);
        UserReader userReader = mock(UserReader.class);
        when(userReader.getCurrentUser()).thenReturn(currentUser);
        ReadOnlySecurityService service = (ReadOnlySecurityService) ReadOnlySecurityService.getInstance();
        service.setUserReader(userReader);

        CreateTopicBtnDto createTopicBtnDto = new QuestionsAndAnswersPlugin().getCreateTopicBtnDto(1);
        assertEquals("Ask Question", createTopicBtnDto.getDisplayNameKey());
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.plugin.api.service.UserReader

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.