allroutestest

package
v1.84.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZebedeeClientMock

type ZebedeeClientMock struct {
	// GetWithHeadersFunc mocks the GetWithHeaders method.
	GetWithHeadersFunc func(ctx context.Context, userAccessToken string, path string) ([]byte, http.Header, error)
	// contains filtered or unexported fields
}

ZebedeeClientMock is a mock implementation of allRoutes.ZebedeeClient.

    func TestSomethingThatUsesZebedeeClient(t *testing.T) {

        // make and configure a mocked allRoutes.ZebedeeClient
        mockedZebedeeClient := &ZebedeeClientMock{
            GetWithHeadersFunc: func(ctx context.Context, userAccessToken string, path string) ([]byte, http.Header, error) {
	               panic("mock out the GetWithHeaders method")
            },
        }

        // use mockedZebedeeClient in code that requires allRoutes.ZebedeeClient
        // and then make assertions.

    }

func (*ZebedeeClientMock) GetWithHeaders

func (mock *ZebedeeClientMock) GetWithHeaders(ctx context.Context, userAccessToken string, path string) ([]byte, http.Header, error)

GetWithHeaders calls GetWithHeadersFunc.

func (*ZebedeeClientMock) GetWithHeadersCalls

func (mock *ZebedeeClientMock) GetWithHeadersCalls() []struct {
	Ctx             context.Context
	UserAccessToken string
	Path            string
}

GetWithHeadersCalls gets all the calls that were made to GetWithHeaders. Check the length with:

len(mockedZebedeeClient.GetWithHeadersCalls())

Jump to

Keyboard shortcuts

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