titlematchertest

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stubs

func Stubs(t *testing.T) map[string]map[int][]string

Stubs creates data for stubs. To create such data we use testdata/stubs_ref_titles.txt file at first to generate all the titles that match a specific reference. The original stubs_ref_titles.txt file was created by adding the following lines to Calculate function at /ent/score/score.go:44 (v0.1.0)

dump, _ := json.Marshal(titleIDs)
fmt.Printf("{ \"ref\": \"%s\", \"titleIds\":", refString)
fmt.Println(string(dump) + " }")

and running TestNomenRefs from bhlnames_test.go. go test -run Nomen 2>/dev/null |jk > testdata/stubs_ref_titles.json

Types

type FakeTitleMatcher

type FakeTitleMatcher struct {
	CloseStub func() error

	TitlesBHLStub func(string) (map[int][]string, error)
	// contains filtered or unexported fields
}

func (*FakeTitleMatcher) Close

func (fake *FakeTitleMatcher) Close() error

func (*FakeTitleMatcher) CloseCallCount

func (fake *FakeTitleMatcher) CloseCallCount() int

func (*FakeTitleMatcher) CloseCalls

func (fake *FakeTitleMatcher) CloseCalls(stub func() error)

func (*FakeTitleMatcher) CloseReturns

func (fake *FakeTitleMatcher) CloseReturns(result1 error)

func (*FakeTitleMatcher) CloseReturnsOnCall

func (fake *FakeTitleMatcher) CloseReturnsOnCall(i int, result1 error)

func (*FakeTitleMatcher) Invocations

func (fake *FakeTitleMatcher) Invocations() map[string][][]interface{}

func (*FakeTitleMatcher) TitlesBHL

func (fake *FakeTitleMatcher) TitlesBHL(arg1 string) (map[int][]string, error)

func (*FakeTitleMatcher) TitlesBHLArgsForCall

func (fake *FakeTitleMatcher) TitlesBHLArgsForCall(i int) string

func (*FakeTitleMatcher) TitlesBHLCallCount

func (fake *FakeTitleMatcher) TitlesBHLCallCount() int

func (*FakeTitleMatcher) TitlesBHLCalls

func (fake *FakeTitleMatcher) TitlesBHLCalls(stub func(string) (map[int][]string, error))

func (*FakeTitleMatcher) TitlesBHLReturns

func (fake *FakeTitleMatcher) TitlesBHLReturns(result1 map[int][]string, result2 error)

func (*FakeTitleMatcher) TitlesBHLReturnsOnCall

func (fake *FakeTitleMatcher) TitlesBHLReturnsOnCall(i int, result1 map[int][]string, result2 error)

Jump to

Keyboard shortcuts

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