Package org.apache.sling.commons.testing.jcr

Examples of org.apache.sling.commons.testing.jcr.MockValue


    @Test
    public void testGetEmailAddrs_User() throws Exception {

        String userPath = "/home/users/a/admin";
        MockValue[] emailVal = new MockValue[] { new MockValue("admin@adobe.com") };

        ResourceResolver resolver = mock(ResourceResolver.class);
        Resource userRes = mock(Resource.class);
        Authorizable adminUser = mock(Authorizable.class);
View Full Code Here


        Authorizable user1 = mock(Authorizable.class);
        Authorizable user2 = mock(Authorizable.class);

        when(user1.hasProperty(PN_EMAIL)).thenReturn(true);
        when(user1.getProperty(PN_EMAIL)).thenReturn(new MockValue[] { new MockValue("user1@adobe.com") });

        when(user2.hasProperty(PN_EMAIL)).thenReturn(true);
        when(user2.getProperty(PN_EMAIL)).thenReturn(new MockValue[] { new MockValue("user2@adobe.com") });

        groupMembers.add(user1);
        groupMembers.add(user2);

        ResourceResolver resolver = mock(ResourceResolver.class);
View Full Code Here

TOP

Related Classes of org.apache.sling.commons.testing.jcr.MockValue

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.