Documentation ¶
Index ¶
- func BuildBoard(p1, p2 []Move) (board common.Board)
- func DumpTableOnFailure()
- func ExpectNewGameBoard(client **Client) func()
- func ExpectNoOpenGames(client **Client) func()
- func ExpectOpenGames(client **Client, hosts ...string) func()
- func ExpectPlayerLeft(client **Client, player string) func()
- func ExpectTurn(client **Client, player common.Disk) func()
- func HaveReceived(messageRef interface{}) types.GomegaMatcher
- func Send(client **Client, messageToSend interface{}) func()
- type Client
- type Move
- type Tester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBoard ¶
func DumpTableOnFailure ¶
func DumpTableOnFailure()
DumpTableOnFailure can be passed to ginkgo.JustAfterEach to dump the DB table to log output if an assertion failed.
func ExpectNewGameBoard ¶
func ExpectNewGameBoard(client **Client) func()
func ExpectNoOpenGames ¶
func ExpectNoOpenGames(client **Client) func()
func ExpectOpenGames ¶
func ExpectPlayerLeft ¶
func ExpectTurn ¶
func HaveReceived ¶
func HaveReceived(messageRef interface{}) types.GomegaMatcher
HaveReceived returns a custom matcher that checks that the client has received at least one message of a given type.
messageRef is a pointer to a message struct of the expected type. The matcher will set the value of the pointer to most recently received message of the type.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Connect ¶
func (c *Client) Connect()
Connect sends a CONNECT message to server.Handle and waits for server.Handle to return.
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
Connect sends a DISCONNECT message to server.Handle and waits for server.Handle to return.
Click to show internal directories.
Click to hide internal directories.