mocks

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHelperMock

type FileHelperMock struct {
	ExistsCall struct {
		Receives struct {
			Paths []string
		}
		Returns       map[string]bool
		DefaultReturn bool
	}
	WriteCall struct {
		Receives struct {
			Path string
			Data string
		}
		Returns struct {
			Error error
		}
	}
}

FileHelperMock mock-impl of FileHelper-interface

func (*FileHelperMock) Exists

func (fh *FileHelperMock) Exists(path string) bool

Exists records callers arguments in ExistsCall.Receives and Returns values of ExistsCall.Returns based on given path. if path not found it returns ExistsCall.DefaultReturn

func (*FileHelperMock) Write

func (fh *FileHelperMock) Write(path string, data string) error

type IPDetectorMock

type IPDetectorMock struct {
	DetectCall struct {
		Returns net.IP
	}
}

IPDetectorMock mock-impl of IPDetector-interface

func (IPDetectorMock) Detect

func (ipd IPDetectorMock) Detect() net.IP

Detect returns DetectCall.Returns on every call

type TemplateLoaderMock

type TemplateLoaderMock struct {
	LoadCall struct {
		Receives struct {
			Paths []string
		}
		Returns struct {
			Data map[interface{}]interface{}
			Err  map[string]error
		}
	}
}

TemplateLoaderMock mock-impl of TemplateLoader-interface

func (*TemplateLoaderMock) Load

func (tl *TemplateLoaderMock) Load(path string) (map[string]interface{}, error)

Load records callers arguments in LoadCall.Receives and returns LoadCall.Returns.Data and LoadCall.Return.Err values based on given path

Jump to

Keyboard shortcuts

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