|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.kristofa.test.http.MockAndProxyFacade
public class MockAndProxyFacade
Facade that lets you easily configure and use either the LoggingHttpProxy for using real services and logging
requests/responses or the MockHttpServer for running your code against mocked http requests/responses.
MockHttpServer or LoggingHttpProxy by themselves but if you use both it is most likely that this
class will make things easier for you.
| Nested Class Summary | |
|---|---|
static class |
MockAndProxyFacade.Builder
|
static class |
MockAndProxyFacade.Mode
Specifies the mode in which MockAndProxyFacade should be operating. |
| Method Summary | |
|---|---|
void |
start()
Starts either MockHttpServer or LoggingHttpProxy depending on operation mode. |
void |
stop()
Stops either MockHttpServer or LoggingHttpProxy depending on operation mode. |
void |
verify()
In case we are in Mocking operation mode we will verify if all expected requests have been invoked. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void start()
throws IOException
MockHttpServer or LoggingHttpProxy depending on operation mode.
IOException - In case starting fails.
public void stop()
throws IOException
MockHttpServer or LoggingHttpProxy depending on operation mode.
IOException - In case stopping fails.
public void verify()
throws UnsatisfiedExpectationException
UnsatisfiedExpectationException - In case we got unexpected requests and/or not all expected requests were
invoked.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||