Skip to content

Commit

Permalink
Verify public API with PublicApiGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinungf committed Feb 25, 2024
1 parent aa85d89 commit 681f844
Show file tree
Hide file tree
Showing 8 changed files with 1,865 additions and 1 deletion.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Polyfill" Version="1.29.0" />
<PackageVersion Include="PolySharp" Version="1.14.1" />
<PackageVersion Include="PublicApiGenerator" Version="11.1.0" />
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.IO.Compression" Version="4.3.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
Expand Down
2 changes: 2 additions & 0 deletions SpreadCheetah.Test/SpreadCheetah.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<PackageReference Include="DocumentFormat.OpenXml" />
<PackageReference Include="EPPlusFree" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="PublicApiGenerator" />
<PackageReference Include="Verify.Xunit" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions SpreadCheetah.Test/Tests/PublicApiTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using PublicApiGenerator;

namespace SpreadCheetah.Test.Tests;

public class PublicApiTests
{
[Fact]
public Task PublicApi_Generate()
{
// Act
var publicApi = typeof(Spreadsheet).Assembly.GeneratePublicApi();

// Assert
var settings = new VerifySettings();
settings.UniqueForTargetFrameworkAndVersion();
return Verify(publicApi, settings);
}
}
2 changes: 1 addition & 1 deletion SpreadCheetah.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpreadCheetah.AotCompatibil
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpreadCheetah.SourceGenerator.CSharp8Test", "SpreadCheetah.SourceGenerator.CSharp8Test\SpreadCheetah.SourceGenerator.CSharp8Test.csproj", "{922F3921-1783-44CC-AF2B-DDDE039913A8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpreadCheetah.TestHelpers", "SpreadCheetah.TestHelpers\SpreadCheetah.TestHelpers.csproj", "{35778347-6F42-484A-A50A-BA33B6892B3D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpreadCheetah.TestHelpers", "SpreadCheetah.TestHelpers\SpreadCheetah.TestHelpers.csproj", "{35778347-6F42-484A-A50A-BA33B6892B3D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit 681f844

Please sign in to comment.