Interface PactLoader


  • public interface PactLoader
    Encapsulate logic for loading pacts
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String description()
      Returns a description of this pact loader
      default void enablePendingPacts​(boolean flag)
      Enables pending pact feature
      au.com.dius.pact.core.model.PactSource getPactSource()
      Returns the source object that the pacts where loaded from
      default void initLoader​(java.lang.Class<?> testClass, java.lang.Object testInstance)
      Supports additional initialisation using the test class
      java.util.List<au.com.dius.pact.core.model.Pact> load​(java.lang.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 Detail

      • load

        java.util.List<au.com.dius.pact.core.model.Pact> load​(java.lang.String providerName)
                                                       throws java.io.IOException
        Load pacts from appropriate source
        Parameters:
        providerName - name of provider for which pacts will be loaded
        Returns:
        list of pacts
        Throws:
        java.io.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 java.lang.String description()
        Returns a description of this pact loader
      • enablePendingPacts

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

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