Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SubscriberMock ¶
type SubscriberMock struct { // OnHealthUpdateFunc mocks the OnHealthUpdate method. OnHealthUpdateFunc func(status string) // contains filtered or unexported fields }
SubscriberMock is a mock implementation of healthcheck.Subscriber.
func TestSomethingThatUsesSubscriber(t *testing.T) { // make and configure a mocked healthcheck.Subscriber mockedSubscriber := &SubscriberMock{ OnHealthUpdateFunc: func(status string) { panic("mock out the OnHealthUpdate method") }, } // use mockedSubscriber in code that requires healthcheck.Subscriber // and then make assertions. }
func (*SubscriberMock) OnHealthUpdate ¶
func (mock *SubscriberMock) OnHealthUpdate(status string)
OnHealthUpdate calls OnHealthUpdateFunc.
func (*SubscriberMock) OnHealthUpdateCalls ¶
func (mock *SubscriberMock) OnHealthUpdateCalls() []struct { Status string }
OnHealthUpdateCalls gets all the calls that were made to OnHealthUpdate. Check the length with:
len(mockedSubscriber.OnHealthUpdateCalls())
Click to show internal directories.
Click to hide internal directories.