Search This Blog

2021-03-03

Use of XUnit in .NET Core application - Part 01: Assert

 Phases of Unit Test


Asserts

Asserting Numeric Values


Last Parameter of Assert.Equal method indicates the rounding off value

Asserting String

Example 1. Use of Contains

Example 2. Use of Regular Expression

Asserting Collection

Asserting Range of Values

Assert Exception

Example 1 : Exception without error message














Example 2 : Exception with error message

Assert Object







No comments: