Examples of UserEntrySet


Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

        return we;
    }
   
    protected static UserEntrySet getSampleUserEntrySet() {
        UserEntry ue = getSampleUserEntry();
        UserEntrySet ues = new UserEntrySet(getEndpointUrl());
        ues.setEntries(new UserEntry[] { ue });
       
        return ues;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

*/
public class UserHandlerTest extends HandlerBaseTest {
    public void testHandler() {
        try {
            //create
            UserEntrySet uesCreate = createSampleUser();
            assertNotNull(uesCreate);
            assertNotNull(uesCreate.getEntries());
            assertEquals(uesCreate.getEntries().length, 1);
            assertEquals(uesCreate, getSampleUserEntrySet());
           
            //get
            UserEntrySet uesFetch = fetchSampleUser();
            assertNotNull(uesFetch);
            assertNotNull(uesFetch.getEntries());
            assertEquals(uesFetch.getEntries().length, 1);
            assertEquals(uesFetch, uesCreate);
           
            //update
            UserEntrySet uesUpdate = updateSampleUser();
            assertNotNull(uesUpdate);
            assertNotNull(uesUpdate.getEntries());
            assertEquals(uesUpdate.getEntries().length, 1);
            assertEquals(uesUpdate, updateSampleUserEntrySet(getSampleUserEntrySet()));
           
            //delete
            UserEntrySet uesDelete = deleteSampleUser(true);
            assertNotNull(uesDelete);
            assertNotNull(uesCreate.getEntries());
            assertEquals(uesCreate.getEntries().length, 1);
            assertEquals(uesDelete, uesUpdate);
        } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

        }
    }

    public void testEnabled() {
        try {
            UserEntrySet ues = createSampleUser();
            UserEntry ue = (UserEntry)ues.getEntries()[0];
            assertEquals(Boolean.TRUE, ue.getEnabled());
           
            ues = updateSampleUser();
            ue = (UserEntry)ues.getEntries()[0];
            assertEquals(Boolean.FALSE, ue.getEnabled());

            ues = fetchSampleUser();
            ue = (UserEntry)ues.getEntries()[0];
            assertEquals(Boolean.FALSE, ue.getEnabled());
        } catch (IOException ioe) {
            fail(ioe.getMessage());
            ioe.printStackTrace();
        } catch (JDOMException je) {
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

*/
public class UserHandlerTest extends AappTest {
    public void testHandler() {
        try {
            //create
            UserEntrySet uesCreate = createSampleUser();
            assertNotNull(uesCreate);
            assertNotNull(uesCreate.getEntries());
            assertEquals(uesCreate.getEntries().length, 1);
            assertEquals(uesCreate, getSampleUserEntrySet());
           
            //get
            UserEntrySet uesFetch = fetchSampleUser();
            assertNotNull(uesFetch);
            assertNotNull(uesFetch.getEntries());
            assertEquals(uesFetch.getEntries().length, 1);
            assertEquals(uesFetch, uesCreate);
           
            //update
            UserEntrySet uesUpdate = updateSampleUser();
            assertNotNull(uesUpdate);
            assertNotNull(uesUpdate.getEntries());
            assertEquals(uesUpdate.getEntries().length, 1);
            assertEquals(uesUpdate, updateSampleUserEntrySet(getSampleUserEntrySet()));
           
            //delete
            UserEntrySet uesDelete = deleteSampleUser();
            assertNotNull(uesDelete);
            assertNotNull(uesCreate.getEntries());
            assertEquals(uesCreate.getEntries().length, 1);
            assertEquals(uesDelete, uesUpdate);
        } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

    }
   
    protected static UserEntrySet updateSampleUserEntrySet(UserEntrySet ues) {
        UserEntry ue = (UserEntry)ues.getEntries()[0];
        UserEntry ueUpdated = updateSampleUserEntry(ue);       
        UserEntrySet uesUpdated = new UserEntrySet(getEndpointUrl());
        uesUpdated.setEntries(new UserEntry[] { ueUpdated });
       
        return uesUpdated;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

        return we;
    }   
   
    protected static UserEntrySet getSampleUserEntrySet() {
        UserEntry ue = getSampleUserEntry();
        UserEntrySet ues = new UserEntrySet(getEndpointUrl());
        ues.setEntries(new UserEntry[] { ue });
       
        return ues;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

       
        return mes;
    }

    protected UserEntrySet createSampleUser() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        UserEntrySet ues = getSampleUserEntrySet();
       
        String url = ues.getHref();
        String user = getUser();
        String password = getPassword();
       
        String body = ues.toString();
       
        HttpResponse res = post(url, user, password, body);
        assertEquals(201, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

       
        return uesResponse;
    }

    protected UserEntrySet updateSampleUser() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        UserEntrySet ues = updateSampleUserEntrySet(getSampleUserEntrySet());
       
        String url = ues.getHref();
        String user = getUser();
        String password = getPassword();
       
        String body = ues.toString();
       
        HttpResponse res = put(url, user, password, body);
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = delete(ue.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = get(ue.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
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.