Skip to content

Glossary: C# Beyond the Basics

Assert

Also written: Assert.Equal, Assert.True, Assert.Throws, Assert.NotNull, Assert.Single

xUnit's static class of checks. A test fails when a check does not hold, for example `Assert.Equal(11.75m, price)`. Put the expected value first.

Where the book teaches it

Related terms

xUnitFactunit test