pact

package module
v0.0.0-...-3a5bafc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2015 License: MIT Imports: 2 Imported by: 0

README

pact-go

A Go Lang implementation of the Ruby consumer driven contract library, Pact. Pact is based off the specification found at https://github.com/bethesque/pact_specification.

Initial, not yet functional

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerPactBuilder

type ConsumerPactBuilder struct {
	// contains filtered or unexported fields
}

func NewConsumerPactBuilder

func NewConsumerPactBuilder(pactConfig *PactConfig) *ConsumerPactBuilder

func (*ConsumerPactBuilder) Build

func (c *ConsumerPactBuilder) Build() error

func (*ConsumerPactBuilder) GetMockProviderService

func (c *ConsumerPactBuilder) GetMockProviderService() ProviderService

func (*ConsumerPactBuilder) HasPactWith

func (c *ConsumerPactBuilder) HasPactWith(serviceProvider string) PactBuilder

func (*ConsumerPactBuilder) ServiceConsumer

func (c *ConsumerPactBuilder) ServiceConsumer(consumer string) PactBuilder

type MockProviderService

type MockProviderService struct {
	// contains filtered or unexported fields
}

func NewMockProviderService

func NewMockProviderService(config *PactConfig) *MockProviderService

func (*MockProviderService) ClearInteractions

func (p *MockProviderService) ClearInteractions() ProviderService

func (*MockProviderService) Given

func (p *MockProviderService) Given(state string) ProviderService

func (*MockProviderService) UponReceiving

func (p *MockProviderService) UponReceiving(description string) ProviderService

func (*MockProviderService) VerifyInteractions

func (p *MockProviderService) VerifyInteractions() error

func (*MockProviderService) WillRespondWith

func (p *MockProviderService) WillRespondWith(providerResponse *provider.ProviderResponse) ProviderService

func (*MockProviderService) With

func (p *MockProviderService) With(providerRequest *provider.ProviderRequest) ProviderService

type PactBuilder

type PactBuilder interface {
	ServiceConsumer(consumer string) PactBuilder
	HasPactWith(serviceProvider string) PactBuilder
	GetMockProviderService() ProviderService
	Build() error
}

type PactConfig

type PactConfig struct {
	PactPath string
	LogPath  string
}

type ProviderService

type ProviderService interface {
	Given(state string) ProviderService
	UponReceiving(description string) ProviderService
	With(request *provider.ProviderRequest) ProviderService
	WillRespondWith(response *provider.ProviderResponse) ProviderService
	ClearInteractions() ProviderService
	VerifyInteractions() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL