Package dev.aherscu.qa.testing.example
Class AbstractMockServerTest<T extends dev.aherscu.qa.jgiven.commons.model.AnyScenarioType,GIVEN extends dev.aherscu.qa.jgiven.commons.steps.GenericFixtures<T,?> & dev.aherscu.qa.jgiven.commons.model.ScenarioType<T>,WHEN extends dev.aherscu.qa.jgiven.commons.steps.GenericActions<T,?> & dev.aherscu.qa.jgiven.commons.model.ScenarioType<T>,THEN extends dev.aherscu.qa.jgiven.commons.steps.GenericVerifications<T,?> & dev.aherscu.qa.jgiven.commons.model.ScenarioType<T>>
- java.lang.Object
-
- com.tngtech.jgiven.base.ScenarioTestBase<GIVEN,WHEN,THEN>
-
- dev.aherscu.qa.jgiven.commons.utils.ScenarioTestEx<GIVEN,WHEN,THEN>
-
- dev.aherscu.qa.jgiven.commons.model.TypedScenarioTest<T,GIVEN,WHEN,THEN>
-
- dev.aherscu.qa.jgiven.commons.utils.ConfigurableScenarioTest<dev.aherscu.qa.testing.utils.config.BaseConfiguration,T,GIVEN,WHEN,THEN>
-
- dev.aherscu.qa.testing.example.AbstractMockServerTest<T,GIVEN,WHEN,THEN>
-
- Type Parameters:
T
- type of scenarioGIVEN
- type of fixturesWHEN
- type of actionsTHEN
- type of verifications
public abstract class AbstractMockServerTest<T extends dev.aherscu.qa.jgiven.commons.model.AnyScenarioType,GIVEN extends dev.aherscu.qa.jgiven.commons.steps.GenericFixtures<T,?> & dev.aherscu.qa.jgiven.commons.model.ScenarioType<T>,WHEN extends dev.aherscu.qa.jgiven.commons.steps.GenericActions<T,?> & dev.aherscu.qa.jgiven.commons.model.ScenarioType<T>,THEN extends dev.aherscu.qa.jgiven.commons.steps.GenericVerifications<T,?> & dev.aherscu.qa.jgiven.commons.model.ScenarioType<T>> extends dev.aherscu.qa.jgiven.commons.utils.ConfigurableScenarioTest<dev.aherscu.qa.testing.utils.config.BaseConfiguration,T,GIVEN,WHEN,THEN>
Contains REST sample tests just to ensure that the testing infrastructure works as required.- Author:
- aherscu
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
protected org.mockserver.client.MockServerClient
mockServer
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMockServerTest()
If port 1080 is free will initiate an in-process MockServer, otherwise will try connecting to port 1080.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterClassStopInProcessMockRestServer()
protected void
beforeClassClearMockServer()
protected URI
mockServerUri()
protected int
outOfProcessPort()
-
Methods inherited from class dev.aherscu.qa.jgiven.commons.utils.ConfigurableScenarioTest
afterMethodKeepJenkinsAlive, beforeClassInitializeSession, beforeMethodInitializeSession, configuration, generateRandomId, randomId
-
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
mockServer
protected final org.mockserver.client.MockServerClient mockServer
-
-
Method Detail
-
outOfProcessPort
protected int outOfProcessPort()
-
beforeClassClearMockServer
@BeforeClass protected void beforeClassClearMockServer()
-
afterClassStopInProcessMockRestServer
@AfterClass(alwaysRun=true) protected void afterClassStopInProcessMockRestServer()
-
mockServerUri
protected URI mockServerUri()
-
-