test

package
v0.0.0-...-86643de Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

test package provides object useful for testing code that relies on Codecs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestCodec

type TestCodec struct {
	mock.Mock
}

TestCodec is a codec mock object useful for testing code that relies on codecs.

The mocking capabilities are provided by stretchrcom/testify framework.

func (*TestCodec) CanMarshalWithCallback

func (c *TestCodec) CanMarshalWithCallback() bool

CanMarshalWithCallback is a mocked function that records the activity in the Mock object and returns the values setup in user code by the .On.Return pair.

func (*TestCodec) ContentType

func (c *TestCodec) ContentType() string

ContentType is a mocked function that records the activity in the Mock object and returns the values setup in user code by the .On.Return pair.

func (*TestCodec) FileExtension

func (c *TestCodec) FileExtension() string

FileExtension is a mocked function that records the activity in the Mock object and returns the values setup in user code by the .On.Return pair.

func (*TestCodec) Marshal

func (c *TestCodec) Marshal(object interface{}, options map[string]interface{}) ([]byte, error)

Marshal is a mocked function that records the activity in the Mock object and returns the values setup in user code by the .On.Return pair.

func (*TestCodec) Unmarshal

func (c *TestCodec) Unmarshal(data []byte, obj interface{}) error

Unmarshal is a mocked function that records the activity in the Mock object and returns the values setup in user code by the .On.Return pair.

type TestObjectWithFacade

type TestObjectWithFacade struct {
	mock.Mock
}

TestObjectWithFacade is a mock test object that implements the Facade interface.

The mocking capabilities are provided by stretchrcom/testify framework.

func (*TestObjectWithFacade) PublicData

func (o *TestObjectWithFacade) PublicData(options map[string]interface{}) (interface{}, error)

PublicData is a mocked function, as defined by the Facade interface, that records the activity in the Mock object and returns the values setup in user code by the .On.Return pair.

Jump to

Keyboard shortcuts

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