test

package
v1.30.0-dexcom-api-v2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlobValuesMaximum      = 3
	BlobArrayValuesMaximum = 3
)

Variables

View Source
var ExpectFieldIsValid = func(object map[string]interface{}, field string, value interface{}) {
	checkErrorsFromParseValidateNormalize(object, field, value, []*service.Error{})
}
View Source
var ExpectFieldNotValid = func(object map[string]interface{}, field string, value interface{}, expectedErrors []*service.Error) {
	checkErrorsFromParseValidateNormalize(object, field, value, expectedErrors)
}
View Source
var ParseAndNormalize = func(object map[string]interface{}, field string, value interface{}) data.Datum {
	return checkErrorsFromParseValidateNormalize(object, field, value, []*service.Error{})
}

Functions

func CloneBlob added in v1.24.0

func CloneBlob(datum *data.Blob) *data.Blob

func CloneBlobArray added in v1.24.0

func CloneBlobArray(datum *data.BlobArray) *data.BlobArray

func CloneDeduplicatorDescriptor added in v1.24.0

func CloneDeduplicatorDescriptor(datum *data.DeduplicatorDescriptor) *data.DeduplicatorDescriptor

func CloneSelector added in v1.29.0

func CloneSelector(datum *data.Selector) *data.Selector

func CloneSelectorOrigin added in v1.29.0

func CloneSelectorOrigin(datum *data.SelectorOrigin) *data.SelectorOrigin

func CloneSelectors added in v1.29.0

func CloneSelectors(datum *data.Selectors) *data.Selectors

func ComposeError added in v1.5.0

func ComposeError(expectedError *service.Error, source string, meta interface{}) *service.Error

func ExpectSerializedArray added in v1.30.0

func ExpectSerializedArray(expected interface{}, array []interface{}, parserFunc func(parser data.ArrayParser) interface{})

func ExpectSerializedObject added in v1.30.0

func ExpectSerializedObject(expected interface{}, object map[string]interface{}, parserFunc func(parser data.ObjectParser) interface{})

func NewBlob added in v1.24.0

func NewBlob() *data.Blob

func NewBlobArray added in v1.24.0

func NewBlobArray() *data.BlobArray

func NewDeviceID added in v1.27.0

func NewDeviceID() string

func NewObjectFromDeduplicatorDescriptor added in v1.29.0

func NewObjectFromDeduplicatorDescriptor(datum *data.DeduplicatorDescriptor, objectFormat test.ObjectFormat) map[string]interface{}

func NewSessionToken added in v1.27.0

func NewSessionToken() string

func RandomDataSetUpdate added in v1.29.0

func RandomDataSetUpdate() *data.DataSetUpdate

func RandomDeduplicatorDescriptor added in v1.29.0

func RandomDeduplicatorDescriptor() *data.DeduplicatorDescriptor

func RandomID added in v1.29.0

func RandomID() string

func RandomSelector added in v1.29.0

func RandomSelector() *data.Selector

func RandomSelectorOrigin added in v1.29.0

func RandomSelectorOrigin() *data.SelectorOrigin

func RandomSelectors added in v1.29.0

func RandomSelectors() *data.Selectors

func RandomSetID added in v1.29.0

func RandomSetID() string

func RandomSetIDs added in v1.29.0

func RandomSetIDs() []string

func RandomTimeZoneOffset added in v1.29.0

func RandomTimeZoneOffset() int

func RawBaseObject added in v1.5.0

func RawBaseObject() map[string]interface{}

Types

type Datum

type Datum struct {
	*test.Mock
	MetaInvocations                      int
	MetaOutputs                          []interface{}
	ParseInvocations                     int
	ParseInputs                          []data.ObjectParser
	ParseOutputs                         []error
	ValidateInvocations                  int
	ValidateInputs                       []structure.Validator
	NormalizeInvocations                 int
	NormalizeInputs                      []data.Normalizer
	IdentityFieldsInvocations            int
	IdentityFieldsOutputs                []IdentityFieldsOutput
	GetPayloadInvocations                int
	GetPayloadOutputs                    []*data.Blob
	SetUserIDInvocations                 int
	SetUserIDInputs                      []*string
	SetDataSetIDInvocations              int
	SetDataSetIDInputs                   []*string
	SetActiveInvocations                 int
	SetActiveInputs                      []bool
	SetDeviceIDInvocations               int
	SetDeviceIDInputs                    []*string
	SetCreatedTimeInvocations            int
	SetCreatedTimeInputs                 []*string
	SetCreatedUserIDInvocations          int
	SetCreatedUserIDInputs               []*string
	SetModifiedTimeInvocations           int
	SetModifiedTimeInputs                []*string
	SetModifiedUserIDInvocations         int
	SetModifiedUserIDInputs              []*string
	SetDeletedTimeInvocations            int
	SetDeletedTimeInputs                 []*string
	SetDeletedUserIDInvocations          int
	SetDeletedUserIDInputs               []*string
	DeduplicatorDescriptorValue          *data.DeduplicatorDescriptor
	DeduplicatorDescriptorInvocations    int
	SetDeduplicatorDescriptorInvocations int
}

func NewDatum

func NewDatum() *Datum

func (*Datum) DeduplicatorDescriptor

func (d *Datum) DeduplicatorDescriptor() *data.DeduplicatorDescriptor

func (*Datum) Expectations added in v1.20.0

func (d *Datum) Expectations()

func (*Datum) GetPayload added in v1.20.0

func (d *Datum) GetPayload() *data.Blob

func (*Datum) IdentityFields

func (d *Datum) IdentityFields() ([]string, error)

func (*Datum) Meta

func (d *Datum) Meta() interface{}

func (*Datum) Normalize

func (d *Datum) Normalize(normalizer data.Normalizer)

func (*Datum) Parse

func (d *Datum) Parse(parser data.ObjectParser) error

func (*Datum) SetActive

func (d *Datum) SetActive(active bool)

func (*Datum) SetCreatedTime

func (d *Datum) SetCreatedTime(createdTime *string)

func (*Datum) SetCreatedUserID

func (d *Datum) SetCreatedUserID(createdUserID *string)

func (*Datum) SetDataSetID added in v1.28.0

func (d *Datum) SetDataSetID(dataSetID *string)

func (*Datum) SetDeduplicatorDescriptor

func (d *Datum) SetDeduplicatorDescriptor(deduplicatorDescriptor *data.DeduplicatorDescriptor)

func (*Datum) SetDeletedTime

func (d *Datum) SetDeletedTime(deletedTime *string)

func (*Datum) SetDeletedUserID

func (d *Datum) SetDeletedUserID(deletedUserID *string)

func (*Datum) SetDeviceID added in v1.20.0

func (d *Datum) SetDeviceID(deviceID *string)

func (*Datum) SetModifiedTime

func (d *Datum) SetModifiedTime(modifiedTime *string)

func (*Datum) SetModifiedUserID

func (d *Datum) SetModifiedUserID(modifiedUserID *string)

func (*Datum) SetUserID

func (d *Datum) SetUserID(userID *string)

func (*Datum) Validate

func (d *Datum) Validate(validator structure.Validator)

type IdentityFieldsOutput

type IdentityFieldsOutput struct {
	IdentityFields []string
	Error          error
}

type Normalizable added in v1.24.0

type Normalizable struct {
	*test.Mock
	NormalizeInvocations int
	NormalizeInputs      []data.Normalizer
	NormalizeStub        func(normalizer data.Normalizer)
}

func NewNormalizable added in v1.24.0

func NewNormalizable() *Normalizable

func (*Normalizable) Expectations added in v1.24.0

func (n *Normalizable) Expectations()

func (*Normalizable) Normalize added in v1.24.0

func (n *Normalizable) Normalize(normalizer data.Normalizer)

Jump to

Keyboard shortcuts

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