fake

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package fake provides basic mocks for IEntity and IProperty. See examples/mocking (https://github.com/markus-wa/demoinfocs-golang/tree/master/examples/mocking).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	mock.Mock
}

Entity is a mock for of sendtables.IEntity.

func (*Entity) ApplyUpdate

func (e *Entity) ApplyUpdate(reader *bitread.BitReader)

ApplyUpdate is a mock-implementation of IEntity.ApplyUpdate().

func (*Entity) BindPosition

func (e *Entity) BindPosition(pos *r3.Vector)

BindPosition is a mock-implementation of IEntity.BindPosition().

func (*Entity) BindProperty

func (e *Entity) BindProperty(name string, variable interface{}, valueType st.PropertyValueType)

BindProperty is a mock-implementation of IEntity.BindProperty().

func (*Entity) Destroy

func (e *Entity) Destroy()

Destroy is a mock-implementation of IEntity.Destroy().

func (*Entity) FindProperty

func (e *Entity) FindProperty(name string) *st.Property

FindProperty is a mock-implementation of IEntity.FindProperty().

func (*Entity) FindPropertyI added in v1.2.0

func (e *Entity) FindPropertyI(name string) st.IProperty

FindPropertyI is a mock-implementation of IEntity.FindPropertyI().

func (*Entity) ID

func (e *Entity) ID() int

ID is a mock-implementation of IEntity.ID().

func (*Entity) OnCreateFinished

func (e *Entity) OnCreateFinished(delegate func())

OnCreateFinished is a mock-implementation of IEntity.OnCreateFinished().

func (*Entity) OnDestroy

func (e *Entity) OnDestroy(delegate func())

OnDestroy is a mock-implementation of IEntity.OnDestroy().

func (*Entity) OnPositionUpdate

func (e *Entity) OnPositionUpdate(handler func(pos r3.Vector))

OnPositionUpdate is a mock-implementation of IEntity.OnPositionUpdate().

func (*Entity) Position

func (e *Entity) Position() r3.Vector

Position is a mock-implementation of IEntity.Position().

func (*Entity) Properties

func (e *Entity) Properties() []st.Property

Properties is a mock-implementation of IEntity.Properties().

func (*Entity) PropertiesI added in v1.2.0

func (e *Entity) PropertiesI() []st.IProperty

PropertiesI is a mock-implementation of IEntity.PropertiesI().

func (*Entity) ServerClass

func (e *Entity) ServerClass() *st.ServerClass

ServerClass is a mock-implementation of IEntity.ServerClass().

type Property added in v1.2.0

type Property struct {
	mock.Mock
}

Property is a mock for of sendtables.IProperty.

func (*Property) Bind added in v1.2.0

func (p *Property) Bind(variable interface{}, valueType st.PropertyValueType)

Bind is a mock-implementation of IProperty.Bind().

func (*Property) Name added in v1.2.0

func (p *Property) Name() string

Name is a mock-implementation of IProperty.Name().

func (*Property) OnUpdate added in v1.2.0

func (p *Property) OnUpdate(handler st.PropertyUpdateHandler)

OnUpdate is a mock-implementation of IProperty.OnUpdate().

func (*Property) Value added in v1.2.0

func (p *Property) Value() st.PropertyValue

Value is a mock-implementation of IProperty.Value().

Jump to

Keyboard shortcuts

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