/
testing.go
154 lines (117 loc) · 4.13 KB
/
testing.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
package store
import (
"context"
"github.com/gempir/gempbot/internal/dto"
)
type MockStore struct {
}
func NewMockStore() *MockStore {
return &MockStore{}
}
func (s *MockStore) IsEmoteBlocked(channelUserID string, emoteID string, rewardType dto.RewardType) bool {
return false
}
func (s *MockStore) GetEmoteAdded(channelUserID string, rewardType dto.RewardType, slots int) []EmoteAdd {
return []EmoteAdd{
{ID: 1, ChannelTwitchID: "channelid", Type: dto.REWARD_SEVENTV, EmoteID: "emoteid"},
}
}
func (s *MockStore) CreateEmoteAdd(channelUserId string, rewardType dto.RewardType, emoteID string, changeType dto.EmoteChangeType) {
// do nothing
}
func (s *MockStore) GetUserAccessToken(userID string) (UserAccessToken, error) {
return UserAccessToken{}, nil
}
func (s *MockStore) GetAppAccessToken() (AppAccessToken, error) {
return AppAccessToken{
AccessToken: "accesstoken",
RefreshToken: "refreshtoken",
Scopes: "scopes",
}, nil
}
func (s *MockStore) SaveAppAccessToken(ctx context.Context, accessToken string, refreshToken string, scopes string, expiresIn int) error {
return nil
}
func (s *MockStore) SaveUserAccessToken(ctx context.Context, ownerId string, accessToken string, refreshToken string, scopes string) error {
return nil
}
func (s *MockStore) GetAllUserAccessToken() []UserAccessToken {
return []UserAccessToken{
{OwnerTwitchID: "31231", AccessToken: "accesstoken", RefreshToken: "refreshtoken", Scopes: "scopes"},
}
}
func (s *MockStore) GetSevenTvToken(ctx context.Context) string {
return "7tvApiToken"
}
func (s *MockStore) GetBttvToken(ctx context.Context) string {
return "BttvToken"
}
func (s *MockStore) GetAllMediaCommandsBotConfig() []BotConfig {
return []BotConfig{}
}
func (s *MockStore) SaveReward(reward ChannelPointReward) error {
return nil
}
func (s *MockStore) CreateOrIncrementNomination(ctx context.Context, nomination Nomination) error {
return nil
}
func (s *MockStore) GetNominations(ctx context.Context, channelTwitchID string) ([]Nomination, error) {
return []Nomination{}, nil
}
func (s *MockStore) ClearNominations(ctx context.Context, channelTwitchID string) error {
return nil
}
func (s *MockStore) DeleteChannelPointRewardById(userID string, rewardID string) {
}
func (s *MockStore) GetChannelPointReward(userID string, rewardType dto.RewardType) (ChannelPointReward, error) {
return ChannelPointReward{}, nil
}
func (s *MockStore) CreateNominationVote(ctx context.Context, vote NominationVote) error {
return nil
}
func (s *MockStore) RemoveNominationVote(ctx context.Context, vote NominationVote) error {
return nil
}
func (s *MockStore) ClearNominationEmote(ctx context.Context, channelTwitchID string, emoteID string) error {
return nil
}
func (s *MockStore) GetNomination(ctx context.Context, channelTwitchID string, emoteID string) (Nomination, error) {
return Nomination{}, nil
}
func (s *MockStore) RemoveNomination(ctx context.Context, channelTwitchID string, emoteID string) error {
return nil
}
func (s *MockStore) CountNominations(ctx context.Context, channelTwitchID string, userID string) (int, error) {
return 0, nil
}
func (s *MockStore) CreateNominationDownvote(ctx context.Context, downvote NominationDownvote) error {
return nil
}
func (s *MockStore) RemoveNominationDownvote(ctx context.Context, downvote NominationDownvote) error {
return nil
}
func (s *MockStore) IsAlreadyNominated(ctx context.Context, channelTwitchID string, emoteID string) (bool, error) {
return false, nil
}
func (s *MockStore) CountNominationDownvotes(ctx context.Context, channelTwitchID string, voteBy string) (int, error) {
return 0, nil
}
func (s *MockStore) CountNominationVotes(ctx context.Context, channelTwitchID string, voteBy string) (int, error) {
return 0, nil
}
func (s *MockStore) GetOverlays(userID string) []Overlay {
return []Overlay{
{ID: "1", OwnerTwitchID: "1", RoomID: "roomid"},
}
}
func (s *MockStore) GetOverlay(ID string, userID string) Overlay {
return Overlay{}
}
func (s *MockStore) GetOverlayByRoomId(roomID string) Overlay {
return Overlay{}
}
func (s *MockStore) DeleteOverlay(ID string) {
}
func (s *MockStore) SaveOverlay(overlay Overlay) error {
return nil
}