coretestcases

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaseV1

type CaseV1 coretests.BaseTestCase

CaseV1

  • Title : Test case header
  • ArrangeInput : Preparing input
  • ActualInput : Input for the act method
  • ExpectedInput : Set expectations for the unit test (what we are going receive from invoking something)
  • Will verify type using VerifyTypeOf

func (CaseV1) Actual

func (it CaseV1) Actual() interface{}

Actual

Must SetActual first.

func (CaseV1) ArrangeTypeName

func (it CaseV1) ArrangeTypeName() string

func (CaseV1) AsBaseTestCase

func (it CaseV1) AsBaseTestCase() coretests.BaseTestCase

func (CaseV1) AsSimpleTestCaseWrapper

func (it CaseV1) AsSimpleTestCaseWrapper() coretests.SimpleTestCaseWrapper

func (CaseV1) AsSimpleTestCaseWrapperContractsBinder

func (it CaseV1) AsSimpleTestCaseWrapperContractsBinder() coretests.SimpleTestCaseWrapperContractsBinder

func (CaseV1) AssertDirectly

func (it CaseV1) AssertDirectly(
	t *testing.T,
	additionalTitle string,
	msg string,
	caseIndex int,
	actual interface{},
	assertion convey.Assertion,
	expectation interface{},
)

AssertDirectly

Assert directly using convey.Convey

func (CaseV1) CaseTitle

func (it CaseV1) CaseTitle() string

func (CaseV1) Expected

func (it CaseV1) Expected() interface{}

func (CaseV1) Input

func (it CaseV1) Input() interface{}

func (CaseV1) PrepareTitle

func (it CaseV1) PrepareTitle(
	caseIndex int,
	additionalTitle string,
) string

func (CaseV1) SetActual

func (it CaseV1) SetActual(actual interface{})

func (CaseV1) SetExpected

func (it CaseV1) SetExpected(expected interface{})

func (CaseV1) ShouldBe

func (it CaseV1) ShouldBe(
	t *testing.T,
	caseIndex int,
	compareAs stringcompareas.Variant,
	actualElements ...string,
) error

func (CaseV1) ShouldBeEqual

func (it CaseV1) ShouldBeEqual(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) ShouldBeNotEqual

func (it CaseV1) ShouldBeNotEqual(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) ShouldBeRegex

func (it CaseV1) ShouldBeRegex(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

ShouldBeRegex

Each expectation line acts as a regex to be validated against the actual line.

func (CaseV1) ShouldBeSortedEqual

func (it CaseV1) ShouldBeSortedEqual(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) ShouldBeTrimEqual

func (it CaseV1) ShouldBeTrimEqual(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) ShouldBeTrimRegex

func (it CaseV1) ShouldBeTrimRegex(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

ShouldBeRegex

Each expectation line acts as a regex to be validated against the actual line.

func (CaseV1) ShouldBeUsingCondition

func (it CaseV1) ShouldBeUsingCondition(
	t *testing.T,
	caseIndex int,
	compareAs stringcompareas.Variant,
	condition corevalidator.Condition,
	actualElements ...string,
) error

func (CaseV1) ShouldContains

func (it CaseV1) ShouldContains(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) ShouldEndsWith

func (it CaseV1) ShouldEndsWith(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) ShouldHaveNoError

func (it CaseV1) ShouldHaveNoError(
	t *testing.T,
	additionalTitle string,
	caseIndex int,
	err error,
)

func (CaseV1) ShouldStartsWith

func (it CaseV1) ShouldStartsWith(
	t *testing.T,
	caseIndex int,
	actualElements ...string,
)

func (CaseV1) SliceValidator

func (it CaseV1) SliceValidator(
	compareAs stringcompareas.Variant,
	actualElements []string,
) corevalidator.SliceValidator

func (CaseV1) SliceValidatorCondition

func (it CaseV1) SliceValidatorCondition(
	compareAs stringcompareas.Variant,
	condition corevalidator.Condition,
	actualElements []string,
) corevalidator.SliceValidator

func (CaseV1) TypeShouldMatch

func (it CaseV1) TypeShouldMatch(
	t *testing.T,
) error

TypeShouldMatch

Assert along with returns the error.

func (CaseV1) VerifyAll

func (it CaseV1) VerifyAll(
	caseIndex int,
	compareAs stringcompareas.Variant,
	actualElements []string,
) error

func (CaseV1) VerifyAllCondition

func (it CaseV1) VerifyAllCondition(
	caseIndex int,
	compareAs stringcompareas.Variant,
	condition corevalidator.Condition,
	actualElements []string,
) error

func (CaseV1) VerifyAllEqual

func (it CaseV1) VerifyAllEqual(
	caseIndex int,
	actualElements ...string,
) error

func (CaseV1) VerifyAllEqualCondition

func (it CaseV1) VerifyAllEqualCondition(
	caseIndex int,
	condition corevalidator.Condition,
	actualElements ...string,
) error

func (CaseV1) VerifyAllSliceValidator

func (it CaseV1) VerifyAllSliceValidator(
	caseIndex int,
	validator corevalidator.SliceValidator,
) error

func (CaseV1) VerifyError

func (it CaseV1) VerifyError(
	caseIndex int,
	compareAs stringcompareas.Variant,
	actualElements ...string,
) error

func (CaseV1) VerifyFirst

func (it CaseV1) VerifyFirst(
	caseIndex int,
	compareAs stringcompareas.Variant,
	actualElements []string,
) error

Jump to

Keyboard shortcuts

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