diff --git a/TransactionProcessor.Aggregates.Tests/ContractAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/ContractAggregateTests.cs
index 2845d7e3..11e16720 100644
--- a/TransactionProcessor.Aggregates.Tests/ContractAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/ContractAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Models.Contract;
@@ -7,6 +8,10 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class ContractAggregateTests
{
+ public ContractAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void ContractAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/EstateAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/EstateAggregateTests.cs
index d46b7dd3..484ccae6 100644
--- a/TransactionProcessor.Aggregates.Tests/EstateAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/EstateAggregateTests.cs
@@ -1,4 +1,5 @@
-using Shouldly;
+using Shared.Serialisation;
+using Shouldly;
using SimpleResults;
using TransactionProcessor.Models.Estate;
using TransactionProcessor.Testing;
@@ -7,6 +8,10 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class EstateAggregateTests
{
+ public EstateAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void EstateAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/FloatActivityAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/FloatActivityAggregateTests.cs
index 5771d04c..7fa192af 100644
--- a/TransactionProcessor.Aggregates.Tests/FloatActivityAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/FloatActivityAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Testing;
@@ -5,6 +6,11 @@
namespace TransactionProcessor.Aggregates.Tests;
public class FloatActivityAggregateTests {
+
+ public FloatActivityAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void FloatActivityAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/FloatAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/FloatAggregateTests.cs
index 0b4b0b63..7f5ac511 100644
--- a/TransactionProcessor.Aggregates.Tests/FloatAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/FloatAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Testing;
@@ -6,6 +7,10 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class FloatAggregateTests
{
+ public FloatAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void FloatAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/MerchantAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/MerchantAggregateTests.cs
index 99d95e7b..c22938fd 100644
--- a/TransactionProcessor.Aggregates.Tests/MerchantAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/MerchantAggregateTests.cs
@@ -1,5 +1,6 @@
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.EventStore.Aggregate;
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using System.Reflection;
@@ -14,6 +15,11 @@
namespace TransactionProcessor.Aggregates.Tests
{
public class MerchantAggregateTests{
+
+ public MerchantAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void MerchantAggregate_CanBeCreated_IsCreated(){
MerchantAggregate aggregate = MerchantAggregate.Create(TestData.MerchantId);
diff --git a/TransactionProcessor.Aggregates.Tests/MerchantDepositListAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/MerchantDepositListAggregateTests.cs
index 6eb487c0..d50adab2 100644
--- a/TransactionProcessor.Aggregates.Tests/MerchantDepositListAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/MerchantDepositListAggregateTests.cs
@@ -1,4 +1,5 @@
using Shared.EventStore.Aggregate;
+using Shared.Serialisation;
using Shared.ValueObjects;
using Shouldly;
using SimpleResults;
@@ -9,6 +10,10 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class MerchantDepositListAggregateTests
{
+ public MerchantDepositListAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
#region Methods
[Fact]
diff --git a/TransactionProcessor.Aggregates.Tests/MerchantStatementAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/MerchantStatementAggregateTests.cs
index 000d22e5..1866dcfc 100644
--- a/TransactionProcessor.Aggregates.Tests/MerchantStatementAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/MerchantStatementAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Models.Merchant;
@@ -6,6 +7,11 @@
namespace TransactionProcessor.Aggregates.Tests
{
public class MerchantStatementAggregateTests {
+
+ public MerchantStatementAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void MerchantStatementAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/MerchantStatementForDateAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/MerchantStatementForDateAggregateTests.cs
index 3fa82221..140a694f 100644
--- a/TransactionProcessor.Aggregates.Tests/MerchantStatementForDateAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/MerchantStatementForDateAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.DataTransferObjects.Requests.Merchant;
@@ -9,6 +10,10 @@ namespace TransactionProcessor.Aggregates.Tests;
public class MerchantStatementForDateAggregateTests
{
+ public MerchantStatementForDateAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
private const Int32 TransactionLineType = 1;
private const Int32 SettledFeeLineType = 2;
private const Int32 DepositLineType = 3;
diff --git a/TransactionProcessor.Aggregates.Tests/OperatorAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/OperatorAggregateTests.cs
index 9227b289..0957cd4e 100644
--- a/TransactionProcessor.Aggregates.Tests/OperatorAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/OperatorAggregateTests.cs
@@ -1,4 +1,5 @@
-using Shouldly;
+using Shared.Serialisation;
+using Shouldly;
using SimpleResults;
using TransactionProcessor.Testing;
@@ -6,10 +7,8 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class OperatorAggregateTests
{
- [Fact]
- public void OperatorAggregate_Create_OperatorIsCreated()
- {
-
+ public OperatorAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
}
[Fact]
diff --git a/TransactionProcessor.Aggregates.Tests/ReconciliationAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/ReconciliationAggregateTests.cs
index 2638f044..2da9f1aa 100644
--- a/TransactionProcessor.Aggregates.Tests/ReconciliationAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/ReconciliationAggregateTests.cs
@@ -1,4 +1,5 @@
-using Shouldly;
+using Shared.Serialisation;
+using Shouldly;
using SimpleResults;
using TransactionProcessor.Testing;
@@ -6,6 +7,10 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class ReconciliationAggregateTests
{
+ public ReconciliationAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void ReconciliationAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/SettlementAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/SettlementAggregateTests.cs
index 725b4620..408916e7 100644
--- a/TransactionProcessor.Aggregates.Tests/SettlementAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/SettlementAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Testing;
@@ -6,6 +7,10 @@ namespace TransactionProcessor.Aggregates.Tests
{
public class SettlementAggregateTests
{
+ public SettlementAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void SettlementAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates.Tests/TransactionAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/TransactionAggregateTests.cs
index 8db7624a..fe738d1a 100644
--- a/TransactionProcessor.Aggregates.Tests/TransactionAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/TransactionAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Aggregates;
@@ -8,6 +9,11 @@
namespace TransactionProcessor.Aggregates.Tests{
public class TransactionAggregateTests{
+
+ public TransactionAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void TransactionAggregate_CanBeCreated_IsCreated(){
Aggregates.TransactionAggregate aggregate = Aggregates.TransactionAggregate.Create(TestData.TransactionId);
diff --git a/TransactionProcessor.Aggregates.Tests/VoucherAggregateTests.cs b/TransactionProcessor.Aggregates.Tests/VoucherAggregateTests.cs
index f9d20df4..7089b9fd 100644
--- a/TransactionProcessor.Aggregates.Tests/VoucherAggregateTests.cs
+++ b/TransactionProcessor.Aggregates.Tests/VoucherAggregateTests.cs
@@ -1,3 +1,4 @@
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
using TransactionProcessor.Models;
@@ -7,6 +8,10 @@ namespace TransactionProcessor.Aggregates.Tests;
public class VoucherAggregateTests
{
+ public VoucherAggregateTests() {
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
+ }
+
[Fact]
public void VoucherAggregate_CanBeCreated_IsCreated()
{
diff --git a/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj b/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj
index 4e887b8b..9830c488 100644
--- a/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj
+++ b/TransactionProcessor.Aggregates/TransactionProcessor.Aggregates.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ContractDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ContractDomainEventHandlerTests.cs
index 2588611b..940c6fee 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ContractDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ContractDomainEventHandlerTests.cs
@@ -1,7 +1,9 @@
-using System.Threading;
-using Moq;
+using Moq;
using Shared.Logger;
+using Shared.Serialisation;
using Shouldly;
+using System.Text.Json;
+using System.Threading;
using TransactionProcessor.BusinessLogic.EventHandling;
using TransactionProcessor.DomainEvents;
using TransactionProcessor.Repository;
@@ -12,6 +14,7 @@ namespace TransactionProcessor.BusinessLogic.Tests.DomainEventHandlers;
public class ContractDomainEventHandlerTests
{
+
#region Methods
private Mock EstateReportingRepository;
@@ -19,6 +22,7 @@ public class ContractDomainEventHandlerTests
private ReadModelDomainEventHandler DomainEventHandler;
public ContractDomainEventHandlerTests() {
Logger.Initialise(NullLogger.Instance);
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
this.EstateReportingRepository= new Mock();
this.DomainEventHandler = new ReadModelDomainEventHandler(this.EstateReportingRepository.Object);
}
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/EstateDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/EstateDomainEventHandlerTests.cs
index 13c47a0d..232a9b05 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/EstateDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/EstateDomainEventHandlerTests.cs
@@ -1,9 +1,11 @@
-using System.Threading;
-using System.Threading.Tasks;
-using Moq;
+using Moq;
using Shared.Logger;
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
using TransactionProcessor.BusinessLogic.EventHandling;
using TransactionProcessor.DomainEvents;
using TransactionProcessor.Repository;
@@ -23,6 +25,7 @@ public class EstateDomainEventHandlerTests
public EstateDomainEventHandlerTests()
{
Logger.Initialise(NullLogger.Instance);
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
this.EstateReportingRepository = new Mock();
this.DomainEventHandler = new ReadModelDomainEventHandler(this.EstateReportingRepository.Object);
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/MerchantScheduleDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/MerchantScheduleDomainEventHandlerTests.cs
index 17486649..0732e1c3 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/MerchantScheduleDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/MerchantScheduleDomainEventHandlerTests.cs
@@ -1,9 +1,11 @@
-using System.Threading;
-using System.Threading.Tasks;
using Moq;
using Shared.Logger;
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
using TransactionProcessor.BusinessLogic.EventHandling;
using TransactionProcessor.DomainEvents;
using TransactionProcessor.Repository;
@@ -20,6 +22,7 @@ public class MerchantScheduleDomainEventHandlerTests
public MerchantScheduleDomainEventHandlerTests()
{
Logger.Initialise(NullLogger.Instance);
+ StringSerialiser.Initialise(new SystemTextJsonSerializer(new JsonSerializerOptions()));
this.EstateReportingRepository = new Mock();
this.DomainEventHandler = new ReadModelDomainEventHandler(this.EstateReportingRepository.Object);
}
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/OperatorDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/OperatorDomainEventHandlerTests.cs
index aadf153a..c5a5186c 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/OperatorDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/OperatorDomainEventHandlerTests.cs
@@ -1,7 +1,9 @@
-using System.Threading;
-using Moq;
+using Moq;
using Shared.Logger;
+using Shared.Serialisation;
using Shouldly;
+using System.Text.Json;
+using System.Threading;
using TransactionProcessor.BusinessLogic.EventHandling;
using TransactionProcessor.DomainEvents;
using TransactionProcessor.Repository;
@@ -18,6 +20,7 @@ public class OperatorDomainEventHandlerTests
public OperatorDomainEventHandlerTests()
{
Logger.Initialise(NullLogger.Instance);
+ StringSerialiser.Initialise(new SystemTextJsonSerializer(new JsonSerializerOptions()));
this.EstateReportingRepository = new Mock();
this.DomainEventHandler = new ReadModelDomainEventHandler(this.EstateReportingRepository.Object);
}
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ReadModelDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ReadModelDomainEventHandlerTests.cs
index c4e7c0e7..733f7b93 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ReadModelDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/ReadModelDomainEventHandlerTests.cs
@@ -1,12 +1,14 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
using Moq;
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.Logger;
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
using TransactionProcessor.BusinessLogic.EventHandling;
using TransactionProcessor.DomainEvents;
using TransactionProcessor.Repository;
@@ -25,6 +27,7 @@ private sealed record UnhandledDomainEvent() : DomainEvent(Guid.NewGuid(), Guid.
public ReadModelDomainEventHandlerTests()
{
Logger.Initialise(NullLogger.Instance);
+ StringSerialiser.Initialise(new SystemTextJsonSerializer(new JsonSerializerOptions()));
this.EstateReportingRepository = new Mock();
this.DomainEventHandler = new ReadModelDomainEventHandler(this.EstateReportingRepository.Object);
}
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/TransactionDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/TransactionDomainEventHandlerTests.cs
index 9755d3f0..3c3bcf08 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/TransactionDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/TransactionDomainEventHandlerTests.cs
@@ -13,9 +13,11 @@ namespace TransactionProcessor.BusinessLogic.Tests.DomainEventHandlers
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.General;
using Shared.Logger;
+ using Shared.Serialisation;
using Shouldly;
using System;
using System.Collections.Generic;
+ using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Testing;
@@ -28,6 +30,7 @@ public abstract class DomainEventHandlerTests
public DomainEventHandlerTests(ITestOutputHelper testOutputHelper) {
this.Mediator = new Mock();
+ StringSerialiser.Initialise(new SystemTextJsonSerializer(new JsonSerializerOptions()));
IConfigurationRoot configurationRoot = new ConfigurationBuilder().AddInMemoryCollection(TestData.DefaultAppSettings).Build();
ConfigurationReader.Initialise(configurationRoot);
this.Mediator.Setup(s => s.Send(It.IsAny>(), It.IsAny())).ReturnsAsync(Result.Success());
diff --git a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/VoucherDomainEventHandlerTests.cs b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/VoucherDomainEventHandlerTests.cs
index 84605d1e..e2a97361 100644
--- a/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/VoucherDomainEventHandlerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/DomainEventHandlers/VoucherDomainEventHandlerTests.cs
@@ -19,11 +19,13 @@ namespace TransactionProcessor.BusinessLogic.Tests.DomainEventHandlers;
using Shared.EventStore.Aggregate;
using Shared.General;
using Shared.Logger;
+using Shared.Serialisation;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions.TestingHelpers;
using System.Reflection;
+using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Testing;
@@ -55,6 +57,7 @@ public VoucherDomainEventHandlerTests() {
IConfigurationRoot configurationRoot = new ConfigurationBuilder().AddInMemoryCollection(TestData.DefaultAppSettings).Build();
ConfigurationReader.Initialise(configurationRoot);
Logger.Initialise(NullLogger.Instance);
+ StringSerialiser.Initialise(new SystemTextJsonSerializer(new JsonSerializerOptions()));
SecurityServiceClient = new Mock();
MessagingServiceClient = new Mock();
@@ -86,7 +89,7 @@ public VoucherDomainEventHandlerTests() {
[Fact]
public async Task VoucherDomainEventHandler_VoucherIssuedEvent_WithEmailAddress_IsHandled()
{
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(t => t.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(Result.Success(TestData.GetVoucherAggregateWithRecipientEmail()));
@@ -111,7 +114,7 @@ public async Task VoucherDomainEventHandler_VoucherIssuedEvent_WithEmailAddress_
[Fact]
public async Task VoucherDomainEventHandler_VoucherIssuedEvent_WithRecipientMobile_IsHandled()
{
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(t => t.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(Result.Success(TestData.GetVoucherAggregateWithRecipientMobile()));
diff --git a/TransactionProcessor.BusinessLogic.Tests/Manager/TransactionProcessorManagerTests.cs b/TransactionProcessor.BusinessLogic.Tests/Manager/TransactionProcessorManagerTests.cs
index 2609c8ef..7227c03c 100644
--- a/TransactionProcessor.BusinessLogic.Tests/Manager/TransactionProcessorManagerTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/Manager/TransactionProcessorManagerTests.cs
@@ -1,24 +1,25 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using Moq;
+using Moq;
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.EventStore.Aggregate;
+using Shared.Serialisation;
using Shouldly;
using SimpleResults;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
using TransactionProcessor.Aggregates;
using TransactionProcessor.BusinessLogic.Manager;
using TransactionProcessor.BusinessLogic.Services;
using TransactionProcessor.Models.Contract;
using TransactionProcessor.Models.Estate;
using TransactionProcessor.Models.Merchant;
-using MerchantScheduleModel = TransactionProcessor.Models.MerchantSchedule.MerchantSchedule;
using TransactionProcessor.Repository;
using TransactionProcessor.Testing;
using Xunit;
using Contract = TransactionProcessor.Models.Contract.Contract;
+using MerchantScheduleModel = TransactionProcessor.Models.MerchantSchedule.MerchantSchedule;
using Operator = TransactionProcessor.Models.Operator.Operator;
namespace TransactionProcessor.BusinessLogic.Tests.Manager
@@ -33,7 +34,7 @@ public class TransactionProcessorManagerTests
public TransactionProcessorManagerTests()
{
this.TransactionProcessorReadModelRepository = new Mock();
-
+ StringSerialiser.Initialise(new Shared.Serialisation.SystemTextJsonSerializer(new System.Text.Json.JsonSerializerOptions()));
this.AggregateService = new Mock();
this.TransactionProcessorManager = new TransactionProcessorManager(this.TransactionProcessorReadModelRepository.Object, this.AggregateService.Object);
diff --git a/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs b/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs
index 0c03b07a..18e5e148 100644
--- a/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/Mediator/MediatorTests.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using System.Text.Json;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Hosting;
@@ -9,6 +10,7 @@
using Microsoft.Extensions.Hosting;
using Moq;
using Shared.EventStore.EventStore;
+using Shared.Serialisation;
using TransactionProcessor.BusinessLogic.Manager;
using TransactionProcessor.DataTransferObjects.Responses.Contract;
using TransactionProcessor.ProjectionEngine.Repository;
@@ -28,6 +30,8 @@ public class MediatorTests
public MediatorTests()
{
+ StringSerialiser.Initialise(new SystemTextJsonSerializer(new JsonSerializerOptions()));
+
this.Requests.Add(TestData.Commands.ProcessLogonTransactionCommand);
this.Requests.Add(TestData.Commands.ProcessReconciliationCommand);
this.Requests.Add(TestData.Commands.ProcessSaleTransactionCommand);
@@ -120,7 +124,7 @@ public async Task Mediator_Send_RequestHandled()
ServiceRegistry services = new ServiceRegistry();
Startup s = new Startup(hostingEnvironment.Object);
Startup.Configuration = this.SetupMemoryConfiguration();
-
+
this.AddTestRegistrations(services, hostingEnvironment.Object);
s.ConfigureContainer(services);
diff --git a/TransactionProcessor.BusinessLogic.Tests/Services/EstateDomainServiceTests.cs b/TransactionProcessor.BusinessLogic.Tests/Services/EstateDomainServiceTests.cs
index 6dc13a8c..19f9dbc9 100644
--- a/TransactionProcessor.BusinessLogic.Tests/Services/EstateDomainServiceTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/Services/EstateDomainServiceTests.cs
@@ -5,7 +5,6 @@
using Moq;
using SecurityService.Client;
using SecurityService.DataTransferObjects;
-using SecurityService.DataTransferObjects.Responses;
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.EventStore.Aggregate;
using Shouldly;
@@ -79,9 +78,9 @@ public async Task EstateDomainService_CreateEstateUser_EstateUserIsCreated() {
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
@@ -108,9 +107,9 @@ public async Task EstateDomainService_CreateEstateUser_EstateRoleOverrideIsUsedI
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
@@ -139,9 +138,9 @@ public async Task EstateDomainService_CreateEstateUser_UserCreateFailed_ResultIs
.ReturnsAsync(Result.Failure);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
@@ -181,7 +180,7 @@ public async Task EstateDomainService_CreateEstateUser_NullUserReturned_ResultIs
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
+ .ReturnsAsync(Result.Success(new List() {
null
}));
@@ -200,9 +199,9 @@ public async Task EstateDomainService_CreateEstateUser_GetEstateFailed_ResultIsF
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
@@ -223,9 +222,9 @@ public async Task EstateDomainService_CreateEstateUser_EstateNotCreated_ResultIs
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
@@ -246,9 +245,9 @@ public async Task EstateDomainService_CreateEstateUser_SaveFailed_ResultIsFailed
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
diff --git a/TransactionProcessor.BusinessLogic.Tests/Services/MerchantDomainServiceTests.cs b/TransactionProcessor.BusinessLogic.Tests/Services/MerchantDomainServiceTests.cs
index abdea891..59a965d5 100644
--- a/TransactionProcessor.BusinessLogic.Tests/Services/MerchantDomainServiceTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/Services/MerchantDomainServiceTests.cs
@@ -3,7 +3,6 @@
using Newtonsoft.Json;
using SecurityService.Client;
using SecurityService.DataTransferObjects;
-using SecurityService.DataTransferObjects.Responses;
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.EventStore.Aggregate;
using Shared.EventStore.EventStore;
@@ -268,9 +267,9 @@ public async Task MerchantDomainService_CreateMerchantUser_MerchantUserIsCreated
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List() {
- new UserDetails {
- UserId = Guid.Parse("FA077CE3-B915-4048-88E3-9B500699317F")
+ .ReturnsAsync(Result.Success(new List() {
+ new UserResponse {
+ UserId = "FA077CE3-B915-4048-88E3-9B500699317F"
}
}));
@@ -375,7 +374,7 @@ public async Task MerchantDomainService_CreateMerchantUser_UserInListIsNull_Erro
.ReturnsAsync(Result.Success);
this.SecurityServiceClient
.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List {
+ .ReturnsAsync(Result.Success(new List {
null
}));
@@ -837,7 +836,7 @@ public async Task MerchantDomainService_MakeMerchantWithdrawal_WithdrawalIsMade(
this.SecurityServiceClient
.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ .ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.EventStoreContext.Setup(e => e.GetPartitionStateFromProjection(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(JsonConvert.SerializeObject(TestData.MerchantBalanceProjectionState)));
@@ -863,7 +862,7 @@ public async Task MerchantDomainService_MakeMerchantWithdrawal_DuplicateWithdraw
this.SecurityServiceClient
.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ .ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.EventStoreContext.Setup(e => e.GetPartitionStateFromProjection(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(JsonConvert.SerializeObject(TestData.MerchantBalanceProjectionState)));
@@ -1412,7 +1411,7 @@ public async Task MerchantDomainService_CreateMerchantUser_SaveFailed_ResultIsFa
this.SecurityServiceClient.Setup(s => s.CreateUser(It.IsAny(), It.IsAny()))
.ReturnsAsync(Result.Success());
this.SecurityServiceClient.Setup(s => s.GetUsers(It.IsAny(), It.IsAny()))
- .ReturnsAsync(Result.Success(new List { new UserDetails { UserId = Guid.NewGuid() } }));
+ .ReturnsAsync(Result.Success(new List { new UserResponse { UserId = "FA077CE3-B915-4048-88E3-9B500699317F" } }));
this.AggregateService.Setup(m => m.Save(It.IsAny(), It.IsAny()))
.ReturnsAsync(Result.Failure());
diff --git a/TransactionProcessor.BusinessLogic.Tests/Services/MerchantStatementDomainServiceTests.cs b/TransactionProcessor.BusinessLogic.Tests/Services/MerchantStatementDomainServiceTests.cs
index 41326060..6d909c4c 100644
--- a/TransactionProcessor.BusinessLogic.Tests/Services/MerchantStatementDomainServiceTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/Services/MerchantStatementDomainServiceTests.cs
@@ -244,7 +244,7 @@ public async Task MerchantStatementDomainService_EmailStatement_StatementIsEmail
this.MessagingServiceClient.Setup(m => m.SendEmail(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success);
- this.SecurityServiceClient.Setup(m => m.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(m => m.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
Result result = await this.DomainService.EmailStatement(TestData.Commands.EmailMerchantStatementCommand, CancellationToken.None);
result.IsSuccess.ShouldBeTrue();
@@ -260,7 +260,7 @@ public async Task MerchantStatementDomainService_EmailStatement_MerchantNotFound
this.MessagingServiceClient.Setup(m => m.SendEmail(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success);
- this.SecurityServiceClient.Setup(m => m.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(m => m.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
Result result = await this.DomainService.EmailStatement(TestData.Commands.EmailMerchantStatementCommand, CancellationToken.None);
result.IsFailed.ShouldBeTrue();
@@ -388,7 +388,7 @@ public async Task MerchantStatementDomainService_EmailStatement_SaveFailed_State
this.MessagingServiceClient.Setup(m => m.SendEmail(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success);
- this.SecurityServiceClient.Setup(m => m.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(m => m.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
Result result = await this.DomainService.EmailStatement(TestData.Commands.EmailMerchantStatementCommand, CancellationToken.None);
result.IsFailed.ShouldBeTrue();
diff --git a/TransactionProcessor.BusinessLogic.Tests/Services/TransactionDomainServiceTests.cs b/TransactionProcessor.BusinessLogic.Tests/Services/TransactionDomainServiceTests.cs
index e85d97ef..c761e6e7 100644
--- a/TransactionProcessor.BusinessLogic.Tests/Services/TransactionDomainServiceTests.cs
+++ b/TransactionProcessor.BusinessLogic.Tests/Services/TransactionDomainServiceTests.cs
@@ -279,7 +279,7 @@ public async Task TransactionDomainService_ProcessSaleTransaction_DeclinedByOper
[Fact]
public async Task TransactionDomainService_ProcessSaleTransaction_OperatorProxyThrowsException_TransactionIsProcessed()
{
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
@@ -321,7 +321,7 @@ public async Task TransactionDomainService_ProcessSaleTransaction_OperatorProxyT
[Fact]
public async Task TransactionDomainService_ProcessSaleTransaction_TransactionIsProcessed(){
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
@@ -386,7 +386,7 @@ public async Task TransactionDomainService_ProcessSaleTransaction_TransactionIsP
[Fact]
public async Task TransactionDomainService_ProcessSaleTransaction_NoFloatFound_TransactionIsProcessed()
{
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
@@ -593,7 +593,7 @@ public async Task TransactionDomainService_CalculateFeesForTransaction_FeesCalcu
this.AggregateService.Setup(t => t.Save(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success());
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(c => c.Get(It.IsAny(), It.IsAny())).ReturnsAsync(TestData.Aggregates.CreatedContractAggregateWithAProductAndTransactionFee(CalculationType.Fixed, FeeType.Merchant));
this.FeeCalculationManager.Setup(f => f.CalculateFees(It.IsAny>(), It.IsAny(), It.IsAny())).Returns(TestData.CalculatedMerchantFees);
@@ -609,7 +609,7 @@ public async Task TransactionDomainService_CalculateFeesForTransaction_MerchantW
this.AggregateService.Setup(t => t.GetLatest(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetCompletedAuthorisedSaleTransactionAggregate()));
this.AggregateService.Setup(t => t.Save(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success());
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny())).ReturnsAsync(TestData.Aggregates.MerchantAggregateWithEverything(SettlementSchedule.Immediate));
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(c => c.Get(It.IsAny(), It.IsAny())).ReturnsAsync(TestData.Aggregates.CreatedContractAggregateWithAProductAndTransactionFee(CalculationType.Fixed, FeeType.Merchant));
this.FeeCalculationManager.Setup(f => f.CalculateFees(It.IsAny>(), It.IsAny(), It.IsAny())).Returns(TestData.CalculatedMerchantFees);
@@ -626,7 +626,7 @@ public async Task TransactionDomainService_CalculateFeesForTransaction_NonMercha
this.AggregateService.Setup(t => t.Save(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success());
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(c => c.Get(It.IsAny(), It.IsAny())).ReturnsAsync(TestData.Aggregates.CreatedContractAggregateWithAProductAndTransactionFee(CalculationType.Fixed, FeeType.ServiceProvider));
this.FeeCalculationManager.Setup(f => f.CalculateFees(It.IsAny>(), It.IsAny(), It.IsAny())).Returns(TestData.CalculatedServiceProviderFees);
@@ -642,7 +642,7 @@ public async Task TransactionDomainService_CalculateFeesForTransaction_Transacti
this.AggregateService.Setup(t => t.GetLatest(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetCompletedLogonTransactionAggregate()));
this.AggregateService.Setup(t => t.Save(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success());
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny())).ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.FeeCalculationManager.Setup(f => f.CalculateFees(It.IsAny>(), It.IsAny(), It.IsAny())).Returns(TestData.CalculatedServiceProviderFees);
@@ -661,7 +661,7 @@ public async Task TransactionDomainService_CalculateFeesForTransaction_NoFeesRet
//this.EstateClient.Setup(e => e.GetTransactionFeesForProduct(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Failure());
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
.ReturnsAsync(TestData.Aggregates.MerchantAggregateWithOperator());
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.FeeCalculationManager.Setup(f => f.CalculateFees(It.IsAny>(), It.IsAny(), It.IsAny())).Returns(TestData.CalculatedServiceProviderFees);
@@ -696,7 +696,7 @@ public async Task TransactionDomainService_AddSettledMerchantFee_SaveFailed_Resu
[Fact]
public async Task TransactionDomainService_SendCustomerEmailReceipt_ReceiptSent() {
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(t => t.GetLatest(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetCompletedAuthorisedSaleTransactionAggregate()));
this.AggregateService.Setup(c => c.Get(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.Aggregates.EstateAggregateWithOperator()));
this.AggregateService.Setup(e => e.Get(It.IsAny(), It.IsAny()))
@@ -711,7 +711,7 @@ public async Task TransactionDomainService_SendCustomerEmailReceipt_ReceiptSent(
[Fact]
public async Task TransactionDomainService_SendCustomerEmailReceipt_GetTransactionFailed_ResultFailed()
{
- this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.TokenResponse()));
+ this.SecurityServiceClient.Setup(s => s.GetToken(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success(TestData.GetTokenResponse()));
this.AggregateService.Setup(t => t.GetLatest(It.IsAny