assertion

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aborter

type Aborter interface {
	AbortChan() <-chan struct{}
}

type Asserter

type Asserter interface {
	ResultChan() <-chan TestAssertionResult
}

type DefaultAssertionService

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

func NewDefaultAssertionService

func NewDefaultAssertionService() (service *DefaultAssertionService)

func (*DefaultAssertionService) AbortChan

func (as *DefaultAssertionService) AbortChan() <-chan struct{}

func (*DefaultAssertionService) DoneChan

func (as *DefaultAssertionService) DoneChan() <-chan struct{}

func (*DefaultAssertionService) GetFailCount

func (as *DefaultAssertionService) GetFailCount() int

func (*DefaultAssertionService) GetTotalTimes

func (as *DefaultAssertionService) GetTotalTimes() []int64

func (*DefaultAssertionService) Init

func (as *DefaultAssertionService) Init(assertions map[string]types.TestAssertionOpt) chan struct{}

func (*DefaultAssertionService) ResultChan

func (as *DefaultAssertionService) ResultChan() <-chan TestAssertionResult

func (*DefaultAssertionService) Start

func (as *DefaultAssertionService) Start(input <-chan *types.ScenarioResult)

type FailedRule

type FailedRule struct {
	Rule        string                 `json:"rule"`
	ReceivedMap map[string]interface{} `json:"received"`
}

type ResultListener

type ResultListener interface {
	Start(input <-chan *types.ScenarioResult)
	DoneChan() <-chan struct{} // indicates processing of results are done
}

type TestAssertionResult

type TestAssertionResult struct {
	Fail        bool         `json:"fail"`
	Aborted     bool         `json:"aborted"`
	FailedRules []FailedRule `json:"failed_rules"`
}

Jump to

Keyboard shortcuts

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