Documentation ¶
Overview ¶
Copyright 2021 SANGFOR TECHNOLOGIES
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type Spec
- func (spec *Spec) ExpectEquals(actual, value interface{})
- func (spec *Spec) ExpectEqualsAny(actual interface{}, values ...interface{})
- func (spec *Spec) ExpectFalse(actual interface{})
- func (spec *Spec) ExpectNil(actual interface{})
- func (spec *Spec) ExpectNotEquals(actual, value interface{})
- func (spec *Spec) ExpectNotEqualsAny(actual interface{}, values ...interface{})
- func (spec *Spec) ExpectNotNil(actual interface{})
- func (spec *Spec) ExpectTrue(actual interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct {
// contains filtered or unexported fields
}
Spec is an access point to test Expections
func S ¶
S generates a spec. You will want to use it once in a test file, once in a test or once per each check
func (*Spec) ExpectEquals ¶
func (spec *Spec) ExpectEquals(actual, value interface{})
ExpectEquals expects given values to be equal (comparison via `==`), or errors
func (*Spec) ExpectEqualsAny ¶
func (spec *Spec) ExpectEqualsAny(actual interface{}, values ...interface{})
ExpectEqualsAny expects given actual to equal (comparison via `==`) at least one of given values, or errors
func (*Spec) ExpectFalse ¶
func (spec *Spec) ExpectFalse(actual interface{})
ExpectFalse expects given values to be false, or errors
func (*Spec) ExpectNil ¶
func (spec *Spec) ExpectNil(actual interface{})
ExpectNil expects given value to be nil, or errors
func (*Spec) ExpectNotEquals ¶
func (spec *Spec) ExpectNotEquals(actual, value interface{})
ExpectNotEquals expects given values to be nonequal (comparison via `==`), or errors
func (*Spec) ExpectNotEqualsAny ¶
func (spec *Spec) ExpectNotEqualsAny(actual interface{}, values ...interface{})
ExpectNotEqualsAny expects given actual to be nonequal (comparison via `==`)tp any of given values, or errors
func (*Spec) ExpectNotNil ¶
func (spec *Spec) ExpectNotNil(actual interface{})
ExpectNotNil expects given value to be not nil, or errors
func (*Spec) ExpectTrue ¶
func (spec *Spec) ExpectTrue(actual interface{})
ExpectTrue expects given values to be true, or errors