ussd/internal/mocks/servicemock.go

26 lines
780 B
Go
Raw Normal View History

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)
}
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-09-07 08:55:00 +02:00
}