tests

package
v0.0.0-...-449df0f Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ApprovedSuffix = ".approved.json"
View Source
const ReceivedSuffix = ".received.json"

Variables

This section is empty.

Functions

func ApproveJson

func ApproveJson(received map[string]interface{}, name string) error

func Compare

func Compare(path string) ([]byte, gojsondiff.Diff, error)

func LoadData

func LoadData(file string) ([]byte, error)

func LoadInvalidData

func LoadInvalidData(dataType string) ([]byte, error)

func LoadValidData

func LoadValidData(dataType string) ([]byte, error)

func StrConcat

func StrConcat(pre string, post string, delimiter string) string

func TestDocumentedFieldsInEvent

func TestDocumentedFieldsInEvent(t *testing.T, fieldPaths []string, fn processor.NewProcessor, exceptions *set.Set)

func TestEventAttrsDocumentedInFields

func TestEventAttrsDocumentedInFields(t *testing.T, fieldPaths []string, fn processor.NewProcessor)

func TestJsonSchemaKeywordLimitation

func TestJsonSchemaKeywordLimitation(t *testing.T, fieldPaths []string, schema string, exceptions *set.Set)

func TestPayloadAttributesInSchema

func TestPayloadAttributesInSchema(t *testing.T, name string, undocumentedAttrs *set.Set, schema string)

func TestProcessRequests

func TestProcessRequests(t *testing.T, fn processor.NewProcessor, requestInfo []RequestInfo)

func UnmarshalData

func UnmarshalData(file string, data interface{}) error

func UnmarshalInvalidData

func UnmarshalInvalidData(dataType string, data interface{}) error

func UnmarshalValidData

func UnmarshalValidData(dataType string, data interface{}) error

Types

type Mapping

type Mapping struct {
	// contains filtered or unexported fields
}

type RequestInfo

type RequestInfo struct {
	Name string
	Path string
}

type Schema

type Schema struct {
	Title                string
	Properties           map[string]*Schema
	AdditionalProperties map[string]interface{}
	PatternProperties    map[string]interface{}
	Items                *Schema
	MaxLength            int
}

Jump to

Keyboard shortcuts

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