Verifying Conditions with Assertions

Assertions are the cornerstone of UTF. The Assert class has a multitude of test related method overloads that allow you to ensure the validity of your app’s state and behavior. The following is the core set of assertions used by most test classes:

Image AreEqual and AreNotEqualThese methods rely on the Object.Equals method to determine object equality. There are various overloads for primitives, as well as reference types.

Image AreSame and AreNotSameTests for whether two variables refer to the same object instance. These ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.