Skip to content

Commit

Permalink
Bump to ApiApprover 10.0.1 (Azure#8982)
Browse files Browse the repository at this point in the history
Brings up to speed with PublicApiGenerator 10.0.1 which supports nullable reference types and has more stable member sorting
  • Loading branch information
danielmarbach authored and nemakam committed Dec 6, 2019
1 parent dcd2803 commit 26e6644
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<PackageReference Update="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Update="Polly" Version="7.1.0" />
<PackageReference Update="Portable.BouncyCastle" Version="1.8.5" />
<PackageReference Update="PublicApiGenerator" Version="9.3.0" />
<PackageReference Update="PublicApiGenerator" Version="10.0.1" />
<PackageReference Update="System.Buffers" Version="4.5.0" />
<PackageReference Update="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Update="System.Collections" Version="4.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Microsoft.Azure.ServiceBus.UnitTests.API
using System.IO;
using System.Linq;
using ApprovalTests;
using PublicApiGenerator;
using Xunit;

public class ApiApprovals
Expand All @@ -24,7 +25,7 @@ public class ApiApprovals
public void ApproveAzureServiceBus()
{
var assembly = typeof(Message).Assembly;
var publicApi = Filter(PublicApiGenerator.ApiGenerator.GeneratePublicApi(assembly, whitelistedNamespacePrefixes: new[] { "Microsoft.Azure.ServiceBus." }));
var publicApi = Filter(assembly.GeneratePublicApi(new ApiGeneratorOptions { WhitelistedNamespacePrefixes = new[] { "Microsoft.Azure.ServiceBus." } }));

try
{
Expand All @@ -40,7 +41,7 @@ public void ApproveAzureServiceBus()
string Filter(string text)
{
return string.Join(Environment.NewLine, text.Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
.Where(l => !l.StartsWith("[assembly: System.Runtime.Versioning.TargetFrameworkAttribute"))
.Where(l => !l.StartsWith("[assembly: System.Runtime.Versioning.TargetFramework"))
);
}

Expand Down
Loading

0 comments on commit 26e6644

Please sign in to comment.