Documentation
¶
Overview ¶
Suite of testing-oriented commands that will trigger errors or failures if they aren't satistifed.
Index ¶
- type BinaryComparison
- type Commands
- func (self *Commands) Compare(have interface{}, args *BinaryComparison) error
- func (self *Commands) Contains(have interface{}, args *BinaryComparison) error
- func (self *Commands) Empty(value interface{}) error
- func (self *Commands) Equal(have interface{}, args *BinaryComparison) error
- func (self *Commands) Exists(value interface{}) error
- func (self *Commands) False(value interface{}) error
- func (self *Commands) Gt(have interface{}, args *BinaryComparison) error
- func (self *Commands) Gte(have interface{}, args *BinaryComparison) error
- func (self *Commands) IsArray(value interface{}) error
- func (self *Commands) IsBoolean(value interface{}) error
- func (self *Commands) IsDuration(value interface{}) error
- func (self *Commands) IsNumeric(value interface{}) error
- func (self *Commands) IsObject(value interface{}) error
- func (self *Commands) IsScalar(value interface{}) error
- func (self *Commands) IsString(value interface{}) error
- func (self *Commands) IsTime(value interface{}) error
- func (self *Commands) Lt(have interface{}, args *BinaryComparison) error
- func (self *Commands) Lte(have interface{}, args *BinaryComparison) error
- func (self *Commands) NotContains(have interface{}, args *BinaryComparison) error
- func (self *Commands) NotEqual(have interface{}, args *BinaryComparison) error
- func (self *Commands) NotNull(value interface{}) error
- func (self *Commands) Null(value interface{}) error
- func (self *Commands) True(value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryComparison ¶
type BinaryComparison struct {
Value interface{} `json:"value"`
Test string `json:"test"`
}
type Commands ¶
func (*Commands) Compare ¶
func (self *Commands) Compare(have interface{}, args *BinaryComparison) error
Return an error if the given value is not equal to the other value.
func (*Commands) Contains ¶
func (self *Commands) Contains(have interface{}, args *BinaryComparison) error
Return an error if the given value does not contain another value.
func (*Commands) Equal ¶
func (self *Commands) Equal(have interface{}, args *BinaryComparison) error
Return an error if the given value is not equal to the other value.
func (*Commands) Gt ¶
func (self *Commands) Gt(have interface{}, args *BinaryComparison) error
Return an error if the given value is not numerically greater than the second value.
func (*Commands) Gte ¶
func (self *Commands) Gte(have interface{}, args *BinaryComparison) error
Return an error if the given value is not numerically greater than or equal to the second value.
func (*Commands) IsDuration ¶
Return an error if the given value is not parsable as a duration.
func (*Commands) Lt ¶
func (self *Commands) Lt(have interface{}, args *BinaryComparison) error
Return an error if the given value is not numerically less than the second value.
func (*Commands) Lte ¶
func (self *Commands) Lte(have interface{}, args *BinaryComparison) error
Return an error if the given value is not numerically less than or equal to the second value.
func (*Commands) NotContains ¶
func (self *Commands) NotContains(have interface{}, args *BinaryComparison) error
Return an error if the given value contains another value.
func (*Commands) NotEqual ¶
func (self *Commands) NotEqual(have interface{}, args *BinaryComparison) error
Return an error if the given value is equal to the other value.