MSTest assertions

Use the Assert classes of the Microsoft.VisualStudio.TestTools.UnitTesting namespace to verify specific functionality. A test method exercises the code of a method in your application's code, but it reports the correctness of the code's behavior only if you include Assert statements.

The Assert class

Use the Assert class to verify that the code under test behaves as expected. Available APIs are:

The StringAssert class

Use the StringAssert class to compare and examine strings. Available APIs are:

The CollectionAssert class

Use the CollectionAssert class to compare collections of objects, or to verify the state of a collection. Available APIs are: