mock

package
v3.1.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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