Interface PactLoader


public interface PactLoader
Encapsulate logic for loading pacts
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns a description of this pact loader
    default void
    enablePendingPacts(boolean flag)
    Enables pending pact feature
    au.com.dius.pact.core.model.PactSource
    Returns the source object that the pacts where loaded from
    default void
    initLoader(Class<?> testClass, Object testInstance)
    Supports additional initialisation using the test class
    List<au.com.dius.pact.core.model.Pact>
    load(String providerName)
    Load pacts from appropriate source
    default void
    setValueResolver(au.com.dius.pact.core.support.expressions.ValueResolver valueResolver)
    Sets the value resolver to use to resolve property expressions.
  • Method Details

    • load

      List<au.com.dius.pact.core.model.Pact> load(String providerName) throws IOException
      Load pacts from appropriate source
      Parameters:
      providerName - name of provider for which pacts will be loaded
      Returns:
      list of pacts
      Throws:
      IOException
    • getPactSource

      au.com.dius.pact.core.model.PactSource getPactSource()
      Returns the source object that the pacts where loaded from
    • setValueResolver

      default void setValueResolver(au.com.dius.pact.core.support.expressions.ValueResolver valueResolver)
      Sets the value resolver to use to resolve property expressions. By default, a system property resolver will be used.
      Parameters:
      valueResolver - Value Resolver
    • description

      default String description()
      Returns a description of this pact loader
    • enablePendingPacts

      default void enablePendingPacts(boolean flag)
      Enables pending pact feature
    • initLoader

      default void initLoader(Class<?> testClass, Object testInstance)
      Supports additional initialisation using the test class