testing

package
v0.0.0-...-4c48183 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package testing is a generated GoMock package.

Index

Constants

View Source
const CreateTableQuery = `
	CREATE TABLE my_table (
		id INTEGER PRIMARY KEY,
		name TEXT,
		age INTEGER
	);
`
View Source
const FileContent = "this is a file."
View Source
const InsertQuery = `
	INSERT INTO my_table (name, age)
	VALUES ('John Smith', 35);
`
View Source
const SelectQuery = `
	SELECT * FROM my_table WHERE name = 'John Smith';
`

Variables

View Source
var TestFiles = []string{
	"dir1/a.txt",
	"dir1/db/db.sqlite3",
	"dir2/b.conf",
	"dir3/.c",
	".d",
}

Functions

func GenDbFile

func GenDbFile(path string) error

func GenTestDirs

func GenTestDirs() (srcDir string, destDir string, err error)

func GenTextFiles

func GenTextFiles(dir string, fileContent map[string]string) error

func VerifyDbFile

func VerifyDbFile(t *testing.T, path string)

func VerifyIgnoredFile

func VerifyIgnoredFile(t *testing.T, path string)

func VerifyTextFile

func VerifyTextFile(t *testing.T, path string, content string)

Types

type FakeTime

type FakeTime struct {
	NowTime time.Time
}

func NewFakeTime

func NewFakeTime(now time.Time) *FakeTime

func (*FakeTime) Now

func (ft *FakeTime) Now(_ *time.Location) time.Time

func (*FakeTime) Sleep

func (ft *FakeTime) Sleep(d time.Duration)

func (*FakeTime) Unix

func (ft *FakeTime) Unix(sec, nsec int64) time.Time

type MockWorkflow

type MockWorkflow struct {
	// contains filtered or unexported fields
}

MockWorkflow is a mock of Workflow interface.

func NewMockWorkflow

func NewMockWorkflow(ctrl *gomock.Controller) *MockWorkflow

NewMockWorkflow creates a new mock instance.

func (*MockWorkflow) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWorkflow) Run

func (m *MockWorkflow) Run() error

Run mocks base method.

type MockWorkflowMockRecorder

type MockWorkflowMockRecorder struct {
	// contains filtered or unexported fields
}

MockWorkflowMockRecorder is the mock recorder for MockWorkflow.

func (*MockWorkflowMockRecorder) Run

Run indicates an expected call of Run.

Jump to

Keyboard shortcuts

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