feat: it works
This commit is contained in:
parent
6302dd62d6
commit
778d5ef146
25 changed files with 638 additions and 106 deletions
27
internal/service/service_test.go
Normal file
27
internal/service/service_test.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
)
|
||||
|
||||
type TestSuite struct {
|
||||
svc *Service
|
||||
mockRepo *MockRepository
|
||||
}
|
||||
|
||||
func NewSuite(t *testing.T) *TestSuite {
|
||||
t.Helper()
|
||||
|
||||
ctrl := gomock.NewController(t)
|
||||
|
||||
mockRepo := NewMockRepository(ctrl)
|
||||
|
||||
svc := New(mockRepo)
|
||||
|
||||
return &TestSuite{
|
||||
svc: svc,
|
||||
mockRepo: mockRepo,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue