Package de.devbliss.apitester

Examples of de.devbliss.apitester.Context


    private Context doGetRequest(URI uri) throws Exception {
        return apiTest.get(uri);
    }

    protected ApiResponse makeGetRequest(URI uri) throws Exception {
        Context context = doGetRequest(uri);
        sayRequest(context.apiRequest);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here


    protected ApiResponse makePostRequest(URI uri) throws Exception {
        return makePostRequest(uri, null);
    }

    protected ApiResponse makePostRequest(URI uri, Object obj) throws Exception {
        Context context = doPostRequest(uri, obj);
        sayRequest(context.apiRequest, obj);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

    protected ApiResponse makePostUploadRequest(URI uri, File fileToUpload, String paramName)
            throws Exception {
        FileBody fileBodyToUpload = new FileBody(fileToUpload);
        String mimeType = new MimetypesFileTypeMap().getContentType(fileToUpload);

        Context context =
                apiTest.post(uri, null, new PostUploadWithoutRedirectImpl(paramName,
                        fileBodyToUpload));

        docTestMachine.sayUploadRequest(context.apiRequest, fileBodyToUpload.getFilename(),
                fileHelper.readFile(fileToUpload), fileToUpload.length(), mimeType, headersToShow,
View Full Code Here

    protected ApiResponse makePutRequest(URI uri) throws Exception {
        return makePutRequest(uri, null);
    }

    protected ApiResponse makePutRequest(URI uri, Object obj) throws Exception {
        Context context = doPutRequest(uri, obj);
        sayRequest(context.apiRequest, obj);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

    protected ApiResponse makeDeleteRequest(URI uri) throws Exception {
        return makeDeleteRequest(uri, null);
    }

    protected ApiResponse makeDeleteRequest(URI uri, Object obj) throws Exception {
        Context context = doDeleteRequest(uri, obj);
        sayRequest(context.apiRequest, obj);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

    private Context doGetRequest(URI uri) throws Exception {
        return apiTest.get(uri);
    }

    protected ApiResponse makeGetRequest(URI uri) throws Exception {
        Context context = doGetRequest(uri);
        sayRequest(context.apiRequest);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

    protected ApiResponse makePostRequest(URI uri) throws Exception {
        return makePostRequest(uri, null);
    }

    protected ApiResponse makePostRequest(URI uri, Object obj) throws Exception {
        Context context = doPostRequest(uri, obj);
        sayRequest(context.apiRequest, obj);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

    protected ApiResponse makePostUploadRequest(URI uri, File fileToUpload, String paramName)
            throws Exception {
        FileBody fileBodyToUpload = new FileBody(fileToUpload);
        String mimeType = new MimetypesFileTypeMap().getContentType(fileToUpload);

        Context context =
                apiTest.post(uri, null, new PostUploadWithoutRedirectImpl(paramName,
                        fileBodyToUpload));

        docTestMachine.sayUploadRequest(context.apiRequest, fileBodyToUpload.getFilename(),
                fileHelper.readFile(fileToUpload), fileToUpload.length(), mimeType, headersToShow,
View Full Code Here

    protected ApiResponse makePutRequest(URI uri) throws Exception {
        return makePutRequest(uri, null);
    }

    protected ApiResponse makePutRequest(URI uri, Object obj) throws Exception {
        Context context = doPutRequest(uri, obj);
        sayRequest(context.apiRequest, obj);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

    protected ApiResponse makeDeleteRequest(URI uri) throws Exception {
        return makeDeleteRequest(uri, null);
    }

    protected ApiResponse makeDeleteRequest(URI uri, Object obj) throws Exception {
        Context context = doDeleteRequest(uri, obj);
        sayRequest(context.apiRequest, obj);
        docTestMachine.sayResponse(context.apiResponse, headersToShow);
        return context.apiResponse;
    }
View Full Code Here

TOP

Related Classes of de.devbliss.apitester.Context

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.