Skip to content

Commit e760e18

Browse files
author
Pavlo Korobov
committed
QueueNameProvider tests
1 parent 090334d commit e760e18

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

WorkflowCore.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkflowCore.Sample09s", "s
145145
EndProject
146146
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScratchPad", "test\ScratchPad\ScratchPad.csproj", "{51BB7DCD-01DD-453D-A1E7-17E5E3DBB14C}"
147147
EndProject
148+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowCore.Tests.QueueProviders.RabbitMQ", "test\WorkflowCore.Tests.QueueProviders.RabbitMQ\WorkflowCore.Tests.QueueProviders.RabbitMQ.csproj", "{54DE20BA-EBA7-4BF0-9BD9-F03766849716}"
149+
EndProject
148150
Global
149151
GlobalSection(SolutionConfigurationPlatforms) = preSolution
150152
Debug|Any CPU = Debug|Any CPU
@@ -355,6 +357,10 @@ Global
355357
{51BB7DCD-01DD-453D-A1E7-17E5E3DBB14C}.Debug|Any CPU.Build.0 = Debug|Any CPU
356358
{51BB7DCD-01DD-453D-A1E7-17E5E3DBB14C}.Release|Any CPU.ActiveCfg = Release|Any CPU
357359
{51BB7DCD-01DD-453D-A1E7-17E5E3DBB14C}.Release|Any CPU.Build.0 = Release|Any CPU
360+
{54DE20BA-EBA7-4BF0-9BD9-F03766849716}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
361+
{54DE20BA-EBA7-4BF0-9BD9-F03766849716}.Debug|Any CPU.Build.0 = Debug|Any CPU
362+
{54DE20BA-EBA7-4BF0-9BD9-F03766849716}.Release|Any CPU.ActiveCfg = Release|Any CPU
363+
{54DE20BA-EBA7-4BF0-9BD9-F03766849716}.Release|Any CPU.Build.0 = Release|Any CPU
358364
EndGlobalSection
359365
GlobalSection(SolutionProperties) = preSolution
360366
HideSolutionNode = FALSE
@@ -414,6 +420,7 @@ Global
414420
{5BE6D628-B9DB-4C76-AAEB-8F3800509A84} = {5080DB09-CBE8-4C45-9957-C3BB7651755E}
415421
{E32CF21A-29CC-46D1-8044-FCC327F2B281} = {5080DB09-CBE8-4C45-9957-C3BB7651755E}
416422
{51BB7DCD-01DD-453D-A1E7-17E5E3DBB14C} = {E6CEAD8D-F565-471E-A0DC-676F54EAEDEB}
423+
{54DE20BA-EBA7-4BF0-9BD9-F03766849716} = {E6CEAD8D-F565-471E-A0DC-676F54EAEDEB}
417424
EndGlobalSection
418425
GlobalSection(ExtensibilityGlobals) = postSolution
419426
SolutionGuid = {DC0FA8D3-6449-4FDA-BB46-ECF58FAD23B4}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using FluentAssertions;
2+
using WorkflowCore.Interface;
3+
using WorkflowCore.QueueProviders.RabbitMQ.Services;
4+
using Xunit;
5+
6+
namespace WorkflowCore.Tests.QueueProviders.RabbitMQ.Tests
7+
{
8+
public class DefaultRabbitMqQueueNameProviderTests
9+
{
10+
private readonly DefaultRabbitMqQueueNameProvider _sut;
11+
12+
public DefaultRabbitMqQueueNameProviderTests()
13+
{
14+
_sut = new DefaultRabbitMqQueueNameProvider();
15+
}
16+
17+
[Theory]
18+
[InlineData(QueueType.Event, "wfc.event_queue")]
19+
[InlineData(QueueType.Index, "wfc.index_queue")]
20+
[InlineData(QueueType.Workflow, "wfc.workflow_queue")]
21+
public void GetQueueName_ValidInput_ReturnsValidQueueName(QueueType queueType, string queueName)
22+
{
23+
var result = _sut.GetQueueName(queueType);
24+
25+
result.Should().Be(queueName);
26+
}
27+
}
28+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="FluentAssertions" Version="5.10.3" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
12+
<PackageReference Include="xunit" Version="2.4.0" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
14+
<PackageReference Include="coverlet.collector" Version="1.2.0" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<ProjectReference Include="..\..\src\providers\WorkflowCore.QueueProviders.RabbitMQ\WorkflowCore.QueueProviders.RabbitMQ.csproj" />
19+
</ItemGroup>
20+
21+
</Project>

0 commit comments

Comments
 (0)