public class BasePact<I extends Interaction> implements Pact<I>
Base Pact class
| Modifier and Type | Class and Description |
|---|---|
static class |
BasePact.Companion |
| Modifier and Type | Field and Description |
|---|---|
static BasePact.Companion |
Companion |
| Constructor and Description |
|---|
BasePact(Consumer consumer,
Provider provider,
java.util.Map<java.lang.String,? extends java.lang.Object> metadata,
PactSource source)
Base Pact class
|
BasePact(Consumer consumer,
Provider provider,
java.util.Map<java.lang.String,? extends java.lang.Object> metadata)
Base Pact class
|
BasePact(Consumer consumer,
Provider provider)
Base Pact class
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compatibleTo(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
|
boolean |
equals(java.lang.Object other) |
java.io.File |
fileForPact(java.lang.String pactDir) |
Consumer |
getConsumer()
Returns the consumer of the service for the pact
|
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata() |
Provider |
getProvider()
Returns the provider of the service for the pact
|
PactSource |
getSource()
The source that this pact was loaded from
|
int |
hashCode() |
static java.lang.String |
lookupVersion() |
static java.util.Map<java.lang.String,java.lang.Object> |
metaData(com.google.gson.JsonElement metadata,
PactSpecVersion pactSpecVersion) |
java.lang.String |
toString() |
void |
write(java.lang.String pactDir,
PactSpecVersion pactSpecVersion) |
compatibleTo, getConsumer, getInteractions, getProvider, getSource, mergeInteractions, sortInteractions, toMappublic static BasePact.Companion Companion
public BasePact(Consumer consumer, Provider provider, java.util.Map<java.lang.String,? extends java.lang.Object> metadata, 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 frompublic BasePact(Consumer consumer, Provider provider, 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(java.lang.String pactDir,
PactSpecVersion pactSpecVersion)
public java.io.File fileForPact(java.lang.String pactDir)
public boolean compatibleTo(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(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
public Consumer getConsumer()
Returns the consumer of the service for the pact
public Provider getProvider()
Returns the provider of the service for the pact
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
public PactSource getSource()
The source that this pact was loaded from
public static java.util.Map<java.lang.String,java.lang.Object> metaData(com.google.gson.JsonElement metadata,
PactSpecVersion pactSpecVersion)
public static java.lang.String lookupVersion()