public class BasePact<I extends Interaction> implements Pact<I>
Base Pact class
@JvmOverloads
public BasePact(@NotNull
Consumer consumer,
@NotNull
Provider provider,
@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> metadata,
@NotNull
PactSource source)
Base Pact class
consumer - Returns the consumer of the service for the pactprovider - Returns the provider of the service for the pactsource - The source that this pact was loaded from@JvmOverloads
public BasePact(@NotNull
Consumer consumer,
@NotNull
Provider provider,
@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> metadata)
Base Pact class
consumer - Returns the consumer of the service for the pactprovider - Returns the provider of the service for the pactpublic void write(@NotNull
java.lang.String pactDir,
@NotNull
PactSpecVersion pactSpecVersion)
@NotNull
public java.io.File fileForPact(@NotNull
java.lang.String pactDir)
public boolean compatibleTo(@NotNull
Pact<?> other)
If this pact is compatible with the other pact. Pacts are compatible if they have the same provider and they are the same type
public boolean equals(@Nullable
java.lang.Object other)
public int hashCode()
@NotNull public java.lang.String toString()
@NotNull public Consumer getConsumer()
Returns the consumer of the service for the pact
@NotNull public Provider getProvider()
Returns the provider of the service for the pact
@NotNull public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
@NotNull public PactSource getSource()
The source that this pact was loaded from
@JvmStatic
@NotNull
public static java.util.Map<java.lang.String,java.lang.Object> metaData(@Nullable
com.google.gson.JsonElement metadata,
@NotNull
PactSpecVersion pactSpecVersion)
@JvmStatic @NotNull public static java.lang.String lookupVersion()