Interface Stubbing

All Known Implementing Classes:
DslWrapper, WireMockServer

public interface Stubbing
  • Method Details

    • givenThat

      StubMapping givenThat(MappingBuilder mappingBuilder)
    • stubFor

      StubMapping stubFor(MappingBuilder mappingBuilder)
    • editStub

      void editStub(MappingBuilder mappingBuilder)
    • removeStub

      void removeStub(MappingBuilder mappingBuilder)
    • removeStub

      void removeStub(StubMapping mappingBuilder)
    • removeStub

      void removeStub(UUID id)
    • getStubMappings

      List<StubMapping> getStubMappings()
    • getSingleStubMapping

      StubMapping getSingleStubMapping(UUID id)
    • findStubMappingsByMetadata

      List<StubMapping> findStubMappingsByMetadata(StringValuePattern pattern)
    • removeStubMappingsByMetadata

      void removeStubMappingsByMetadata(StringValuePattern pattern)
    • verify

      void verify(RequestPatternBuilder requestPatternBuilder)
    • verify

      void verify(int count, RequestPatternBuilder requestPatternBuilder)
    • verify

      void verify(CountMatchingStrategy countMatchingStrategy, RequestPatternBuilder requestPatternBuilder)
    • findAll

      List<LoggedRequest> findAll(RequestPatternBuilder requestPatternBuilder)
    • getAllServeEvents

      List<ServeEvent> getAllServeEvents()
    • setGlobalFixedDelay

      void setGlobalFixedDelay(int milliseconds)
    • findAllUnmatchedRequests

      List<LoggedRequest> findAllUnmatchedRequests()
    • findNearMissesForAllUnmatchedRequests

      List<NearMiss> findNearMissesForAllUnmatchedRequests()
    • findNearMissesFor

      List<NearMiss> findNearMissesFor(LoggedRequest loggedRequest)
    • findAllNearMissesFor

      List<NearMiss> findAllNearMissesFor(RequestPatternBuilder requestPatternBuilder)
    • messageStubFor

      Registers a message stub mapping using a builder.
      Parameters:
      builder - the message stub mapping builder
      Returns:
      the registered MessageStubMapping
    • messageStubFor

      MessageStubMapping messageStubFor(MessageStubMapping messageStubMapping)
      Registers a message stub mapping directly.
      Parameters:
      messageStubMapping - the message stub mapping to register
      Returns:
      the registered MessageStubMapping
    • removeMessageStub

      void removeMessageStub(UUID id)
      Removes a message stub mapping.
      Parameters:
      id - the UUID of the message stub mapping to remove
    • getMessageStubMappingsList

      List<MessageStubMapping> getMessageStubMappingsList()
      Gets all registered message stub mappings.
      Returns:
      list of all message stub mappings
    • resetMessageStubs

      void resetMessageStubs()
      Removes all message stub mappings.
    • getAllMessageServeEvents

      List<MessageServeEvent> getAllMessageServeEvents()
      Gets all message serve events from the message journal.
      Returns:
      list of all message serve events
    • findAllMessageEvents

      List<MessageServeEvent> findAllMessageEvents(MessagePattern pattern)
      Gets message serve events matching the given pattern.
      Parameters:
      pattern - the pattern to match events against
      Returns:
      list of matching events
    • verifyMessageEvent

      void verifyMessageEvent(MessagePattern pattern)
      Verifies that at least one message event matches the given pattern.
      Parameters:
      pattern - the pattern to match events against
    • verifyMessageEvent

      void verifyMessageEvent(int expectedCount, MessagePattern pattern)
      Verifies that exactly the specified number of message events match the given pattern.
      Parameters:
      expectedCount - the expected number of matching events
      pattern - the pattern to match events against
    • verifyMessageEvent

      void verifyMessageEvent(CountMatchingStrategy expectedCount, MessagePattern pattern)
      Verifies that the number of message events matching the pattern satisfies the count strategy.
      Parameters:
      expectedCount - the count matching strategy
      pattern - the pattern to match events against
    • waitForMessageEvent

      Optional<MessageServeEvent> waitForMessageEvent(MessagePattern pattern, Duration maxWait)
      Waits for a message event matching the given pattern to appear in the journal.
      Parameters:
      pattern - the pattern to match events against
      maxWait - the maximum duration to wait
      Returns:
      the matching event if found within the timeout
    • waitForMessageEvents

      List<MessageServeEvent> waitForMessageEvents(MessagePattern pattern, int count, Duration maxWait)
      Waits for a specific number of message events matching the given pattern.
      Parameters:
      pattern - the pattern to match events against
      count - the number of events to wait for
      maxWait - the maximum duration to wait
      Returns:
      list of matching events
    • resetMessageJournal

      void resetMessageJournal()
      Resets the message journal, removing all events.