mocks

package
v0.0.0-...-73fa0b7 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	mock.Mock
}

Game is an autogenerated mock type for the Game type

func NewGame

func NewGame(t mockConstructorTestingTNewGame) *Game

NewGame creates a new instance of Game. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Game) Choice

func (_m *Game) Choice(_a0 context.Context) (types.Choice, error)

Choice provides a mock function with given fields: _a0

func (*Game) Choices

func (_m *Game) Choices(_a0 context.Context) ([]types.Choice, error)

Choices provides a mock function with given fields: _a0

func (*Game) EXPECT

func (_m *Game) EXPECT() *Game_Expecter

func (*Game) Play

func (_m *Game) Play(_a0 context.Context, _a1 types.Choice) (types.Result, types.Choice, error)

Play provides a mock function with given fields: _a0, _a1

type GameAPI

type GameAPI struct {
	mock.Mock
}

GameAPI is an autogenerated mock type for the GameAPI type

func NewGameAPI

func NewGameAPI(t mockConstructorTestingTNewGameAPI) *GameAPI

NewGameAPI creates a new instance of GameAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*GameAPI) Choice

func (_m *GameAPI) Choice(_a0 http.ResponseWriter, _a1 *http.Request)

Choice provides a mock function with given fields: _a0, _a1

func (*GameAPI) Choices

func (_m *GameAPI) Choices(_a0 http.ResponseWriter, _a1 *http.Request)

Choices provides a mock function with given fields: _a0, _a1

func (*GameAPI) ClearScores

func (_m *GameAPI) ClearScores(w http.ResponseWriter, r *http.Request)

ClearScores provides a mock function with given fields: w, r

func (*GameAPI) ConnectP2P

func (_m *GameAPI) ConnectP2P(w http.ResponseWriter, r *http.Request)

ConnectP2P provides a mock function with given fields: w, r

func (*GameAPI) CreateP2P

func (_m *GameAPI) CreateP2P(w http.ResponseWriter, r *http.Request)

CreateP2P provides a mock function with given fields: w, r

func (*GameAPI) EXPECT

func (_m *GameAPI) EXPECT() *GameAPI_Expecter

func (*GameAPI) FindP2PGame

func (_m *GameAPI) FindP2PGame(w http.ResponseWriter, r *http.Request)

FindP2PGame provides a mock function with given fields: w, r

func (*GameAPI) GetScores

func (_m *GameAPI) GetScores(w http.ResponseWriter, r *http.Request)

GetScores provides a mock function with given fields: w, r

func (*GameAPI) Play

func (_m *GameAPI) Play(_a0 http.ResponseWriter, _a1 *http.Request)

Play provides a mock function with given fields: _a0, _a1

type GameAPI_Choice_Call

type GameAPI_Choice_Call struct {
	*mock.Call
}

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

func (*GameAPI_Choice_Call) Return

func (*GameAPI_Choice_Call) Run

type GameAPI_Choices_Call

type GameAPI_Choices_Call struct {
	*mock.Call
}

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

func (*GameAPI_Choices_Call) Return

func (*GameAPI_Choices_Call) Run

type GameAPI_ClearScores_Call

type GameAPI_ClearScores_Call struct {
	*mock.Call
}

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

func (*GameAPI_ClearScores_Call) Return

func (*GameAPI_ClearScores_Call) Run

type GameAPI_ConnectP2P_Call

type GameAPI_ConnectP2P_Call struct {
	*mock.Call
}

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

func (*GameAPI_ConnectP2P_Call) Return

func (*GameAPI_ConnectP2P_Call) Run

type GameAPI_CreateP2P_Call

type GameAPI_CreateP2P_Call struct {
	*mock.Call
}

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

func (*GameAPI_CreateP2P_Call) Return

func (*GameAPI_CreateP2P_Call) Run

type GameAPI_Expecter

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

func (*GameAPI_Expecter) Choice

func (_e *GameAPI_Expecter) Choice(_a0 interface{}, _a1 interface{}) *GameAPI_Choice_Call

Choice is a helper method to define mock.On call

  • _a0 http.ResponseWriter
  • _a1 *http.Request

func (*GameAPI_Expecter) Choices

func (_e *GameAPI_Expecter) Choices(_a0 interface{}, _a1 interface{}) *GameAPI_Choices_Call

Choices is a helper method to define mock.On call

  • _a0 http.ResponseWriter
  • _a1 *http.Request

func (*GameAPI_Expecter) ClearScores

func (_e *GameAPI_Expecter) ClearScores(w interface{}, r interface{}) *GameAPI_ClearScores_Call

ClearScores is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request

func (*GameAPI_Expecter) ConnectP2P

func (_e *GameAPI_Expecter) ConnectP2P(w interface{}, r interface{}) *GameAPI_ConnectP2P_Call

ConnectP2P is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request

func (*GameAPI_Expecter) CreateP2P

func (_e *GameAPI_Expecter) CreateP2P(w interface{}, r interface{}) *GameAPI_CreateP2P_Call

CreateP2P is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request

func (*GameAPI_Expecter) FindP2PGame

func (_e *GameAPI_Expecter) FindP2PGame(w interface{}, r interface{}) *GameAPI_FindP2PGame_Call

FindP2PGame is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request

func (*GameAPI_Expecter) GetScores

func (_e *GameAPI_Expecter) GetScores(w interface{}, r interface{}) *GameAPI_GetScores_Call

GetScores is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request

func (*GameAPI_Expecter) Play

func (_e *GameAPI_Expecter) Play(_a0 interface{}, _a1 interface{}) *GameAPI_Play_Call

Play is a helper method to define mock.On call

  • _a0 http.ResponseWriter
  • _a1 *http.Request

type GameAPI_FindP2PGame_Call

type GameAPI_FindP2PGame_Call struct {
	*mock.Call
}

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

func (*GameAPI_FindP2PGame_Call) Return

func (*GameAPI_FindP2PGame_Call) Run

type GameAPI_GetScores_Call

type GameAPI_GetScores_Call struct {
	*mock.Call
}

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

func (*GameAPI_GetScores_Call) Return

func (*GameAPI_GetScores_Call) Run

type GameAPI_Play_Call

type GameAPI_Play_Call struct {
	*mock.Call
}

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

func (*GameAPI_Play_Call) Return

func (_c *GameAPI_Play_Call) Return() *GameAPI_Play_Call

func (*GameAPI_Play_Call) Run

func (_c *GameAPI_Play_Call) Run(run func(_a0 http.ResponseWriter, _a1 *http.Request)) *GameAPI_Play_Call

type Game_Choice_Call

type Game_Choice_Call struct {
	*mock.Call
}

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

func (*Game_Choice_Call) Return

func (_c *Game_Choice_Call) Return(_a0 types.Choice, _a1 error) *Game_Choice_Call

func (*Game_Choice_Call) Run

func (_c *Game_Choice_Call) Run(run func(_a0 context.Context)) *Game_Choice_Call

type Game_Choices_Call

type Game_Choices_Call struct {
	*mock.Call
}

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

func (*Game_Choices_Call) Return

func (_c *Game_Choices_Call) Return(_a0 []types.Choice, _a1 error) *Game_Choices_Call

func (*Game_Choices_Call) Run

func (_c *Game_Choices_Call) Run(run func(_a0 context.Context)) *Game_Choices_Call

type Game_Expecter

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

func (*Game_Expecter) Choice

func (_e *Game_Expecter) Choice(_a0 interface{}) *Game_Choice_Call

Choice is a helper method to define mock.On call

  • _a0 context.Context

func (*Game_Expecter) Choices

func (_e *Game_Expecter) Choices(_a0 interface{}) *Game_Choices_Call

Choices is a helper method to define mock.On call

  • _a0 context.Context

func (*Game_Expecter) Play

func (_e *Game_Expecter) Play(_a0 interface{}, _a1 interface{}) *Game_Play_Call

Play is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 types.Choice

type Game_Play_Call

type Game_Play_Call struct {
	*mock.Call
}

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

func (*Game_Play_Call) Return

func (_c *Game_Play_Call) Return(_a0 types.Result, _a1 types.Choice, _a2 error) *Game_Play_Call

func (*Game_Play_Call) Run

func (_c *Game_Play_Call) Run(run func(_a0 context.Context, _a1 types.Choice)) *Game_Play_Call

type P2PGame

type P2PGame struct {
	mock.Mock
}

P2PGame is an autogenerated mock type for the P2PGame type

func NewP2PGame

func NewP2PGame(t mockConstructorTestingTNewP2PGame) *P2PGame

NewP2PGame creates a new instance of P2PGame. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*P2PGame) AddPlayer

func (_m *P2PGame) AddPlayer(name string) (bool, chan types.Message, error)

AddPlayer provides a mock function with given fields: name

func (*P2PGame) Choice

func (_m *P2PGame) Choice(choice types.Choice, rightSide bool)

Choice provides a mock function with given fields: choice, rightSide

func (*P2PGame) EXPECT

func (_m *P2PGame) EXPECT() *P2PGame_Expecter

func (*P2PGame) GetID

func (_m *P2PGame) GetID() types.GameID

GetID provides a mock function with given fields:

func (*P2PGame) IsFull

func (_m *P2PGame) IsFull(ctx context.Context) bool

IsFull provides a mock function with given fields: ctx

func (*P2PGame) RemovePlayer

func (_m *P2PGame) RemovePlayer(rightSide bool)

RemovePlayer provides a mock function with given fields: rightSide

type P2PGameFactory

type P2PGameFactory struct {
	mock.Mock
}

P2PGameFactory is an autogenerated mock type for the P2PGameFactory type

func NewP2PGameFactory

func NewP2PGameFactory(t mockConstructorTestingTNewP2PGameFactory) *P2PGameFactory

NewP2PGameFactory creates a new instance of P2PGameFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*P2PGameFactory) CreateGame

func (_m *P2PGameFactory) CreateGame(ctx context.Context) (pkg.P2PGame, error)

CreateGame provides a mock function with given fields: ctx

func (*P2PGameFactory) EXPECT

func (*P2PGameFactory) GetGame

func (_m *P2PGameFactory) GetGame(id types.GameID) (pkg.P2PGame, bool)

GetGame provides a mock function with given fields: id

func (*P2PGameFactory) StopGames

func (_m *P2PGameFactory) StopGames(ctx context.Context)

StopGames provides a mock function with given fields: ctx

type P2PGameFactory_CreateGame_Call

type P2PGameFactory_CreateGame_Call struct {
	*mock.Call
}

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

func (*P2PGameFactory_CreateGame_Call) Return

func (*P2PGameFactory_CreateGame_Call) Run

type P2PGameFactory_Expecter

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

func (*P2PGameFactory_Expecter) CreateGame

func (_e *P2PGameFactory_Expecter) CreateGame(ctx interface{}) *P2PGameFactory_CreateGame_Call

CreateGame is a helper method to define mock.On call

  • ctx context.Context

func (*P2PGameFactory_Expecter) GetGame

func (_e *P2PGameFactory_Expecter) GetGame(id interface{}) *P2PGameFactory_GetGame_Call

GetGame is a helper method to define mock.On call

  • id types.GameID

func (*P2PGameFactory_Expecter) StopGames

func (_e *P2PGameFactory_Expecter) StopGames(ctx interface{}) *P2PGameFactory_StopGames_Call

StopGames is a helper method to define mock.On call

  • ctx context.Context

type P2PGameFactory_GetGame_Call

type P2PGameFactory_GetGame_Call struct {
	*mock.Call
}

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

func (*P2PGameFactory_GetGame_Call) Return

func (*P2PGameFactory_GetGame_Call) Run

type P2PGameFactory_StopGames_Call

type P2PGameFactory_StopGames_Call struct {
	*mock.Call
}

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

func (*P2PGameFactory_StopGames_Call) Return

func (*P2PGameFactory_StopGames_Call) Run

type P2PGame_AddPlayer_Call

type P2PGame_AddPlayer_Call struct {
	*mock.Call
}

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

func (*P2PGame_AddPlayer_Call) Return

func (_c *P2PGame_AddPlayer_Call) Return(_a0 bool, _a1 chan types.Message, _a2 error) *P2PGame_AddPlayer_Call

func (*P2PGame_AddPlayer_Call) Run

func (_c *P2PGame_AddPlayer_Call) Run(run func(name string)) *P2PGame_AddPlayer_Call

type P2PGame_Choice_Call

type P2PGame_Choice_Call struct {
	*mock.Call
}

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

func (*P2PGame_Choice_Call) Return

func (*P2PGame_Choice_Call) Run

func (_c *P2PGame_Choice_Call) Run(run func(choice types.Choice, rightSide bool)) *P2PGame_Choice_Call

type P2PGame_Expecter

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

func (*P2PGame_Expecter) AddPlayer

func (_e *P2PGame_Expecter) AddPlayer(name interface{}) *P2PGame_AddPlayer_Call

AddPlayer is a helper method to define mock.On call

  • name string

func (*P2PGame_Expecter) Choice

func (_e *P2PGame_Expecter) Choice(choice interface{}, rightSide interface{}) *P2PGame_Choice_Call

Choice is a helper method to define mock.On call

  • choice types.Choice
  • rightSide bool

func (*P2PGame_Expecter) GetID

func (_e *P2PGame_Expecter) GetID() *P2PGame_GetID_Call

GetID is a helper method to define mock.On call

func (*P2PGame_Expecter) IsFull

func (_e *P2PGame_Expecter) IsFull(ctx interface{}) *P2PGame_IsFull_Call

IsFull is a helper method to define mock.On call

  • ctx context.Context

func (*P2PGame_Expecter) RemovePlayer

func (_e *P2PGame_Expecter) RemovePlayer(rightSide interface{}) *P2PGame_RemovePlayer_Call

RemovePlayer is a helper method to define mock.On call

  • rightSide bool

type P2PGame_GetID_Call

type P2PGame_GetID_Call struct {
	*mock.Call
}

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

func (*P2PGame_GetID_Call) Return

func (*P2PGame_GetID_Call) Run

func (_c *P2PGame_GetID_Call) Run(run func()) *P2PGame_GetID_Call

type P2PGame_IsFull_Call

type P2PGame_IsFull_Call struct {
	*mock.Call
}

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

func (*P2PGame_IsFull_Call) Return

func (_c *P2PGame_IsFull_Call) Return(_a0 bool) *P2PGame_IsFull_Call

func (*P2PGame_IsFull_Call) Run

func (_c *P2PGame_IsFull_Call) Run(run func(ctx context.Context)) *P2PGame_IsFull_Call

type P2PGame_RemovePlayer_Call

type P2PGame_RemovePlayer_Call struct {
	*mock.Call
}

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

func (*P2PGame_RemovePlayer_Call) Return

func (*P2PGame_RemovePlayer_Call) Run

func (_c *P2PGame_RemovePlayer_Call) Run(run func(rightSide bool)) *P2PGame_RemovePlayer_Call

type RandomProvider

type RandomProvider struct {
	mock.Mock
}

RandomProvider is an autogenerated mock type for the RandomProvider type

func NewRandomProvider

func NewRandomProvider(t mockConstructorTestingTNewRandomProvider) *RandomProvider

NewRandomProvider creates a new instance of RandomProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RandomProvider) EXPECT

func (*RandomProvider) Rand

func (_m *RandomProvider) Rand(ctx context.Context) (int, error)

Rand provides a mock function with given fields: ctx

type RandomProvider_Expecter

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

func (*RandomProvider_Expecter) Rand

func (_e *RandomProvider_Expecter) Rand(ctx interface{}) *RandomProvider_Rand_Call

Rand is a helper method to define mock.On call

  • ctx context.Context

type RandomProvider_Rand_Call

type RandomProvider_Rand_Call struct {
	*mock.Call
}

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

func (*RandomProvider_Rand_Call) Return

func (*RandomProvider_Rand_Call) Run

type Server

type Server struct {
	mock.Mock
}

Server is an autogenerated mock type for the Server type

func NewServer

func NewServer(t mockConstructorTestingTNewServer) *Server

NewServer creates a new instance of Server. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Server) EXPECT

func (_m *Server) EXPECT() *Server_Expecter

func (*Server) Shutdown

func (_m *Server) Shutdown(ctx context.Context)

Shutdown provides a mock function with given fields: ctx

type Server_Expecter

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

func (*Server_Expecter) Shutdown

func (_e *Server_Expecter) Shutdown(ctx interface{}) *Server_Shutdown_Call

Shutdown is a helper method to define mock.On call

  • ctx context.Context

type Server_Shutdown_Call

type Server_Shutdown_Call struct {
	*mock.Call
}

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

func (*Server_Shutdown_Call) Return

func (*Server_Shutdown_Call) Run

func (_c *Server_Shutdown_Call) Run(run func(ctx context.Context)) *Server_Shutdown_Call

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage

func NewStorage(t mockConstructorTestingTNewStorage) *Storage

NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Storage) ClearScores

func (_m *Storage) ClearScores() error

ClearScores provides a mock function with given fields:

func (*Storage) EXPECT

func (_m *Storage) EXPECT() *Storage_Expecter

func (*Storage) GetLastScores

func (_m *Storage) GetLastScores() ([]types.Result, error)

GetLastScores provides a mock function with given fields:

func (*Storage) SetLastScore

func (_m *Storage) SetLastScore(_a0 types.Result) error

SetLastScore provides a mock function with given fields: _a0

type Storage_ClearScores_Call

type Storage_ClearScores_Call struct {
	*mock.Call
}

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

func (*Storage_ClearScores_Call) Return

func (*Storage_ClearScores_Call) Run

type Storage_Expecter

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

func (*Storage_Expecter) ClearScores

func (_e *Storage_Expecter) ClearScores() *Storage_ClearScores_Call

ClearScores is a helper method to define mock.On call

func (*Storage_Expecter) GetLastScores

func (_e *Storage_Expecter) GetLastScores() *Storage_GetLastScores_Call

GetLastScores is a helper method to define mock.On call

func (*Storage_Expecter) SetLastScore

func (_e *Storage_Expecter) SetLastScore(_a0 interface{}) *Storage_SetLastScore_Call

SetLastScore is a helper method to define mock.On call

  • _a0 types.Result

type Storage_GetLastScores_Call

type Storage_GetLastScores_Call struct {
	*mock.Call
}

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

func (*Storage_GetLastScores_Call) Return

func (*Storage_GetLastScores_Call) Run

type Storage_SetLastScore_Call

type Storage_SetLastScore_Call struct {
	*mock.Call
}

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

func (*Storage_SetLastScore_Call) Return

func (*Storage_SetLastScore_Call) Run

Jump to

Keyboard shortcuts

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