ussd/internal/mocks/servicemock.go

33 lines
999 B
Go
Raw Normal View History

2024-09-07 08:55:00 +02:00
package mocks
import (
"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 09:10:03 +02:00
func (m *MockAccountService) CreateAccount() (*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-14 22:17:57 +02:00
func (m *MockAccountService) CheckBalance(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-14 22:17:57 +02:00
func (m *MockAccountService) CheckAccountStatus(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-18 16:04:02 +02:00
}
2024-10-24 09:10:03 +02:00
func (m *MockAccountService) TrackAccountStatus(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
}