Class AbstractRequestExpectationManager.RequestExpectationGroup

java.lang.Object
org.springframework.test.web.client.AbstractRequestExpectationManager.RequestExpectationGroup
Enclosing class:
AbstractRequestExpectationManager

protected static class AbstractRequestExpectationManager.RequestExpectationGroup extends Object
Helper class to manage a group of remaining expectations.
  • Constructor Details

    • RequestExpectationGroup

      protected RequestExpectationGroup()
  • Method Details

    • addAllExpectations

      public void addAllExpectations(Collection<RequestExpectation> expectations)
    • getExpectations

      public Set<RequestExpectation> getExpectations()
    • findExpectation

      @Nullable public RequestExpectation findExpectation(org.springframework.http.client.ClientHttpRequest request) throws IOException
      Return a matching expectation, or null if none match.
      Throws:
      IOException
    • update

      public void update(RequestExpectation expectation)
      Invoke this for an expectation that has been matched.

      The count of the given expectation is incremented, then it is either stored if remainingCount > 0 or removed otherwise.

    • reset

      public void reset()
      Reset all expectations for this group.