Provides a wrapper around DeepEqualityTester and NUnit for property assertions.
More...
|
static void | AreDeepEqual (object obj1, object obj2, params string[] ignorePropertiesByName) |
| Assert that all the properties for two objects match, deep-tested. Essentially tests that all primitive properties are equal and complex ones match shape.
|
static void | AreIntersectionEqual (object obj1, object obj2, params string[] ignorePropertiesByName) |
| Assert that common (intersecting) the properties for two objects match, deep-tested. Essentially tests that all primitive properties are equal and complex ones match shape.
|
static void | AreEqual (object obj1, object obj2, string obj1PropertyName, string obj2PropertyName=null) |
| Asserts that two objects have the same value for two specified properties, by name. If the second name is omitted, it is assumed to test the same-named property on both.
|
static void | AreNotEqual< T1, T2 > (T1 obj1, T2 obj2, string obj1PropertyName, string obj2PropertyName=null) |
| Asserts that two objects have different values for two specified properties, by name. If the second name is omitted, it is assumed to test the same-named property on both.
|
Provides a wrapper around DeepEqualityTester and NUnit for property assertions.
◆ AreDeepEqual()
void PeanutButter.TestUtils.Generic.PropertyAssert.AreDeepEqual |
( |
object | obj1, |
|
|
object | obj2, |
|
|
params string[] | ignorePropertiesByName ) |
|
static |
Assert that all the properties for two objects match, deep-tested. Essentially tests that all primitive properties are equal and complex ones match shape.
- Parameters
-
obj1 | Primary object |
obj2 | Object to compare with |
ignorePropertiesByName | Properties to ignore, by name |
◆ AreEqual()
void PeanutButter.TestUtils.Generic.PropertyAssert.AreEqual |
( |
object | obj1, |
|
|
object | obj2, |
|
|
string | obj1PropertyName, |
|
|
string | obj2PropertyName = null ) |
|
static |
Asserts that two objects have the same value for two specified properties, by name. If the second name is omitted, it is assumed to test the same-named property on both.
- Parameters
-
obj1 | Primary object to test |
obj2 | Comparison object to test |
obj1PropertyName | Property to test on both objects, unless obj2PropertyName is specified |
obj2PropertyName | Specifies the name of the property to test on obj2 |
◆ AreIntersectionEqual()
void PeanutButter.TestUtils.Generic.PropertyAssert.AreIntersectionEqual |
( |
object | obj1, |
|
|
object | obj2, |
|
|
params string[] | ignorePropertiesByName ) |
|
static |
Assert that common (intersecting) the properties for two objects match, deep-tested. Essentially tests that all primitive properties are equal and complex ones match shape.
- Parameters
-
obj1 | |
obj2 | |
ignorePropertiesByName | |
◆ AreNotEqual< T1, T2 >()
void PeanutButter.TestUtils.Generic.PropertyAssert.AreNotEqual< T1, T2 > |
( |
T1 | obj1, |
|
|
T2 | obj2, |
|
|
string | obj1PropertyName, |
|
|
string | obj2PropertyName = null ) |
|
static |
Asserts that two objects have different values for two specified properties, by name. If the second name is omitted, it is assumed to test the same-named property on both.
- Parameters
-
obj1 | Primary object to test |
obj2 | Comparison object to test |
obj1PropertyName | Property to test on both objects, unless obj2PropertyName is specified |
obj2PropertyName | Specifies the name of the property to test on obj2 |
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.Generic/PropertyAssert.cs