Skip to content

Commit

Permalink
Add NUnit.Analyzers to test project
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Dec 2, 2024
1 parent 4490c4e commit e26100a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="9.2.3" GeneratePathProperty="true" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

Expand Down
4 changes: 1 addition & 3 deletions src/AcceptanceTests/When_using_claimcheck_with_client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
using System.Threading.Tasks;
using AcceptanceTesting;
using NServiceBus;
using NServiceBus.ClaimCheck;
using NServiceBus.AcceptanceTests;
using NServiceBus.AcceptanceTests.EndpointTemplates;
using NUnit.Framework;
using NUnit.Framework.Legacy;

public class When_using_claimcheck_with_client : NServiceBusAcceptanceTest
{
Expand All @@ -27,7 +25,7 @@ public async Task Should_work()
.Done(c => c.MessageReceived)
.Run();

CollectionAssert.AreEqual(payloadToSend, context.PayloadReceived);
Assert.That(context.PayloadReceived, Is.EqualTo(payloadToSend).AsCollection);
}

public class Context : ScenarioContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
using System.Threading.Tasks;
using AcceptanceTesting;
using NServiceBus;
using NServiceBus.ClaimCheck;
using NServiceBus.AcceptanceTests;
using NServiceBus.AcceptanceTests.EndpointTemplates;
using NUnit.Framework;
using NUnit.Framework.Legacy;

public class When_using_claimcheck_with_connection_string : NServiceBusAcceptanceTest
{
Expand All @@ -27,7 +25,7 @@ public async Task Should_work()
.Done(c => c.MessageReceived)
.Run();

CollectionAssert.AreEqual(payloadToSend, context.PayloadReceived);
Assert.That(context.PayloadReceived, Is.EqualTo(payloadToSend).AsCollection);
}

public class Context : ScenarioContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
using System;
using System.Threading.Tasks;
using AcceptanceTesting;
using NUnit.Framework;
using Azure.Storage.Blobs;
using Microsoft.Extensions.DependencyInjection;
using NServiceBus.ClaimCheck;
using NServiceBus.AcceptanceTests;
using NServiceBus.AcceptanceTests.EndpointTemplates;
using NUnit.Framework.Legacy;
using NUnit.Framework;

public class When_using_claimcheck_with_custom_provider : NServiceBusAcceptanceTest
{
Expand All @@ -28,7 +26,7 @@ public async Task Should_work()
.Run();

Assert.That(context.ProviderWasCalled);
CollectionAssert.AreEqual(payloadToSend, context.PayloadReceived);
Assert.That(context.PayloadReceived, Is.EqualTo(payloadToSend).AsCollection);
}

public class Context : ScenarioContext
Expand Down
4 changes: 1 addition & 3 deletions src/AcceptanceTests/When_using_claimcheck_with_expiry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
using System.Threading.Tasks;
using AcceptanceTesting;
using NServiceBus;
using NServiceBus.ClaimCheck;
using NServiceBus.AcceptanceTests;
using NServiceBus.AcceptanceTests.EndpointTemplates;
using NUnit.Framework;
using NUnit.Framework.Legacy;

public class When_using_claimcheck_with_expiry : NServiceBusAcceptanceTest
{
Expand All @@ -27,7 +25,7 @@ public async Task Should_work()
.Done(c => c.MessageReceived)
.Run();

CollectionAssert.AreEqual(payloadToSend, context.PayloadReceived);
Assert.That(context.PayloadReceived, Is.EqualTo(payloadToSend).AsCollection);
}

public class Context : ScenarioContext
Expand Down

0 comments on commit e26100a

Please sign in to comment.