Package com.github.kristofa.test.http

Examples of com.github.kristofa.test.http.HttpRequestResponseLogger.log()


        final HttpRequestResponseFileLoggerFactory factory =
            new HttpRequestResponseFileLoggerFactory(DIRECTORY, FILE_NAME, true);
        final HttpRequestResponseLogger logger = factory.getHttpRequestResponseLogger();
        final HttpRequestImpl request = new HttpRequestImpl();
        request.method(Method.POST).path("/").content(new String("content").getBytes());
        logger.log(request);
        final HttpResponseImpl response = new HttpResponseImpl(200, "application/json", "{}".getBytes());
        logger.log(response);

        for (final File file : getFiles(1)) {
            assertTrue("Those files should exist, should be recreated." + file, file.exists());
View Full Code Here


        final HttpRequestResponseLogger logger = factory.getHttpRequestResponseLogger();
        final HttpRequestImpl request = new HttpRequestImpl();
        request.method(Method.POST).path("/").content(new String("content").getBytes());
        logger.log(request);
        final HttpResponseImpl response = new HttpResponseImpl(200, "application/json", "{}".getBytes());
        logger.log(response);

        for (final File file : getFiles(1)) {
            assertTrue("Those files should exist, should be recreated." + file, file.exists());
        }
        for (final File file : getFiles(2)) {
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.