Documentation
¶
Index ¶
- func AnyToBytes(anyItem interface{}) []byte
- func AnyToBytesPtr(anyItem interface{}) *[]byte
- func GetAssertMessage(testCaseMessenger TestCaseMessenger, counter int) string
- func GetAssertMessageQuick(when, actual, expected interface{}, counter int) string
- func GetAssertMessageUsingSimpleTestCaseWrapper(testCaseIndex int, testCaseWrapper SimpleTestCaseWrapper) string
- func GetMessageToSorted(isPrint bool, message, joiner string) string
- func GetMessageToSortedArray(isPrint bool, isSort bool, message string) []string
- func GetMessageToSortedArrayDefault(message string) []string
- func GetTestHeader(testCaseMessenger TestCaseMessenger) string
- func GetTrimmedNonEmptySpaceSplit(message string, isSort bool) []string
- func IsErrorNonWhiteSortedEqual(isPrintOnFail bool, actual error, ...) bool
- func IsStrMsgNonWhiteSortedEqual(isPrintOnFail bool, actual string, ...) bool
- func LogOnFail(isPass bool, expected, actual interface{})
- func PrintFailedExpected(isFailed bool, when, actual, expected interface{}, counter int)
- func PrintNameValue(header string, any interface{})
- func PrintValue(header string, any interface{})
- func SkipOnUnix(t *testing.T)
- func SkipOnWindows(t *testing.T)
- func ToStringNameValues(any interface{}) string
- func ToStringValues(any interface{}) string
- type BaseTestCase
- func (it *BaseTestCase) Actual() interface{}
- func (it *BaseTestCase) ActualString() string
- func (it *BaseTestCase) ArrangeString() string
- func (it *BaseTestCase) AsSimpleTestCaseWrapper() SimpleTestCaseWrapper
- func (it *BaseTestCase) CaseTitle() string
- func (it *BaseTestCase) Expected() interface{}
- func (it *BaseTestCase) ExpectedString() string
- func (it *BaseTestCase) Input() interface{}
- func (it *BaseTestCase) SetActual(actual interface{})
- func (it *BaseTestCase) String(caseIndex int) string
- type CaseIndexPlusIsPrint
- type Compare
- type ComparingInstruction
- type DraftType
- func (it DraftType) Clone() DraftType
- func (it *DraftType) ClonePtr() *DraftType
- func (it DraftType) F1String() string
- func (it DraftType) F2Integer() int
- func (it *DraftType) IsEqual(isIncludingInnerFields bool, right *DraftType) bool
- func (it *DraftType) IsEqualAll(right *DraftType) bool
- func (it DraftType) JsonBytes() []byte
- func (it DraftType) JsonBytesPtr() *[]byte
- func (it DraftType) JsonString() string
- func (it *DraftType) LinesLength() int
- func (it DraftType) NonPtr() DraftType
- func (it *DraftType) PtrOrNonPtr(isPtr bool) interface{}
- func (it *DraftType) RawBytesLength() int
- func (it *DraftType) SetF2Integer(f2Integer int)
- func (it *DraftType) VerifyAllNotEqualErr(right *DraftType) error
- func (it *DraftType) VerifyAllNotEqualMessage(right *DraftType) string
- func (it *DraftType) VerifyNotEqualErr(isIncludingInnerFields bool, right *DraftType) error
- func (it *DraftType) VerifyNotEqualExcludingInnerFieldsErr(right *DraftType) error
- func (it *DraftType) VerifyNotEqualMessage(isIncludingInnerFields bool, right *DraftType) string
- type SimpleGherkins
- type SimpleTestCaseWrapper
- type SimpleTestCaseWrapperContractsBinder
- type TestCaseMessenger
- type TestFuncName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToBytes ¶ added in v1.1.0
func AnyToBytes(anyItem interface{}) []byte
func AnyToBytesPtr ¶ added in v1.1.0
func AnyToBytesPtr(anyItem interface{}) *[]byte
func GetAssertMessage ¶ added in v0.0.4
func GetAssertMessage(testCaseMessenger TestCaseMessenger, counter int) string
func GetAssertMessageQuick ¶ added in v0.0.4
GetAssertMessageQuick
Gives generic and consistent test message using msgformats.QuickIndexInputActualExpectedMessageFormat
func GetAssertMessageUsingSimpleTestCaseWrapper ¶ added in v1.1.0
func GetAssertMessageUsingSimpleTestCaseWrapper(testCaseIndex int, testCaseWrapper SimpleTestCaseWrapper) string
GetAssertMessageUsingSimpleTestCaseWrapper
Gives generic and consistent test message using msgformats.QuickIndexTitleInputActualExpectedMessageFormat
func GetMessageToSorted ¶ added in v0.6.2
func GetMessageToSortedArray ¶ added in v0.6.2
func GetMessageToSortedArrayDefault ¶ added in v0.6.2
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 IsErrorNonWhiteSortedEqual ¶ added in v0.7.3
func IsErrorNonWhiteSortedEqual( isPrintOnFail bool, actual error, expectationMessageDef *errcore.ExpectationMessageDef, ) bool
func IsStrMsgNonWhiteSortedEqual ¶ added in v0.7.3
func IsStrMsgNonWhiteSortedEqual( isPrintOnFail bool, actual string, expectationMessageDef *errcore.ExpectationMessageDef, ) bool
func PrintFailedExpected ¶ added in v0.6.2
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 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 BaseTestCase ¶ added in v1.1.0
type BaseTestCase struct { Title string // consider as header ArrangeInput, ActualInput, ExpectedInput interface{} HasError bool IsValidateError bool }
func (*BaseTestCase) Actual ¶ added in v1.1.0
func (it *BaseTestCase) Actual() interface{}
func (*BaseTestCase) ActualString ¶ added in v1.1.0
func (it *BaseTestCase) ActualString() string
func (*BaseTestCase) ArrangeString ¶ added in v1.1.0
func (it *BaseTestCase) ArrangeString() string
func (*BaseTestCase) AsSimpleTestCaseWrapper ¶ added in v1.1.0
func (it *BaseTestCase) AsSimpleTestCaseWrapper() SimpleTestCaseWrapper
func (*BaseTestCase) CaseTitle ¶ added in v1.1.0
func (it *BaseTestCase) CaseTitle() string
func (*BaseTestCase) Expected ¶ added in v1.1.0
func (it *BaseTestCase) Expected() interface{}
func (*BaseTestCase) ExpectedString ¶ added in v1.1.0
func (it *BaseTestCase) ExpectedString() string
func (*BaseTestCase) Input ¶ added in v1.1.0
func (it *BaseTestCase) Input() interface{}
func (*BaseTestCase) SetActual ¶ added in v1.1.0
func (it *BaseTestCase) SetActual(actual interface{})
func (*BaseTestCase) String ¶ added in v1.1.0
func (it *BaseTestCase) String(caseIndex int) string
type CaseIndexPlusIsPrint ¶ added in v0.7.3
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 (*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 (*Compare) SortedStrings ¶ added in v0.6.3
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 DraftType ¶ added in v1.1.0
type DraftType struct {
SampleString1, SampleString2 string
SampleInteger int
Lines []string
RawBytes []byte
// contains filtered or unexported fields
}
func AnyToDraftType ¶ added in v1.1.0
func AnyToDraftType(anyItem interface{}) *DraftType
func (*DraftType) IsEqualAll ¶ added in v1.1.0
func (DraftType) JsonBytesPtr ¶ added in v1.1.0
func (DraftType) JsonString ¶ added in v1.1.0
func (*DraftType) LinesLength ¶ added in v1.1.0
func (*DraftType) PtrOrNonPtr ¶ added in v1.1.0
func (*DraftType) RawBytesLength ¶ added in v1.1.0
func (*DraftType) SetF2Integer ¶ added in v1.1.0
func (*DraftType) VerifyAllNotEqualErr ¶ added in v1.1.0
func (*DraftType) VerifyAllNotEqualMessage ¶ added in v1.1.0
func (*DraftType) VerifyNotEqualErr ¶ added in v1.1.0
func (*DraftType) VerifyNotEqualExcludingInnerFieldsErr ¶ added in v1.1.0
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 SimpleTestCaseWrapper ¶ added in v1.1.0
type SimpleTestCaseWrapper interface { CaseTitle() string Input() interface{} Expected() interface{} Actual() interface{} }
type SimpleTestCaseWrapperContractsBinder ¶ added in v1.1.0
type SimpleTestCaseWrapperContractsBinder interface { SimpleTestCaseWrapper AsSimpleTestCaseWrapper() SimpleTestCaseWrapper }
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
Source Files
¶
- AnyToBytes.go
- AnyToBytesPtr.go
- AnyToDraftType.go
- BaseTestCase.go
- CaseIndexPlusIsPrint.go
- Compare.go
- CompareInstruction.go
- DraftType.go
- GetAssertMessage.go
- GetAssertMessageQuick.go
- GetAssertMessageUsingSimpleTestCaseWrapper.go
- GetLogMessageBoolFailed.go
- GetMessageToSorted.go
- GetMessageToSortedArray.go
- GetMessageToSortedArrayDefault.go
- GetTestHeader.go
- GetTrimmedNonEmptySpaceSplit.go
- IsErrorNonWhiteSortedEqual.go
- IsStrMsgNonWhiteSortedEqual.go
- PrintFailedExpected.go
- PrintNameValue.go
- PrintValues.go
- SimpleGherkins.go
- SimpleTestCaseWrapper.go
- SimpleTestCaseWrapperContractsBinder.go
- SkipOnUnix.go
- SkipOnWindows.go
- TestCaseMessenger.go
- TestFuncName.go
- ToStringNameValues.go
- ToStringValues.go
- consts.go
- isStrMsgNonWhiteSortedEqualInternal.go
Click to show internal directories.
Click to hide internal directories.