contract

package
v0.300.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract interface {
	testcase.Suite
	testcase.OpenSuite
}

Contract represents a resource specification also known as "contract".

The main goal of a contract is to introduce dependency injection pattern at logical level between a consumer its supplier.

In other words any expectations from a consumer/interactor/use-case towards a used dependency should be defined in a contract. This allows architecture flexibility since the expectations not bound to a certain technology, but purely high level and as such can be implemented in various ways.

Using resource Spec also force the writer of the Spec to keep things at high level and only focus on the expected behavior, instead of going into implementation details.

Jump to

Keyboard shortcuts

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