mocks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage

func NewStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *Storage

NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Storage) AddBook

func (_m *Storage) AddBook(ctx context.Context, title string, author string, source string) (storage.Book, error)

AddBook provides a mock function with given fields: ctx, title, author, source

func (*Storage) AddHighlight

func (_m *Storage) AddHighlight(ctx context.Context, b storage.Book, text string, note string, chapter string, location int, url string) (storage.Highlight, error)

AddHighlight provides a mock function with given fields: ctx, b, text, note, chapter, location, url

func (*Storage) EXPECT

func (_m *Storage) EXPECT() *Storage_Expecter

func (*Storage) ListBooks

func (_m *Storage) ListBooks(ctx context.Context, lt time.Time, gt time.Time) ([]storage.Book, error)

ListBooks provides a mock function with given fields: ctx, lt, gt

func (*Storage) ListHighlights

func (_m *Storage) ListHighlights(ctx context.Context, lt time.Time, gt time.Time) ([]storage.Highlight, error)

ListHighlights provides a mock function with given fields: ctx, lt, gt

type Storage_AddBook_Call

type Storage_AddBook_Call struct {
	*mock.Call
}

Storage_AddBook_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBook'

func (*Storage_AddBook_Call) Return

func (*Storage_AddBook_Call) Run

func (_c *Storage_AddBook_Call) Run(run func(ctx context.Context, title string, author string, source string)) *Storage_AddBook_Call

func (*Storage_AddBook_Call) RunAndReturn

type Storage_AddHighlight_Call

type Storage_AddHighlight_Call struct {
	*mock.Call
}

Storage_AddHighlight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddHighlight'

func (*Storage_AddHighlight_Call) Return

func (*Storage_AddHighlight_Call) Run

func (_c *Storage_AddHighlight_Call) Run(run func(ctx context.Context, b storage.Book, text string, note string, chapter string, location int, url string)) *Storage_AddHighlight_Call

func (*Storage_AddHighlight_Call) RunAndReturn

type Storage_Expecter

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

func (*Storage_Expecter) AddBook

func (_e *Storage_Expecter) AddBook(ctx interface{}, title interface{}, author interface{}, source interface{}) *Storage_AddBook_Call

AddBook is a helper method to define mock.On call

  • ctx context.Context
  • title string
  • author string
  • source string

func (*Storage_Expecter) AddHighlight

func (_e *Storage_Expecter) AddHighlight(ctx interface{}, b interface{}, text interface{}, note interface{}, chapter interface{}, location interface{}, url interface{}) *Storage_AddHighlight_Call

AddHighlight is a helper method to define mock.On call

  • ctx context.Context
  • b storage.Book
  • text string
  • note string
  • chapter string
  • location int
  • url string

func (*Storage_Expecter) ListBooks

func (_e *Storage_Expecter) ListBooks(ctx interface{}, lt interface{}, gt interface{}) *Storage_ListBooks_Call

ListBooks is a helper method to define mock.On call

  • ctx context.Context
  • lt time.Time
  • gt time.Time

func (*Storage_Expecter) ListHighlights

func (_e *Storage_Expecter) ListHighlights(ctx interface{}, lt interface{}, gt interface{}) *Storage_ListHighlights_Call

ListHighlights is a helper method to define mock.On call

  • ctx context.Context
  • lt time.Time
  • gt time.Time

type Storage_ListBooks_Call

type Storage_ListBooks_Call struct {
	*mock.Call
}

Storage_ListBooks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBooks'

func (*Storage_ListBooks_Call) Return

func (*Storage_ListBooks_Call) Run

func (*Storage_ListBooks_Call) RunAndReturn

type Storage_ListHighlights_Call

type Storage_ListHighlights_Call struct {
	*mock.Call
}

Storage_ListHighlights_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListHighlights'

func (*Storage_ListHighlights_Call) Return

func (*Storage_ListHighlights_Call) Run

func (*Storage_ListHighlights_Call) RunAndReturn

Jump to

Keyboard shortcuts

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