Package com.couchace.core.api.response

Examples of com.couchace.core.api.response.GetContentResponse


        // Here we use "raw" database put and delete for the database create and delete
        WriteResponse writeResponse = oneTestDatabase.put().database().execute();
        assertEquals(writeResponse.getHttpStatus(), CouchHttpStatus.CREATED);

        // Get the database
        GetContentResponse getContentResponse = oneTestDatabase.get().database().execute();
        assertEquals(getContentResponse.getHttpStatus(), CouchHttpStatus.OK);
        assertEquals(getContentResponse.getContentType(), CouchMediaType.APPLICATION_JSON);

        // Delete the database
        WriteResponse deleteResponse = oneTestDatabase.delete().database().execute();
        assertEquals(deleteResponse.getHttpStatus(), CouchHttpStatus.OK);

        // Database should no longer exist.
        getContentResponse = oneTestDatabase.get().database().execute();
        assertEquals(getContentResponse.getHttpStatus(), CouchHttpStatus.NOT_FOUND);

    }
View Full Code Here

TOP

Related Classes of com.couchace.core.api.response.GetContentResponse

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.