mocks

package
v0.0.0-...-7d3b975 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitErrTx

func CommitErrTx(t *testing.T) radio.StorageTx

CommitErrTx is a helper function to create a mocked StorageTx that has the Commit return an error

func CommitTx

func CommitTx(t *testing.T) radio.StorageTx

CommitTx is a helper function to create a mocked StorageTx that expects to be committed, it errors if a Rollback occurs before a Commit

func IcecastServerMock

func IcecastServerMock(t *testing.T) *icecastServerMock

func NotUsedTx

func NotUsedTx(t *testing.T) radio.StorageTx

NotUsedTx is a mocked StorageTx that doesn't expect to be used at all

func RollbackTx

func RollbackTx(t *testing.T) radio.StorageTx

RollbackTx is a helper function to create a mocked StorageTx that expects to be rolled back and not have Commit called

Types

type AnnounceServiceMock

type AnnounceServiceMock struct {
	// AnnounceRequestFunc mocks the AnnounceRequest method.
	AnnounceRequestFunc func(contextMoqParam context.Context, song radio.Song) error

	// AnnounceSongFunc mocks the AnnounceSong method.
	AnnounceSongFunc func(contextMoqParam context.Context, status radio.Status) error

	// AnnounceUserFunc mocks the AnnounceUser method.
	AnnounceUserFunc func(contextMoqParam context.Context, user *radio.User) error
	// contains filtered or unexported fields
}

AnnounceServiceMock is a mock implementation of radio.AnnounceService.

func TestSomethingThatUsesAnnounceService(t *testing.T) {

	// make and configure a mocked radio.AnnounceService
	mockedAnnounceService := &AnnounceServiceMock{
		AnnounceRequestFunc: func(contextMoqParam context.Context, song radio.Song) error {
			panic("mock out the AnnounceRequest method")
		},
		AnnounceSongFunc: func(contextMoqParam context.Context, status radio.Status) error {
			panic("mock out the AnnounceSong method")
		},
		AnnounceUserFunc: func(contextMoqParam context.Context, user *radio.User) error {
			panic("mock out the AnnounceUser method")
		},
	}

	// use mockedAnnounceService in code that requires radio.AnnounceService
	// and then make assertions.

}

func (*AnnounceServiceMock) AnnounceRequest

func (mock *AnnounceServiceMock) AnnounceRequest(contextMoqParam context.Context, song radio.Song) error

AnnounceRequest calls AnnounceRequestFunc.

func (*AnnounceServiceMock) AnnounceRequestCalls

func (mock *AnnounceServiceMock) AnnounceRequestCalls() []struct {
	ContextMoqParam context.Context
	Song            radio.Song
}

AnnounceRequestCalls gets all the calls that were made to AnnounceRequest. Check the length with:

len(mockedAnnounceService.AnnounceRequestCalls())

func (*AnnounceServiceMock) AnnounceSong

func (mock *AnnounceServiceMock) AnnounceSong(contextMoqParam context.Context, status radio.Status) error

AnnounceSong calls AnnounceSongFunc.

func (*AnnounceServiceMock) AnnounceSongCalls

func (mock *AnnounceServiceMock) AnnounceSongCalls() []struct {
	ContextMoqParam context.Context
	Status          radio.Status
}

AnnounceSongCalls gets all the calls that were made to AnnounceSong. Check the length with:

len(mockedAnnounceService.AnnounceSongCalls())

func (*AnnounceServiceMock) AnnounceUser

func (mock *AnnounceServiceMock) AnnounceUser(contextMoqParam context.Context, user *radio.User) error

AnnounceUser calls AnnounceUserFunc.

func (*AnnounceServiceMock) AnnounceUserCalls

func (mock *AnnounceServiceMock) AnnounceUserCalls() []struct {
	ContextMoqParam context.Context
	User            *radio.User
}

AnnounceUserCalls gets all the calls that were made to AnnounceUser. Check the length with:

len(mockedAnnounceService.AnnounceUserCalls())

type ExecutorMock

type ExecutorMock struct {
	// ExecuteFunc mocks the Execute method.
	ExecuteFunc func(w io.Writer, r *http.Request, input templates.TemplateSelectable) error

	// ExecuteAllFunc mocks the ExecuteAll method.
	ExecuteAllFunc func(input templates.TemplateSelectable) (map[radio.ThemeName][]byte, error)

	// ExecuteAllAdminFunc mocks the ExecuteAllAdmin method.
	ExecuteAllAdminFunc func(input templates.TemplateSelectable) (map[radio.ThemeName][]byte, error)

	// ExecuteTemplateFunc mocks the ExecuteTemplate method.
	ExecuteTemplateFunc func(ctx context.Context, theme radio.ThemeName, page string, template string, output io.Writer, input any) error
	// contains filtered or unexported fields
}

ExecutorMock is a mock implementation of templates.Executor.

func TestSomethingThatUsesExecutor(t *testing.T) {

	// make and configure a mocked templates.Executor
	mockedExecutor := &ExecutorMock{
		ExecuteFunc: func(w io.Writer, r *http.Request, input templates.TemplateSelectable) error {
			panic("mock out the Execute method")
		},
		ExecuteAllFunc: func(input templates.TemplateSelectable) (map[radio.ThemeName][]byte, error) {
			panic("mock out the ExecuteAll method")
		},
		ExecuteAllAdminFunc: func(input templates.TemplateSelectable) (map[radio.ThemeName][]byte, error) {
			panic("mock out the ExecuteAllAdmin method")
		},
		ExecuteTemplateFunc: func(ctx context.Context, theme radio.ThemeName, page string, template string, output io.Writer, input any) error {
			panic("mock out the ExecuteTemplate method")
		},
	}

	// use mockedExecutor in code that requires templates.Executor
	// and then make assertions.

}

func (*ExecutorMock) Execute

func (mock *ExecutorMock) Execute(w io.Writer, r *http.Request, input templates.TemplateSelectable) error

Execute calls ExecuteFunc.

func (*ExecutorMock) ExecuteAll

func (mock *ExecutorMock) ExecuteAll(input templates.TemplateSelectable) (map[radio.ThemeName][]byte, error)

ExecuteAll calls ExecuteAllFunc.

func (*ExecutorMock) ExecuteAllAdmin

func (mock *ExecutorMock) ExecuteAllAdmin(input templates.TemplateSelectable) (map[radio.ThemeName][]byte, error)

ExecuteAllAdmin calls ExecuteAllAdminFunc.

func (*ExecutorMock) ExecuteAllAdminCalls

func (mock *ExecutorMock) ExecuteAllAdminCalls() []struct {
	Input templates.TemplateSelectable
}

ExecuteAllAdminCalls gets all the calls that were made to ExecuteAllAdmin. Check the length with:

len(mockedExecutor.ExecuteAllAdminCalls())

func (*ExecutorMock) ExecuteAllCalls

func (mock *ExecutorMock) ExecuteAllCalls() []struct {
	Input templates.TemplateSelectable
}

ExecuteAllCalls gets all the calls that were made to ExecuteAll. Check the length with:

len(mockedExecutor.ExecuteAllCalls())

func (*ExecutorMock) ExecuteCalls

func (mock *ExecutorMock) ExecuteCalls() []struct {
	W     io.Writer
	R     *http.Request
	Input templates.TemplateSelectable
}

ExecuteCalls gets all the calls that were made to Execute. Check the length with:

len(mockedExecutor.ExecuteCalls())

func (*ExecutorMock) ExecuteTemplate

func (mock *ExecutorMock) ExecuteTemplate(ctx context.Context, theme radio.ThemeName, page string, template string, output io.Writer, input any) error

ExecuteTemplate calls ExecuteTemplateFunc.

func (*ExecutorMock) ExecuteTemplateCalls

func (mock *ExecutorMock) ExecuteTemplateCalls() []struct {
	Ctx      context.Context
	Theme    radio.ThemeName
	Page     string
	Template string
	Output   io.Writer
	Input    any
}

ExecuteTemplateCalls gets all the calls that were made to ExecuteTemplate. Check the length with:

len(mockedExecutor.ExecuteTemplateCalls())

type FS

type FS interface {
	fs.GlobFS
	fs.ReadFileFS
	fs.StatFS
	fs.SubFS
}

type FSMock

type FSMock struct {
	// GlobFunc mocks the Glob method.
	GlobFunc func(pattern string) ([]string, error)

	// OpenFunc mocks the Open method.
	OpenFunc func(name string) (fs.File, error)

	// ReadFileFunc mocks the ReadFile method.
	ReadFileFunc func(name string) ([]byte, error)

	// StatFunc mocks the Stat method.
	StatFunc func(name string) (fs.FileInfo, error)

	// SubFunc mocks the Sub method.
	SubFunc func(dir string) (fs.FS, error)
	// contains filtered or unexported fields
}

FSMock is a mock implementation of FS.

func TestSomethingThatUsesFS(t *testing.T) {

	// make and configure a mocked FS
	mockedFS := &FSMock{
		GlobFunc: func(pattern string) ([]string, error) {
			panic("mock out the Glob method")
		},
		OpenFunc: func(name string) (fs.File, error) {
			panic("mock out the Open method")
		},
		ReadFileFunc: func(name string) ([]byte, error) {
			panic("mock out the ReadFile method")
		},
		StatFunc: func(name string) (fs.FileInfo, error) {
			panic("mock out the Stat method")
		},
		SubFunc: func(dir string) (fs.FS, error) {
			panic("mock out the Sub method")
		},
	}

	// use mockedFS in code that requires FS
	// and then make assertions.

}

func (*FSMock) Glob

func (mock *FSMock) Glob(pattern string) ([]string, error)

Glob calls GlobFunc.

func (*FSMock) GlobCalls

func (mock *FSMock) GlobCalls() []struct {
	Pattern string
}

GlobCalls gets all the calls that were made to Glob. Check the length with:

len(mockedFS.GlobCalls())

func (*FSMock) Open

func (mock *FSMock) Open(name string) (fs.File, error)

Open calls OpenFunc.

func (*FSMock) OpenCalls

func (mock *FSMock) OpenCalls() []struct {
	Name string
}

OpenCalls gets all the calls that were made to Open. Check the length with:

len(mockedFS.OpenCalls())

func (*FSMock) ReadFile

func (mock *FSMock) ReadFile(name string) ([]byte, error)

ReadFile calls ReadFileFunc.

func (*FSMock) ReadFileCalls

func (mock *FSMock) ReadFileCalls() []struct {
	Name string
}

ReadFileCalls gets all the calls that were made to ReadFile. Check the length with:

len(mockedFS.ReadFileCalls())

func (*FSMock) Stat

func (mock *FSMock) Stat(name string) (fs.FileInfo, error)

Stat calls StatFunc.

func (*FSMock) StatCalls

func (mock *FSMock) StatCalls() []struct {
	Name string
}

StatCalls gets all the calls that were made to Stat. Check the length with:

len(mockedFS.StatCalls())

func (*FSMock) Sub

func (mock *FSMock) Sub(dir string) (fs.FS, error)

Sub calls SubFunc.

func (*FSMock) SubCalls

func (mock *FSMock) SubCalls() []struct {
	Dir string
}

SubCalls gets all the calls that were made to Sub. Check the length with:

len(mockedFS.SubCalls())

type File

type File = fs.File

type FileInfo

type FileInfo = fs.FileInfo

type FileInfoMock

type FileInfoMock struct {
	// IsDirFunc mocks the IsDir method.
	IsDirFunc func() bool

	// ModTimeFunc mocks the ModTime method.
	ModTimeFunc func() time.Time

	// ModeFunc mocks the Mode method.
	ModeFunc func() fs.FileMode

	// NameFunc mocks the Name method.
	NameFunc func() string

	// SizeFunc mocks the Size method.
	SizeFunc func() int64

	// SysFunc mocks the Sys method.
	SysFunc func() any
	// contains filtered or unexported fields
}

FileInfoMock is a mock implementation of FileInfo.

func TestSomethingThatUsesFileInfo(t *testing.T) {

	// make and configure a mocked FileInfo
	mockedFileInfo := &FileInfoMock{
		IsDirFunc: func() bool {
			panic("mock out the IsDir method")
		},
		ModTimeFunc: func() time.Time {
			panic("mock out the ModTime method")
		},
		ModeFunc: func() fs.FileMode {
			panic("mock out the Mode method")
		},
		NameFunc: func() string {
			panic("mock out the Name method")
		},
		SizeFunc: func() int64 {
			panic("mock out the Size method")
		},
		SysFunc: func() any {
			panic("mock out the Sys method")
		},
	}

	// use mockedFileInfo in code that requires FileInfo
	// and then make assertions.

}

func (*FileInfoMock) IsDir

func (mock *FileInfoMock) IsDir() bool

IsDir calls IsDirFunc.

func (*FileInfoMock) IsDirCalls

func (mock *FileInfoMock) IsDirCalls() []struct {
}

IsDirCalls gets all the calls that were made to IsDir. Check the length with:

len(mockedFileInfo.IsDirCalls())

func (*FileInfoMock) ModTime

func (mock *FileInfoMock) ModTime() time.Time

ModTime calls ModTimeFunc.

func (*FileInfoMock) ModTimeCalls

func (mock *FileInfoMock) ModTimeCalls() []struct {
}

ModTimeCalls gets all the calls that were made to ModTime. Check the length with:

len(mockedFileInfo.ModTimeCalls())

func (*FileInfoMock) Mode

func (mock *FileInfoMock) Mode() fs.FileMode

Mode calls ModeFunc.

func (*FileInfoMock) ModeCalls

func (mock *FileInfoMock) ModeCalls() []struct {
}

ModeCalls gets all the calls that were made to Mode. Check the length with:

len(mockedFileInfo.ModeCalls())

func (*FileInfoMock) Name

func (mock *FileInfoMock) Name() string

Name calls NameFunc.

func (*FileInfoMock) NameCalls

func (mock *FileInfoMock) NameCalls() []struct {
}

NameCalls gets all the calls that were made to Name. Check the length with:

len(mockedFileInfo.NameCalls())

func (*FileInfoMock) Size

func (mock *FileInfoMock) Size() int64

Size calls SizeFunc.

func (*FileInfoMock) SizeCalls

func (mock *FileInfoMock) SizeCalls() []struct {
}

SizeCalls gets all the calls that were made to Size. Check the length with:

len(mockedFileInfo.SizeCalls())

func (*FileInfoMock) Sys

func (mock *FileInfoMock) Sys() any

Sys calls SysFunc.

func (*FileInfoMock) SysCalls

func (mock *FileInfoMock) SysCalls() []struct {
}

SysCalls gets all the calls that were made to Sys. Check the length with:

len(mockedFileInfo.SysCalls())

type FileMock

type FileMock struct {
	// CloseFunc mocks the Close method.
	CloseFunc func() error

	// ReadFunc mocks the Read method.
	ReadFunc func(bytes []byte) (int, error)

	// StatFunc mocks the Stat method.
	StatFunc func() (fs.FileInfo, error)
	// contains filtered or unexported fields
}

FileMock is a mock implementation of File.

func TestSomethingThatUsesFile(t *testing.T) {

	// make and configure a mocked File
	mockedFile := &FileMock{
		CloseFunc: func() error {
			panic("mock out the Close method")
		},
		ReadFunc: func(bytes []byte) (int, error) {
			panic("mock out the Read method")
		},
		StatFunc: func() (fs.FileInfo, error) {
			panic("mock out the Stat method")
		},
	}

	// use mockedFile in code that requires File
	// and then make assertions.

}

func (*FileMock) Close

func (mock *FileMock) Close() error

Close calls CloseFunc.

func (*FileMock) CloseCalls

func (mock *FileMock) CloseCalls() []struct {
}

CloseCalls gets all the calls that were made to Close. Check the length with:

len(mockedFile.CloseCalls())

func (*FileMock) Read

func (mock *FileMock) Read(bytes []byte) (int, error)

Read calls ReadFunc.

func (*FileMock) ReadCalls

func (mock *FileMock) ReadCalls() []struct {
	Bytes []byte
}

ReadCalls gets all the calls that were made to Read. Check the length with:

len(mockedFile.ReadCalls())

func (*FileMock) Stat

func (mock *FileMock) Stat() (fs.FileInfo, error)

Stat calls StatFunc.

func (*FileMock) StatCalls

func (mock *FileMock) StatCalls() []struct {
}

StatCalls gets all the calls that were made to Stat. Check the length with:

len(mockedFile.StatCalls())

type ManagerServiceMock

type ManagerServiceMock struct {
	// CurrentListenersFunc mocks the CurrentListeners method.
	CurrentListenersFunc func(contextMoqParam context.Context) (eventstream.Stream[radio.Listeners], error)

	// CurrentSongFunc mocks the CurrentSong method.
	CurrentSongFunc func(contextMoqParam context.Context) (eventstream.Stream[*radio.SongUpdate], error)

	// CurrentStatusFunc mocks the CurrentStatus method.
	CurrentStatusFunc func(contextMoqParam context.Context) (eventstream.Stream[radio.Status], error)

	// CurrentThreadFunc mocks the CurrentThread method.
	CurrentThreadFunc func(contextMoqParam context.Context) (eventstream.Stream[radio.Thread], error)

	// CurrentUserFunc mocks the CurrentUser method.
	CurrentUserFunc func(contextMoqParam context.Context) (eventstream.Stream[*radio.User], error)

	// UpdateFromStorageFunc mocks the UpdateFromStorage method.
	UpdateFromStorageFunc func(contextMoqParam context.Context) error

	// UpdateListenersFunc mocks the UpdateListeners method.
	UpdateListenersFunc func(contextMoqParam context.Context, v radio.Listeners) error

	// UpdateSongFunc mocks the UpdateSong method.
	UpdateSongFunc func(contextMoqParam context.Context, songUpdate *radio.SongUpdate) error

	// UpdateThreadFunc mocks the UpdateThread method.
	UpdateThreadFunc func(contextMoqParam context.Context, v radio.Thread) error

	// UpdateUserFunc mocks the UpdateUser method.
	UpdateUserFunc func(contextMoqParam context.Context, user *radio.User) error
	// contains filtered or unexported fields
}

ManagerServiceMock is a mock implementation of radio.ManagerService.

func TestSomethingThatUsesManagerService(t *testing.T) {

	// make and configure a mocked radio.ManagerService
	mockedManagerService := &ManagerServiceMock{
		CurrentListenersFunc: func(contextMoqParam context.Context) (eventstream.Stream[radio.Listeners], error) {
			panic("mock out the CurrentListeners method")
		},
		CurrentSongFunc: func(contextMoqParam context.Context) (eventstream.Stream[*radio.SongUpdate], error) {
			panic("mock out the CurrentSong method")
		},
		CurrentStatusFunc: func(contextMoqParam context.Context) (eventstream.Stream[radio.Status], error) {
			panic("mock out the CurrentStatus method")
		},
		CurrentThreadFunc: func(contextMoqParam context.Context) (eventstream.Stream[radio.Thread], error) {
			panic("mock out the CurrentThread method")
		},
		CurrentUserFunc: func(contextMoqParam context.Context) (eventstream.Stream[*radio.User], error) {
			panic("mock out the CurrentUser method")
		},
		UpdateFromStorageFunc: func(contextMoqParam context.Context) error {
			panic("mock out the UpdateFromStorage method")
		},
		UpdateListenersFunc: func(contextMoqParam context.Context, v radio.Listeners) error {
			panic("mock out the UpdateListeners method")
		},
		UpdateSongFunc: func(contextMoqParam context.Context, songUpdate *radio.SongUpdate) error {
			panic("mock out the UpdateSong method")
		},
		UpdateThreadFunc: func(contextMoqParam context.Context, v radio.Thread) error {
			panic("mock out the UpdateThread method")
		},
		UpdateUserFunc: func(contextMoqParam context.Context, user *radio.User) error {
			panic("mock out the UpdateUser method")
		},
	}

	// use mockedManagerService in code that requires radio.ManagerService
	// and then make assertions.

}

func (*ManagerServiceMock) CurrentListeners

func (mock *ManagerServiceMock) CurrentListeners(contextMoqParam context.Context) (eventstream.Stream[radio.Listeners], error)

CurrentListeners calls CurrentListenersFunc.

func (*ManagerServiceMock) CurrentListenersCalls

func (mock *ManagerServiceMock) CurrentListenersCalls() []struct {
	ContextMoqParam context.Context
}

CurrentListenersCalls gets all the calls that were made to CurrentListeners. Check the length with:

len(mockedManagerService.CurrentListenersCalls())

func (*ManagerServiceMock) CurrentSong

func (mock *ManagerServiceMock) CurrentSong(contextMoqParam context.Context) (eventstream.Stream[*radio.SongUpdate], error)

CurrentSong calls CurrentSongFunc.

func (*ManagerServiceMock) CurrentSongCalls

func (mock *ManagerServiceMock) CurrentSongCalls() []struct {
	ContextMoqParam context.Context
}

CurrentSongCalls gets all the calls that were made to CurrentSong. Check the length with:

len(mockedManagerService.CurrentSongCalls())

func (*ManagerServiceMock) CurrentStatus

func (mock *ManagerServiceMock) CurrentStatus(contextMoqParam context.Context) (eventstream.Stream[radio.Status], error)

CurrentStatus calls CurrentStatusFunc.

func (*ManagerServiceMock) CurrentStatusCalls

func (mock *ManagerServiceMock) CurrentStatusCalls() []struct {
	ContextMoqParam context.Context
}

CurrentStatusCalls gets all the calls that were made to CurrentStatus. Check the length with:

len(mockedManagerService.CurrentStatusCalls())

func (*ManagerServiceMock) CurrentThread

func (mock *ManagerServiceMock) CurrentThread(contextMoqParam context.Context) (eventstream.Stream[radio.Thread], error)

CurrentThread calls CurrentThreadFunc.

func (*ManagerServiceMock) CurrentThreadCalls

func (mock *ManagerServiceMock) CurrentThreadCalls() []struct {
	ContextMoqParam context.Context
}

CurrentThreadCalls gets all the calls that were made to CurrentThread. Check the length with:

len(mockedManagerService.CurrentThreadCalls())

func (*ManagerServiceMock) CurrentUser

func (mock *ManagerServiceMock) CurrentUser(contextMoqParam context.Context) (eventstream.Stream[*radio.User], error)

CurrentUser calls CurrentUserFunc.

func (*ManagerServiceMock) CurrentUserCalls

func (mock *ManagerServiceMock) CurrentUserCalls() []struct {
	ContextMoqParam context.Context
}

CurrentUserCalls gets all the calls that were made to CurrentUser. Check the length with:

len(mockedManagerService.CurrentUserCalls())

func (*ManagerServiceMock) UpdateFromStorage

func (mock *ManagerServiceMock) UpdateFromStorage(contextMoqParam context.Context) error

UpdateFromStorage calls UpdateFromStorageFunc.

func (*ManagerServiceMock) UpdateFromStorageCalls

func (mock *ManagerServiceMock) UpdateFromStorageCalls() []struct {
	ContextMoqParam context.Context
}

UpdateFromStorageCalls gets all the calls that were made to UpdateFromStorage. Check the length with:

len(mockedManagerService.UpdateFromStorageCalls())

func (*ManagerServiceMock) UpdateListeners

func (mock *ManagerServiceMock) UpdateListeners(contextMoqParam context.Context, v radio.Listeners) error

UpdateListeners calls UpdateListenersFunc.

func (*ManagerServiceMock) UpdateListenersCalls

func (mock *ManagerServiceMock) UpdateListenersCalls() []struct {
	ContextMoqParam context.Context
	V               radio.Listeners
}

UpdateListenersCalls gets all the calls that were made to UpdateListeners. Check the length with:

len(mockedManagerService.UpdateListenersCalls())

func (*ManagerServiceMock) UpdateSong

func (mock *ManagerServiceMock) UpdateSong(contextMoqParam context.Context, songUpdate *radio.SongUpdate) error

UpdateSong calls UpdateSongFunc.

func (*ManagerServiceMock) UpdateSongCalls

func (mock *ManagerServiceMock) UpdateSongCalls() []struct {
	ContextMoqParam context.Context
	SongUpdate      *radio.SongUpdate
}

UpdateSongCalls gets all the calls that were made to UpdateSong. Check the length with:

len(mockedManagerService.UpdateSongCalls())

func (*ManagerServiceMock) UpdateThread

func (mock *ManagerServiceMock) UpdateThread(contextMoqParam context.Context, v radio.Thread) error

UpdateThread calls UpdateThreadFunc.

func (*ManagerServiceMock) UpdateThreadCalls

func (mock *ManagerServiceMock) UpdateThreadCalls() []struct {
	ContextMoqParam context.Context
	V               radio.Thread
}

UpdateThreadCalls gets all the calls that were made to UpdateThread. Check the length with:

len(mockedManagerService.UpdateThreadCalls())

func (*ManagerServiceMock) UpdateUser

func (mock *ManagerServiceMock) UpdateUser(contextMoqParam context.Context, user *radio.User) error

UpdateUser calls UpdateUserFunc.

func (*ManagerServiceMock) UpdateUserCalls

func (mock *ManagerServiceMock) UpdateUserCalls() []struct {
	ContextMoqParam context.Context
	User            *radio.User
}

UpdateUserCalls gets all the calls that were made to UpdateUser. Check the length with:

len(mockedManagerService.UpdateUserCalls())

type NewsStorageMock

type NewsStorageMock struct {
	// AddCommentFunc mocks the AddComment method.
	AddCommentFunc func(newsComment radio.NewsComment) (radio.NewsCommentID, error)

	// CommentsFunc mocks the Comments method.
	CommentsFunc func(newsPostID radio.NewsPostID) ([]radio.NewsComment, error)

	// CommentsPublicFunc mocks the CommentsPublic method.
	CommentsPublicFunc func(newsPostID radio.NewsPostID) ([]radio.NewsComment, error)

	// CreateFunc mocks the Create method.
	CreateFunc func(newsPost radio.NewsPost) (radio.NewsPostID, error)

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(newsPostID radio.NewsPostID) error

	// GetFunc mocks the Get method.
	GetFunc func(newsPostID radio.NewsPostID) (*radio.NewsPost, error)

	// ListFunc mocks the List method.
	ListFunc func(limit int64, offset int64) (radio.NewsList, error)

	// ListPublicFunc mocks the ListPublic method.
	ListPublicFunc func(limit int64, offset int64) (radio.NewsList, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(newsPost radio.NewsPost) error
	// contains filtered or unexported fields
}

NewsStorageMock is a mock implementation of radio.NewsStorage.

func TestSomethingThatUsesNewsStorage(t *testing.T) {

	// make and configure a mocked radio.NewsStorage
	mockedNewsStorage := &NewsStorageMock{
		AddCommentFunc: func(newsComment radio.NewsComment) (radio.NewsCommentID, error) {
			panic("mock out the AddComment method")
		},
		CommentsFunc: func(newsPostID radio.NewsPostID) ([]radio.NewsComment, error) {
			panic("mock out the Comments method")
		},
		CommentsPublicFunc: func(newsPostID radio.NewsPostID) ([]radio.NewsComment, error) {
			panic("mock out the CommentsPublic method")
		},
		CreateFunc: func(newsPost radio.NewsPost) (radio.NewsPostID, error) {
			panic("mock out the Create method")
		},
		DeleteFunc: func(newsPostID radio.NewsPostID) error {
			panic("mock out the Delete method")
		},
		GetFunc: func(newsPostID radio.NewsPostID) (*radio.NewsPost, error) {
			panic("mock out the Get method")
		},
		ListFunc: func(limit int64, offset int64) (radio.NewsList, error) {
			panic("mock out the List method")
		},
		ListPublicFunc: func(limit int64, offset int64) (radio.NewsList, error) {
			panic("mock out the ListPublic method")
		},
		UpdateFunc: func(newsPost radio.NewsPost) error {
			panic("mock out the Update method")
		},
	}

	// use mockedNewsStorage in code that requires radio.NewsStorage
	// and then make assertions.

}

func (*NewsStorageMock) AddComment

func (mock *NewsStorageMock) AddComment(newsComment radio.NewsComment) (radio.NewsCommentID, error)

AddComment calls AddCommentFunc.

func (*NewsStorageMock) AddCommentCalls

func (mock *NewsStorageMock) AddCommentCalls() []struct {
	NewsComment radio.NewsComment
}

AddCommentCalls gets all the calls that were made to AddComment. Check the length with:

len(mockedNewsStorage.AddCommentCalls())

func (*NewsStorageMock) Comments

func (mock *NewsStorageMock) Comments(newsPostID radio.NewsPostID) ([]radio.NewsComment, error)

Comments calls CommentsFunc.

func (*NewsStorageMock) CommentsCalls

func (mock *NewsStorageMock) CommentsCalls() []struct {
	NewsPostID radio.NewsPostID
}

CommentsCalls gets all the calls that were made to Comments. Check the length with:

len(mockedNewsStorage.CommentsCalls())

func (*NewsStorageMock) CommentsPublic

func (mock *NewsStorageMock) CommentsPublic(newsPostID radio.NewsPostID) ([]radio.NewsComment, error)

CommentsPublic calls CommentsPublicFunc.

func (*NewsStorageMock) CommentsPublicCalls

func (mock *NewsStorageMock) CommentsPublicCalls() []struct {
	NewsPostID radio.NewsPostID
}

CommentsPublicCalls gets all the calls that were made to CommentsPublic. Check the length with:

len(mockedNewsStorage.CommentsPublicCalls())

func (*NewsStorageMock) Create

func (mock *NewsStorageMock) Create(newsPost radio.NewsPost) (radio.NewsPostID, error)

Create calls CreateFunc.

func (*NewsStorageMock) CreateCalls

func (mock *NewsStorageMock) CreateCalls() []struct {
	NewsPost radio.NewsPost
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedNewsStorage.CreateCalls())

func (*NewsStorageMock) Delete

func (mock *NewsStorageMock) Delete(newsPostID radio.NewsPostID) error

Delete calls DeleteFunc.

func (*NewsStorageMock) DeleteCalls

func (mock *NewsStorageMock) DeleteCalls() []struct {
	NewsPostID radio.NewsPostID
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedNewsStorage.DeleteCalls())

func (*NewsStorageMock) Get

func (mock *NewsStorageMock) Get(newsPostID radio.NewsPostID) (*radio.NewsPost, error)

Get calls GetFunc.

func (*NewsStorageMock) GetCalls

func (mock *NewsStorageMock) GetCalls() []struct {
	NewsPostID radio.NewsPostID
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedNewsStorage.GetCalls())

func (*NewsStorageMock) List

func (mock *NewsStorageMock) List(limit int64, offset int64) (radio.NewsList, error)

List calls ListFunc.

func (*NewsStorageMock) ListCalls

func (mock *NewsStorageMock) ListCalls() []struct {
	Limit  int64
	Offset int64
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedNewsStorage.ListCalls())

func (*NewsStorageMock) ListPublic

func (mock *NewsStorageMock) ListPublic(limit int64, offset int64) (radio.NewsList, error)

ListPublic calls ListPublicFunc.

func (*NewsStorageMock) ListPublicCalls

func (mock *NewsStorageMock) ListPublicCalls() []struct {
	Limit  int64
	Offset int64
}

ListPublicCalls gets all the calls that were made to ListPublic. Check the length with:

len(mockedNewsStorage.ListPublicCalls())

func (*NewsStorageMock) Update

func (mock *NewsStorageMock) Update(newsPost radio.NewsPost) error

Update calls UpdateFunc.

func (*NewsStorageMock) UpdateCalls

func (mock *NewsStorageMock) UpdateCalls() []struct {
	NewsPost radio.NewsPost
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedNewsStorage.UpdateCalls())

type NewsStorageServiceMock

type NewsStorageServiceMock struct {
	// NewsFunc mocks the News method.
	NewsFunc func(contextMoqParam context.Context) radio.NewsStorage

	// NewsTxFunc mocks the NewsTx method.
	NewsTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.NewsStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

NewsStorageServiceMock is a mock implementation of radio.NewsStorageService.

func TestSomethingThatUsesNewsStorageService(t *testing.T) {

	// make and configure a mocked radio.NewsStorageService
	mockedNewsStorageService := &NewsStorageServiceMock{
		NewsFunc: func(contextMoqParam context.Context) radio.NewsStorage {
			panic("mock out the News method")
		},
		NewsTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.NewsStorage, radio.StorageTx, error) {
			panic("mock out the NewsTx method")
		},
	}

	// use mockedNewsStorageService in code that requires radio.NewsStorageService
	// and then make assertions.

}

func (*NewsStorageServiceMock) News

func (mock *NewsStorageServiceMock) News(contextMoqParam context.Context) radio.NewsStorage

News calls NewsFunc.

func (*NewsStorageServiceMock) NewsCalls

func (mock *NewsStorageServiceMock) NewsCalls() []struct {
	ContextMoqParam context.Context
}

NewsCalls gets all the calls that were made to News. Check the length with:

len(mockedNewsStorageService.NewsCalls())

func (*NewsStorageServiceMock) NewsTx

func (mock *NewsStorageServiceMock) NewsTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.NewsStorage, radio.StorageTx, error)

NewsTx calls NewsTxFunc.

func (*NewsStorageServiceMock) NewsTxCalls

func (mock *NewsStorageServiceMock) NewsTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

NewsTxCalls gets all the calls that were made to NewsTx. Check the length with:

len(mockedNewsStorageService.NewsTxCalls())

type QueueServiceMock

type QueueServiceMock struct {
	// AddRequestFunc mocks the AddRequest method.
	AddRequestFunc func(contextMoqParam context.Context, song radio.Song, s string) error

	// EntriesFunc mocks the Entries method.
	EntriesFunc func(contextMoqParam context.Context) (radio.Queue, error)

	// RemoveFunc mocks the Remove method.
	RemoveFunc func(contextMoqParam context.Context, queueID radio.QueueID) (bool, error)

	// ReserveNextFunc mocks the ReserveNext method.
	ReserveNextFunc func(contextMoqParam context.Context) (*radio.QueueEntry, error)

	// ResetReservedFunc mocks the ResetReserved method.
	ResetReservedFunc func(contextMoqParam context.Context) error
	// contains filtered or unexported fields
}

QueueServiceMock is a mock implementation of radio.QueueService.

func TestSomethingThatUsesQueueService(t *testing.T) {

	// make and configure a mocked radio.QueueService
	mockedQueueService := &QueueServiceMock{
		AddRequestFunc: func(contextMoqParam context.Context, song radio.Song, s string) error {
			panic("mock out the AddRequest method")
		},
		EntriesFunc: func(contextMoqParam context.Context) (radio.Queue, error) {
			panic("mock out the Entries method")
		},
		RemoveFunc: func(contextMoqParam context.Context, queueID radio.QueueID) (bool, error) {
			panic("mock out the Remove method")
		},
		ReserveNextFunc: func(contextMoqParam context.Context) (*radio.QueueEntry, error) {
			panic("mock out the ReserveNext method")
		},
		ResetReservedFunc: func(contextMoqParam context.Context) error {
			panic("mock out the ResetReserved method")
		},
	}

	// use mockedQueueService in code that requires radio.QueueService
	// and then make assertions.

}

func (*QueueServiceMock) AddRequest

func (mock *QueueServiceMock) AddRequest(contextMoqParam context.Context, song radio.Song, s string) error

AddRequest calls AddRequestFunc.

func (*QueueServiceMock) AddRequestCalls

func (mock *QueueServiceMock) AddRequestCalls() []struct {
	ContextMoqParam context.Context
	Song            radio.Song
	S               string
}

AddRequestCalls gets all the calls that were made to AddRequest. Check the length with:

len(mockedQueueService.AddRequestCalls())

func (*QueueServiceMock) Entries

func (mock *QueueServiceMock) Entries(contextMoqParam context.Context) (radio.Queue, error)

Entries calls EntriesFunc.

func (*QueueServiceMock) EntriesCalls

func (mock *QueueServiceMock) EntriesCalls() []struct {
	ContextMoqParam context.Context
}

EntriesCalls gets all the calls that were made to Entries. Check the length with:

len(mockedQueueService.EntriesCalls())

func (*QueueServiceMock) Remove

func (mock *QueueServiceMock) Remove(contextMoqParam context.Context, queueID radio.QueueID) (bool, error)

Remove calls RemoveFunc.

func (*QueueServiceMock) RemoveCalls

func (mock *QueueServiceMock) RemoveCalls() []struct {
	ContextMoqParam context.Context
	QueueID         radio.QueueID
}

RemoveCalls gets all the calls that were made to Remove. Check the length with:

len(mockedQueueService.RemoveCalls())

func (*QueueServiceMock) ReserveNext

func (mock *QueueServiceMock) ReserveNext(contextMoqParam context.Context) (*radio.QueueEntry, error)

ReserveNext calls ReserveNextFunc.

func (*QueueServiceMock) ReserveNextCalls

func (mock *QueueServiceMock) ReserveNextCalls() []struct {
	ContextMoqParam context.Context
}

ReserveNextCalls gets all the calls that were made to ReserveNext. Check the length with:

len(mockedQueueService.ReserveNextCalls())

func (*QueueServiceMock) ResetReserved

func (mock *QueueServiceMock) ResetReserved(contextMoqParam context.Context) error

ResetReserved calls ResetReservedFunc.

func (*QueueServiceMock) ResetReservedCalls

func (mock *QueueServiceMock) ResetReservedCalls() []struct {
	ContextMoqParam context.Context
}

ResetReservedCalls gets all the calls that were made to ResetReserved. Check the length with:

len(mockedQueueService.ResetReservedCalls())

type QueueStorageMock

type QueueStorageMock struct {
	// LoadFunc mocks the Load method.
	LoadFunc func(name string) ([]radio.QueueEntry, error)

	// StoreFunc mocks the Store method.
	StoreFunc func(name string, queue []radio.QueueEntry) error
	// contains filtered or unexported fields
}

QueueStorageMock is a mock implementation of radio.QueueStorage.

func TestSomethingThatUsesQueueStorage(t *testing.T) {

	// make and configure a mocked radio.QueueStorage
	mockedQueueStorage := &QueueStorageMock{
		LoadFunc: func(name string) ([]radio.QueueEntry, error) {
			panic("mock out the Load method")
		},
		StoreFunc: func(name string, queue []radio.QueueEntry) error {
			panic("mock out the Store method")
		},
	}

	// use mockedQueueStorage in code that requires radio.QueueStorage
	// and then make assertions.

}

func (*QueueStorageMock) Load

func (mock *QueueStorageMock) Load(name string) ([]radio.QueueEntry, error)

Load calls LoadFunc.

func (*QueueStorageMock) LoadCalls

func (mock *QueueStorageMock) LoadCalls() []struct {
	Name string
}

LoadCalls gets all the calls that were made to Load. Check the length with:

len(mockedQueueStorage.LoadCalls())

func (*QueueStorageMock) Store

func (mock *QueueStorageMock) Store(name string, queue []radio.QueueEntry) error

Store calls StoreFunc.

func (*QueueStorageMock) StoreCalls

func (mock *QueueStorageMock) StoreCalls() []struct {
	Name  string
	Queue []radio.QueueEntry
}

StoreCalls gets all the calls that were made to Store. Check the length with:

len(mockedQueueStorage.StoreCalls())

type QueueStorageServiceMock

type QueueStorageServiceMock struct {
	// QueueFunc mocks the Queue method.
	QueueFunc func(contextMoqParam context.Context) radio.QueueStorage

	// QueueTxFunc mocks the QueueTx method.
	QueueTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.QueueStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

QueueStorageServiceMock is a mock implementation of radio.QueueStorageService.

func TestSomethingThatUsesQueueStorageService(t *testing.T) {

	// make and configure a mocked radio.QueueStorageService
	mockedQueueStorageService := &QueueStorageServiceMock{
		QueueFunc: func(contextMoqParam context.Context) radio.QueueStorage {
			panic("mock out the Queue method")
		},
		QueueTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.QueueStorage, radio.StorageTx, error) {
			panic("mock out the QueueTx method")
		},
	}

	// use mockedQueueStorageService in code that requires radio.QueueStorageService
	// and then make assertions.

}

func (*QueueStorageServiceMock) Queue

func (mock *QueueStorageServiceMock) Queue(contextMoqParam context.Context) radio.QueueStorage

Queue calls QueueFunc.

func (*QueueStorageServiceMock) QueueCalls

func (mock *QueueStorageServiceMock) QueueCalls() []struct {
	ContextMoqParam context.Context
}

QueueCalls gets all the calls that were made to Queue. Check the length with:

len(mockedQueueStorageService.QueueCalls())

func (*QueueStorageServiceMock) QueueTx

func (mock *QueueStorageServiceMock) QueueTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.QueueStorage, radio.StorageTx, error)

QueueTx calls QueueTxFunc.

func (*QueueStorageServiceMock) QueueTxCalls

func (mock *QueueStorageServiceMock) QueueTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

QueueTxCalls gets all the calls that were made to QueueTx. Check the length with:

len(mockedQueueStorageService.QueueTxCalls())

type RelayStorageMock

type RelayStorageMock struct {
	// AllFunc mocks the All method.
	AllFunc func() ([]radio.Relay, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(r radio.Relay) error
	// contains filtered or unexported fields
}

RelayStorageMock is a mock implementation of radio.RelayStorage.

func TestSomethingThatUsesRelayStorage(t *testing.T) {

	// make and configure a mocked radio.RelayStorage
	mockedRelayStorage := &RelayStorageMock{
		AllFunc: func() ([]radio.Relay, error) {
			panic("mock out the All method")
		},
		UpdateFunc: func(r radio.Relay) error {
			panic("mock out the Update method")
		},
	}

	// use mockedRelayStorage in code that requires radio.RelayStorage
	// and then make assertions.

}

func (*RelayStorageMock) All

func (mock *RelayStorageMock) All() ([]radio.Relay, error)

All calls AllFunc.

func (*RelayStorageMock) AllCalls

func (mock *RelayStorageMock) AllCalls() []struct {
}

AllCalls gets all the calls that were made to All. Check the length with:

len(mockedRelayStorage.AllCalls())

func (*RelayStorageMock) Update

func (mock *RelayStorageMock) Update(r radio.Relay) error

Update calls UpdateFunc.

func (*RelayStorageMock) UpdateCalls

func (mock *RelayStorageMock) UpdateCalls() []struct {
	R radio.Relay
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedRelayStorage.UpdateCalls())

type RelayStorageServiceMock

type RelayStorageServiceMock struct {
	// RelayFunc mocks the Relay method.
	RelayFunc func(contextMoqParam context.Context) radio.RelayStorage

	// RelayTxFunc mocks the RelayTx method.
	RelayTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RelayStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

RelayStorageServiceMock is a mock implementation of radio.RelayStorageService.

func TestSomethingThatUsesRelayStorageService(t *testing.T) {

	// make and configure a mocked radio.RelayStorageService
	mockedRelayStorageService := &RelayStorageServiceMock{
		RelayFunc: func(contextMoqParam context.Context) radio.RelayStorage {
			panic("mock out the Relay method")
		},
		RelayTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RelayStorage, radio.StorageTx, error) {
			panic("mock out the RelayTx method")
		},
	}

	// use mockedRelayStorageService in code that requires radio.RelayStorageService
	// and then make assertions.

}

func (*RelayStorageServiceMock) Relay

func (mock *RelayStorageServiceMock) Relay(contextMoqParam context.Context) radio.RelayStorage

Relay calls RelayFunc.

func (*RelayStorageServiceMock) RelayCalls

func (mock *RelayStorageServiceMock) RelayCalls() []struct {
	ContextMoqParam context.Context
}

RelayCalls gets all the calls that were made to Relay. Check the length with:

len(mockedRelayStorageService.RelayCalls())

func (*RelayStorageServiceMock) RelayTx

func (mock *RelayStorageServiceMock) RelayTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RelayStorage, radio.StorageTx, error)

RelayTx calls RelayTxFunc.

func (*RelayStorageServiceMock) RelayTxCalls

func (mock *RelayStorageServiceMock) RelayTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

RelayTxCalls gets all the calls that were made to RelayTx. Check the length with:

len(mockedRelayStorageService.RelayTxCalls())

type RequestStorageMock

type RequestStorageMock struct {
	// LastRequestFunc mocks the LastRequest method.
	LastRequestFunc func(identifier string) (time.Time, error)

	// UpdateLastRequestFunc mocks the UpdateLastRequest method.
	UpdateLastRequestFunc func(identifier string) error
	// contains filtered or unexported fields
}

RequestStorageMock is a mock implementation of radio.RequestStorage.

func TestSomethingThatUsesRequestStorage(t *testing.T) {

	// make and configure a mocked radio.RequestStorage
	mockedRequestStorage := &RequestStorageMock{
		LastRequestFunc: func(identifier string) (time.Time, error) {
			panic("mock out the LastRequest method")
		},
		UpdateLastRequestFunc: func(identifier string) error {
			panic("mock out the UpdateLastRequest method")
		},
	}

	// use mockedRequestStorage in code that requires radio.RequestStorage
	// and then make assertions.

}

func (*RequestStorageMock) LastRequest

func (mock *RequestStorageMock) LastRequest(identifier string) (time.Time, error)

LastRequest calls LastRequestFunc.

func (*RequestStorageMock) LastRequestCalls

func (mock *RequestStorageMock) LastRequestCalls() []struct {
	Identifier string
}

LastRequestCalls gets all the calls that were made to LastRequest. Check the length with:

len(mockedRequestStorage.LastRequestCalls())

func (*RequestStorageMock) UpdateLastRequest

func (mock *RequestStorageMock) UpdateLastRequest(identifier string) error

UpdateLastRequest calls UpdateLastRequestFunc.

func (*RequestStorageMock) UpdateLastRequestCalls

func (mock *RequestStorageMock) UpdateLastRequestCalls() []struct {
	Identifier string
}

UpdateLastRequestCalls gets all the calls that were made to UpdateLastRequest. Check the length with:

len(mockedRequestStorage.UpdateLastRequestCalls())

type RequestStorageServiceMock

type RequestStorageServiceMock struct {
	// RequestFunc mocks the Request method.
	RequestFunc func(contextMoqParam context.Context) radio.RequestStorage

	// RequestTxFunc mocks the RequestTx method.
	RequestTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RequestStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

RequestStorageServiceMock is a mock implementation of radio.RequestStorageService.

func TestSomethingThatUsesRequestStorageService(t *testing.T) {

	// make and configure a mocked radio.RequestStorageService
	mockedRequestStorageService := &RequestStorageServiceMock{
		RequestFunc: func(contextMoqParam context.Context) radio.RequestStorage {
			panic("mock out the Request method")
		},
		RequestTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RequestStorage, radio.StorageTx, error) {
			panic("mock out the RequestTx method")
		},
	}

	// use mockedRequestStorageService in code that requires radio.RequestStorageService
	// and then make assertions.

}

func (*RequestStorageServiceMock) Request

func (mock *RequestStorageServiceMock) Request(contextMoqParam context.Context) radio.RequestStorage

Request calls RequestFunc.

func (*RequestStorageServiceMock) RequestCalls

func (mock *RequestStorageServiceMock) RequestCalls() []struct {
	ContextMoqParam context.Context
}

RequestCalls gets all the calls that were made to Request. Check the length with:

len(mockedRequestStorageService.RequestCalls())

func (*RequestStorageServiceMock) RequestTx

func (mock *RequestStorageServiceMock) RequestTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RequestStorage, radio.StorageTx, error)

RequestTx calls RequestTxFunc.

func (*RequestStorageServiceMock) RequestTxCalls

func (mock *RequestStorageServiceMock) RequestTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

RequestTxCalls gets all the calls that were made to RequestTx. Check the length with:

len(mockedRequestStorageService.RequestTxCalls())

type ScheduleStorageMock

type ScheduleStorageMock struct {
	// HistoryFunc mocks the History method.
	HistoryFunc func(day radio.ScheduleDay, limit int64, offset int64) ([]radio.ScheduleEntry, error)

	// LatestFunc mocks the Latest method.
	LatestFunc func() ([]*radio.ScheduleEntry, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(scheduleEntry radio.ScheduleEntry) error
	// contains filtered or unexported fields
}

ScheduleStorageMock is a mock implementation of radio.ScheduleStorage.

func TestSomethingThatUsesScheduleStorage(t *testing.T) {

	// make and configure a mocked radio.ScheduleStorage
	mockedScheduleStorage := &ScheduleStorageMock{
		HistoryFunc: func(day radio.ScheduleDay, limit int64, offset int64) ([]radio.ScheduleEntry, error) {
			panic("mock out the History method")
		},
		LatestFunc: func() ([]*radio.ScheduleEntry, error) {
			panic("mock out the Latest method")
		},
		UpdateFunc: func(scheduleEntry radio.ScheduleEntry) error {
			panic("mock out the Update method")
		},
	}

	// use mockedScheduleStorage in code that requires radio.ScheduleStorage
	// and then make assertions.

}

func (*ScheduleStorageMock) History

func (mock *ScheduleStorageMock) History(day radio.ScheduleDay, limit int64, offset int64) ([]radio.ScheduleEntry, error)

History calls HistoryFunc.

func (*ScheduleStorageMock) HistoryCalls

func (mock *ScheduleStorageMock) HistoryCalls() []struct {
	Day    radio.ScheduleDay
	Limit  int64
	Offset int64
}

HistoryCalls gets all the calls that were made to History. Check the length with:

len(mockedScheduleStorage.HistoryCalls())

func (*ScheduleStorageMock) Latest

func (mock *ScheduleStorageMock) Latest() ([]*radio.ScheduleEntry, error)

Latest calls LatestFunc.

func (*ScheduleStorageMock) LatestCalls

func (mock *ScheduleStorageMock) LatestCalls() []struct {
}

LatestCalls gets all the calls that were made to Latest. Check the length with:

len(mockedScheduleStorage.LatestCalls())

func (*ScheduleStorageMock) Update

func (mock *ScheduleStorageMock) Update(scheduleEntry radio.ScheduleEntry) error

Update calls UpdateFunc.

func (*ScheduleStorageMock) UpdateCalls

func (mock *ScheduleStorageMock) UpdateCalls() []struct {
	ScheduleEntry radio.ScheduleEntry
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedScheduleStorage.UpdateCalls())

type ScheduleStorageServiceMock

type ScheduleStorageServiceMock struct {
	// ScheduleFunc mocks the Schedule method.
	ScheduleFunc func(contextMoqParam context.Context) radio.ScheduleStorage

	// ScheduleTxFunc mocks the ScheduleTx method.
	ScheduleTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.ScheduleStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

ScheduleStorageServiceMock is a mock implementation of radio.ScheduleStorageService.

func TestSomethingThatUsesScheduleStorageService(t *testing.T) {

	// make and configure a mocked radio.ScheduleStorageService
	mockedScheduleStorageService := &ScheduleStorageServiceMock{
		ScheduleFunc: func(contextMoqParam context.Context) radio.ScheduleStorage {
			panic("mock out the Schedule method")
		},
		ScheduleTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.ScheduleStorage, radio.StorageTx, error) {
			panic("mock out the ScheduleTx method")
		},
	}

	// use mockedScheduleStorageService in code that requires radio.ScheduleStorageService
	// and then make assertions.

}

func (*ScheduleStorageServiceMock) Schedule

func (mock *ScheduleStorageServiceMock) Schedule(contextMoqParam context.Context) radio.ScheduleStorage

Schedule calls ScheduleFunc.

func (*ScheduleStorageServiceMock) ScheduleCalls

func (mock *ScheduleStorageServiceMock) ScheduleCalls() []struct {
	ContextMoqParam context.Context
}

ScheduleCalls gets all the calls that were made to Schedule. Check the length with:

len(mockedScheduleStorageService.ScheduleCalls())

func (*ScheduleStorageServiceMock) ScheduleTx

func (mock *ScheduleStorageServiceMock) ScheduleTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.ScheduleStorage, radio.StorageTx, error)

ScheduleTx calls ScheduleTxFunc.

func (*ScheduleStorageServiceMock) ScheduleTxCalls

func (mock *ScheduleStorageServiceMock) ScheduleTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

ScheduleTxCalls gets all the calls that were made to ScheduleTx. Check the length with:

len(mockedScheduleStorageService.ScheduleTxCalls())

type SearchServiceMock

type SearchServiceMock struct {
	// DeleteFunc mocks the Delete method.
	DeleteFunc func(contextMoqParam context.Context, trackIDs ...radio.TrackID) error

	// SearchFunc mocks the Search method.
	SearchFunc func(ctx context.Context, query string, limit int64, offset int64) (*radio.SearchResult, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(contextMoqParam context.Context, songs ...radio.Song) error
	// contains filtered or unexported fields
}

SearchServiceMock is a mock implementation of radio.SearchService.

func TestSomethingThatUsesSearchService(t *testing.T) {

	// make and configure a mocked radio.SearchService
	mockedSearchService := &SearchServiceMock{
		DeleteFunc: func(contextMoqParam context.Context, trackIDs ...radio.TrackID) error {
			panic("mock out the Delete method")
		},
		SearchFunc: func(ctx context.Context, query string, limit int64, offset int64) (*radio.SearchResult, error) {
			panic("mock out the Search method")
		},
		UpdateFunc: func(contextMoqParam context.Context, songs ...radio.Song) error {
			panic("mock out the Update method")
		},
	}

	// use mockedSearchService in code that requires radio.SearchService
	// and then make assertions.

}

func (*SearchServiceMock) Delete

func (mock *SearchServiceMock) Delete(contextMoqParam context.Context, trackIDs ...radio.TrackID) error

Delete calls DeleteFunc.

func (*SearchServiceMock) DeleteCalls

func (mock *SearchServiceMock) DeleteCalls() []struct {
	ContextMoqParam context.Context
	TrackIDs        []radio.TrackID
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedSearchService.DeleteCalls())

func (*SearchServiceMock) Search

func (mock *SearchServiceMock) Search(ctx context.Context, query string, limit int64, offset int64) (*radio.SearchResult, error)

Search calls SearchFunc.

func (*SearchServiceMock) SearchCalls

func (mock *SearchServiceMock) SearchCalls() []struct {
	Ctx    context.Context
	Query  string
	Limit  int64
	Offset int64
}

SearchCalls gets all the calls that were made to Search. Check the length with:

len(mockedSearchService.SearchCalls())

func (*SearchServiceMock) Update

func (mock *SearchServiceMock) Update(contextMoqParam context.Context, songs ...radio.Song) error

Update calls UpdateFunc.

func (*SearchServiceMock) UpdateCalls

func (mock *SearchServiceMock) UpdateCalls() []struct {
	ContextMoqParam context.Context
	Songs           []radio.Song
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedSearchService.UpdateCalls())

type SessionStorageMock

type SessionStorageMock struct {
	// DeleteFunc mocks the Delete method.
	DeleteFunc func(sessionToken radio.SessionToken) error

	// GetFunc mocks the Get method.
	GetFunc func(sessionToken radio.SessionToken) (radio.Session, error)

	// SaveFunc mocks the Save method.
	SaveFunc func(session radio.Session) error
	// contains filtered or unexported fields
}

SessionStorageMock is a mock implementation of radio.SessionStorage.

func TestSomethingThatUsesSessionStorage(t *testing.T) {

	// make and configure a mocked radio.SessionStorage
	mockedSessionStorage := &SessionStorageMock{
		DeleteFunc: func(sessionToken radio.SessionToken) error {
			panic("mock out the Delete method")
		},
		GetFunc: func(sessionToken radio.SessionToken) (radio.Session, error) {
			panic("mock out the Get method")
		},
		SaveFunc: func(session radio.Session) error {
			panic("mock out the Save method")
		},
	}

	// use mockedSessionStorage in code that requires radio.SessionStorage
	// and then make assertions.

}

func (*SessionStorageMock) Delete

func (mock *SessionStorageMock) Delete(sessionToken radio.SessionToken) error

Delete calls DeleteFunc.

func (*SessionStorageMock) DeleteCalls

func (mock *SessionStorageMock) DeleteCalls() []struct {
	SessionToken radio.SessionToken
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedSessionStorage.DeleteCalls())

func (*SessionStorageMock) Get

func (mock *SessionStorageMock) Get(sessionToken radio.SessionToken) (radio.Session, error)

Get calls GetFunc.

func (*SessionStorageMock) GetCalls

func (mock *SessionStorageMock) GetCalls() []struct {
	SessionToken radio.SessionToken
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedSessionStorage.GetCalls())

func (*SessionStorageMock) Save

func (mock *SessionStorageMock) Save(session radio.Session) error

Save calls SaveFunc.

func (*SessionStorageMock) SaveCalls

func (mock *SessionStorageMock) SaveCalls() []struct {
	Session radio.Session
}

SaveCalls gets all the calls that were made to Save. Check the length with:

len(mockedSessionStorage.SaveCalls())

type SessionStorageServiceMock

type SessionStorageServiceMock struct {
	// SessionsFunc mocks the Sessions method.
	SessionsFunc func(contextMoqParam context.Context) radio.SessionStorage

	// SessionsTxFunc mocks the SessionsTx method.
	SessionsTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SessionStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

SessionStorageServiceMock is a mock implementation of radio.SessionStorageService.

func TestSomethingThatUsesSessionStorageService(t *testing.T) {

	// make and configure a mocked radio.SessionStorageService
	mockedSessionStorageService := &SessionStorageServiceMock{
		SessionsFunc: func(contextMoqParam context.Context) radio.SessionStorage {
			panic("mock out the Sessions method")
		},
		SessionsTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SessionStorage, radio.StorageTx, error) {
			panic("mock out the SessionsTx method")
		},
	}

	// use mockedSessionStorageService in code that requires radio.SessionStorageService
	// and then make assertions.

}

func (*SessionStorageServiceMock) Sessions

func (mock *SessionStorageServiceMock) Sessions(contextMoqParam context.Context) radio.SessionStorage

Sessions calls SessionsFunc.

func (*SessionStorageServiceMock) SessionsCalls

func (mock *SessionStorageServiceMock) SessionsCalls() []struct {
	ContextMoqParam context.Context
}

SessionsCalls gets all the calls that were made to Sessions. Check the length with:

len(mockedSessionStorageService.SessionsCalls())

func (*SessionStorageServiceMock) SessionsTx

func (mock *SessionStorageServiceMock) SessionsTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SessionStorage, radio.StorageTx, error)

SessionsTx calls SessionsTxFunc.

func (*SessionStorageServiceMock) SessionsTxCalls

func (mock *SessionStorageServiceMock) SessionsTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

SessionsTxCalls gets all the calls that were made to SessionsTx. Check the length with:

len(mockedSessionStorageService.SessionsTxCalls())

type SongStorageMock

type SongStorageMock struct {
	// AddFavoriteFunc mocks the AddFavorite method.
	AddFavoriteFunc func(song radio.Song, nick string) (bool, error)

	// AddPlayFunc mocks the AddPlay method.
	AddPlayFunc func(song radio.Song, streamer radio.User, ldiff *radio.Listeners) error

	// CreateFunc mocks the Create method.
	CreateFunc func(song radio.Song) (*radio.Song, error)

	// FavoriteCountFunc mocks the FavoriteCount method.
	FavoriteCountFunc func(song radio.Song) (int64, error)

	// FavoritesFunc mocks the Favorites method.
	FavoritesFunc func(song radio.Song) ([]string, error)

	// FavoritesOfFunc mocks the FavoritesOf method.
	FavoritesOfFunc func(nick string, limit int64, offset int64) ([]radio.Song, int64, error)

	// FavoritesOfDatabaseFunc mocks the FavoritesOfDatabase method.
	FavoritesOfDatabaseFunc func(nick string) ([]radio.Song, error)

	// FromHashFunc mocks the FromHash method.
	FromHashFunc func(songHash radio.SongHash) (*radio.Song, error)

	// FromMetadataFunc mocks the FromMetadata method.
	FromMetadataFunc func(metadata string) (*radio.Song, error)

	// LastPlayedFunc mocks the LastPlayed method.
	LastPlayedFunc func(key radio.LastPlayedKey, amountPerPage int) ([]radio.Song, error)

	// LastPlayedCountFunc mocks the LastPlayedCount method.
	LastPlayedCountFunc func() (int64, error)

	// LastPlayedPaginationFunc mocks the LastPlayedPagination method.
	LastPlayedPaginationFunc func(key radio.LastPlayedKey, amountPerPage int, pageCount int) ([]radio.LastPlayedKey, []radio.LastPlayedKey, error)

	// PlayedCountFunc mocks the PlayedCount method.
	PlayedCountFunc func(song radio.Song) (int64, error)

	// RemoveFavoriteFunc mocks the RemoveFavorite method.
	RemoveFavoriteFunc func(song radio.Song, nick string) (bool, error)

	// UpdateHashLinkFunc mocks the UpdateHashLink method.
	UpdateHashLinkFunc func(old radio.SongHash, new radio.SongHash) error

	// UpdateLengthFunc mocks the UpdateLength method.
	UpdateLengthFunc func(song radio.Song, duration time.Duration) error
	// contains filtered or unexported fields
}

SongStorageMock is a mock implementation of radio.SongStorage.

func TestSomethingThatUsesSongStorage(t *testing.T) {

	// make and configure a mocked radio.SongStorage
	mockedSongStorage := &SongStorageMock{
		AddFavoriteFunc: func(song radio.Song, nick string) (bool, error) {
			panic("mock out the AddFavorite method")
		},
		AddPlayFunc: func(song radio.Song, streamer radio.User, ldiff *radio.Listeners) error {
			panic("mock out the AddPlay method")
		},
		CreateFunc: func(song radio.Song) (*radio.Song, error) {
			panic("mock out the Create method")
		},
		FavoriteCountFunc: func(song radio.Song) (int64, error) {
			panic("mock out the FavoriteCount method")
		},
		FavoritesFunc: func(song radio.Song) ([]string, error) {
			panic("mock out the Favorites method")
		},
		FavoritesOfFunc: func(nick string, limit int64, offset int64) ([]radio.Song, int64, error) {
			panic("mock out the FavoritesOf method")
		},
		FavoritesOfDatabaseFunc: func(nick string) ([]radio.Song, error) {
			panic("mock out the FavoritesOfDatabase method")
		},
		FromHashFunc: func(songHash radio.SongHash) (*radio.Song, error) {
			panic("mock out the FromHash method")
		},
		FromMetadataFunc: func(metadata string) (*radio.Song, error) {
			panic("mock out the FromMetadata method")
		},
		LastPlayedFunc: func(key radio.LastPlayedKey, amountPerPage int) ([]radio.Song, error) {
			panic("mock out the LastPlayed method")
		},
		LastPlayedCountFunc: func() (int64, error) {
			panic("mock out the LastPlayedCount method")
		},
		LastPlayedPaginationFunc: func(key radio.LastPlayedKey, amountPerPage int, pageCount int) ([]radio.LastPlayedKey, []radio.LastPlayedKey, error) {
			panic("mock out the LastPlayedPagination method")
		},
		PlayedCountFunc: func(song radio.Song) (int64, error) {
			panic("mock out the PlayedCount method")
		},
		RemoveFavoriteFunc: func(song radio.Song, nick string) (bool, error) {
			panic("mock out the RemoveFavorite method")
		},
		UpdateHashLinkFunc: func(old radio.SongHash, new radio.SongHash) error {
			panic("mock out the UpdateHashLink method")
		},
		UpdateLengthFunc: func(song radio.Song, duration time.Duration) error {
			panic("mock out the UpdateLength method")
		},
	}

	// use mockedSongStorage in code that requires radio.SongStorage
	// and then make assertions.

}

func (*SongStorageMock) AddFavorite

func (mock *SongStorageMock) AddFavorite(song radio.Song, nick string) (bool, error)

AddFavorite calls AddFavoriteFunc.

func (*SongStorageMock) AddFavoriteCalls

func (mock *SongStorageMock) AddFavoriteCalls() []struct {
	Song radio.Song
	Nick string
}

AddFavoriteCalls gets all the calls that were made to AddFavorite. Check the length with:

len(mockedSongStorage.AddFavoriteCalls())

func (*SongStorageMock) AddPlay

func (mock *SongStorageMock) AddPlay(song radio.Song, streamer radio.User, ldiff *radio.Listeners) error

AddPlay calls AddPlayFunc.

func (*SongStorageMock) AddPlayCalls

func (mock *SongStorageMock) AddPlayCalls() []struct {
	Song     radio.Song
	Streamer radio.User
	Ldiff    *radio.Listeners
}

AddPlayCalls gets all the calls that were made to AddPlay. Check the length with:

len(mockedSongStorage.AddPlayCalls())

func (*SongStorageMock) Create

func (mock *SongStorageMock) Create(song radio.Song) (*radio.Song, error)

Create calls CreateFunc.

func (*SongStorageMock) CreateCalls

func (mock *SongStorageMock) CreateCalls() []struct {
	Song radio.Song
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedSongStorage.CreateCalls())

func (*SongStorageMock) FavoriteCount

func (mock *SongStorageMock) FavoriteCount(song radio.Song) (int64, error)

FavoriteCount calls FavoriteCountFunc.

func (*SongStorageMock) FavoriteCountCalls

func (mock *SongStorageMock) FavoriteCountCalls() []struct {
	Song radio.Song
}

FavoriteCountCalls gets all the calls that were made to FavoriteCount. Check the length with:

len(mockedSongStorage.FavoriteCountCalls())

func (*SongStorageMock) Favorites

func (mock *SongStorageMock) Favorites(song radio.Song) ([]string, error)

Favorites calls FavoritesFunc.

func (*SongStorageMock) FavoritesCalls

func (mock *SongStorageMock) FavoritesCalls() []struct {
	Song radio.Song
}

FavoritesCalls gets all the calls that were made to Favorites. Check the length with:

len(mockedSongStorage.FavoritesCalls())

func (*SongStorageMock) FavoritesOf

func (mock *SongStorageMock) FavoritesOf(nick string, limit int64, offset int64) ([]radio.Song, int64, error)

FavoritesOf calls FavoritesOfFunc.

func (*SongStorageMock) FavoritesOfCalls

func (mock *SongStorageMock) FavoritesOfCalls() []struct {
	Nick   string
	Limit  int64
	Offset int64
}

FavoritesOfCalls gets all the calls that were made to FavoritesOf. Check the length with:

len(mockedSongStorage.FavoritesOfCalls())

func (*SongStorageMock) FavoritesOfDatabase

func (mock *SongStorageMock) FavoritesOfDatabase(nick string) ([]radio.Song, error)

FavoritesOfDatabase calls FavoritesOfDatabaseFunc.

func (*SongStorageMock) FavoritesOfDatabaseCalls

func (mock *SongStorageMock) FavoritesOfDatabaseCalls() []struct {
	Nick string
}

FavoritesOfDatabaseCalls gets all the calls that were made to FavoritesOfDatabase. Check the length with:

len(mockedSongStorage.FavoritesOfDatabaseCalls())

func (*SongStorageMock) FromHash

func (mock *SongStorageMock) FromHash(songHash radio.SongHash) (*radio.Song, error)

FromHash calls FromHashFunc.

func (*SongStorageMock) FromHashCalls

func (mock *SongStorageMock) FromHashCalls() []struct {
	SongHash radio.SongHash
}

FromHashCalls gets all the calls that were made to FromHash. Check the length with:

len(mockedSongStorage.FromHashCalls())

func (*SongStorageMock) FromMetadata

func (mock *SongStorageMock) FromMetadata(metadata string) (*radio.Song, error)

FromMetadata calls FromMetadataFunc.

func (*SongStorageMock) FromMetadataCalls

func (mock *SongStorageMock) FromMetadataCalls() []struct {
	Metadata string
}

FromMetadataCalls gets all the calls that were made to FromMetadata. Check the length with:

len(mockedSongStorage.FromMetadataCalls())

func (*SongStorageMock) LastPlayed

func (mock *SongStorageMock) LastPlayed(key radio.LastPlayedKey, amountPerPage int) ([]radio.Song, error)

LastPlayed calls LastPlayedFunc.

func (*SongStorageMock) LastPlayedCalls

func (mock *SongStorageMock) LastPlayedCalls() []struct {
	Key           radio.LastPlayedKey
	AmountPerPage int
}

LastPlayedCalls gets all the calls that were made to LastPlayed. Check the length with:

len(mockedSongStorage.LastPlayedCalls())

func (*SongStorageMock) LastPlayedCount

func (mock *SongStorageMock) LastPlayedCount() (int64, error)

LastPlayedCount calls LastPlayedCountFunc.

func (*SongStorageMock) LastPlayedCountCalls

func (mock *SongStorageMock) LastPlayedCountCalls() []struct {
}

LastPlayedCountCalls gets all the calls that were made to LastPlayedCount. Check the length with:

len(mockedSongStorage.LastPlayedCountCalls())

func (*SongStorageMock) LastPlayedPagination

func (mock *SongStorageMock) LastPlayedPagination(key radio.LastPlayedKey, amountPerPage int, pageCount int) ([]radio.LastPlayedKey, []radio.LastPlayedKey, error)

LastPlayedPagination calls LastPlayedPaginationFunc.

func (*SongStorageMock) LastPlayedPaginationCalls

func (mock *SongStorageMock) LastPlayedPaginationCalls() []struct {
	Key           radio.LastPlayedKey
	AmountPerPage int
	PageCount     int
}

LastPlayedPaginationCalls gets all the calls that were made to LastPlayedPagination. Check the length with:

len(mockedSongStorage.LastPlayedPaginationCalls())

func (*SongStorageMock) PlayedCount

func (mock *SongStorageMock) PlayedCount(song radio.Song) (int64, error)

PlayedCount calls PlayedCountFunc.

func (*SongStorageMock) PlayedCountCalls

func (mock *SongStorageMock) PlayedCountCalls() []struct {
	Song radio.Song
}

PlayedCountCalls gets all the calls that were made to PlayedCount. Check the length with:

len(mockedSongStorage.PlayedCountCalls())

func (*SongStorageMock) RemoveFavorite

func (mock *SongStorageMock) RemoveFavorite(song radio.Song, nick string) (bool, error)

RemoveFavorite calls RemoveFavoriteFunc.

func (*SongStorageMock) RemoveFavoriteCalls

func (mock *SongStorageMock) RemoveFavoriteCalls() []struct {
	Song radio.Song
	Nick string
}

RemoveFavoriteCalls gets all the calls that were made to RemoveFavorite. Check the length with:

len(mockedSongStorage.RemoveFavoriteCalls())
func (mock *SongStorageMock) UpdateHashLink(old radio.SongHash, new radio.SongHash) error

UpdateHashLink calls UpdateHashLinkFunc.

func (*SongStorageMock) UpdateHashLinkCalls

func (mock *SongStorageMock) UpdateHashLinkCalls() []struct {
	Old radio.SongHash
	New radio.SongHash
}

UpdateHashLinkCalls gets all the calls that were made to UpdateHashLink. Check the length with:

len(mockedSongStorage.UpdateHashLinkCalls())

func (*SongStorageMock) UpdateLength

func (mock *SongStorageMock) UpdateLength(song radio.Song, duration time.Duration) error

UpdateLength calls UpdateLengthFunc.

func (*SongStorageMock) UpdateLengthCalls

func (mock *SongStorageMock) UpdateLengthCalls() []struct {
	Song     radio.Song
	Duration time.Duration
}

UpdateLengthCalls gets all the calls that were made to UpdateLength. Check the length with:

len(mockedSongStorage.UpdateLengthCalls())

type SongStorageServiceMock

type SongStorageServiceMock struct {
	// SongFunc mocks the Song method.
	SongFunc func(contextMoqParam context.Context) radio.SongStorage

	// SongTxFunc mocks the SongTx method.
	SongTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SongStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

SongStorageServiceMock is a mock implementation of radio.SongStorageService.

func TestSomethingThatUsesSongStorageService(t *testing.T) {

	// make and configure a mocked radio.SongStorageService
	mockedSongStorageService := &SongStorageServiceMock{
		SongFunc: func(contextMoqParam context.Context) radio.SongStorage {
			panic("mock out the Song method")
		},
		SongTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SongStorage, radio.StorageTx, error) {
			panic("mock out the SongTx method")
		},
	}

	// use mockedSongStorageService in code that requires radio.SongStorageService
	// and then make assertions.

}

func (*SongStorageServiceMock) Song

func (mock *SongStorageServiceMock) Song(contextMoqParam context.Context) radio.SongStorage

Song calls SongFunc.

func (*SongStorageServiceMock) SongCalls

func (mock *SongStorageServiceMock) SongCalls() []struct {
	ContextMoqParam context.Context
}

SongCalls gets all the calls that were made to Song. Check the length with:

len(mockedSongStorageService.SongCalls())

func (*SongStorageServiceMock) SongTx

func (mock *SongStorageServiceMock) SongTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SongStorage, radio.StorageTx, error)

SongTx calls SongTxFunc.

func (*SongStorageServiceMock) SongTxCalls

func (mock *SongStorageServiceMock) SongTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

SongTxCalls gets all the calls that were made to SongTx. Check the length with:

len(mockedSongStorageService.SongTxCalls())

type StatusStorageMock

type StatusStorageMock struct {
	// LoadFunc mocks the Load method.
	LoadFunc func() (*radio.Status, error)

	// StoreFunc mocks the Store method.
	StoreFunc func(status radio.Status) error
	// contains filtered or unexported fields
}

StatusStorageMock is a mock implementation of radio.StatusStorage.

func TestSomethingThatUsesStatusStorage(t *testing.T) {

	// make and configure a mocked radio.StatusStorage
	mockedStatusStorage := &StatusStorageMock{
		LoadFunc: func() (*radio.Status, error) {
			panic("mock out the Load method")
		},
		StoreFunc: func(status radio.Status) error {
			panic("mock out the Store method")
		},
	}

	// use mockedStatusStorage in code that requires radio.StatusStorage
	// and then make assertions.

}

func (*StatusStorageMock) Load

func (mock *StatusStorageMock) Load() (*radio.Status, error)

Load calls LoadFunc.

func (*StatusStorageMock) LoadCalls

func (mock *StatusStorageMock) LoadCalls() []struct {
}

LoadCalls gets all the calls that were made to Load. Check the length with:

len(mockedStatusStorage.LoadCalls())

func (*StatusStorageMock) Store

func (mock *StatusStorageMock) Store(status radio.Status) error

Store calls StoreFunc.

func (*StatusStorageMock) StoreCalls

func (mock *StatusStorageMock) StoreCalls() []struct {
	Status radio.Status
}

StoreCalls gets all the calls that were made to Store. Check the length with:

len(mockedStatusStorage.StoreCalls())

type StatusStorageServiceMock

type StatusStorageServiceMock struct {
	// StatusFunc mocks the Status method.
	StatusFunc func(contextMoqParam context.Context) radio.StatusStorage
	// contains filtered or unexported fields
}

StatusStorageServiceMock is a mock implementation of radio.StatusStorageService.

func TestSomethingThatUsesStatusStorageService(t *testing.T) {

	// make and configure a mocked radio.StatusStorageService
	mockedStatusStorageService := &StatusStorageServiceMock{
		StatusFunc: func(contextMoqParam context.Context) radio.StatusStorage {
			panic("mock out the Status method")
		},
	}

	// use mockedStatusStorageService in code that requires radio.StatusStorageService
	// and then make assertions.

}

func (*StatusStorageServiceMock) Status

func (mock *StatusStorageServiceMock) Status(contextMoqParam context.Context) radio.StatusStorage

Status calls StatusFunc.

func (*StatusStorageServiceMock) StatusCalls

func (mock *StatusStorageServiceMock) StatusCalls() []struct {
	ContextMoqParam context.Context
}

StatusCalls gets all the calls that were made to Status. Check the length with:

len(mockedStatusStorageService.StatusCalls())

type StorageServiceMock

type StorageServiceMock struct {
	// CloseFunc mocks the Close method.
	CloseFunc func() error

	// NewsFunc mocks the News method.
	NewsFunc func(contextMoqParam context.Context) radio.NewsStorage

	// NewsTxFunc mocks the NewsTx method.
	NewsTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.NewsStorage, radio.StorageTx, error)

	// QueueFunc mocks the Queue method.
	QueueFunc func(contextMoqParam context.Context) radio.QueueStorage

	// QueueTxFunc mocks the QueueTx method.
	QueueTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.QueueStorage, radio.StorageTx, error)

	// RelayFunc mocks the Relay method.
	RelayFunc func(contextMoqParam context.Context) radio.RelayStorage

	// RelayTxFunc mocks the RelayTx method.
	RelayTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RelayStorage, radio.StorageTx, error)

	// RequestFunc mocks the Request method.
	RequestFunc func(contextMoqParam context.Context) radio.RequestStorage

	// RequestTxFunc mocks the RequestTx method.
	RequestTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RequestStorage, radio.StorageTx, error)

	// ScheduleFunc mocks the Schedule method.
	ScheduleFunc func(contextMoqParam context.Context) radio.ScheduleStorage

	// ScheduleTxFunc mocks the ScheduleTx method.
	ScheduleTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.ScheduleStorage, radio.StorageTx, error)

	// SessionsFunc mocks the Sessions method.
	SessionsFunc func(contextMoqParam context.Context) radio.SessionStorage

	// SessionsTxFunc mocks the SessionsTx method.
	SessionsTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SessionStorage, radio.StorageTx, error)

	// SongFunc mocks the Song method.
	SongFunc func(contextMoqParam context.Context) radio.SongStorage

	// SongTxFunc mocks the SongTx method.
	SongTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SongStorage, radio.StorageTx, error)

	// StatusFunc mocks the Status method.
	StatusFunc func(contextMoqParam context.Context) radio.StatusStorage

	// SubmissionsFunc mocks the Submissions method.
	SubmissionsFunc func(contextMoqParam context.Context) radio.SubmissionStorage

	// SubmissionsTxFunc mocks the SubmissionsTx method.
	SubmissionsTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SubmissionStorage, radio.StorageTx, error)

	// TrackFunc mocks the Track method.
	TrackFunc func(contextMoqParam context.Context) radio.TrackStorage

	// TrackTxFunc mocks the TrackTx method.
	TrackTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.TrackStorage, radio.StorageTx, error)

	// UserFunc mocks the User method.
	UserFunc func(contextMoqParam context.Context) radio.UserStorage

	// UserTxFunc mocks the UserTx method.
	UserTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.UserStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

StorageServiceMock is a mock implementation of radio.StorageService.

func TestSomethingThatUsesStorageService(t *testing.T) {

	// make and configure a mocked radio.StorageService
	mockedStorageService := &StorageServiceMock{
		CloseFunc: func() error {
			panic("mock out the Close method")
		},
		NewsFunc: func(contextMoqParam context.Context) radio.NewsStorage {
			panic("mock out the News method")
		},
		NewsTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.NewsStorage, radio.StorageTx, error) {
			panic("mock out the NewsTx method")
		},
		QueueFunc: func(contextMoqParam context.Context) radio.QueueStorage {
			panic("mock out the Queue method")
		},
		QueueTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.QueueStorage, radio.StorageTx, error) {
			panic("mock out the QueueTx method")
		},
		RelayFunc: func(contextMoqParam context.Context) radio.RelayStorage {
			panic("mock out the Relay method")
		},
		RelayTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RelayStorage, radio.StorageTx, error) {
			panic("mock out the RelayTx method")
		},
		RequestFunc: func(contextMoqParam context.Context) radio.RequestStorage {
			panic("mock out the Request method")
		},
		RequestTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RequestStorage, radio.StorageTx, error) {
			panic("mock out the RequestTx method")
		},
		ScheduleFunc: func(contextMoqParam context.Context) radio.ScheduleStorage {
			panic("mock out the Schedule method")
		},
		ScheduleTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.ScheduleStorage, radio.StorageTx, error) {
			panic("mock out the ScheduleTx method")
		},
		SessionsFunc: func(contextMoqParam context.Context) radio.SessionStorage {
			panic("mock out the Sessions method")
		},
		SessionsTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SessionStorage, radio.StorageTx, error) {
			panic("mock out the SessionsTx method")
		},
		SongFunc: func(contextMoqParam context.Context) radio.SongStorage {
			panic("mock out the Song method")
		},
		SongTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SongStorage, radio.StorageTx, error) {
			panic("mock out the SongTx method")
		},
		StatusFunc: func(contextMoqParam context.Context) radio.StatusStorage {
			panic("mock out the Status method")
		},
		SubmissionsFunc: func(contextMoqParam context.Context) radio.SubmissionStorage {
			panic("mock out the Submissions method")
		},
		SubmissionsTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SubmissionStorage, radio.StorageTx, error) {
			panic("mock out the SubmissionsTx method")
		},
		TrackFunc: func(contextMoqParam context.Context) radio.TrackStorage {
			panic("mock out the Track method")
		},
		TrackTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.TrackStorage, radio.StorageTx, error) {
			panic("mock out the TrackTx method")
		},
		UserFunc: func(contextMoqParam context.Context) radio.UserStorage {
			panic("mock out the User method")
		},
		UserTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.UserStorage, radio.StorageTx, error) {
			panic("mock out the UserTx method")
		},
	}

	// use mockedStorageService in code that requires radio.StorageService
	// and then make assertions.

}

func (*StorageServiceMock) Close

func (mock *StorageServiceMock) Close() error

Close calls CloseFunc.

func (*StorageServiceMock) CloseCalls

func (mock *StorageServiceMock) CloseCalls() []struct {
}

CloseCalls gets all the calls that were made to Close. Check the length with:

len(mockedStorageService.CloseCalls())

func (*StorageServiceMock) News

func (mock *StorageServiceMock) News(contextMoqParam context.Context) radio.NewsStorage

News calls NewsFunc.

func (*StorageServiceMock) NewsCalls

func (mock *StorageServiceMock) NewsCalls() []struct {
	ContextMoqParam context.Context
}

NewsCalls gets all the calls that were made to News. Check the length with:

len(mockedStorageService.NewsCalls())

func (*StorageServiceMock) NewsTx

func (mock *StorageServiceMock) NewsTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.NewsStorage, radio.StorageTx, error)

NewsTx calls NewsTxFunc.

func (*StorageServiceMock) NewsTxCalls

func (mock *StorageServiceMock) NewsTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

NewsTxCalls gets all the calls that were made to NewsTx. Check the length with:

len(mockedStorageService.NewsTxCalls())

func (*StorageServiceMock) Queue

func (mock *StorageServiceMock) Queue(contextMoqParam context.Context) radio.QueueStorage

Queue calls QueueFunc.

func (*StorageServiceMock) QueueCalls

func (mock *StorageServiceMock) QueueCalls() []struct {
	ContextMoqParam context.Context
}

QueueCalls gets all the calls that were made to Queue. Check the length with:

len(mockedStorageService.QueueCalls())

func (*StorageServiceMock) QueueTx

func (mock *StorageServiceMock) QueueTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.QueueStorage, radio.StorageTx, error)

QueueTx calls QueueTxFunc.

func (*StorageServiceMock) QueueTxCalls

func (mock *StorageServiceMock) QueueTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

QueueTxCalls gets all the calls that were made to QueueTx. Check the length with:

len(mockedStorageService.QueueTxCalls())

func (*StorageServiceMock) Relay

func (mock *StorageServiceMock) Relay(contextMoqParam context.Context) radio.RelayStorage

Relay calls RelayFunc.

func (*StorageServiceMock) RelayCalls

func (mock *StorageServiceMock) RelayCalls() []struct {
	ContextMoqParam context.Context
}

RelayCalls gets all the calls that were made to Relay. Check the length with:

len(mockedStorageService.RelayCalls())

func (*StorageServiceMock) RelayTx

func (mock *StorageServiceMock) RelayTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RelayStorage, radio.StorageTx, error)

RelayTx calls RelayTxFunc.

func (*StorageServiceMock) RelayTxCalls

func (mock *StorageServiceMock) RelayTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

RelayTxCalls gets all the calls that were made to RelayTx. Check the length with:

len(mockedStorageService.RelayTxCalls())

func (*StorageServiceMock) Request

func (mock *StorageServiceMock) Request(contextMoqParam context.Context) radio.RequestStorage

Request calls RequestFunc.

func (*StorageServiceMock) RequestCalls

func (mock *StorageServiceMock) RequestCalls() []struct {
	ContextMoqParam context.Context
}

RequestCalls gets all the calls that were made to Request. Check the length with:

len(mockedStorageService.RequestCalls())

func (*StorageServiceMock) RequestTx

func (mock *StorageServiceMock) RequestTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.RequestStorage, radio.StorageTx, error)

RequestTx calls RequestTxFunc.

func (*StorageServiceMock) RequestTxCalls

func (mock *StorageServiceMock) RequestTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

RequestTxCalls gets all the calls that were made to RequestTx. Check the length with:

len(mockedStorageService.RequestTxCalls())

func (*StorageServiceMock) Schedule

func (mock *StorageServiceMock) Schedule(contextMoqParam context.Context) radio.ScheduleStorage

Schedule calls ScheduleFunc.

func (*StorageServiceMock) ScheduleCalls

func (mock *StorageServiceMock) ScheduleCalls() []struct {
	ContextMoqParam context.Context
}

ScheduleCalls gets all the calls that were made to Schedule. Check the length with:

len(mockedStorageService.ScheduleCalls())

func (*StorageServiceMock) ScheduleTx

func (mock *StorageServiceMock) ScheduleTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.ScheduleStorage, radio.StorageTx, error)

ScheduleTx calls ScheduleTxFunc.

func (*StorageServiceMock) ScheduleTxCalls

func (mock *StorageServiceMock) ScheduleTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

ScheduleTxCalls gets all the calls that were made to ScheduleTx. Check the length with:

len(mockedStorageService.ScheduleTxCalls())

func (*StorageServiceMock) Sessions

func (mock *StorageServiceMock) Sessions(contextMoqParam context.Context) radio.SessionStorage

Sessions calls SessionsFunc.

func (*StorageServiceMock) SessionsCalls

func (mock *StorageServiceMock) SessionsCalls() []struct {
	ContextMoqParam context.Context
}

SessionsCalls gets all the calls that were made to Sessions. Check the length with:

len(mockedStorageService.SessionsCalls())

func (*StorageServiceMock) SessionsTx

func (mock *StorageServiceMock) SessionsTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SessionStorage, radio.StorageTx, error)

SessionsTx calls SessionsTxFunc.

func (*StorageServiceMock) SessionsTxCalls

func (mock *StorageServiceMock) SessionsTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

SessionsTxCalls gets all the calls that were made to SessionsTx. Check the length with:

len(mockedStorageService.SessionsTxCalls())

func (*StorageServiceMock) Song

func (mock *StorageServiceMock) Song(contextMoqParam context.Context) radio.SongStorage

Song calls SongFunc.

func (*StorageServiceMock) SongCalls

func (mock *StorageServiceMock) SongCalls() []struct {
	ContextMoqParam context.Context
}

SongCalls gets all the calls that were made to Song. Check the length with:

len(mockedStorageService.SongCalls())

func (*StorageServiceMock) SongTx

func (mock *StorageServiceMock) SongTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SongStorage, radio.StorageTx, error)

SongTx calls SongTxFunc.

func (*StorageServiceMock) SongTxCalls

func (mock *StorageServiceMock) SongTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

SongTxCalls gets all the calls that were made to SongTx. Check the length with:

len(mockedStorageService.SongTxCalls())

func (*StorageServiceMock) Status

func (mock *StorageServiceMock) Status(contextMoqParam context.Context) radio.StatusStorage

Status calls StatusFunc.

func (*StorageServiceMock) StatusCalls

func (mock *StorageServiceMock) StatusCalls() []struct {
	ContextMoqParam context.Context
}

StatusCalls gets all the calls that were made to Status. Check the length with:

len(mockedStorageService.StatusCalls())

func (*StorageServiceMock) Submissions

func (mock *StorageServiceMock) Submissions(contextMoqParam context.Context) radio.SubmissionStorage

Submissions calls SubmissionsFunc.

func (*StorageServiceMock) SubmissionsCalls

func (mock *StorageServiceMock) SubmissionsCalls() []struct {
	ContextMoqParam context.Context
}

SubmissionsCalls gets all the calls that were made to Submissions. Check the length with:

len(mockedStorageService.SubmissionsCalls())

func (*StorageServiceMock) SubmissionsTx

func (mock *StorageServiceMock) SubmissionsTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SubmissionStorage, radio.StorageTx, error)

SubmissionsTx calls SubmissionsTxFunc.

func (*StorageServiceMock) SubmissionsTxCalls

func (mock *StorageServiceMock) SubmissionsTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

SubmissionsTxCalls gets all the calls that were made to SubmissionsTx. Check the length with:

len(mockedStorageService.SubmissionsTxCalls())

func (*StorageServiceMock) Track

func (mock *StorageServiceMock) Track(contextMoqParam context.Context) radio.TrackStorage

Track calls TrackFunc.

func (*StorageServiceMock) TrackCalls

func (mock *StorageServiceMock) TrackCalls() []struct {
	ContextMoqParam context.Context
}

TrackCalls gets all the calls that were made to Track. Check the length with:

len(mockedStorageService.TrackCalls())

func (*StorageServiceMock) TrackTx

func (mock *StorageServiceMock) TrackTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.TrackStorage, radio.StorageTx, error)

TrackTx calls TrackTxFunc.

func (*StorageServiceMock) TrackTxCalls

func (mock *StorageServiceMock) TrackTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

TrackTxCalls gets all the calls that were made to TrackTx. Check the length with:

len(mockedStorageService.TrackTxCalls())

func (*StorageServiceMock) User

func (mock *StorageServiceMock) User(contextMoqParam context.Context) radio.UserStorage

User calls UserFunc.

func (*StorageServiceMock) UserCalls

func (mock *StorageServiceMock) UserCalls() []struct {
	ContextMoqParam context.Context
}

UserCalls gets all the calls that were made to User. Check the length with:

len(mockedStorageService.UserCalls())

func (*StorageServiceMock) UserTx

func (mock *StorageServiceMock) UserTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.UserStorage, radio.StorageTx, error)

UserTx calls UserTxFunc.

func (*StorageServiceMock) UserTxCalls

func (mock *StorageServiceMock) UserTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

UserTxCalls gets all the calls that were made to UserTx. Check the length with:

len(mockedStorageService.UserTxCalls())

type StorageTxMock

type StorageTxMock struct {
	// CommitFunc mocks the Commit method.
	CommitFunc func() error

	// RollbackFunc mocks the Rollback method.
	RollbackFunc func() error
	// contains filtered or unexported fields
}

StorageTxMock is a mock implementation of radio.StorageTx.

func TestSomethingThatUsesStorageTx(t *testing.T) {

	// make and configure a mocked radio.StorageTx
	mockedStorageTx := &StorageTxMock{
		CommitFunc: func() error {
			panic("mock out the Commit method")
		},
		RollbackFunc: func() error {
			panic("mock out the Rollback method")
		},
	}

	// use mockedStorageTx in code that requires radio.StorageTx
	// and then make assertions.

}

func (*StorageTxMock) Commit

func (mock *StorageTxMock) Commit() error

Commit calls CommitFunc.

func (*StorageTxMock) CommitCalls

func (mock *StorageTxMock) CommitCalls() []struct {
}

CommitCalls gets all the calls that were made to Commit. Check the length with:

len(mockedStorageTx.CommitCalls())

func (*StorageTxMock) Rollback

func (mock *StorageTxMock) Rollback() error

Rollback calls RollbackFunc.

func (*StorageTxMock) RollbackCalls

func (mock *StorageTxMock) RollbackCalls() []struct {
}

RollbackCalls gets all the calls that were made to Rollback. Check the length with:

len(mockedStorageTx.RollbackCalls())

type StreamerServiceMock

type StreamerServiceMock struct {
	// QueueFunc mocks the Queue method.
	QueueFunc func(contextMoqParam context.Context) (radio.Queue, error)

	// RequestSongFunc mocks the RequestSong method.
	RequestSongFunc func(contextMoqParam context.Context, song radio.Song, s string) error

	// StartFunc mocks the Start method.
	StartFunc func(contextMoqParam context.Context) error

	// StopFunc mocks the Stop method.
	StopFunc func(ctx context.Context, force bool) error
	// contains filtered or unexported fields
}

StreamerServiceMock is a mock implementation of radio.StreamerService.

func TestSomethingThatUsesStreamerService(t *testing.T) {

	// make and configure a mocked radio.StreamerService
	mockedStreamerService := &StreamerServiceMock{
		QueueFunc: func(contextMoqParam context.Context) (radio.Queue, error) {
			panic("mock out the Queue method")
		},
		RequestSongFunc: func(contextMoqParam context.Context, song radio.Song, s string) error {
			panic("mock out the RequestSong method")
		},
		StartFunc: func(contextMoqParam context.Context) error {
			panic("mock out the Start method")
		},
		StopFunc: func(ctx context.Context, force bool) error {
			panic("mock out the Stop method")
		},
	}

	// use mockedStreamerService in code that requires radio.StreamerService
	// and then make assertions.

}

func (*StreamerServiceMock) Queue

func (mock *StreamerServiceMock) Queue(contextMoqParam context.Context) (radio.Queue, error)

Queue calls QueueFunc.

func (*StreamerServiceMock) QueueCalls

func (mock *StreamerServiceMock) QueueCalls() []struct {
	ContextMoqParam context.Context
}

QueueCalls gets all the calls that were made to Queue. Check the length with:

len(mockedStreamerService.QueueCalls())

func (*StreamerServiceMock) RequestSong

func (mock *StreamerServiceMock) RequestSong(contextMoqParam context.Context, song radio.Song, s string) error

RequestSong calls RequestSongFunc.

func (*StreamerServiceMock) RequestSongCalls

func (mock *StreamerServiceMock) RequestSongCalls() []struct {
	ContextMoqParam context.Context
	Song            radio.Song
	S               string
}

RequestSongCalls gets all the calls that were made to RequestSong. Check the length with:

len(mockedStreamerService.RequestSongCalls())

func (*StreamerServiceMock) Start

func (mock *StreamerServiceMock) Start(contextMoqParam context.Context) error

Start calls StartFunc.

func (*StreamerServiceMock) StartCalls

func (mock *StreamerServiceMock) StartCalls() []struct {
	ContextMoqParam context.Context
}

StartCalls gets all the calls that were made to Start. Check the length with:

len(mockedStreamerService.StartCalls())

func (*StreamerServiceMock) Stop

func (mock *StreamerServiceMock) Stop(ctx context.Context, force bool) error

Stop calls StopFunc.

func (*StreamerServiceMock) StopCalls

func (mock *StreamerServiceMock) StopCalls() []struct {
	Ctx   context.Context
	Force bool
}

StopCalls gets all the calls that were made to Stop. Check the length with:

len(mockedStreamerService.StopCalls())

type SubmissionStorageMock

type SubmissionStorageMock struct {
	// AllFunc mocks the All method.
	AllFunc func() ([]radio.PendingSong, error)

	// GetSubmissionFunc mocks the GetSubmission method.
	GetSubmissionFunc func(submissionID radio.SubmissionID) (*radio.PendingSong, error)

	// InsertPostPendingFunc mocks the InsertPostPending method.
	InsertPostPendingFunc func(pendingSong radio.PendingSong) error

	// InsertSubmissionFunc mocks the InsertSubmission method.
	InsertSubmissionFunc func(pendingSong radio.PendingSong) error

	// LastSubmissionTimeFunc mocks the LastSubmissionTime method.
	LastSubmissionTimeFunc func(identifier string) (time.Time, error)

	// RemoveSubmissionFunc mocks the RemoveSubmission method.
	RemoveSubmissionFunc func(submissionID radio.SubmissionID) error

	// SubmissionStatsFunc mocks the SubmissionStats method.
	SubmissionStatsFunc func(identifier string) (radio.SubmissionStats, error)

	// UpdateSubmissionTimeFunc mocks the UpdateSubmissionTime method.
	UpdateSubmissionTimeFunc func(identifier string) error
	// contains filtered or unexported fields
}

SubmissionStorageMock is a mock implementation of radio.SubmissionStorage.

func TestSomethingThatUsesSubmissionStorage(t *testing.T) {

	// make and configure a mocked radio.SubmissionStorage
	mockedSubmissionStorage := &SubmissionStorageMock{
		AllFunc: func() ([]radio.PendingSong, error) {
			panic("mock out the All method")
		},
		GetSubmissionFunc: func(submissionID radio.SubmissionID) (*radio.PendingSong, error) {
			panic("mock out the GetSubmission method")
		},
		InsertPostPendingFunc: func(pendingSong radio.PendingSong) error {
			panic("mock out the InsertPostPending method")
		},
		InsertSubmissionFunc: func(pendingSong radio.PendingSong) error {
			panic("mock out the InsertSubmission method")
		},
		LastSubmissionTimeFunc: func(identifier string) (time.Time, error) {
			panic("mock out the LastSubmissionTime method")
		},
		RemoveSubmissionFunc: func(submissionID radio.SubmissionID) error {
			panic("mock out the RemoveSubmission method")
		},
		SubmissionStatsFunc: func(identifier string) (radio.SubmissionStats, error) {
			panic("mock out the SubmissionStats method")
		},
		UpdateSubmissionTimeFunc: func(identifier string) error {
			panic("mock out the UpdateSubmissionTime method")
		},
	}

	// use mockedSubmissionStorage in code that requires radio.SubmissionStorage
	// and then make assertions.

}

func (*SubmissionStorageMock) All

func (mock *SubmissionStorageMock) All() ([]radio.PendingSong, error)

All calls AllFunc.

func (*SubmissionStorageMock) AllCalls

func (mock *SubmissionStorageMock) AllCalls() []struct {
}

AllCalls gets all the calls that were made to All. Check the length with:

len(mockedSubmissionStorage.AllCalls())

func (*SubmissionStorageMock) GetSubmission

func (mock *SubmissionStorageMock) GetSubmission(submissionID radio.SubmissionID) (*radio.PendingSong, error)

GetSubmission calls GetSubmissionFunc.

func (*SubmissionStorageMock) GetSubmissionCalls

func (mock *SubmissionStorageMock) GetSubmissionCalls() []struct {
	SubmissionID radio.SubmissionID
}

GetSubmissionCalls gets all the calls that were made to GetSubmission. Check the length with:

len(mockedSubmissionStorage.GetSubmissionCalls())

func (*SubmissionStorageMock) InsertPostPending

func (mock *SubmissionStorageMock) InsertPostPending(pendingSong radio.PendingSong) error

InsertPostPending calls InsertPostPendingFunc.

func (*SubmissionStorageMock) InsertPostPendingCalls

func (mock *SubmissionStorageMock) InsertPostPendingCalls() []struct {
	PendingSong radio.PendingSong
}

InsertPostPendingCalls gets all the calls that were made to InsertPostPending. Check the length with:

len(mockedSubmissionStorage.InsertPostPendingCalls())

func (*SubmissionStorageMock) InsertSubmission

func (mock *SubmissionStorageMock) InsertSubmission(pendingSong radio.PendingSong) error

InsertSubmission calls InsertSubmissionFunc.

func (*SubmissionStorageMock) InsertSubmissionCalls

func (mock *SubmissionStorageMock) InsertSubmissionCalls() []struct {
	PendingSong radio.PendingSong
}

InsertSubmissionCalls gets all the calls that were made to InsertSubmission. Check the length with:

len(mockedSubmissionStorage.InsertSubmissionCalls())

func (*SubmissionStorageMock) LastSubmissionTime

func (mock *SubmissionStorageMock) LastSubmissionTime(identifier string) (time.Time, error)

LastSubmissionTime calls LastSubmissionTimeFunc.

func (*SubmissionStorageMock) LastSubmissionTimeCalls

func (mock *SubmissionStorageMock) LastSubmissionTimeCalls() []struct {
	Identifier string
}

LastSubmissionTimeCalls gets all the calls that were made to LastSubmissionTime. Check the length with:

len(mockedSubmissionStorage.LastSubmissionTimeCalls())

func (*SubmissionStorageMock) RemoveSubmission

func (mock *SubmissionStorageMock) RemoveSubmission(submissionID radio.SubmissionID) error

RemoveSubmission calls RemoveSubmissionFunc.

func (*SubmissionStorageMock) RemoveSubmissionCalls

func (mock *SubmissionStorageMock) RemoveSubmissionCalls() []struct {
	SubmissionID radio.SubmissionID
}

RemoveSubmissionCalls gets all the calls that were made to RemoveSubmission. Check the length with:

len(mockedSubmissionStorage.RemoveSubmissionCalls())

func (*SubmissionStorageMock) SubmissionStats

func (mock *SubmissionStorageMock) SubmissionStats(identifier string) (radio.SubmissionStats, error)

SubmissionStats calls SubmissionStatsFunc.

func (*SubmissionStorageMock) SubmissionStatsCalls

func (mock *SubmissionStorageMock) SubmissionStatsCalls() []struct {
	Identifier string
}

SubmissionStatsCalls gets all the calls that were made to SubmissionStats. Check the length with:

len(mockedSubmissionStorage.SubmissionStatsCalls())

func (*SubmissionStorageMock) UpdateSubmissionTime

func (mock *SubmissionStorageMock) UpdateSubmissionTime(identifier string) error

UpdateSubmissionTime calls UpdateSubmissionTimeFunc.

func (*SubmissionStorageMock) UpdateSubmissionTimeCalls

func (mock *SubmissionStorageMock) UpdateSubmissionTimeCalls() []struct {
	Identifier string
}

UpdateSubmissionTimeCalls gets all the calls that were made to UpdateSubmissionTime. Check the length with:

len(mockedSubmissionStorage.UpdateSubmissionTimeCalls())

type SubmissionStorageServiceMock

type SubmissionStorageServiceMock struct {
	// SubmissionsFunc mocks the Submissions method.
	SubmissionsFunc func(contextMoqParam context.Context) radio.SubmissionStorage

	// SubmissionsTxFunc mocks the SubmissionsTx method.
	SubmissionsTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SubmissionStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

SubmissionStorageServiceMock is a mock implementation of radio.SubmissionStorageService.

func TestSomethingThatUsesSubmissionStorageService(t *testing.T) {

	// make and configure a mocked radio.SubmissionStorageService
	mockedSubmissionStorageService := &SubmissionStorageServiceMock{
		SubmissionsFunc: func(contextMoqParam context.Context) radio.SubmissionStorage {
			panic("mock out the Submissions method")
		},
		SubmissionsTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SubmissionStorage, radio.StorageTx, error) {
			panic("mock out the SubmissionsTx method")
		},
	}

	// use mockedSubmissionStorageService in code that requires radio.SubmissionStorageService
	// and then make assertions.

}

func (*SubmissionStorageServiceMock) Submissions

func (mock *SubmissionStorageServiceMock) Submissions(contextMoqParam context.Context) radio.SubmissionStorage

Submissions calls SubmissionsFunc.

func (*SubmissionStorageServiceMock) SubmissionsCalls

func (mock *SubmissionStorageServiceMock) SubmissionsCalls() []struct {
	ContextMoqParam context.Context
}

SubmissionsCalls gets all the calls that were made to Submissions. Check the length with:

len(mockedSubmissionStorageService.SubmissionsCalls())

func (*SubmissionStorageServiceMock) SubmissionsTx

func (mock *SubmissionStorageServiceMock) SubmissionsTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.SubmissionStorage, radio.StorageTx, error)

SubmissionsTx calls SubmissionsTxFunc.

func (*SubmissionStorageServiceMock) SubmissionsTxCalls

func (mock *SubmissionStorageServiceMock) SubmissionsTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

SubmissionsTxCalls gets all the calls that were made to SubmissionsTx. Check the length with:

len(mockedSubmissionStorageService.SubmissionsTxCalls())

type TemplateSelectableMock

type TemplateSelectableMock struct {
	// TemplateBundleFunc mocks the TemplateBundle method.
	TemplateBundleFunc func() string

	// TemplateNameFunc mocks the TemplateName method.
	TemplateNameFunc func() string
	// contains filtered or unexported fields
}

TemplateSelectableMock is a mock implementation of templates.TemplateSelectable.

func TestSomethingThatUsesTemplateSelectable(t *testing.T) {

	// make and configure a mocked templates.TemplateSelectable
	mockedTemplateSelectable := &TemplateSelectableMock{
		TemplateBundleFunc: func() string {
			panic("mock out the TemplateBundle method")
		},
		TemplateNameFunc: func() string {
			panic("mock out the TemplateName method")
		},
	}

	// use mockedTemplateSelectable in code that requires templates.TemplateSelectable
	// and then make assertions.

}

func (*TemplateSelectableMock) TemplateBundle

func (mock *TemplateSelectableMock) TemplateBundle() string

TemplateBundle calls TemplateBundleFunc.

func (*TemplateSelectableMock) TemplateBundleCalls

func (mock *TemplateSelectableMock) TemplateBundleCalls() []struct {
}

TemplateBundleCalls gets all the calls that were made to TemplateBundle. Check the length with:

len(mockedTemplateSelectable.TemplateBundleCalls())

func (*TemplateSelectableMock) TemplateName

func (mock *TemplateSelectableMock) TemplateName() string

TemplateName calls TemplateNameFunc.

func (*TemplateSelectableMock) TemplateNameCalls

func (mock *TemplateSelectableMock) TemplateNameCalls() []struct {
}

TemplateNameCalls gets all the calls that were made to TemplateName. Check the length with:

len(mockedTemplateSelectable.TemplateNameCalls())

type TrackStorageMock

type TrackStorageMock struct {
	// AllFunc mocks the All method.
	AllFunc func() ([]radio.Song, error)

	// AllRawFunc mocks the AllRaw method.
	AllRawFunc func() ([]radio.Song, error)

	// BeforeLastRequestedFunc mocks the BeforeLastRequested method.
	BeforeLastRequestedFunc func(before time.Time) ([]radio.Song, error)

	// DecrementRequestCountFunc mocks the DecrementRequestCount method.
	DecrementRequestCountFunc func(before time.Time) error

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(trackID radio.TrackID) error

	// GetFunc mocks the Get method.
	GetFunc func(trackID radio.TrackID) (*radio.Song, error)

	// InsertFunc mocks the Insert method.
	InsertFunc func(song radio.Song) (radio.TrackID, error)

	// NeedReplacementFunc mocks the NeedReplacement method.
	NeedReplacementFunc func() ([]radio.Song, error)

	// QueueCandidatesFunc mocks the QueueCandidates method.
	QueueCandidatesFunc func() ([]radio.TrackID, error)

	// RandomFunc mocks the Random method.
	RandomFunc func(limit int) ([]radio.Song, error)

	// RandomFavoriteOfFunc mocks the RandomFavoriteOf method.
	RandomFavoriteOfFunc func(nick string, limit int) ([]radio.Song, error)

	// UnusableFunc mocks the Unusable method.
	UnusableFunc func() ([]radio.Song, error)

	// UpdateLastPlayedFunc mocks the UpdateLastPlayed method.
	UpdateLastPlayedFunc func(trackID radio.TrackID) error

	// UpdateLastRequestedFunc mocks the UpdateLastRequested method.
	UpdateLastRequestedFunc func(trackID radio.TrackID) error

	// UpdateMetadataFunc mocks the UpdateMetadata method.
	UpdateMetadataFunc func(song radio.Song) error

	// UpdateRequestInfoFunc mocks the UpdateRequestInfo method.
	UpdateRequestInfoFunc func(trackID radio.TrackID) error

	// UpdateUsableFunc mocks the UpdateUsable method.
	UpdateUsableFunc func(song radio.Song, state radio.TrackState) error
	// contains filtered or unexported fields
}

TrackStorageMock is a mock implementation of radio.TrackStorage.

func TestSomethingThatUsesTrackStorage(t *testing.T) {

	// make and configure a mocked radio.TrackStorage
	mockedTrackStorage := &TrackStorageMock{
		AllFunc: func() ([]radio.Song, error) {
			panic("mock out the All method")
		},
		AllRawFunc: func() ([]radio.Song, error) {
			panic("mock out the AllRaw method")
		},
		BeforeLastRequestedFunc: func(before time.Time) ([]radio.Song, error) {
			panic("mock out the BeforeLastRequested method")
		},
		DecrementRequestCountFunc: func(before time.Time) error {
			panic("mock out the DecrementRequestCount method")
		},
		DeleteFunc: func(trackID radio.TrackID) error {
			panic("mock out the Delete method")
		},
		GetFunc: func(trackID radio.TrackID) (*radio.Song, error) {
			panic("mock out the Get method")
		},
		InsertFunc: func(song radio.Song) (radio.TrackID, error) {
			panic("mock out the Insert method")
		},
		NeedReplacementFunc: func() ([]radio.Song, error) {
			panic("mock out the NeedReplacement method")
		},
		QueueCandidatesFunc: func() ([]radio.TrackID, error) {
			panic("mock out the QueueCandidates method")
		},
		RandomFunc: func(limit int) ([]radio.Song, error) {
			panic("mock out the Random method")
		},
		RandomFavoriteOfFunc: func(nick string, limit int) ([]radio.Song, error) {
			panic("mock out the RandomFavoriteOf method")
		},
		UnusableFunc: func() ([]radio.Song, error) {
			panic("mock out the Unusable method")
		},
		UpdateLastPlayedFunc: func(trackID radio.TrackID) error {
			panic("mock out the UpdateLastPlayed method")
		},
		UpdateLastRequestedFunc: func(trackID radio.TrackID) error {
			panic("mock out the UpdateLastRequested method")
		},
		UpdateMetadataFunc: func(song radio.Song) error {
			panic("mock out the UpdateMetadata method")
		},
		UpdateRequestInfoFunc: func(trackID radio.TrackID) error {
			panic("mock out the UpdateRequestInfo method")
		},
		UpdateUsableFunc: func(song radio.Song, state radio.TrackState) error {
			panic("mock out the UpdateUsable method")
		},
	}

	// use mockedTrackStorage in code that requires radio.TrackStorage
	// and then make assertions.

}

func (*TrackStorageMock) All

func (mock *TrackStorageMock) All() ([]radio.Song, error)

All calls AllFunc.

func (*TrackStorageMock) AllCalls

func (mock *TrackStorageMock) AllCalls() []struct {
}

AllCalls gets all the calls that were made to All. Check the length with:

len(mockedTrackStorage.AllCalls())

func (*TrackStorageMock) AllRaw

func (mock *TrackStorageMock) AllRaw() ([]radio.Song, error)

AllRaw calls AllRawFunc.

func (*TrackStorageMock) AllRawCalls

func (mock *TrackStorageMock) AllRawCalls() []struct {
}

AllRawCalls gets all the calls that were made to AllRaw. Check the length with:

len(mockedTrackStorage.AllRawCalls())

func (*TrackStorageMock) BeforeLastRequested

func (mock *TrackStorageMock) BeforeLastRequested(before time.Time) ([]radio.Song, error)

BeforeLastRequested calls BeforeLastRequestedFunc.

func (*TrackStorageMock) BeforeLastRequestedCalls

func (mock *TrackStorageMock) BeforeLastRequestedCalls() []struct {
	Before time.Time
}

BeforeLastRequestedCalls gets all the calls that were made to BeforeLastRequested. Check the length with:

len(mockedTrackStorage.BeforeLastRequestedCalls())

func (*TrackStorageMock) DecrementRequestCount

func (mock *TrackStorageMock) DecrementRequestCount(before time.Time) error

DecrementRequestCount calls DecrementRequestCountFunc.

func (*TrackStorageMock) DecrementRequestCountCalls

func (mock *TrackStorageMock) DecrementRequestCountCalls() []struct {
	Before time.Time
}

DecrementRequestCountCalls gets all the calls that were made to DecrementRequestCount. Check the length with:

len(mockedTrackStorage.DecrementRequestCountCalls())

func (*TrackStorageMock) Delete

func (mock *TrackStorageMock) Delete(trackID radio.TrackID) error

Delete calls DeleteFunc.

func (*TrackStorageMock) DeleteCalls

func (mock *TrackStorageMock) DeleteCalls() []struct {
	TrackID radio.TrackID
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedTrackStorage.DeleteCalls())

func (*TrackStorageMock) Get

func (mock *TrackStorageMock) Get(trackID radio.TrackID) (*radio.Song, error)

Get calls GetFunc.

func (*TrackStorageMock) GetCalls

func (mock *TrackStorageMock) GetCalls() []struct {
	TrackID radio.TrackID
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedTrackStorage.GetCalls())

func (*TrackStorageMock) Insert

func (mock *TrackStorageMock) Insert(song radio.Song) (radio.TrackID, error)

Insert calls InsertFunc.

func (*TrackStorageMock) InsertCalls

func (mock *TrackStorageMock) InsertCalls() []struct {
	Song radio.Song
}

InsertCalls gets all the calls that were made to Insert. Check the length with:

len(mockedTrackStorage.InsertCalls())

func (*TrackStorageMock) NeedReplacement

func (mock *TrackStorageMock) NeedReplacement() ([]radio.Song, error)

NeedReplacement calls NeedReplacementFunc.

func (*TrackStorageMock) NeedReplacementCalls

func (mock *TrackStorageMock) NeedReplacementCalls() []struct {
}

NeedReplacementCalls gets all the calls that were made to NeedReplacement. Check the length with:

len(mockedTrackStorage.NeedReplacementCalls())

func (*TrackStorageMock) QueueCandidates

func (mock *TrackStorageMock) QueueCandidates() ([]radio.TrackID, error)

QueueCandidates calls QueueCandidatesFunc.

func (*TrackStorageMock) QueueCandidatesCalls

func (mock *TrackStorageMock) QueueCandidatesCalls() []struct {
}

QueueCandidatesCalls gets all the calls that were made to QueueCandidates. Check the length with:

len(mockedTrackStorage.QueueCandidatesCalls())

func (*TrackStorageMock) Random

func (mock *TrackStorageMock) Random(limit int) ([]radio.Song, error)

Random calls RandomFunc.

func (*TrackStorageMock) RandomCalls

func (mock *TrackStorageMock) RandomCalls() []struct {
	Limit int
}

RandomCalls gets all the calls that were made to Random. Check the length with:

len(mockedTrackStorage.RandomCalls())

func (*TrackStorageMock) RandomFavoriteOf

func (mock *TrackStorageMock) RandomFavoriteOf(nick string, limit int) ([]radio.Song, error)

RandomFavoriteOf calls RandomFavoriteOfFunc.

func (*TrackStorageMock) RandomFavoriteOfCalls

func (mock *TrackStorageMock) RandomFavoriteOfCalls() []struct {
	Nick  string
	Limit int
}

RandomFavoriteOfCalls gets all the calls that were made to RandomFavoriteOf. Check the length with:

len(mockedTrackStorage.RandomFavoriteOfCalls())

func (*TrackStorageMock) Unusable

func (mock *TrackStorageMock) Unusable() ([]radio.Song, error)

Unusable calls UnusableFunc.

func (*TrackStorageMock) UnusableCalls

func (mock *TrackStorageMock) UnusableCalls() []struct {
}

UnusableCalls gets all the calls that were made to Unusable. Check the length with:

len(mockedTrackStorage.UnusableCalls())

func (*TrackStorageMock) UpdateLastPlayed

func (mock *TrackStorageMock) UpdateLastPlayed(trackID radio.TrackID) error

UpdateLastPlayed calls UpdateLastPlayedFunc.

func (*TrackStorageMock) UpdateLastPlayedCalls

func (mock *TrackStorageMock) UpdateLastPlayedCalls() []struct {
	TrackID radio.TrackID
}

UpdateLastPlayedCalls gets all the calls that were made to UpdateLastPlayed. Check the length with:

len(mockedTrackStorage.UpdateLastPlayedCalls())

func (*TrackStorageMock) UpdateLastRequested

func (mock *TrackStorageMock) UpdateLastRequested(trackID radio.TrackID) error

UpdateLastRequested calls UpdateLastRequestedFunc.

func (*TrackStorageMock) UpdateLastRequestedCalls

func (mock *TrackStorageMock) UpdateLastRequestedCalls() []struct {
	TrackID radio.TrackID
}

UpdateLastRequestedCalls gets all the calls that were made to UpdateLastRequested. Check the length with:

len(mockedTrackStorage.UpdateLastRequestedCalls())

func (*TrackStorageMock) UpdateMetadata

func (mock *TrackStorageMock) UpdateMetadata(song radio.Song) error

UpdateMetadata calls UpdateMetadataFunc.

func (*TrackStorageMock) UpdateMetadataCalls

func (mock *TrackStorageMock) UpdateMetadataCalls() []struct {
	Song radio.Song
}

UpdateMetadataCalls gets all the calls that were made to UpdateMetadata. Check the length with:

len(mockedTrackStorage.UpdateMetadataCalls())

func (*TrackStorageMock) UpdateRequestInfo

func (mock *TrackStorageMock) UpdateRequestInfo(trackID radio.TrackID) error

UpdateRequestInfo calls UpdateRequestInfoFunc.

func (*TrackStorageMock) UpdateRequestInfoCalls

func (mock *TrackStorageMock) UpdateRequestInfoCalls() []struct {
	TrackID radio.TrackID
}

UpdateRequestInfoCalls gets all the calls that were made to UpdateRequestInfo. Check the length with:

len(mockedTrackStorage.UpdateRequestInfoCalls())

func (*TrackStorageMock) UpdateUsable

func (mock *TrackStorageMock) UpdateUsable(song radio.Song, state radio.TrackState) error

UpdateUsable calls UpdateUsableFunc.

func (*TrackStorageMock) UpdateUsableCalls

func (mock *TrackStorageMock) UpdateUsableCalls() []struct {
	Song  radio.Song
	State radio.TrackState
}

UpdateUsableCalls gets all the calls that were made to UpdateUsable. Check the length with:

len(mockedTrackStorage.UpdateUsableCalls())

type TrackStorageServiceMock

type TrackStorageServiceMock struct {
	// TrackFunc mocks the Track method.
	TrackFunc func(contextMoqParam context.Context) radio.TrackStorage

	// TrackTxFunc mocks the TrackTx method.
	TrackTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.TrackStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

TrackStorageServiceMock is a mock implementation of radio.TrackStorageService.

func TestSomethingThatUsesTrackStorageService(t *testing.T) {

	// make and configure a mocked radio.TrackStorageService
	mockedTrackStorageService := &TrackStorageServiceMock{
		TrackFunc: func(contextMoqParam context.Context) radio.TrackStorage {
			panic("mock out the Track method")
		},
		TrackTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.TrackStorage, radio.StorageTx, error) {
			panic("mock out the TrackTx method")
		},
	}

	// use mockedTrackStorageService in code that requires radio.TrackStorageService
	// and then make assertions.

}

func (*TrackStorageServiceMock) Track

func (mock *TrackStorageServiceMock) Track(contextMoqParam context.Context) radio.TrackStorage

Track calls TrackFunc.

func (*TrackStorageServiceMock) TrackCalls

func (mock *TrackStorageServiceMock) TrackCalls() []struct {
	ContextMoqParam context.Context
}

TrackCalls gets all the calls that were made to Track. Check the length with:

len(mockedTrackStorageService.TrackCalls())

func (*TrackStorageServiceMock) TrackTx

func (mock *TrackStorageServiceMock) TrackTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.TrackStorage, radio.StorageTx, error)

TrackTx calls TrackTxFunc.

func (*TrackStorageServiceMock) TrackTxCalls

func (mock *TrackStorageServiceMock) TrackTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

TrackTxCalls gets all the calls that were made to TrackTx. Check the length with:

len(mockedTrackStorageService.TrackTxCalls())

type UserStorageMock

type UserStorageMock struct {
	// AllFunc mocks the All method.
	AllFunc func() ([]radio.User, error)

	// ByNickFunc mocks the ByNick method.
	ByNickFunc func(nick string) (*radio.User, error)

	// CreateFunc mocks the Create method.
	CreateFunc func(user radio.User) (radio.UserID, error)

	// CreateDJFunc mocks the CreateDJ method.
	CreateDJFunc func(user radio.User, dJ radio.DJ) (radio.DJID, error)

	// GetFunc mocks the Get method.
	GetFunc func(name string) (*radio.User, error)

	// GetByDJIDFunc mocks the GetByDJID method.
	GetByDJIDFunc func(dJID radio.DJID) (*radio.User, error)

	// GetByIDFunc mocks the GetByID method.
	GetByIDFunc func(userID radio.UserID) (*radio.User, error)

	// LookupNameFunc mocks the LookupName method.
	LookupNameFunc func(name string) (*radio.User, error)

	// PermissionsFunc mocks the Permissions method.
	PermissionsFunc func() ([]radio.UserPermission, error)

	// RecordListenersFunc mocks the RecordListeners method.
	RecordListenersFunc func(v radio.Listeners, user radio.User) error

	// UpdateFunc mocks the Update method.
	UpdateFunc func(user radio.User) (radio.User, error)
	// contains filtered or unexported fields
}

UserStorageMock is a mock implementation of radio.UserStorage.

func TestSomethingThatUsesUserStorage(t *testing.T) {

	// make and configure a mocked radio.UserStorage
	mockedUserStorage := &UserStorageMock{
		AllFunc: func() ([]radio.User, error) {
			panic("mock out the All method")
		},
		ByNickFunc: func(nick string) (*radio.User, error) {
			panic("mock out the ByNick method")
		},
		CreateFunc: func(user radio.User) (radio.UserID, error) {
			panic("mock out the Create method")
		},
		CreateDJFunc: func(user radio.User, dJ radio.DJ) (radio.DJID, error) {
			panic("mock out the CreateDJ method")
		},
		GetFunc: func(name string) (*radio.User, error) {
			panic("mock out the Get method")
		},
		GetByDJIDFunc: func(dJID radio.DJID) (*radio.User, error) {
			panic("mock out the GetByDJID method")
		},
		GetByIDFunc: func(userID radio.UserID) (*radio.User, error) {
			panic("mock out the GetByID method")
		},
		LookupNameFunc: func(name string) (*radio.User, error) {
			panic("mock out the LookupName method")
		},
		PermissionsFunc: func() ([]radio.UserPermission, error) {
			panic("mock out the Permissions method")
		},
		RecordListenersFunc: func(v radio.Listeners, user radio.User) error {
			panic("mock out the RecordListeners method")
		},
		UpdateFunc: func(user radio.User) (radio.User, error) {
			panic("mock out the Update method")
		},
	}

	// use mockedUserStorage in code that requires radio.UserStorage
	// and then make assertions.

}

func (*UserStorageMock) All

func (mock *UserStorageMock) All() ([]radio.User, error)

All calls AllFunc.

func (*UserStorageMock) AllCalls

func (mock *UserStorageMock) AllCalls() []struct {
}

AllCalls gets all the calls that were made to All. Check the length with:

len(mockedUserStorage.AllCalls())

func (*UserStorageMock) ByNick

func (mock *UserStorageMock) ByNick(nick string) (*radio.User, error)

ByNick calls ByNickFunc.

func (*UserStorageMock) ByNickCalls

func (mock *UserStorageMock) ByNickCalls() []struct {
	Nick string
}

ByNickCalls gets all the calls that were made to ByNick. Check the length with:

len(mockedUserStorage.ByNickCalls())

func (*UserStorageMock) Create

func (mock *UserStorageMock) Create(user radio.User) (radio.UserID, error)

Create calls CreateFunc.

func (*UserStorageMock) CreateCalls

func (mock *UserStorageMock) CreateCalls() []struct {
	User radio.User
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedUserStorage.CreateCalls())

func (*UserStorageMock) CreateDJ

func (mock *UserStorageMock) CreateDJ(user radio.User, dJ radio.DJ) (radio.DJID, error)

CreateDJ calls CreateDJFunc.

func (*UserStorageMock) CreateDJCalls

func (mock *UserStorageMock) CreateDJCalls() []struct {
	User radio.User
	DJ   radio.DJ
}

CreateDJCalls gets all the calls that were made to CreateDJ. Check the length with:

len(mockedUserStorage.CreateDJCalls())

func (*UserStorageMock) Get

func (mock *UserStorageMock) Get(name string) (*radio.User, error)

Get calls GetFunc.

func (*UserStorageMock) GetByDJID

func (mock *UserStorageMock) GetByDJID(dJID radio.DJID) (*radio.User, error)

GetByDJID calls GetByDJIDFunc.

func (*UserStorageMock) GetByDJIDCalls

func (mock *UserStorageMock) GetByDJIDCalls() []struct {
	DJID radio.DJID
}

GetByDJIDCalls gets all the calls that were made to GetByDJID. Check the length with:

len(mockedUserStorage.GetByDJIDCalls())

func (*UserStorageMock) GetByID

func (mock *UserStorageMock) GetByID(userID radio.UserID) (*radio.User, error)

GetByID calls GetByIDFunc.

func (*UserStorageMock) GetByIDCalls

func (mock *UserStorageMock) GetByIDCalls() []struct {
	UserID radio.UserID
}

GetByIDCalls gets all the calls that were made to GetByID. Check the length with:

len(mockedUserStorage.GetByIDCalls())

func (*UserStorageMock) GetCalls

func (mock *UserStorageMock) GetCalls() []struct {
	Name string
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedUserStorage.GetCalls())

func (*UserStorageMock) LookupName

func (mock *UserStorageMock) LookupName(name string) (*radio.User, error)

LookupName calls LookupNameFunc.

func (*UserStorageMock) LookupNameCalls

func (mock *UserStorageMock) LookupNameCalls() []struct {
	Name string
}

LookupNameCalls gets all the calls that were made to LookupName. Check the length with:

len(mockedUserStorage.LookupNameCalls())

func (*UserStorageMock) Permissions

func (mock *UserStorageMock) Permissions() ([]radio.UserPermission, error)

Permissions calls PermissionsFunc.

func (*UserStorageMock) PermissionsCalls

func (mock *UserStorageMock) PermissionsCalls() []struct {
}

PermissionsCalls gets all the calls that were made to Permissions. Check the length with:

len(mockedUserStorage.PermissionsCalls())

func (*UserStorageMock) RecordListeners

func (mock *UserStorageMock) RecordListeners(v radio.Listeners, user radio.User) error

RecordListeners calls RecordListenersFunc.

func (*UserStorageMock) RecordListenersCalls

func (mock *UserStorageMock) RecordListenersCalls() []struct {
	V    radio.Listeners
	User radio.User
}

RecordListenersCalls gets all the calls that were made to RecordListeners. Check the length with:

len(mockedUserStorage.RecordListenersCalls())

func (*UserStorageMock) Update

func (mock *UserStorageMock) Update(user radio.User) (radio.User, error)

Update calls UpdateFunc.

func (*UserStorageMock) UpdateCalls

func (mock *UserStorageMock) UpdateCalls() []struct {
	User radio.User
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedUserStorage.UpdateCalls())

type UserStorageServiceMock

type UserStorageServiceMock struct {
	// UserFunc mocks the User method.
	UserFunc func(contextMoqParam context.Context) radio.UserStorage

	// UserTxFunc mocks the UserTx method.
	UserTxFunc func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.UserStorage, radio.StorageTx, error)
	// contains filtered or unexported fields
}

UserStorageServiceMock is a mock implementation of radio.UserStorageService.

func TestSomethingThatUsesUserStorageService(t *testing.T) {

	// make and configure a mocked radio.UserStorageService
	mockedUserStorageService := &UserStorageServiceMock{
		UserFunc: func(contextMoqParam context.Context) radio.UserStorage {
			panic("mock out the User method")
		},
		UserTxFunc: func(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.UserStorage, radio.StorageTx, error) {
			panic("mock out the UserTx method")
		},
	}

	// use mockedUserStorageService in code that requires radio.UserStorageService
	// and then make assertions.

}

func (*UserStorageServiceMock) User

func (mock *UserStorageServiceMock) User(contextMoqParam context.Context) radio.UserStorage

User calls UserFunc.

func (*UserStorageServiceMock) UserCalls

func (mock *UserStorageServiceMock) UserCalls() []struct {
	ContextMoqParam context.Context
}

UserCalls gets all the calls that were made to User. Check the length with:

len(mockedUserStorageService.UserCalls())

func (*UserStorageServiceMock) UserTx

func (mock *UserStorageServiceMock) UserTx(contextMoqParam context.Context, storageTx radio.StorageTx) (radio.UserStorage, radio.StorageTx, error)

UserTx calls UserTxFunc.

func (*UserStorageServiceMock) UserTxCalls

func (mock *UserStorageServiceMock) UserTxCalls() []struct {
	ContextMoqParam context.Context
	StorageTx       radio.StorageTx
}

UserTxCalls gets all the calls that were made to UserTx. Check the length with:

len(mockedUserStorageService.UserTxCalls())

Jump to

Keyboard shortcuts

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