tests

package
v0.0.0-...-914d145 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group interface {
	Run(string)
	PrintResult(io.Writer)
}

Group represents a series of related Tests to run

type OrderedTestGroup

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

OrderedTestGroup is a set of tests which must be run sequentially

func (*OrderedTestGroup) Advance

func (ordered *OrderedTestGroup) Advance()

Advance moves on to the next test, unless already finished

func (*OrderedTestGroup) Done

func (ordered *OrderedTestGroup) Done() bool

Done checks if either all tests have been run or the current test has failed

func (*OrderedTestGroup) PrintResults

func (ordered *OrderedTestGroup) PrintResults(out io.Writer)

PrintResults will print the result from the last test (if all passed) or the current failed test

func (*OrderedTestGroup) Run

func (ordered *OrderedTestGroup) Run(cell string)

Run execues the current test, unless it has already failed or there are no more tests

type Suite

type Suite interface {
	Run(*csv.Reader, io.Writer) error
}

Suite runs one or more tests on a CSV file

type Test

type Test interface {
	Run(string)
	Passed() bool
	PrintResult(io.Writer)
}

Test represents one of the various checks performed

type UnorderedTestGroup

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

UnorderedTestGroup is a set of tests which may be run all at once

func (*UnorderedTestGroup) Advance

func (unordered *UnorderedTestGroup) Advance()

Advance moves on to the next test in the suite if not already done

func (*UnorderedTestGroup) Done

func (unordered *UnorderedTestGroup) Done() bool

Done checks if either all tests have been run

func (*UnorderedTestGroup) PrintResults

func (unordered *UnorderedTestGroup) PrintResults(out io.Writer)

PrintResults will print the result for each of the tests

func (*UnorderedTestGroup) Run

func (unordered *UnorderedTestGroup) Run(cell string)

Run executes the current test, if not already done

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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