Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public SettlementDomainServiceTests() {
}

[Fact]
public async Task TransactionDomainService_ProcessSettlement_SettlementIsProcessed()
public async Task SettlementDomainService_ProcessSettlement_SettlementIsProcessed()
{
settlementAggregateRepository.Setup(s => s.GetLatestVersion(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(TestData.GetSettlementAggregateWithPendingMerchantFees(10));
Expand All @@ -59,7 +59,7 @@ public async Task TransactionDomainService_ProcessSettlement_SettlementIsProcess
}

[Fact]
public async Task TransactionDomainService_ProcessSettlement_SettlementAggregateNotCreated_NothingProcessed()
public async Task SettlementDomainService_ProcessSettlement_SettlementAggregateNotCreated_NothingProcessed()
{
settlementAggregateRepository.Setup(s => s.GetLatestVersion(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(TestData.GetEmptySettlementAggregate);
Expand All @@ -75,7 +75,7 @@ public async Task TransactionDomainService_ProcessSettlement_SettlementAggregate
}

[Fact]
public async Task TransactionDomainService_ProcessSettlement_SettlementAggregateNoFeesToSettles_NothingProcessed()
public async Task SettlementDomainService_ProcessSettlement_SettlementAggregateNoFeesToSettles_NothingProcessed()
{
settlementAggregateRepository.Setup(s => s.GetLatestVersion(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(TestData.GetCreatedSettlementAggregate);
Expand All @@ -91,7 +91,7 @@ public async Task TransactionDomainService_ProcessSettlement_SettlementAggregate
}

[Fact]
public async Task TransactionDomainService_ProcessSettlement_AddSettledFeeThrownException_SettlementProcessed()
public async Task SettlementDomainService_ProcessSettlement_AddSettledFeeThrownException_SettlementProcessed()
{
settlementAggregateRepository.Setup(s => s.GetLatestVersion(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(TestData.GetSettlementAggregateWithPendingMerchantFees(10));
Expand Down
1,363 changes: 301 additions & 1,062 deletions TransactionProcessor.BusinessLogic.Tests/Services/TransactionDomainServiceTests.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<DebugType>None</DebugType>
<DebugType>Full</DebugType>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace TransactionProcessor.BusinessLogic.Services;

using System;
using System.Threading;
using System.Threading.Tasks;

public interface ITransactionValidationService{
#region Methods

Task<(String responseMessage, TransactionResponseCode responseCode)> ValidateLogonTransaction(Guid estateId,
Guid merchantId,
String deviceIdentifier,
CancellationToken cancellationToken);

Task<(String responseMessage, TransactionResponseCode responseCode)> ValidateReconciliationTransaction(Guid estateId,
Guid merchantId,
String deviceIdentifier,
CancellationToken cancellationToken);

Task<(String responseMessage, TransactionResponseCode responseCode)> ValidateSaleTransaction(Guid estateId,
Guid merchantId,
Guid contractId,
Guid productId,
String deviceIdentifier,
String operatorIdentifier,
Decimal? transactionAmount,
CancellationToken cancellationToken);

#endregion
}
Loading