-with-resets is currently generating Reset{{.Name}}Calls() and ResetCalls() without Generic Types
//go:generate moq -with-resets -out ./mock.go ResetStoreGeneric
type ResetStoreGeneric[T, S any] interface {
Get(ctx context.Context, id T) (string, error)
Create(ctx context.Context, id T, value S) error
}
Generates
// ResetCreateCalls reset all the calls that were made to Create.
func (mock *ResetStoreGenericMock) ResetCreateCalls() {
mock.lockCreate.Lock()
mock.calls.Create = nil
mock.lockCreate.Unlock()
}
// ResetGetCalls reset all the calls that were made to Get.
func (mock *ResetStoreGenericMock) ResetGetCalls() {
mock.lockGet.Lock()
mock.calls.Get = nil
mock.lockGet.Unlock()
}
// ResetCalls reset all the calls that were made to all mocked methods.
func (mock *ResetStoreGenericMock) ResetCalls() {
mock.lockCreate.Lock()
mock.calls.Create = nil
mock.lockCreate.Unlock()
mock.lockGet.Lock()
mock.calls.Get = nil
mock.lockGet.Unlock()
}
Instead of expected:
// ResetCreateCalls reset all the calls that were made to Create.
func (mock *ResetStoreGenericMock[T, S]) ResetCreateCalls() {
mock.lockCreate.Lock()
mock.calls.Create = nil
mock.lockCreate.Unlock()
}
// ResetGetCalls reset all the calls that were made to Get.
func (mock *ResetStoreGenericMock[T, S]) ResetGetCalls() {
mock.lockGet.Lock()
mock.calls.Get = nil
mock.lockGet.Unlock()
}
// ResetCalls reset all the calls that were made to all mocked methods.
func (mock *ResetStoreGenericMock[T, S]) ResetCalls() {
mock.lockCreate.Lock()
mock.calls.Create = nil
mock.lockCreate.Unlock()
mock.lockGet.Lock()
mock.calls.Get = nil
mock.lockGet.Unlock()
}
-with-resets
is currently generatingReset{{.Name}}Calls()
andResetCalls()
without Generic TypesGenerates
Instead of expected: