2024-09-07 08:55:00 +02:00
|
|
|
package mocks
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.grassecon.net/urdt/ussd/internal/models"
|
|
|
|
"github.com/stretchr/testify/mock"
|
|
|
|
)
|
|
|
|
|
|
|
|
// MockAccountService implements AccountServiceInterface for testing
|
|
|
|
type MockAccountService struct {
|
|
|
|
mock.Mock
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *MockAccountService) CreateAccount() (*models.AccountResponse, error) {
|
|
|
|
args := m.Called()
|
|
|
|
return args.Get(0).(*models.AccountResponse), args.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *MockAccountService) CheckBalance(publicKey string) (string, error) {
|
|
|
|
args := m.Called(publicKey)
|
|
|
|
return args.String(0), args.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *MockAccountService) CheckAccountStatus(trackingId string) (string, error) {
|
|
|
|
args := m.Called(trackingId)
|
|
|
|
return args.String(0), args.Error(1)
|
2024-09-28 13:07:37 +02:00
|
|
|
}
|
|
|
|
|
2024-10-05 15:56:49 +02:00
|
|
|
func (m *MockAccountService) FetchVouchers(publicKey string) (*models.VoucherHoldingResponse, error) {
|
2024-10-12 17:03:13 +02:00
|
|
|
args := m.Called(publicKey)
|
2024-10-05 15:56:49 +02:00
|
|
|
return args.Get(0).(*models.VoucherHoldingResponse), args.Error(1)
|
2024-09-28 13:07:37 +02:00
|
|
|
}
|