Compare commits
No commits in common. "175cbd1983a54521d8f7db6d0b3e60ae13794e7a" and "eb9f470ac568473b72aa2a5ad61d8d4eec91018f" have entirely different histories.
175cbd1983
...
eb9f470ac5
File diff suppressed because it is too large
Load Diff
@ -1,60 +0,0 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.defalsify.org/vise.git/lang"
|
||||
"git.grassecon.net/urdt/ussd/internal/utils"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type MockDb struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *MockDb) SetPrefix(prefix uint8) {
|
||||
m.Called(utils.DATA_FAMILY_NAME)
|
||||
}
|
||||
|
||||
func (m *MockDb) Prefix() uint8 {
|
||||
args := m.Called()
|
||||
return args.Get(0).(uint8)
|
||||
}
|
||||
|
||||
func (m *MockDb) Safe() bool {
|
||||
args := m.Called()
|
||||
return args.Get(0).(bool)
|
||||
}
|
||||
|
||||
func (m *MockDb) SetLanguage(language *lang.Language) {
|
||||
m.Called(language)
|
||||
}
|
||||
|
||||
func (m *MockDb) SetLock(uint8, bool) error {
|
||||
args := m.Called()
|
||||
return args.Error(0)
|
||||
}
|
||||
|
||||
func (m *MockDb) Connect(ctx context.Context, connectionStr string) error {
|
||||
args := m.Called(ctx, connectionStr)
|
||||
return args.Error(0)
|
||||
}
|
||||
|
||||
func (m *MockDb) SetSession(sessionId string) {
|
||||
m.Called(sessionId)
|
||||
}
|
||||
|
||||
func (m *MockDb) Put(ctx context.Context, key, value []byte) error {
|
||||
args := m.Called(ctx, key, value)
|
||||
return args.Error(0)
|
||||
}
|
||||
|
||||
func (m *MockDb) Get(ctx context.Context, key []byte) ([]byte, error) {
|
||||
args := m.Called(ctx, key)
|
||||
return nil, args.Error(0)
|
||||
}
|
||||
|
||||
func (m *MockDb) Close() error {
|
||||
args := m.Called(nil)
|
||||
return args.Error(0)
|
||||
}
|
Loading…
Reference in New Issue
Block a user