Examples of httpMessageHeader()


Examples of com.github.kristofa.test.http.HttpRequestImpl.httpMessageHeader()

        final HttpRequestImpl request1 = new HttpRequestImpl();
        request1.method(Method.GET);
        request1.path("/a/b");
        request1.queryParameter("a", "1");
        request1.httpMessageHeader("custom", "value");

        final HttpResponse response1 = responseProvider.getResponse(request1);
        assertNotNull("We expect matcher to be kicked in and provided response.", response1);
        assertEquals("We expect custom response.", 201, response1.getHttpCode());
View Full Code Here

Examples of com.github.kristofa.test.http.HttpRequestImpl.httpMessageHeader()

        assertNotNull("We expect matcher to be kicked in and provided response.", response1);
        assertEquals("We expect custom response.", 201, response1.getHttpCode());

        final HttpRequestImpl request2 = new HttpRequestImpl();
        request2.path("/a/c");
        request2.httpMessageHeader("custom", "value");
        assertNull("for /a/c we need exact match.", responseProvider.getResponse(request2));

        final HttpRequestImpl request3 = new HttpRequestImpl();
        request3.method(Method.GET);
        request3.path("/a/c");
View Full Code Here

Examples of com.github.kristofa.test.http.HttpRequestImpl.httpMessageHeader()

        assertNull("for /a/c we need exact match.", responseProvider.getResponse(request2));

        final HttpRequestImpl request3 = new HttpRequestImpl();
        request3.method(Method.GET);
        request3.path("/a/c");
        request3.httpMessageHeader("Content-Type", "application/json");
        request3.queryParameter("a", "1");

        final HttpResponse response3 = responseProvider.getResponse(request3);
        assertNotNull("We expected exact match to have worked.", response3);
        assertEquals(200, response3.getHttpCode());
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.