Mercurial > stress-tester
changeset 811:a6ca1dda7e52
AbstractWireMockTest improvements
author | Devel 2 |
---|---|
date | Mon, 08 Jan 2018 12:33:40 +0100 |
parents | 22dd25425c8d |
children | 43eb11e7f86b |
files | stress-tester/src/test/java/com/passus/st/AbstractWireMockTest.java |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/test/java/com/passus/st/AbstractWireMockTest.java Mon Jan 08 11:32:22 2018 +0100 +++ b/stress-tester/src/test/java/com/passus/st/AbstractWireMockTest.java Mon Jan 08 12:33:40 2018 +0100 @@ -3,8 +3,11 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.WireMock; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; +import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; +import org.testng.annotations.BeforeTest; /** * @@ -18,7 +21,7 @@ private WireMockServer wireMockServer; private WireMock wireMock; - @BeforeMethod + @BeforeClass public void beforeClass() { WireMockConfiguration config = WireMockConfiguration.wireMockConfig() .port(PORT); @@ -29,6 +32,11 @@ } @AfterMethod + public void afterMethod() { + WireMock.reset(); + } + + @AfterClass public void afterClass() { wireMockServer.stop(); }