/
SynthesizerClient.go
74 lines (57 loc) · 1.91 KB
/
SynthesizerClient.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Code generated by mockery v2.11.0. DO NOT EDIT.
package mocks
import (
context "context"
domain "github.com/kujilabo/cocotola/cocotola-api/src/app/domain"
mock "github.com/stretchr/testify/mock"
service "github.com/kujilabo/cocotola/cocotola-api/src/app/service"
testing "testing"
)
// SynthesizerClient is an autogenerated mock type for the SynthesizerClient type
type SynthesizerClient struct {
mock.Mock
}
// FindAudioByAudioID provides a mock function with given fields: ctx, audioID
func (_m *SynthesizerClient) FindAudioByAudioID(ctx context.Context, audioID domain.AudioID) (service.Audio, error) {
ret := _m.Called(ctx, audioID)
var r0 service.Audio
if rf, ok := ret.Get(0).(func(context.Context, domain.AudioID) service.Audio); ok {
r0 = rf(ctx, audioID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(service.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, domain.AudioID) error); ok {
r1 = rf(ctx, audioID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Synthesize provides a mock function with given fields: ctx, lang2, text
func (_m *SynthesizerClient) Synthesize(ctx context.Context, lang2 domain.Lang2, text string) (service.Audio, error) {
ret := _m.Called(ctx, lang2, text)
var r0 service.Audio
if rf, ok := ret.Get(0).(func(context.Context, domain.Lang2, string) service.Audio); ok {
r0 = rf(ctx, lang2, text)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(service.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, domain.Lang2, string) error); ok {
r1 = rf(ctx, lang2, text)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewSynthesizerClient creates a new instance of SynthesizerClient. It also registers a cleanup function to assert the mocks expectations.
func NewSynthesizerClient(t testing.TB) *SynthesizerClient {
mock := &SynthesizerClient{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}