Examples of AnonymousUser


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

        Assert.assertThat(result, not(instanceOf(AnonymousUser.class)));
    }

    @Test
    public void getCurrentUserShouldReturnAnonymousUserIfCurrentUserNotFound() {
        when(userReader.getCurrentUser()).thenReturn(new AnonymousUser());
        ReadOnlySecurityService service = (ReadOnlySecurityService)ReadOnlySecurityService.getInstance();
        service.setUserReader(userReader);

        JCUser result = service.getCurrentUser();
View Full Code Here

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

        assertTrue(validator.isValid("other name", null));
    }

    @Test
    public void testIsValidForAnonymous() throws Exception {
        when(service.getCurrentUser()).thenReturn(new AnonymousUser());

        assertTrue(validator.isValid(username, null));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.