All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kristofa.test.http.HttpResponseProvider Maven / Gradle / Ivy

Go to download

Mock and Proxy HTTP Server for testing purposes. Forked from https://github.com/jharlap/mock-http-server

There is a newer version: 4.1
Show newest version
package com.github.kristofa.test.http;

/**
 * Provides responses for given {@link HttpRequest http requests}. Abstracts where the responses come from.
 * 

* Used with {@link MockHttpServer}. * * @see MockHttpServer * @author kristof */ public interface HttpResponseProvider { /** * Gets expected response for given request. * * @param request HttpRequest. * @return Response or null in case we don't know given request. */ HttpResponse getResponse(final HttpRequest request); /** * Should be executed when all requests have been submitted. Checks if all expected requests have been requested. * * @throws UnsatisfiedExpectationException In case expectation were not as expected. See * {@link UnsatisfiedExpectationException#getMissingHttpRequests()} and * {@link UnsatisfiedExpectationException#getUnexpectedHttpRequests()} to get missing and unexpected * requests. */ void verify() throws UnsatisfiedExpectationException; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy