Class Stubbing.Builder

java.lang.Object
org.stubit.http.Stubbing.Builder
Enclosing class:
Stubbing

public static class Stubbing.Builder extends Object
A fluent API builder for Stubbing.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • path

      public Stubbing.Builder path(String path)
      Parameters:
      path - the path that will be considered for the Stubbing.
      Returns:
      this
      See Also:
      • PathPredicate(String)
    • method

      public Stubbing.Builder method(String method, String... furtherMethods)
      Parameters:
      method - the method to be considered
      furtherMethods - optional further methods to be considered
      Returns:
      this
      See Also:
      • MethodPredicate(String, String...)
    • returns

      public Stubbing returns(StubbedResponse response)
      Sets the response and builds the Stubbing.
      Parameters:
      response - the StubbedResponse to be used for the Stubbing
      Returns:
      the build Stubbing