Documentation ¶
Index ¶
- func Assert(condition bool, t *testing.T, failMessage ...interface{})
- func TestSettersAndGetters(object interface{}, t *testing.T) bool
- type MockCharacter
- type MockContainer
- func (*MockContainer) AddCash(int)
- func (*MockContainer) AddItem(types.Id)
- func (*MockContainer) GetCapacity() int
- func (*MockContainer) GetCash() int
- func (*MockContainer) GetItems() types.ItemList
- func (*MockContainer) RemoveCash(int)
- func (*MockContainer) RemoveItem(types.Id) bool
- func (*MockContainer) SetCapacity(int)
- type MockDestroyable
- type MockId
- type MockIdentifiable
- type MockNameable
- type MockObject
- type MockPC
- type MockReadLocker
- type MockRoom
- type MockUser
- type MockZone
- type TestCommunicable
- type TestReadWriter
- type TestReader
- type TestWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestSettersAndGetters ¶
Types ¶
type MockCharacter ¶
type MockCharacter struct { MockObject MockNameable MockContainer }
func (*MockCharacter) GetHealth ¶
func (*MockCharacter) GetHealth() int
func (*MockCharacter) GetHitPoints ¶
func (*MockCharacter) GetHitPoints() int
func (*MockCharacter) GetWeight ¶
func (*MockCharacter) GetWeight() int
func (*MockCharacter) Heal ¶
func (*MockCharacter) Heal(int)
func (*MockCharacter) Hit ¶
func (*MockCharacter) Hit(int)
func (*MockCharacter) SetHealth ¶
func (*MockCharacter) SetHealth(int)
func (*MockCharacter) SetHitPoints ¶
func (*MockCharacter) SetHitPoints(int)
type MockContainer ¶
type MockContainer struct { }
func (*MockContainer) AddCash ¶
func (*MockContainer) AddCash(int)
func (*MockContainer) AddItem ¶
func (*MockContainer) AddItem(types.Id)
func (*MockContainer) GetCapacity ¶
func (*MockContainer) GetCapacity() int
func (*MockContainer) GetCash ¶
func (*MockContainer) GetCash() int
func (*MockContainer) GetItems ¶
func (*MockContainer) GetItems() types.ItemList
func (*MockContainer) RemoveCash ¶
func (*MockContainer) RemoveCash(int)
func (*MockContainer) RemoveItem ¶
func (*MockContainer) RemoveItem(types.Id) bool
func (*MockContainer) SetCapacity ¶
func (*MockContainer) SetCapacity(int)
type MockDestroyable ¶
type MockDestroyable struct { }
func (MockDestroyable) Destroy ¶
func (MockDestroyable) Destroy()
func (MockDestroyable) IsDestroyed ¶
func (self MockDestroyable) IsDestroyed() bool
type MockIdentifiable ¶
func (MockIdentifiable) GetId ¶
func (self MockIdentifiable) GetId() types.Id
type MockNameable ¶
type MockNameable struct {
Name string
}
func (MockNameable) GetName ¶
func (self MockNameable) GetName() string
func (*MockNameable) SetName ¶
func (self *MockNameable) SetName(name string)
type MockObject ¶
type MockObject struct { MockIdentifiable MockReadLocker MockDestroyable }
func (MockObject) SetId ¶
func (self MockObject) SetId(types.Id)
type MockPC ¶
type MockPC struct { MockCharacter RoomId types.Id }
type MockReadLocker ¶
type MockReadLocker struct { }
func (*MockReadLocker) ReadLock ¶
func (*MockReadLocker) ReadLock()
func (*MockReadLocker) ReadUnlock ¶
func (*MockReadLocker) ReadUnlock()
type MockRoom ¶
type MockRoom struct {
MockIdentifiable
}
func NewMockRoom ¶
func NewMockRoom() *MockRoom
type MockUser ¶
type MockUser struct {
MockIdentifiable
}
func NewMockUser ¶
func NewMockUser() *MockUser
type MockZone ¶
type MockZone struct {
MockIdentifiable
}
func NewMockZone ¶
func NewMockZone() *MockZone
type TestCommunicable ¶
type TestCommunicable struct {
TestReadWriter
}
func (*TestCommunicable) GetInput ¶
func (self *TestCommunicable) GetInput(prompt string) string
func (*TestCommunicable) GetWindowSize ¶
func (self *TestCommunicable) GetWindowSize() (int, int)
func (*TestCommunicable) Write ¶
func (self *TestCommunicable) Write(text string)
func (*TestCommunicable) WriteLine ¶
func (self *TestCommunicable) WriteLine(line string, a ...interface{})
type TestReadWriter ¶
type TestReadWriter struct { TestReader TestWriter }
type TestReader ¶
type TestReader struct { ToRead string // contains filtered or unexported fields }
func (*TestReader) SetError ¶
func (self *TestReader) SetError(err error)
type TestWriter ¶
type TestWriter struct {
Wrote string
}
Click to show internal directories.
Click to hide internal directories.