MCPcopy Create free account
hub / github.com/dotzero/git-profile / vcsMock

Struct vcsMock

cmd/mock.go:409–449  ·  view source on GitHub ↗

vcsMock is a mock implementation of vcs. func TestSomethingThatUsesvcs(t *testing.T) { // make and configure a mocked vcs mockedvcs := &vcsMock{ GetFunc: func(key string) (string, error) { panic("mock out the Get method") }, IsRepositoryFunc: func() bool { panic("mock out the

Source from the content-addressed store, hash-verified

407//
408// }
409type vcsMock struct {
410 // GetFunc mocks the Get method.
411 GetFunc func(key string) (string, error)
412
413 // IsRepositoryFunc mocks the IsRepository method.
414 IsRepositoryFunc func() bool
415
416 // SetFunc mocks the Set method.
417 SetFunc func(key string, value string) error
418
419 // UnsetFunc mocks the Unset method.
420 UnsetFunc func(key string) error
421
422 // calls tracks calls to the methods.
423 calls struct {
424 // Get holds details about calls to the Get method.
425 Get []struct {
426 // Key is the key argument value.
427 Key string
428 }
429 // IsRepository holds details about calls to the IsRepository method.
430 IsRepository []struct {
431 }
432 // Set holds details about calls to the Set method.
433 Set []struct {
434 // Key is the key argument value.
435 Key string
436 // Value is the value argument value.
437 Value string
438 }
439 // Unset holds details about calls to the Unset method.
440 Unset []struct {
441 // Key is the key argument value.
442 Key string
443 }
444 }
445 lockGet sync.RWMutex
446 lockIsRepository sync.RWMutex
447 lockSet sync.RWMutex
448 lockUnset sync.RWMutex
449}
450
451// Get calls GetFunc.
452func (mock *vcsMock) Get(key string) (string, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected