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>>

  • Type Parameters:
    T - type of scenario
    GIVEN - type of fixtures
    WHEN - type of actions
    THEN - 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  
      • Fields inherited from class dev.aherscu.qa.jgiven.commons.utils.ConfigurableScenarioTest

        concurrency, configurationType, INTERNAL_DATA_PROVIDER, issuedRandomIds, randomId, startTime, USE_FIRST_PARAM
      • Fields inherited from class dev.aherscu.qa.jgiven.commons.model.TypedScenarioTest

        EPOCH_MILLI_64
    • 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.
    • Field Detail

      • mockServer

        protected final org.mockserver.client.MockServerClient mockServer
    • Constructor Detail

      • AbstractMockServerTest

        protected AbstractMockServerTest()
        If port 1080 is free will initiate an in-process MockServer, otherwise will try connecting to port 1080.
    • Method Detail

      • outOfProcessPort

        protected int outOfProcessPort()
      • beforeClassClearMockServer

        @BeforeClass
        protected void beforeClassClearMockServer()
      • afterClassStopInProcessMockRestServer

        @AfterClass(alwaysRun=true)
        protected void afterClassStopInProcessMockRestServer()
      • mockServerUri

        protected URI mockServerUri()