Documentation ¶
Index ¶
- type CityworksService
- type CityworksServiceMock
- func (mock *CityworksServiceMock) Broker() string
- func (mock *CityworksServiceMock) BrokerCalls() []struct{}
- func (mock *CityworksServiceMock) GetAll() []byte
- func (mock *CityworksServiceMock) GetAllCalls() []struct{}
- func (mock *CityworksServiceMock) GetByID(id string) ([]byte, error)
- func (mock *CityworksServiceMock) GetByIDCalls() []struct{ ... }
- func (mock *CityworksServiceMock) Shutdown(ctx context.Context)
- func (mock *CityworksServiceMock) ShutdownCalls() []struct{ ... }
- func (mock *CityworksServiceMock) Start(ctx context.Context)
- func (mock *CityworksServiceMock) StartCalls() []struct{ ... }
- func (mock *CityworksServiceMock) Tenant() string
- func (mock *CityworksServiceMock) TenantCalls() []struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CityworksService ¶
type CityworksService interface { Broker() string Tenant() string GetAll() []byte GetByID(id string) ([]byte, error) Start(ctx context.Context) Shutdown(ctx context.Context) }
func NewCityworksService ¶
func NewCityworksService(ctx context.Context, contextBrokerUrl, tenant string) CityworksService
type CityworksServiceMock ¶
type CityworksServiceMock struct { // BrokerFunc mocks the Broker method. BrokerFunc func() string // GetAllFunc mocks the GetAll method. GetAllFunc func() []byte // GetByIDFunc mocks the GetByID method. GetByIDFunc func(id string) ([]byte, error) // ShutdownFunc mocks the Shutdown method. ShutdownFunc func(ctx context.Context) // StartFunc mocks the Start method. StartFunc func(ctx context.Context) // TenantFunc mocks the Tenant method. TenantFunc func() string // contains filtered or unexported fields }
CityworksServiceMock is a mock implementation of CityworksService.
func TestSomethingThatUsesCityworksService(t *testing.T) { // make and configure a mocked CityworksService mockedCityworksService := &CityworksServiceMock{ BrokerFunc: func() string { panic("mock out the Broker method") }, GetAllFunc: func() []byte { panic("mock out the GetAll method") }, GetByIDFunc: func(id string) ([]byte, error) { panic("mock out the GetByID method") }, ShutdownFunc: func(ctx context.Context) { panic("mock out the Shutdown method") }, StartFunc: func(ctx context.Context) { panic("mock out the Start method") }, TenantFunc: func() string { panic("mock out the Tenant method") }, } // use mockedCityworksService in code that requires CityworksService // and then make assertions. }
func (*CityworksServiceMock) Broker ¶
func (mock *CityworksServiceMock) Broker() string
Broker calls BrokerFunc.
func (*CityworksServiceMock) BrokerCalls ¶
func (mock *CityworksServiceMock) BrokerCalls() []struct { }
BrokerCalls gets all the calls that were made to Broker. Check the length with:
len(mockedCityworksService.BrokerCalls())
func (*CityworksServiceMock) GetAll ¶
func (mock *CityworksServiceMock) GetAll() []byte
GetAll calls GetAllFunc.
func (*CityworksServiceMock) GetAllCalls ¶
func (mock *CityworksServiceMock) GetAllCalls() []struct { }
GetAllCalls gets all the calls that were made to GetAll. Check the length with:
len(mockedCityworksService.GetAllCalls())
func (*CityworksServiceMock) GetByID ¶
func (mock *CityworksServiceMock) GetByID(id string) ([]byte, error)
GetByID calls GetByIDFunc.
func (*CityworksServiceMock) GetByIDCalls ¶
func (mock *CityworksServiceMock) GetByIDCalls() []struct { ID string }
GetByIDCalls gets all the calls that were made to GetByID. Check the length with:
len(mockedCityworksService.GetByIDCalls())
func (*CityworksServiceMock) Shutdown ¶
func (mock *CityworksServiceMock) Shutdown(ctx context.Context)
Shutdown calls ShutdownFunc.
func (*CityworksServiceMock) ShutdownCalls ¶
func (mock *CityworksServiceMock) ShutdownCalls() []struct { Ctx context.Context }
ShutdownCalls gets all the calls that were made to Shutdown. Check the length with:
len(mockedCityworksService.ShutdownCalls())
func (*CityworksServiceMock) Start ¶
func (mock *CityworksServiceMock) Start(ctx context.Context)
Start calls StartFunc.
func (*CityworksServiceMock) StartCalls ¶
func (mock *CityworksServiceMock) StartCalls() []struct { Ctx context.Context }
StartCalls gets all the calls that were made to Start. Check the length with:
len(mockedCityworksService.StartCalls())
func (*CityworksServiceMock) Tenant ¶
func (mock *CityworksServiceMock) Tenant() string
Tenant calls TenantFunc.
func (*CityworksServiceMock) TenantCalls ¶
func (mock *CityworksServiceMock) TenantCalls() []struct { }
TenantCalls gets all the calls that were made to Tenant. Check the length with:
len(mockedCityworksService.TenantCalls())