ussd/internal/mocks/servicemock.go

41 lines
1.3 KiB
Go
Raw Permalink Normal View History

2024-09-07 08:55:00 +02:00
package mocks
import (
2024-10-23 11:45:54 +02:00
"context"
2024-09-07 08:55:00 +02:00
"git.grassecon.net/urdt/ussd/internal/models"
2024-10-21 10:10:23 +02:00
"github.com/grassrootseconomics/eth-custodial/pkg/api"
2024-09-07 08:55:00 +02:00
"github.com/stretchr/testify/mock"
)
// MockAccountService implements AccountServiceInterface for testing
type MockAccountService struct {
mock.Mock
}
2024-10-24 16:07:11 +02:00
func (m *MockAccountService) CreateAccount(ctx context.Context) (*api.OKResponse, error) {
2024-09-07 08:55:00 +02:00
args := m.Called()
2024-10-24 09:10:03 +02:00
return args.Get(0).(*api.OKResponse), args.Error(1)
2024-09-07 08:55:00 +02:00
}
2024-10-24 16:32:08 +02:00
func (m *MockAccountService) CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResponse, error) {
2024-09-07 08:55:00 +02:00
args := m.Called(publicKey)
2024-10-14 22:17:57 +02:00
return args.Get(0).(*models.BalanceResponse), args.Error(1)
2024-09-07 08:55:00 +02:00
}
2024-10-24 16:32:08 +02:00
func (m *MockAccountService) CheckAccountStatus(ctx context.Context, trackingId string) (*models.TrackStatusResponse, error) {
2024-09-07 08:55:00 +02:00
args := m.Called(trackingId)
2024-10-14 22:17:57 +02:00
return args.Get(0).(*models.TrackStatusResponse), args.Error(1)
}
2024-10-24 16:32:08 +02:00
func (m *MockAccountService) TrackAccountStatus(ctx context.Context,publicKey string) (*api.OKResponse, error) {
2024-10-18 16:04:02 +02:00
args := m.Called(publicKey)
2024-10-24 09:10:03 +02:00
return args.Get(0).(*api.OKResponse), args.Error(1)
2024-10-18 16:04:02 +02:00
}
2024-10-24 19:44:29 +02:00
func (m *MockAccountService) FetchVouchers(ctx context.Context, publicKey string) (*models.VoucherHoldingResponse, error) {
2024-10-12 17:03:13 +02:00
args := m.Called(publicKey)
return args.Get(0).(*models.VoucherHoldingResponse), args.Error(1)
}