github

package
v0.0.0-...-0b098b8 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package github is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListBranches(ctx context.Context, owner, repo string) ([]string, error)
}

type ClientMock

type ClientMock struct {
	// ListBranchesFunc mocks the ListBranches method.
	ListBranchesFunc func(ctx context.Context, owner string, repo string) ([]string, error)
	// contains filtered or unexported fields
}

ClientMock is a mock implementation of Client.

func TestSomethingThatUsesClient(t *testing.T) {

	// make and configure a mocked Client
	mockedClient := &ClientMock{
		ListBranchesFunc: func(ctx context.Context, owner string, repo string) ([]string, error) {
			panic("mock out the ListBranches method")
		},
	}

	// use mockedClient in code that requires Client
	// and then make assertions.

}

func (*ClientMock) ListBranches

func (mock *ClientMock) ListBranches(ctx context.Context, owner string, repo string) ([]string, error)

ListBranches calls ListBranchesFunc.

func (*ClientMock) ListBranchesCalls

func (mock *ClientMock) ListBranchesCalls() []struct {
	Ctx   context.Context
	Owner string
	Repo  string
}

ListBranchesCalls gets all the calls that were made to ListBranches. Check the length with:

len(mockedClient.ListBranchesCalls())

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) ListBranches

func (m *MockClient) ListBranches(arg0 context.Context, arg1, arg2 string) ([]string, error)

ListBranches mocks base method.

type MockClientMockRecorder

type MockClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) ListBranches

func (mr *MockClientMockRecorder) ListBranches(arg0, arg1, arg2 interface{}) *gomock.Call

ListBranches indicates an expected call of ListBranches.

Jump to

Keyboard shortcuts

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