test

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertInt

func AssertInt(target int, expectation int, t *testing.T) bool

func AssertMultistatusXML

func AssertMultistatusXML(target, expectation string, t *testing.T)

func AssertResourceData

func AssertResourceData(rpath, expectation string, t *testing.T)

func AssertResourceDoesNotExist

func AssertResourceDoesNotExist(rpath string, t *testing.T)

func AssertResourceExists

func AssertResourceExists(rpath string, t *testing.T)

func AssertStr

func AssertStr(target string, expectation string, t *testing.T)

Types

type FakeStorage

type FakeStorage struct {
	data.Storage
}

func NewFakeStorage

func NewFakeStorage() FakeStorage

Creates a fake storage to be used in unit tests. TODO: for now it's just creating a storage based of the default file storage. Would be better having an in-memory storage instead and make use of a stubbed fake storage to make unit tests faster.

func (FakeStorage) AddFakeResource

func (s FakeStorage) AddFakeResource(collection, name, data string)

Jump to

Keyboard shortcuts

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