/
mock_service.go
44 lines (34 loc) · 1.12 KB
/
mock_service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Code generated by mockery v2.13.1. DO NOT EDIT.
package usecase
import (
league "github.com/liampulles/ranking-cli/pkg/league"
mock "github.com/stretchr/testify/mock"
)
// MockService is an autogenerated mock type for the Service type
type MockService struct {
mock.Mock
}
// CalculateRankings provides a mock function with given fields: gameResults
func (_m *MockService) CalculateRankings(gameResults []league.GameResult) []league.Ranking {
ret := _m.Called(gameResults)
var r0 []league.Ranking
if rf, ok := ret.Get(0).(func([]league.GameResult) []league.Ranking); ok {
r0 = rf(gameResults)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]league.Ranking)
}
}
return r0
}
type mockConstructorTestingTNewMockService interface {
mock.TestingT
Cleanup(func())
}
// NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockService(t mockConstructorTestingTNewMockService) *MockService {
mock := &MockService{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}