coretests

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAssertMessage added in v0.0.4

func GetAssertMessage(testCaseMessenger TestCaseMessenger, counter int) string

func GetAssertMessageQuick added in v0.0.4

func GetAssertMessageQuick(
	when,
	actual,
	expected interface{},
	counter int,
) string

func GetMessageToSorted added in v0.6.2

func GetMessageToSorted(
	isPrint bool,
	message,
	joiner string,
) string

func GetMessageToSortedArray added in v0.6.2

func GetMessageToSortedArray(
	isPrint bool,
	isSort bool,
	message string,
) []string

func GetMessageToSortedArrayDefault added in v0.6.2

func GetMessageToSortedArrayDefault(
	message string,
) []string

GetMessageToSortedArrayDefault

isPrint: false, isSort: true

func GetTestHeader added in v0.0.4

func GetTestHeader(testCaseMessenger TestCaseMessenger) string

func GetTrimmedNonEmptySpaceSplit added in v0.6.4

func GetTrimmedNonEmptySpaceSplit(
	message string,
	isSort bool,
) []string

func IsErrorNonWhiteSortedEqual added in v0.7.3

func IsErrorNonWhiteSortedEqual(
	isPrintOnFail bool,
	actual error,
	expectationMessageDef *msgtype.ExpectationMessageDef,
) bool

func IsStrMsgNonWhiteSortedEqual added in v0.7.3

func IsStrMsgNonWhiteSortedEqual(
	isPrintOnFail bool,
	actual string,
	expectationMessageDef *msgtype.ExpectationMessageDef,
) bool

func LogOnFail added in v0.3.8

func LogOnFail(
	isPass bool,
	expected, actual interface{},
)

func PrintFailedExpected added in v0.6.2

func PrintFailedExpected(
	isFailed bool,
	when,
	actual,
	expected interface{},
	counter int,
)

func PrintNameValue added in v0.3.8

func PrintNameValue(header string, any interface{})

func PrintValue added in v0.3.8

func PrintValue(header string, any interface{})

func SkipOnUnix

func SkipOnUnix(t *testing.T)

SkipOnUnix Skip on Unix

func SkipOnWindows

func SkipOnWindows(t *testing.T)

SkipOnWindows Skip on Windows

func ToStringNameValues added in v0.3.8

func ToStringNameValues(any interface{}) string

func ToStringValues added in v0.3.8

func ToStringValues(any interface{}) string

Types

type CaseIndexPlusIsPrint added in v0.7.3

type CaseIndexPlusIsPrint struct {
	IsPrint   bool
	CaseIndex int
}

type Compare added in v0.6.3

type Compare struct {
	MatchingLength int // 0/-1 means all, number means, that number must match
	StringContains string
	// contains filtered or unexported fields
}

func (*Compare) GetPrintMessage added in v0.6.3

func (it *Compare) GetPrintMessage(index int) string

func (*Compare) IsMatch added in v0.6.3

func (it *Compare) IsMatch(
	isPrint bool,
	index int,
	instruction *ComparingInstruction,
) bool

func (*Compare) SortedString added in v0.6.3

func (it *Compare) SortedString() string

func (*Compare) SortedStrings added in v0.6.3

func (it *Compare) SortedStrings() []string

type ComparingInstruction added in v0.6.3

type ComparingInstruction struct {
	FunName,
	Header,
	TestCaseName,
	MatchingAsEqualExpectation string
	ComparingItems                   []Compare
	HasWhitespace, IsMatchingAsEqual bool
	// contains filtered or unexported fields
}

func (*ComparingInstruction) Actual added in v0.6.3

func (it *ComparingInstruction) Actual() string

func (*ComparingInstruction) ActualHashset added in v0.6.3

func (it *ComparingInstruction) ActualHashset() *corestr.Hashset

func (*ComparingInstruction) IsMatch added in v0.6.9

func (it *ComparingInstruction) IsMatch(
	caseIndexPlusIsPrint *CaseIndexPlusIsPrint,
) bool

func (*ComparingInstruction) SetActual added in v0.6.4

func (it *ComparingInstruction) SetActual(actual string)

type SimpleGherkins added in v0.6.9

type SimpleGherkins struct {
	Feature,
	Given,
	When,
	Then,
	Expect,
	Actual string
}

SimpleGherkins

https://www.guru99.com/gherkin-test-cucumber.html Feature: Login functionality of social networking site Facebook. Given: I am a facebook user. When: I enter username as username. And I enter the password as the password Then I should be redirected to the home page of facebook Given -> When -> Then

func (*SimpleGherkins) GetMessageConditional added in v0.6.9

func (it *SimpleGherkins) GetMessageConditional(
	isExpectation bool,
	testIndex int,
) string

func (*SimpleGherkins) GetWithExpectation added in v0.6.9

func (it *SimpleGherkins) GetWithExpectation(
	testIndex int,
) string

func (*SimpleGherkins) String added in v0.6.9

func (it *SimpleGherkins) String() string

func (*SimpleGherkins) ToString added in v0.6.9

func (it *SimpleGherkins) ToString(testIndex int) string

type TestCaseMessenger added in v0.0.4

type TestCaseMessenger interface {
	FuncName() string
	Value() interface{}
	Expected() interface{}
	Actual() interface{}
}

type TestFuncName added in v0.0.4

type TestFuncName string

func (TestFuncName) Value added in v0.0.4

func (funcName TestFuncName) Value() string

Jump to

Keyboard shortcuts

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