Skip to content

rdoubleui/ApiApprover

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApiApprover

Api Approver is a simple NuGet package built on top of ApprovalTests.Net which approves the public API of an assembly.

Whenever the public API changes the Api Approver test will fail. Running the test manually will pop up a diff tool allowing you to see the changes. If the changes are fine (i.e an added overload) then the changes can simply be approved and test will pass again.

ApiApprover

There are times though that changes to the public API is accidental. Api Approver simply adds a step that all public API changes have to be reviewed by a developer and accepted, saving accidental breaking changes being shipped.

How do I use it

Install-package ApiApprover

[Fact]
[UseReporter(typeof(DiffReporter))]
public void my_assembly_has_no_public_api_changes()
{
	PublicApiApprover.ApprovePublicApi(typeof(Application).Assembly.Location);
}

See this example of a more advanced test you can write using this library.

About

Simple project to approve the public API of a project (useful for semantic versioning)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.9%
  • Batchfile 0.1%