tests

package
v6.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, p processor.Processor, 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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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