Skip to content

Commit d8f9394

Browse files
Merge branch 'approval-update'
(cherry picked from commit 3600254)
1 parent 52502a6 commit d8f9394

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

projects/Unit/APIApproval.Approve.approved.txt renamed to projects/Unit/APIApproval.Approve.verified.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Unit, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d20ec856aeeb8c3153a77faa2d80e6e43b5db93224a20cc7ae384f65f142e89730e2ff0fcc5d578bbe96fa98a7196c77329efdee4579b3814c0789e5a39b51df6edd75b602a33ceabdfcf19a3feb832f31d8254168cd7ba5700dfbca301fbf8db614ba41ba18474de0a5f4c2d51c995bc3636c641c8cbe76f45717bfcb943b5")]
1+
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Unit, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d20ec856aeeb8c3153a77faa2d80e6e43b5db93224a20cc7ae384f65f142e89730e2ff0fcc5d578bbe96fa98a7196c77329efdee4579b3814c0789e5a39b51df6edd75b602a33ceabdfcf19a3feb832f31d8254168cd7ba5700dfbca301fbf8db614ba41ba18474de0a5f4c2d51c995bc3636c641c8cbe76f45717bfcb943b5")]
22
namespace RabbitMQ.Client
33
{
44
public class AmqpTcpEndpoint

projects/Unit/APIApproval.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,30 @@
3838
// Copyright (c) 2007-2020 VMware, Inc. All rights reserved.
3939
//---------------------------------------------------------------------------
4040

41-
using ApprovalTests;
42-
using ApprovalTests.Reporters;
43-
41+
using System.Threading.Tasks;
4442
using NUnit.Framework;
45-
4643
using PublicApiGenerator;
44+
using Verify;
45+
using VerifyNUnit;
4746

4847
namespace RabbitMQ.Client.Unit
4948
{
5049
[TestFixture]
51-
[UseReporter(typeof(QuietReporter))]
5250
public class APIApproval
5351
{
5452
[Test]
55-
public void Approve()
53+
#if !NETCOREAPP
54+
[Ignore("This test is limited to .NET Core targets")]
55+
#endif
56+
public Task Approve()
5657
{
5758
string publicApi = typeof(ConnectionFactory).Assembly.GeneratePublicApi(new ApiGeneratorOptions { ExcludeAttributes = new[] { "System.Runtime.Versioning.TargetFrameworkAttribute" } });
58-
Approvals.Verify(publicApi);
59+
60+
var settings = new VerifySettings();
61+
settings.DisableClipboard();
62+
settings.DisableDiff();
63+
64+
return Verifier.Verify(publicApi, settings);
5965
}
6066
}
6167
}

projects/Unit/Unit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="ApprovalTests" Version="4.5.2" />
1514
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
1615
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
1716
<PackageReference Include="NUnit" Version="3.12.0" />
1817
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
1918
<PackageReference Include="PublicApiGenerator" Version="10.0.2" />
19+
<PackageReference Include="Verify.NUnit" Version="1.32.4" />
2020
</ItemGroup>
2121

2222
</Project>

0 commit comments

Comments
 (0)