Initial commit: add .gitignore and README
This commit is contained in:
33
tests/unit/payment-workflow.test.ts
Normal file
33
tests/unit/payment-workflow.test.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
// import { PaymentWorkflow } from '../../src/orchestration/workflows/payment-workflow';
|
||||
import { PaymentRequest } from '../../src/gateway/validation/payment-validation';
|
||||
import { PaymentType, Currency } from '../../src/models/payment';
|
||||
|
||||
describe('PaymentWorkflow', () => {
|
||||
// TODO: Update to use dependency injection after PaymentWorkflow refactoring
|
||||
// let workflow: PaymentWorkflow;
|
||||
|
||||
// beforeEach(() => {
|
||||
// workflow = new PaymentWorkflow();
|
||||
// });
|
||||
|
||||
describe('initiatePayment', () => {
|
||||
it('should create a payment with PENDING_APPROVAL status', async () => {
|
||||
const paymentRequest: PaymentRequest = {
|
||||
type: PaymentType.CUSTOMER_CREDIT_TRANSFER,
|
||||
amount: 1000,
|
||||
currency: Currency.USD,
|
||||
senderAccount: 'ACC001',
|
||||
senderBIC: 'TESTBIC1',
|
||||
receiverAccount: 'ACC002',
|
||||
receiverBIC: 'TESTBIC2',
|
||||
beneficiaryName: 'Test Beneficiary',
|
||||
};
|
||||
|
||||
// Mock implementation would be tested here
|
||||
// This is a placeholder for actual test implementation
|
||||
expect(paymentRequest.type).toBe(PaymentType.CUSTOMER_CREDIT_TRANSFER);
|
||||
});
|
||||
});
|
||||
|
||||
// Add more tests as needed
|
||||
});
|
||||
Reference in New Issue
Block a user