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
19 changes: 3 additions & 16 deletions MessagingService.BusinessLogic.Tests/Mediator/MediatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,12 @@ public async Task Mediator_Send_RequestHandled() {
}
}

private IConfigurationRoot SetupMemoryConfiguration() {
Dictionary<String, String> configuration = new Dictionary<String, String>();
private IConfigurationRoot SetupMemoryConfiguration()
{
Dictionary<String, String> configuration = TestData.GetStandardMemoryConfiguration();

IConfigurationBuilder builder = new ConfigurationBuilder();

configuration.Add("ConnectionStrings:HealthCheck", "HeathCheckConnString");
configuration.Add("SecurityConfiguration:Authority", "https://127.0.0.1");
configuration.Add("EventStoreSettings:ConnectionString", "https://127.0.0.1:2113");
configuration.Add("EventStoreSettings:ConnectionName", "UnitTestConnection");
configuration.Add("EventStoreSettings:UserName", "admin");
configuration.Add("EventStoreSettings:Password", "changeit");
configuration.Add("AppSettings:UseConnectionStringConfig", "false");
configuration.Add("AppSettings:SecurityService", "http://127.0.0.1");
configuration.Add("AppSettings:MessagingServiceApi", "http://127.0.0.1");
configuration.Add("AppSettings:TransactionProcessorApi", "http://127.0.0.1");
configuration.Add("AppSettings:DatabaseEngine", "SqlServer");
configuration.Add("AppSettings:EmailProxy", "UnitTest");
configuration.Add("AppSettings:SMSProxy", "UnitTest");

builder.AddInMemoryCollection(configuration);

return builder.Build();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="Lamar" Version="12.0.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Lamar" Version="13.0.3" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="Manager\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.0" />
<PackageReference Include="MediatR" Version="12.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
<PackageReference Include="MediatR" Version="12.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions MessagingService.Client/MessagingService.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeP2PAssets</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="2024.3.3" />
<PackageReference Include="ClientProxyBase" Version="2024.4.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5.0|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Shared.EventStore" Version="2024.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Shared.EventStore" Version="2024.4.1" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared" Version="2024.3.3" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2024.3.3" />
<PackageReference Include="Shared" Version="2024.4.1" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2024.4.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.53.0" />
<PackageReference Include="Shared" Version="2024.3.3" />
<PackageReference Include="Shared.EventStore" Version="2024.3.3" />
<PackageReference Include="Grpc.Net.Client" Version="2.61.0" />
<PackageReference Include="Shared" Version="2024.4.1" />
<PackageReference Include="Shared.EventStore" Version="2024.4.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.IntegrationTesting" Version="2024.3.3" />
<PackageReference Include="Shared.IntegrationTesting" Version="2024.4.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="2024.3.3" />
<PackageReference Include="ClientProxyBase" Version="2024.4.1" />
<PackageReference Include="Ductus.FluentDocker" Version="2.10.59" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Reqnroll.Tools.MsBuild.Generation" Version="1.0.1" />
<PackageReference Include="Reqnroll.xUnit" Version="1.0.1" />
<PackageReference Include="SecurityService.Client" Version="2023.12.2-build58" />
<PackageReference Include="SecurityService.IntegrationTesting.Helpers" Version="2023.12.2-build58" />
<PackageReference Include="Shared.IntegrationTesting" Version="2024.3.3" />
<PackageReference Include="SecurityService.Client" Version="2024.3.1" />
<PackageReference Include="SecurityService.IntegrationTesting.Helpers" Version="2024.3.1" />
<PackageReference Include="Shared.IntegrationTesting" Version="2024.4.1" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion MessagingService.Models/MessagingService.Models.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="2024.3.3" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2024.4.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.53.0" />
<PackageReference Include="Shared.EventStore" Version="2024.3.3" />
<PackageReference Include="Grpc.Net.Client" Version="2.61.0" />
<PackageReference Include="Shared.EventStore" Version="2024.4.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion MessagingService.Testing/MessagingService.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DebugType>None</DebugType>
</PropertyGroup>

Expand Down
22 changes: 22 additions & 0 deletions MessagingService.Testing/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using SMSMessageStatus = BusinessLogic.Services.SMSServices.MessageStatus;
using EmailMessageStatusResponse = BusinessLogic.Services.EmailServices.MessageStatusResponse;
using SMSMessageStatusResponse = BusinessLogic.Services.SMSServices.MessageStatusResponse;
using Microsoft.Extensions.Configuration;

public class TestData
{
Expand Down Expand Up @@ -325,6 +326,27 @@ public static SMSAggregate GetSentSMSAggregate()
smsAggregate.ReceiveResponseFromProvider(TestData.ProviderSMSReference);
return smsAggregate;
}

public static Dictionary<String,String> GetStandardMemoryConfiguration()
{
Dictionary<String, String> configuration = new Dictionary<String, String>();

IConfigurationBuilder builder = new ConfigurationBuilder();

configuration.Add("AppSettings:EmailProxy", "UnitTest");
configuration.Add("AppSettings:SMSProxy", "UnitTest");
configuration.Add("ConnectionStrings:HealthCheck", "HeathCheckConnString");
configuration.Add("SecurityConfiguration:Authority", "https://127.0.0.1");
configuration.Add("EventStoreSettings:ConnectionString", "esdb://127.0.0.1:2113");
configuration.Add("EventStoreSettings:ConnectionName", "UnitTestConnection");
configuration.Add("EventStoreSettings:UserName", "admin");
configuration.Add("EventStoreSettings:Password", "changeit");
configuration.Add("AppSettings:UseConnectionStringConfig", "false");
configuration.Add("AppSettings:SecurityService", "http://127.0.0.1");
configuration.Add("AppSettings:MessagingServiceApi", "http://127.0.0.1");

return configuration;
}
}

public record TestEvent : DomainEvent
Expand Down
18 changes: 3 additions & 15 deletions MessagingService.Tests/General/BootstrapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace MessagingService.Tests.General
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Moq;
using Testing;
using Xunit;

[Collection("TestCollection")]
Expand All @@ -36,24 +37,11 @@ public void VerifyBootstrapperIsValid()
Startup.Container.AssertConfigurationIsValid(AssertMode.Full);
}

private IConfigurationRoot SetupMemoryConfiguration()
{
Dictionary<String, String> configuration = new Dictionary<String, String>();
private IConfigurationRoot SetupMemoryConfiguration(){
Dictionary<String, String> configuration = TestData.GetStandardMemoryConfiguration();

IConfigurationBuilder builder = new ConfigurationBuilder();

configuration.Add("AppSettings:EmailProxy", "UnitTest");
configuration.Add("AppSettings:SMSProxy", "UnitTest");
configuration.Add("ConnectionStrings:HealthCheck", "HeathCheckConnString");
configuration.Add("SecurityConfiguration:Authority", "https://127.0.0.1");
configuration.Add("EventStoreSettings:ConnectionString", "https://127.0.0.1:2113");
configuration.Add("EventStoreSettings:ConnectionName", "UnitTestConnection");
configuration.Add("EventStoreSettings:UserName", "admin");
configuration.Add("EventStoreSettings:Password", "changeit");
configuration.Add("AppSettings:UseConnectionStringConfig", "false");
configuration.Add("AppSettings:SecurityService", "http://127.0.0.1");
configuration.Add("AppSettings:MessagingServiceApi", "http://127.0.0.1");

builder.AddInMemoryCollection(configuration);

return builder.Build();
Expand Down
Loading