Add static interface implementation check
Add an additional line of code per interface to the generated mock file, which allows the go compiler to statically check if the mock implements the mocked interface.
This commit is contained in:
committed by
Lucas Bremgartner
parent
c4521bcc9d
commit
b21592468b
@@ -12,6 +12,10 @@ var (
|
||||
lockServiceMockUser sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that ServiceMock does implement Service.
|
||||
// If this is not the case, regenerate this file with moq.
|
||||
var _ dotimport.Service = &ServiceMock{}
|
||||
|
||||
// ServiceMock is a mock implementation of Service.
|
||||
//
|
||||
// func TestSomethingThatUsesService(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user