Skip to content

Method input validation and runtime checks that report errors or throw exceptions when failures are detected.

License

Notifications You must be signed in to change notification settings

AArnott/Validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validation

Method input validation and runtime checks that report errors or throw exceptions when failures are detected.

NuGet package 🏭 Build codecov

This project is available as the Validation NuGet package.

Check out our full documentation.

Basic input validation via the Requires class throws an ArgumentException.

Requires.NotNull(arg1);
Requires.NotNullOrEmpty(arg2);

State validation via the Verify class throws an InvalidOperationException.

Verify.Operation(condition, "some error occurred.");

Internal integrity checks via the Assumes class throws an InternalErrorException.

Assumes.True(condition, "some error");

Warning signs that should not throw exceptions via the Report class.

Report.IfNot(condition, "some error");

About

Method input validation and runtime checks that report errors or throw exceptions when failures are detected.

Resources

License

Stars

Watchers

Forks

Languages