mock

package
v3.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockedReposData = map[string][]string{
	"devPinned1": []string{"d1", "pinned11", "pinned12", "d3", "pinned13", "pinned14.sometimes", "d5"},
	"devPinned2": []string{"pinned21", "d1", "pinned22"},
	"devPinned3": []string{"d1", "pinned31"},
	"devNoRepos": []string{},
	"devSeven":   []string{"d1", "d2", "d3", "d4", "d5", "d6", "d7"},
}

MockedReposData stores valid input data for RepoFetcherMock

Functions

func GetMockedRepos

func GetMockedRepos(owner string, names []string) (repos []*github.Repository)

GetMockedRepos returns MockedRepos for the passed owner and repository names

Types

type RepoFetcherMock

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

RepoFetcherMock is a RepoFetcher mock that implements RepoFetcher

func NewRepoFetcherMock

func NewRepoFetcherMock(data map[string][]string) *RepoFetcherMock

func (*RepoFetcherMock) Get

func (*RepoFetcherMock) List

func (*RepoFetcherMock) Reset

func (r *RepoFetcherMock) Reset()

Reset initializes the Stats of the RepoFetcherMock

func (*RepoFetcherMock) Stats

func (r *RepoFetcherMock) Stats(owner string) int

Stats returns the number of times that it was called the List method for certain owner

Jump to

Keyboard shortcuts

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