Merge branch 'master' into static-interface-check
This commit is contained in:
commit
7855d5d508
@ -24,15 +24,15 @@ var _ PersonStore = &PersonStoreMock{}
|
||||
// // make and configure a mocked PersonStore
|
||||
// mockedPersonStore := &PersonStoreMock{
|
||||
// CreateFunc: func(ctx context.Context, person *Person, confirm bool) error {
|
||||
// panic("TODO: mock out the Create method")
|
||||
// panic("mock out the Create method")
|
||||
// },
|
||||
// GetFunc: func(ctx context.Context, id string) (*Person, error) {
|
||||
// panic("TODO: mock out the Get method")
|
||||
// panic("mock out the Get method")
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // TODO: use mockedPersonStore in code that requires PersonStore
|
||||
// // and then make assertions.
|
||||
// // use mockedPersonStore in code that requires PersonStore
|
||||
// // and then make assertions.
|
||||
//
|
||||
// }
|
||||
type PersonStoreMock struct {
|
||||
|
@ -24,18 +24,18 @@ var _ MyInterface = &MyInterfaceMock{}
|
||||
// // make and configure a mocked MyInterface
|
||||
// mockedMyInterface := &MyInterfaceMock{
|
||||
// OneFunc: func() bool {
|
||||
// panic("TODO: mock out the One method")
|
||||
// panic("mock out the One method")
|
||||
// },
|
||||
// ThreeFunc: func() string {
|
||||
// panic("TODO: mock out the Three method")
|
||||
// panic("mock out the Three method")
|
||||
// },
|
||||
// TwoFunc: func() int {
|
||||
// panic("TODO: mock out the Two method")
|
||||
// panic("mock out the Two method")
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // TODO: use mockedMyInterface in code that requires MyInterface
|
||||
// // and then make assertions.
|
||||
// // use mockedMyInterface in code that requires MyInterface
|
||||
// // and then make assertions.
|
||||
//
|
||||
// }
|
||||
type MyInterfaceMock struct {
|
||||
|
@ -23,12 +23,12 @@ var _ dotimport.Service = &ServiceMock{}
|
||||
// // make and configure a mocked Service
|
||||
// mockedService := &ServiceMock{
|
||||
// UserFunc: func(ID string) (dotimport.User, error) {
|
||||
// panic("TODO: mock out the User method")
|
||||
// panic("mock out the User method")
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // TODO: use mockedService in code that requires Service
|
||||
// // and then make assertions.
|
||||
// // use mockedService in code that requires Service
|
||||
// // and then make assertions.
|
||||
//
|
||||
// }
|
||||
type ServiceMock struct {
|
||||
|
@ -23,12 +23,12 @@ var _ Service = &ServiceMock{}
|
||||
// // make and configure a mocked Service
|
||||
// mockedService := &ServiceMock{
|
||||
// DoSomethingFunc: func(in1 somerepo.SomeType) error {
|
||||
// panic("TODO: mock out the DoSomething method")
|
||||
// panic("mock out the DoSomething method")
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // TODO: use mockedService in code that requires Service
|
||||
// // and then make assertions.
|
||||
// // use mockedService in code that requires Service
|
||||
// // and then make assertions.
|
||||
//
|
||||
// }
|
||||
type ServiceMock struct {
|
||||
|
Loading…
Reference in New Issue
Block a user