Documentation
¶
Index ¶
- Constants
- Variables
- func BeforeEach(f func())
- func EqualsComparitor(k reflect.Kind, a, b interface{}) bool
- func Expectify(suite interface{}, t *testing.T)
- func Fail(format string, args ...interface{})
- func GreaterOrEqualToComparitor(k reflect.Kind, a, b interface{}) bool
- func GreaterThanComparitor(k reflect.Kind, a, b interface{}) bool
- func IsInt(a interface{}) bool
- func IsNil(a interface{}) bool
- func IsNumeric(a interface{}) bool
- func IsSlice(a interface{}) bool
- func IsString(a interface{}) bool
- func IsUint(a interface{}) bool
- func LessThanComparitor(k reflect.Kind, a, b interface{}) bool
- func LessThanOrEqualToComparitor(k reflect.Kind, a, b interface{}) bool
- func MockConn() *mock.MockConn
- func NotEqualsComparitor(k reflect.Kind, a, b interface{}) bool
- func RequestBuilder() *build.RequestBuilder
- func SameKind(a, b interface{}) (reflect.Kind, bool)
- func Skip(format string, args ...interface{})
- func ToInt64(a, b interface{}) (interface{}, interface{})
- func ToString(a interface{}) string
- func ToUint64(a, b interface{}) (interface{}, interface{})
- type Expectation
- func (e *Expectation) GreaterOrEqualTo(expected interface{}) PostHandler
- func (e *Expectation) GreaterThan(expected interface{}) PostHandler
- func (e *Expectation) LessOrEqualTo(expected interface{}) PostHandler
- func (e *Expectation) LessThan(expected interface{}) PostHandler
- func (e *Expectation) ToEql(expected interface{}, others ...interface{}) PostHandler
- func (e *Expectation) ToEqual(expected interface{}, others ...interface{}) PostHandler
- type Failure
- type FailurePostHandler
- type InvertedExpectation
- type JSON
- type PostHandler
- type Runner
- func (r *Runner) End() bool
- func (r *Runner) ErrorMessage(format string, args ...interface{})
- func (r *Runner) Errorf(format string, args ...interface{})
- func (r *Runner) Passed() bool
- func (r *Runner) Skip(format string, args ...interface{})
- func (r *Runner) Start(name string, typeName string) *result
- type SuccessPostHandler
- type ThanAssertion
- type ToAssertion
- type ToExpectation
Constants ¶
View Source
const ( Equals comparitorType = iota NotEqual LessThan LessThanOrEqual GreaterThan GreaterThanOrEqual )
Variables ¶
View Source
var ( FailureHandler = &FailurePostHandler{} SuccessHandler = &SuccessPostHandler{} )
View Source
var ( Comparitors = map[reflect.Kind]map[comparitorType]resolver{ reflect.Int64: map[comparitorType]resolver{ LessThan: func(a, b interface{}) bool { return a.(int64) < b.(int64) }, }, reflect.Uint64: map[comparitorType]resolver{ LessThan: func(a, b interface{}) bool { return a.(uint64) < b.(uint64) }, }, reflect.Float32: map[comparitorType]resolver{ LessThan: func(a, b interface{}) bool { return a.(float32) < b.(float32) }, }, reflect.Float64: map[comparitorType]resolver{ LessThan: func(a, b interface{}) bool { return a.(float64) < b.(float64) }, }, } )
View Source
var Errorf = func(format string, args ...interface{}) {
runner.Errorf(format, args...)
}
View Source
var NotNil = struct{}{}
Functions ¶
func BeforeEach ¶
func BeforeEach(f func())
func EqualsComparitor ¶
func GreaterThanComparitor ¶
func LessThanComparitor ¶
func NotEqualsComparitor ¶
func RequestBuilder ¶
func RequestBuilder() *build.RequestBuilder
Types ¶
type Expectation ¶
type Expectation struct {
Greater *ThanAssertion
GreaterOrEqual *ToAssertion
Less *ThanAssertion
LessOrEqual *ToAssertion
To *ToExpectation
Not *InvertedExpectation
// contains filtered or unexported fields
}
func Expect ¶
func Expect(actual interface{}, others ...interface{}) *Expectation
func (*Expectation) GreaterOrEqualTo ¶
func (e *Expectation) GreaterOrEqualTo(expected interface{}) PostHandler
func (*Expectation) GreaterThan ¶
func (e *Expectation) GreaterThan(expected interface{}) PostHandler
func (*Expectation) LessOrEqualTo ¶
func (e *Expectation) LessOrEqualTo(expected interface{}) PostHandler
func (*Expectation) LessThan ¶
func (e *Expectation) LessThan(expected interface{}) PostHandler
func (*Expectation) ToEql ¶
func (e *Expectation) ToEql(expected interface{}, others ...interface{}) PostHandler
func (*Expectation) ToEqual ¶
func (e *Expectation) ToEqual(expected interface{}, others ...interface{}) PostHandler
type FailurePostHandler ¶
type FailurePostHandler struct {
}
func (*FailurePostHandler) Message ¶
func (h *FailurePostHandler) Message(format string, args ...interface{})
type InvertedExpectation ¶
type InvertedExpectation struct {
*Expectation
}
func NotExpect ¶
func NotExpect(actual interface{}, others ...interface{}) *InvertedExpectation
type PostHandler ¶
type PostHandler interface {
Message(format string, args ...interface{})
}
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) ErrorMessage ¶
type SuccessPostHandler ¶
type SuccessPostHandler struct {
}
func (*SuccessPostHandler) Message ¶
func (h *SuccessPostHandler) Message(format string, args ...interface{})
type ThanAssertion ¶
type ThanAssertion struct {
// contains filtered or unexported fields
}
func (*ThanAssertion) Than ¶
func (a *ThanAssertion) Than(expected interface{}) PostHandler
type ToAssertion ¶
type ToAssertion struct {
// contains filtered or unexported fields
}
func (*ToAssertion) To ¶
func (a *ToAssertion) To(expected interface{}) PostHandler
type ToExpectation ¶
type ToExpectation struct {
// contains filtered or unexported fields
}
func (*ToExpectation) Contain ¶
func (e *ToExpectation) Contain(expected interface{}) PostHandler
func (*ToExpectation) Eql ¶
func (e *ToExpectation) Eql(expected interface{}, others ...interface{}) PostHandler
func (*ToExpectation) Equal ¶
func (e *ToExpectation) Equal(expected interface{}, others ...interface{}) PostHandler
Source Files
¶
Click to show internal directories.
Click to hide internal directories.