Class CMSAssert
Custom assertions
public class CMSAssert
- Inheritance
-
objectCMSAssert
- Extension Methods
Constructors
CMSAssert()
public CMSAssert()
Methods
All(params Action[])
Execute multiple assertions
public static void All(params Action[] assertionsToRun)
Parameters
assertionsToRunAction[]Assertions to be executed
ForEach<T>(IEnumerable<T>, Action<T>)
Asserts the given expression for each item in the given collection
public static void ForEach<T>(IEnumerable<T> items, Action<T> action)
Parameters
itemsIEnumerable<T>Items to assert
actionAction<T>Assert action for the item
Type Parameters
T
PathEquals(string, string, bool)
Asserts whether two paths are equal
public static void PathEquals(string expected, string actual, bool normalizeExpectedPathDelimiters = true)
Parameters
expectedstringExpected path
actualstringCurrent path
normalizeExpectedPathDelimitersboolIf true, all backslash symbols in
expectedare normalized to System.IO.Path.DirectorySeparatorChar
PropertyValuesEqual(object, object)
Asserts two objects by comparing their property values
public static void PropertyValuesEqual(object actual, object expected)
Parameters
actualobjectCurrent object
expectedobjectExpected object
QueryEquals(WhereCondition, string, string)
Asserts whether two queries equal
public static void QueryEquals(WhereCondition current, string expected, string message = null)
Parameters
currentWhereConditionCurrent query
expectedstringExpected query
messagestringOptional error message
QueryEquals(string, string, string)
Asserts whether two queries equal
public static void QueryEquals(string current, string expected, string message = null)
Parameters
currentstringCurrent query
expectedstringExpected query
messagestringOptional error message
TextEquals(string, string, string, TextNormalizationSettings)
Asserts whether two queries equal
public static void TextEquals(string current, string expected, string message = null, TextNormalizationSettings settings = null)
Parameters
currentstringCurrent query
expectedstringExpected query
messagestringOptional error message
settingsTextNormalizationSettingsText normalization settings