Class WireMockClassExtension

  • All Implemented Interfaces:
    com.github.tomakehurst.wiremock.core.Admin, com.github.tomakehurst.wiremock.core.Container, com.github.tomakehurst.wiremock.junit.Stubbing, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension

    public class WireMockClassExtension
    extends com.github.tomakehurst.wiremock.WireMockServer
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
    Junit 5 replacement for WireMockClassRule
    • Field Summary

      • Fields inherited from class com.github.tomakehurst.wiremock.WireMockServer

        client, options
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      • Methods inherited from class com.github.tomakehurst.wiremock.WireMockServer

        addMockServiceRequestListener, addStubMapping, baseUrl, checkForUnmatchedRequests, countRequestsMatching, editStub, editStubMapping, enableRecordMappings, findAll, findAllNearMissesFor, findAllStubsByMetadata, findAllUnmatchedRequests, findNearMissesFor, findNearMissesForAllUnmatchedRequests, findNearMissesForUnmatchedRequests, findRequestsMatching, findStubMappingsByMetadata, findTopNearMissesFor, findTopNearMissesFor, findUnmatchedRequests, getAllScenarios, getAllServeEvents, getGlobalSettings, getGlobalSettingsHolder, getOptions, getRecordingStatus, getServedStub, getServeEvents, getServeEvents, getSingleStubMapping, getStubMapping, getStubMappings, givenThat, httpsPort, importStubs, isHttpEnabled, isHttpsEnabled, isRunning, listAllStubMappings, loadMappingsUsing, port, removeServeEvent, removeServeEventsForStubsMatchingMetadata, removeServeEventsMatching, removeStub, removeStub, removeStubMapping, removeStubMapping, removeStubMappingsByMetadata, removeStubsByMetadata, resetAll, resetMappings, resetRequests, resetScenario, resetScenarios, resetToDefaultMappings, saveMappings, setGlobalFixedDelay, setScenarioState, shutdown, shutdownServer, snapshotRecord, snapshotRecord, snapshotRecord, start, startRecording, startRecording, startRecording, stop, stopRecording, stubFor, updateGlobalSettings, url, verify, verify, verify
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WireMockClassExtension

        public WireMockClassExtension()
        Constructor that creates a new instance with dynamic port
      • WireMockClassExtension

        public WireMockClassExtension​(com.github.tomakehurst.wiremock.core.Options options)
      • WireMockClassExtension

        public WireMockClassExtension​(int port,
                                      java.lang.Integer httpsPort)
      • WireMockClassExtension

        public WireMockClassExtension​(int port)
    • Method Detail

      • beforeAll

        public void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback