Microsoft.VisualStudio.TestPlatform.TestFramework
The presence of this attribute in a test assembly causes MSTest to discover test classes (i.e. classes having
the "TestClass" attribute) and test methods (i.e. methods having the "TestMethod" attribute) which are declared
internal in addition to test classes and test methods which are declared public. When this attribute is not
present in a test assembly the tests in such classes will not be discovered.
Specification to disable parallelization.
Enum to specify whether the data is stored as property or in method.
Data is declared as property.
Data is declared in method.
Attribute to define dynamic data for a test method.
Initializes a new instance of the class.
The name of method or property having test data.
Specifies whether the data is stored as property or in method.
Initializes a new instance of the class when the test data is present in a class different
from test method's class.
The name of method or property having test data.
The declaring type of property or method having data. Useful in cases when declaring type is present in a class different from
test method's class. If null, declaring type defaults to test method's class type.
Specifies whether the data is stored as property or in method.
Gets or sets the name of method used to customize the display name in test results.
Gets or sets the declaring type used to customize the display name in test results.
Specification for parallelization level for a test run.
The default scope for the parallel run. Although method level gives maximum parallelization, the default is set to
class level to enable maximum number of customers to easily convert their tests to run in parallel. In most cases within
a class tests aren't thread safe.
Initializes a new instance of the class.
Gets or sets the number of workers to be used for the parallel run.
Gets or sets the scope of the parallel run.
To enable all classes to run in parallel set this to .
To get the maximum parallelization level set this to .
Parallel execution mode.
Each thread of execution will be handed a TestClass worth of tests to execute.
Within the TestClass, the test methods will execute serially.
Each thread of execution will be handed TestMethods to execute.
Specifies how to discover ITestDataSource tests.
Initializes a new instance of the class.
Sets which to use when discovering ITestDataSource tests.
Gets specified discovery option.
Supported TestDataSource discovery modes
Discover tests during execution.
This was the default option on version 2.2.3 and before.
Discover and expand ITestDataSource based tests.
This is the default behavior after version 2.2.3.
Test data source for data driven tests.
Gets the test data from custom test data source.
The method info of test method.
Test data for calling test method.
Gets the display name corresponding to test data row for displaying in TestResults.
The method info of test method.
The test data which is passed to test method.
The .
TestMethod for execution.
Gets the name of test method.
Gets the name of test class.
Gets the return type of test method.
Gets the arguments with which test method is invoked.
Gets the parameters of test method.
Gets the methodInfo for test method.
This is just to retrieve additional information about the method.
Do not directly invoke the method using MethodInfo. Use ITestMethod.Invoke instead.
Invokes the test method.
Arguments to pass to test method. (E.g. For data driven)
Result of test method invocation.
This call handles asynchronous test methods as well.
Get all attributes of the test method.
Whether attribute defined in parent class is valid.
All attributes.
Get attribute of specific type.
System.Attribute type.
Whether attribute defined in parent class is valid.
The attributes of the specified type.
The helper.
The check parameter not null.
The parameter.
The parameter name.
The message.
Throws argument null exception when parameter is null.
The check parameter not null or empty.
The parameter.
The parameter name.
The message.
Throws ArgumentException when parameter is null.
Enumeration for how we access data rows in data driven testing.
Rows are returned in sequential order.
Rows are returned in random order.
Attribute to define in-line data for a test method.
Initializes a new instance of the class.
Initializes a new instance of the class.
The data object.
Initializes a new instance of the class which takes in an array of arguments.
A data object.
More data.
Gets data for calling test method.
Gets or sets display name in test results for customization.
The assert inconclusive exception.
Initializes a new instance of the class.
The message.
The exception.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
InternalTestFailureException class. Used to indicate internal failure for a test case
This class is only added to preserve source compatibility with the V1 framework.
For all practical purposes either use AssertFailedException/AssertInconclusiveException.
Initializes a new instance of the class.
The exception message.
The exception.
Initializes a new instance of the class.
The exception message.
Initializes a new instance of the class.
Attribute that specifies to expect an exception of the specified type
Initializes a new instance of the class with the expected type
Type of the expected exception
Initializes a new instance of the class with
the expected type and the message to include when no exception is thrown by the test.
Type of the expected exception
Message to include in the test result if the test fails due to not throwing an exception
Gets a value indicating the Type of the expected exception
Gets or sets a value indicating whether to allow types derived from the type of the expected exception to
qualify as expected
Gets the message to include in the test result if the test fails due to not throwing an exception
Verifies that the type of the exception thrown by the unit test is expected
The exception thrown by the unit test
Base class for attributes that specify to expect an exception from a unit test
Initializes a new instance of the class with a default no-exception message
Initializes a new instance of the class with a no-exception message
Message to include in the test result if the test fails due to not throwing an
exception
Gets the message to include in the test result if the test fails due to not throwing an exception
Gets the message to include in the test result if the test fails due to not throwing an exception
Gets the default no-exception message
The ExpectedException attribute type name
The default no-exception message
Determines whether the exception is expected. If the method returns, then it is
understood that the exception was expected. If the method throws an exception, then it
is understood that the exception was not expected, and the thrown exception's message
is included in the test result. The class can be used for
convenience. If is used and the assertion fails,
then the test outcome is set to Inconclusive.
The exception thrown by the unit test
Rethrow the exception if it is an AssertFailedException or an AssertInconclusiveException
The exception to rethrow if it is an assertion exception
This class is designed to help user doing unit testing for types which uses generic types.
GenericParameterHelper satisfies some common generic type constraints
such as:
1. public default constructor
2. implements common interface: IComparable, IEnumerable
Initializes a new instance of the class that
satisfies the 'newable' constraint in C# generics.
This constructor initializes the Data property to a random value.
Initializes a new instance of the class that
initializes the Data property to a user-supplied value.
Any integer value
Gets or sets the Data
Do the value comparison for two GenericParameterHelper object
object to do comparison with
true if obj has the same value as 'this' GenericParameterHelper object.
false otherwise.
Returns a hashcode for this object.
The hash code.
Compares the data of the two objects.
The object to compare with.
A signed number indicating the relative values of this instance and value.
Thrown when the object passed in is not an instance of .
Returns an IEnumerator object whose length is derived from
the Data property.
The IEnumerator object
Returns a GenericParameterHelper object that is equal to
the current object.
The cloned object.
Enables users to log/write traces from unit tests for diagnostics.
Handler for LogMessage.
Message to log.
Event to listen. Raised when unit test writer writes some message.
Mainly to consume by adapter.
API for test writer to call to Log messages.
String format with placeholders.
Parameters for placeholders.
TestCategory attribute; used to specify the category of a unit test.
Initializes a new instance of the class and applies the category to the test.
The test Category.
Gets the test categories that has been applied to the test.
Base class for the "Category" attribute
The reason for this attribute is to let the users create their own implementation of test categories.
- test framework (discovery, etc) deals with TestCategoryBaseAttribute.
- The reason that TestCategories property is a collection rather than a string,
is to give more flexibility to the user. For instance the implementation may be based on enums for which the values can be OR'ed
in which case it makes sense to have single attribute rather than multiple ones on the same test.
Initializes a new instance of the class.
Applies the category to the test. The strings returned by TestCategories
are used with the /category command to filter tests
Gets the test category that has been applied to the test.
AssertFailedException class. Used to indicate failure for a test case
Initializes a new instance of the class.
The message.
The exception.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
A collection of helper classes to test various conditions within
unit tests. If the condition being tested is not met, an exception
is thrown.
Gets the singleton instance of the Assert functionality.
Users can use this to plug-in custom assertions through C# extension methods.
For instance, the signature of a custom assertion provider could be "public static void IsOfType<T>(this Assert assert, object obj)"
Users could then use a syntax similar to the default assertions which in this case is "Assert.That.IsOfType<Dog>(animal);"
More documentation is at "https://github.com/Microsoft/testfx-docs".
Tests whether the specified condition is true and throws an exception
if the condition is false.
The condition the test expects to be true.
Thrown if is false.
Tests whether the specified condition is true and throws an exception
if the condition is false.
The condition the test expects to be true.
Thrown if is false.
Tests whether the specified condition is true and throws an exception
if the condition is false.
The condition the test expects to be true.
The message to include in the exception when
is false. The message is shown in test results.
Thrown if is false.
Tests whether the specified condition is true and throws an exception
if the condition is false.
The condition the test expects to be true.
The message to include in the exception when
is false. The message is shown in test results.
Thrown if is false.
Tests whether the specified condition is true and throws an exception
if the condition is false.
The condition the test expects to be true.
The message to include in the exception when
is false. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is false.
Tests whether the specified condition is true and throws an exception
if the condition is false.
The condition the test expects to be true.
The message to include in the exception when
is false. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is false.
Tests whether the specified condition is false and throws an exception
if the condition is true.
The condition the test expects to be false.
Thrown if is true.
Tests whether the specified condition is false and throws an exception
if the condition is true.
The condition the test expects to be false.
Thrown if is true.
Tests whether the specified condition is false and throws an exception
if the condition is true.
The condition the test expects to be false.
The message to include in the exception when
is true. The message is shown in test results.
Thrown if is true.
Tests whether the specified condition is false and throws an exception
if the condition is true.
The condition the test expects to be false.
The message to include in the exception when
is true. The message is shown in test results.
Thrown if is true.
Tests whether the specified condition is false and throws an exception
if the condition is true.
The condition the test expects to be false.
The message to include in the exception when
is true. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is true.
Tests whether the specified condition is false and throws an exception
if the condition is true.
The condition the test expects to be false.
The message to include in the exception when
is true. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is true.
Tests whether the specified object is null and throws an exception
if it is not.
The object the test expects to be null.
Thrown if is not null.
Tests whether the specified object is null and throws an exception
if it is not.
The object the test expects to be null.
The message to include in the exception when
is not null. The message is shown in test results.
Thrown if is not null.
Tests whether the specified object is null and throws an exception
if it is not.
The object the test expects to be null.
The message to include in the exception when
is not null. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is not null.
Tests whether the specified object is non-null and throws an exception
if it is null.
The object the test expects not to be null.
Thrown if is null.
Tests whether the specified object is non-null and throws an exception
if it is null.
The object the test expects not to be null.
The message to include in the exception when
is null. The message is shown in test results.
Thrown if is null.
Tests whether the specified object is non-null and throws an exception
if it is null.
The object the test expects not to be null.
The message to include in the exception when
is null. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is null.
Tests whether the specified objects both refer to the same object and
throws an exception if the two inputs do not refer to the same object.
The first object to compare. This is the value the test expects.
The second object to compare. This is the value produced by the code under test.
Thrown if does not refer to the same object
as .
Tests whether the specified objects both refer to the same object and
throws an exception if the two inputs do not refer to the same object.
The first object to compare. This is the value the test expects.
The second object to compare. This is the value produced by the code under test.
The message to include in the exception when
is not the same as . The message is shown
in test results.
Thrown if does not refer to the same object
as .
Tests whether the specified objects both refer to the same object and
throws an exception if the two inputs do not refer to the same object.
The first object to compare. This is the value the test expects.
The second object to compare. This is the value produced by the code under test.
The message to include in the exception when
is not the same as . The message is shown
in test results.
An array of parameters to use when formatting .
Thrown if does not refer to the same object
as .
Tests whether the specified objects refer to different objects and
throws an exception if the two inputs refer to the same object.
The first object to compare. This is the value the test expects not
to match .
The second object to compare. This is the value produced by the code under test.
Thrown if refers to the same object
as .
Tests whether the specified objects refer to different objects and
throws an exception if the two inputs refer to the same object.
The first object to compare. This is the value the test expects not
to match .
The second object to compare. This is the value produced by the code under test.
The message to include in the exception when
is the same as . The message is shown in
test results.
Thrown if refers to the same object
as .
Tests whether the specified objects refer to different objects and
throws an exception if the two inputs refer to the same object.
The first object to compare. This is the value the test expects not
to match .
The second object to compare. This is the value produced by the code under test.
The message to include in the exception when
is the same as . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if refers to the same object
as .
Tests whether the specified values are equal and throws an exception
if the two values are not equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The type of values to compare.
The first value to compare. This is the value the tests expects.
The second value to compare. This is the value produced by the code under test.
Thrown if is not equal to .
Tests whether the specified values are equal and throws an exception
if the two values are not equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The type of values to compare.
The first value to compare. This is the value the tests expects.
The second value to compare. This is the value produced by the code under test.
The message to include in the exception when
is not equal to . The message is shown in
test results.
Thrown if is not equal to
.
Tests whether the specified values are equal and throws an exception
if the two values are not equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The type of values to compare.
The first value to compare. This is the value the tests expects.
The second value to compare. This is the value produced by the code under test.
The message to include in the exception when
is not equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not equal to
.
Tests whether the specified values are unequal and throws an exception
if the two values are equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The type of values to compare.
The first value to compare. This is the value the test expects not
to match .
The second value to compare. This is the value produced by the code under test.
Thrown if is equal to .
Tests whether the specified values are unequal and throws an exception
if the two values are equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The type of values to compare.
The first value to compare. This is the value the test expects not
to match .
The second value to compare. This is the value produced by the code under test.
The message to include in the exception when
is equal to . The message is shown in
test results.
Thrown if is equal to .
Tests whether the specified values are unequal and throws an exception
if the two values are equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The type of values to compare.
The first value to compare. This is the value the test expects not
to match .
The second value to compare. This is the value produced by the code under test.
The message to include in the exception when
is equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified objects are equal and throws an exception
if the two objects are not equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The first object to compare. This is the object the tests expects.
The second object to compare. This is the object produced by the code under test.
Thrown if is not equal to
.
Tests whether the specified objects are equal and throws an exception
if the two objects are not equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The first object to compare. This is the object the tests expects.
The second object to compare. This is the object produced by the code under test.
The message to include in the exception when
is not equal to . The message is shown in
test results.
Thrown if is not equal to
.
Tests whether the specified objects are equal and throws an exception
if the two objects are not equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The first object to compare. This is the object the tests expects.
The second object to compare. This is the object produced by the code under test.
The message to include in the exception when
is not equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not equal to
.
Tests whether the specified objects are unequal and throws an exception
if the two objects are equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The first object to compare. This is the value the test expects not
to match .
The second object to compare. This is the object produced by the code under test.
Thrown if is equal to .
Tests whether the specified objects are unequal and throws an exception
if the two objects are equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The first object to compare. This is the value the test expects not
to match .
The second object to compare. This is the object produced by the code under test.
The message to include in the exception when
is equal to . The message is shown in
test results.
Thrown if is equal to .
Tests whether the specified objects are unequal and throws an exception
if the two objects are equal. Different numeric types are treated
as unequal even if the logical values are equal. 42L is not equal to 42.
The first object to compare. This is the value the test expects not
to match .
The second object to compare. This is the object produced by the code under test.
The message to include in the exception when
is equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified floats are equal and throws an exception
if they are not equal.
The first float to compare. This is the float the tests expects.
The second float to compare. This is the float produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by more than .
Thrown if is not equal to
.
Tests whether the specified floats are equal and throws an exception
if they are not equal.
The first float to compare. This is the float the tests expects.
The second float to compare. This is the float produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by more than .
The message to include in the exception when
is different than by more than
. The message is shown in test results.
Thrown if is not equal to
.
Tests whether the specified floats are equal and throws an exception
if they are not equal.
The first float to compare. This is the float the tests expects.
The second float to compare. This is the float produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by more than .
The message to include in the exception when
is different than by more than
. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is not equal to
.
Tests whether the specified floats are unequal and throws an exception
if they are equal.
The first float to compare. This is the float the test expects not to
match .
The second float to compare. This is the float produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by at most .
Thrown if is equal to .
Tests whether the specified floats are unequal and throws an exception
if they are equal.
The first float to compare. This is the float the test expects not to
match .
The second float to compare. This is the float produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by at most .
The message to include in the exception when
is equal to or different by less than
. The message is shown in test results.
Thrown if is equal to .
Tests whether the specified floats are unequal and throws an exception
if they are equal.
The first float to compare. This is the float the test expects not to
match .
The second float to compare. This is the float produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by at most .
The message to include in the exception when
is equal to or different by less than
. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified doubles are equal and throws an exception
if they are not equal.
The first double to compare. This is the double the tests expects.
The second double to compare. This is the double produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by more than .
Thrown if is not equal to
.
Tests whether the specified doubles are equal and throws an exception
if they are not equal.
The first double to compare. This is the double the tests expects.
The second double to compare. This is the double produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by more than .
The message to include in the exception when
is different than by more than
. The message is shown in test results.
Thrown if is not equal to .
Tests whether the specified doubles are equal and throws an exception
if they are not equal.
The first double to compare. This is the double the tests expects.
The second double to compare. This is the double produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by more than .
The message to include in the exception when
is different than by more than
. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is not equal to .
Tests whether the specified doubles are unequal and throws an exception
if they are equal.
The first double to compare. This is the double the test expects not to
match .
The second double to compare. This is the double produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by at most .
Thrown if is equal to .
Tests whether the specified doubles are unequal and throws an exception
if they are equal.
The first double to compare. This is the double the test expects not to
match .
The second double to compare. This is the double produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by at most .
The message to include in the exception when
is equal to or different by less than
. The message is shown in test results.
Thrown if is equal to .
Tests whether the specified doubles are unequal and throws an exception
if they are equal.
The first double to compare. This is the double the test expects not to
match .
The second double to compare. This is the double produced by the code under test.
The required accuracy. An exception will be thrown only if
is different than
by at most .
The message to include in the exception when
is equal to or different by less than
. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified strings are equal and throws an exception
if they are not equal. The invariant culture is used for the comparison.
The first string to compare. This is the string the tests expects.
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
Thrown if is not equal to .
Tests whether the specified strings are equal and throws an exception
if they are not equal. The invariant culture is used for the comparison.
The first string to compare. This is the string the tests expects.
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
The message to include in the exception when
is not equal to . The message is shown in
test results.
Thrown if is not equal to .
Tests whether the specified strings are equal and throws an exception
if they are not equal. The invariant culture is used for the comparison.
The first string to compare. This is the string the tests expects.
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
The message to include in the exception when
is not equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not equal to .
Tests whether the specified strings are equal and throws an exception
if they are not equal.
The first string to compare. This is the string the tests expects.
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
A CultureInfo object that supplies culture-specific comparison information.
Thrown if is not equal to .
Tests whether the specified strings are equal and throws an exception
if they are not equal.
The first string to compare. This is the string the tests expects.
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
A CultureInfo object that supplies culture-specific comparison information.
The message to include in the exception when
is not equal to . The message is shown in
test results.
Thrown if is not equal to .
Tests whether the specified strings are equal and throws an exception
if they are not equal.
The first string to compare. This is the string the tests expects.
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
A CultureInfo object that supplies culture-specific comparison information.
The message to include in the exception when
is not equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not equal to .
Tests whether the specified strings are unequal and throws an exception
if they are equal. The invariant culture is used for the comparison.
The first string to compare. This is the string the test expects not to
match .
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
Thrown if is equal to .
Tests whether the specified strings are unequal and throws an exception
if they are equal. The invariant culture is used for the comparison.
The first string to compare. This is the string the test expects not to
match .
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
The message to include in the exception when
is equal to . The message is shown in
test results.
Thrown if is equal to .
Tests whether the specified strings are unequal and throws an exception
if they are equal. The invariant culture is used for the comparison.
The first string to compare. This is the string the test expects not to
match .
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
The message to include in the exception when
is equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified strings are unequal and throws an exception
if they are equal.
The first string to compare. This is the string the test expects not to
match .
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
A CultureInfo object that supplies culture-specific comparison information.
Thrown if is equal to .
Tests whether the specified strings are unequal and throws an exception
if they are equal.
The first string to compare. This is the string the test expects not to
match .
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
A CultureInfo object that supplies culture-specific comparison information.
The message to include in the exception when
is equal to . The message is shown in
test results.
Thrown if is equal to .
Tests whether the specified strings are unequal and throws an exception
if they are equal.
The first string to compare. This is the string the test expects not to
match .
The second string to compare. This is the string produced by the code under test.
A Boolean indicating a case-sensitive or insensitive comparison. (true
indicates a case-insensitive comparison.)
A CultureInfo object that supplies culture-specific comparison information.
The message to include in the exception when
is equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified object is an instance of the expected
type and throws an exception if the expected type is not in the
inheritance hierarchy of the object.
The object the test expects to be of the specified type.
The expected type of .
Thrown if is null or
is not in the inheritance hierarchy
of .
Tests whether the specified object is an instance of the expected
type and throws an exception if the expected type is not in the
inheritance hierarchy of the object.
The object the test expects to be of the specified type.
The expected type of .
The message to include in the exception when
is not an instance of . The message is
shown in test results.
Thrown if is null or
is not in the inheritance hierarchy
of .
Tests whether the specified object is an instance of the expected
type and throws an exception if the expected type is not in the
inheritance hierarchy of the object.
The object the test expects to be of the specified type.
The expected type of .
The message to include in the exception when
is not an instance of . The message is
shown in test results.
An array of parameters to use when formatting .
Thrown if is null or
is not in the inheritance hierarchy
of .
Tests whether the specified object is not an instance of the wrong
type and throws an exception if the specified type is in the
inheritance hierarchy of the object.
The object the test expects not to be of the specified type.
The type that should not be.
Thrown if is not null and
is in the inheritance hierarchy
of .
Tests whether the specified object is not an instance of the wrong
type and throws an exception if the specified type is in the
inheritance hierarchy of the object.
The object the test expects not to be of the specified type.
The type that should not be.
The message to include in the exception when
is an instance of . The message is shown
in test results.
Thrown if is not null and
is in the inheritance hierarchy
of .
Tests whether the specified object is not an instance of the wrong
type and throws an exception if the specified type is in the
inheritance hierarchy of the object.
The object the test expects not to be of the specified type.
The type that should not be.
The message to include in the exception when
is an instance of . The message is shown
in test results.
An array of parameters to use when formatting .
Thrown if is not null and
is in the inheritance hierarchy
of .
Throws an AssertFailedException.
Always thrown.
Throws an AssertFailedException.
The message to include in the exception. The message is shown in
test results.
Always thrown.
Throws an AssertFailedException.
The message to include in the exception. The message is shown in
test results.
An array of parameters to use when formatting .
Always thrown.
Throws an AssertInconclusiveException.
Always thrown.
Throws an AssertInconclusiveException.
The message to include in the exception. The message is shown in
test results.
Always thrown.
Throws an AssertInconclusiveException.
The message to include in the exception. The message is shown in
test results.
An array of parameters to use when formatting .
Always thrown.
Static equals overloads are used for comparing instances of two types for reference
equality. This method should not be used for comparison of two instances for
equality. This object will always throw with Assert.Fail. Please use
Assert.AreEqual and associated overloads in your unit tests.
Object A
Object B
False, always.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The exception that was thrown.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
The message to include in the exception when
does not throws exception of type .
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The exception that was thrown.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The exception that was thrown.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
The message to include in the exception when
does not throws exception of type .
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The exception that was thrown.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
The message to include in the exception when
does not throws exception of type .
An array of parameters to use when formatting .
Type of exception expected to be thrown.
Thrown if does not throw exception of type .
The exception that was thrown.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
The message to include in the exception when
does not throws exception of type .
An array of parameters to use when formatting .
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The exception that was thrown.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The executing the delegate.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
The message to include in the exception when
does not throws exception of type .
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The executing the delegate.
Tests whether the code specified by delegate throws exact given exception of type (and not of derived type)
and throws AssertFailedException if code does not throws exception or throws exception of type other than .
Delegate to code to be tested and which is expected to throw exception.
The message to include in the exception when
does not throws exception of type .
An array of parameters to use when formatting .
Type of exception expected to be thrown.
Thrown if does not throws exception of type .
The executing the delegate.
Replaces null characters ('\0') with "\\0".
The string to search.
The converted string with null characters replaced by "\\0".
This is only public and still present to preserve compatibility with the V1 framework.
Helper function that creates and throws an AssertionFailedException
name of the assertion throwing an exception
message describing conditions for assertion failure
The parameters.
Checks the parameter for valid conditions
The parameter.
The assertion Name.
parameter name
message for the invalid parameter exception
The parameters.
Safely converts an object to a string, handling null values and null characters.
Null values are converted to "(null)". Null characters are converted to "\\0".
The object to convert to a string.
The converted string.
The string assert.
Gets the singleton instance of the CollectionAssert functionality.
Users can use this to plug-in custom assertions through C# extension methods.
For instance, the signature of a custom assertion provider could be "public static void ContainsWords(this StringAssert customAssert, string value, ICollection substrings)"
Users could then use a syntax similar to the default assertions which in this case is "StringAssert.That.ContainsWords(value, substrings);"
More documentation is at "https://github.com/Microsoft/testfx-docs".
Tests whether the specified string contains the specified substring
and throws an exception if the substring does not occur within the
test string.
The string that is expected to contain .
The string expected to occur within .
Thrown if is not found in
.
Tests whether the specified string contains the specified substring
and throws an exception if the substring does not occur within the
test string.
The string that is expected to contain .
The string expected to occur within .
The comparison method to compare strings .
Thrown if is not found in
.
Tests whether the specified string contains the specified substring
and throws an exception if the substring does not occur within the
test string.
The string that is expected to contain .
The string expected to occur within .
The message to include in the exception when
is not in . The message is shown in
test results.
Thrown if is not found in
.
Tests whether the specified string contains the specified substring
and throws an exception if the substring does not occur within the
test string.
The string that is expected to contain .
The string expected to occur within .
The message to include in the exception when
is not in . The message is shown in
test results.
The comparison method to compare strings .
Thrown if is not found in
.
Tests whether the specified string contains the specified substring
and throws an exception if the substring does not occur within the
test string.
The string that is expected to contain .
The string expected to occur within .
The message to include in the exception when
is not in . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not found in
.
Tests whether the specified string contains the specified substring
and throws an exception if the substring does not occur within the
test string.
The string that is expected to contain .
The string expected to occur within .
The message to include in the exception when
is not in . The message is shown in
test results.
The comparison method to compare strings .
An array of parameters to use when formatting .
Thrown if is not found in
.
Tests whether the specified string begins with the specified substring
and throws an exception if the test string does not start with the
substring.
The string that is expected to begin with .
The string expected to be a prefix of .
Thrown if does not begin with
.
Tests whether the specified string begins with the specified substring
and throws an exception if the test string does not start with the
substring.
The string that is expected to begin with .
The string expected to be a prefix of .
The comparison method to compare strings .
Thrown if does not begin with
.
Tests whether the specified string begins with the specified substring
and throws an exception if the test string does not start with the
substring.
The string that is expected to begin with .
The string expected to be a prefix of .
The message to include in the exception when
does not begin with . The message is
shown in test results.
Thrown if does not begin with
.
Tests whether the specified string begins with the specified substring
and throws an exception if the test string does not start with the
substring.
The string that is expected to begin with .
The string expected to be a prefix of .
The message to include in the exception when
does not begin with . The message is
shown in test results.
An array of parameters to use when formatting .
Thrown if does not begin with
.
Tests whether the specified string begins with the specified substring
and throws an exception if the test string does not start with the
substring.
The string that is expected to begin with .
The string expected to be a prefix of .
The message to include in the exception when
does not begin with . The message is
shown in test results.
The comparison method to compare strings .
Thrown if does not begin with
.
Tests whether the specified string begins with the specified substring
and throws an exception if the test string does not start with the
substring.
The string that is expected to begin with .
The string expected to be a prefix of .
The message to include in the exception when
does not begin with . The message is
shown in test results.
The comparison method to compare strings .
An array of parameters to use when formatting .
Thrown if does not begin with
.
Tests whether the specified string ends with the specified substring
and throws an exception if the test string does not end with the
substring.
The string that is expected to end with .
The string expected to be a suffix of .
Thrown if does not end with
.
Tests whether the specified string ends with the specified substring
and throws an exception if the test string does not end with the
substring.
The string that is expected to end with .
The string expected to be a suffix of .
The comparison method to compare strings .
Thrown if does not end with
.
Tests whether the specified string ends with the specified substring
and throws an exception if the test string does not end with the
substring.
The string that is expected to end with .
The string expected to be a suffix of .
The message to include in the exception when
does not end with . The message is
shown in test results.
Thrown if does not end with
.
Tests whether the specified string ends with the specified substring
and throws an exception if the test string does not end with the
substring.
The string that is expected to end with .
The string expected to be a suffix of .
The message to include in the exception when
does not end with . The message is
shown in test results.
An array of parameters to use when formatting .
Thrown if does not end with
.
Tests whether the specified string ends with the specified substring
and throws an exception if the test string does not end with the
substring.
The string that is expected to end with .
The string expected to be a suffix of .
The message to include in the exception when
does not end with . The message is
shown in test results.
The comparison method to compare strings .
Thrown if does not end with
.
Tests whether the specified string ends with the specified substring
and throws an exception if the test string does not end with the
substring.
The string that is expected to end with .
The string expected to be a suffix of .
The message to include in the exception when
does not end with . The message is
shown in test results.
The comparison method to compare strings .
An array of parameters to use when formatting .
Thrown if does not end with
.
Tests whether the specified string matches a regular expression and
throws an exception if the string does not match the expression.
The string that is expected to match .
The regular expression that is
expected to match.
Thrown if does not match
.
Tests whether the specified string matches a regular expression and
throws an exception if the string does not match the expression.
The string that is expected to match .
The regular expression that is
expected to match.
The message to include in the exception when
does not match . The message is shown in
test results.
Thrown if does not match
.
Tests whether the specified string matches a regular expression and
throws an exception if the string does not match the expression.
The string that is expected to match .
The regular expression that is
expected to match.
The message to include in the exception when
does not match . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if does not match
.
Tests whether the specified string does not match a regular expression
and throws an exception if the string matches the expression.
The string that is expected not to match .
The regular expression that is
expected to not match.
Thrown if matches .
Tests whether the specified string does not match a regular expression
and throws an exception if the string matches the expression.
The string that is expected not to match .
The regular expression that is
expected to not match.
The message to include in the exception when
matches . The message is shown in test
results.
Thrown if matches .
Tests whether the specified string does not match a regular expression
and throws an exception if the string matches the expression.
The string that is expected not to match .
The regular expression that is
expected to not match.
The message to include in the exception when
matches . The message is shown in test
results.
An array of parameters to use when formatting .
Thrown if matches .
A collection of helper classes to test various conditions associated
with collections within unit tests. If the condition being tested is not
met, an exception is thrown.
Gets the singleton instance of the CollectionAssert functionality.
Users can use this to plug-in custom assertions through C# extension methods.
For instance, the signature of a custom assertion provider could be "public static void AreEqualUnordered(this CollectionAssert customAssert, ICollection expected, ICollection actual)"
Users could then use a syntax similar to the default assertions which in this case is "CollectionAssert.That.AreEqualUnordered(list1, list2);"
More documentation is at "https://github.com/Microsoft/testfx-docs".
Tests whether the specified collection contains the specified element
and throws an exception if the element is not in the collection.
The collection in which to search for the element.
The element that is expected to be in the collection.
Thrown if is not found in
.
Tests whether the specified collection contains the specified element
and throws an exception if the element is not in the collection.
The collection in which to search for the element.
The element that is expected to be in the collection.
The message to include in the exception when
is not in . The message is shown in
test results.
Thrown if is not found in
.
Tests whether the specified collection contains the specified element
and throws an exception if the element is not in the collection.
The collection in which to search for the element.
The element that is expected to be in the collection.
The message to include in the exception when
is not in . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not found in
.
Tests whether the specified collection does not contain the specified
element and throws an exception if the element is in the collection.
The collection in which to search for the element.
The element that is expected not to be in the collection.
Thrown if is found in
.
Tests whether the specified collection does not contain the specified
element and throws an exception if the element is in the collection.
The collection in which to search for the element.
The element that is expected not to be in the collection.
The message to include in the exception when
is in . The message is shown in test
results.
Thrown if is found in
.
Tests whether the specified collection does not contain the specified
element and throws an exception if the element is in the collection.
The collection in which to search for the element.
The element that is expected not to be in the collection.
The message to include in the exception when
is in . The message is shown in test
results.
An array of parameters to use when formatting .
Thrown if is found in
.
Tests whether all items in the specified collection are non-null and throws
an exception if any element is null.
The collection in which to search for null elements.
Thrown if a null element is found in .
Tests whether all items in the specified collection are non-null and throws
an exception if any element is null.
The collection in which to search for null elements.
The message to include in the exception when
contains a null element. The message is shown in test results.
Thrown if a null element is found in .
Tests whether all items in the specified collection are non-null and throws
an exception if any element is null.
The collection in which to search for null elements.
The message to include in the exception when
contains a null element. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if a null element is found in .
Tests whether all items in the specified collection are unique or not and
throws if any two elements in the collection are equal.
The collection in which to search for duplicate elements.
Thrown if a two or more equal elements are found in
.
Tests whether all items in the specified collection are unique or not and
throws if any two elements in the collection are equal.
The collection in which to search for duplicate elements.
The message to include in the exception when
contains at least one duplicate element. The message is shown in
test results.
Thrown if a two or more equal elements are found in
.
Tests whether all items in the specified collection are unique or not and
throws if any two elements in the collection are equal.
The collection in which to search for duplicate elements.
The message to include in the exception when
contains at least one duplicate element. The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if a two or more equal elements are found in
.
Tests whether one collection is a subset of another collection and
throws an exception if any element in the subset is not also in the
superset.
The collection expected to be a subset of .
The collection expected to be a superset of
Thrown if an element in is not found in
.
Tests whether one collection is a subset of another collection and
throws an exception if any element in the subset is not also in the
superset.
The collection expected to be a subset of .
The collection expected to be a superset of
The message to include in the exception when an element in
is not found in .
The message is shown in test results.
Thrown if an element in is not found in
.
Tests whether one collection is a subset of another collection and
throws an exception if any element in the subset is not also in the
superset.
The collection expected to be a subset of .
The collection expected to be a superset of
The message to include in the exception when an element in
is not found in .
The message is shown in test results.
An array of parameters to use when formatting .
Thrown if an element in is not found in
.
Tests whether one collection is not a subset of another collection and
throws an exception if all elements in the subset are also in the
superset.
The collection expected not to be a subset of .
The collection expected not to be a superset of
Thrown if every element in is also found in
.
Tests whether one collection is not a subset of another collection and
throws an exception if all elements in the subset are also in the
superset.
The collection expected not to be a subset of .
The collection expected not to be a superset of
The message to include in the exception when every element in
is also found in .
The message is shown in test results.
Thrown if every element in is also found in
.
Tests whether one collection is not a subset of another collection and
throws an exception if all elements in the subset are also in the
superset.
The collection expected not to be a subset of .
The collection expected not to be a superset of
The message to include in the exception when every element in
is also found in .
The message is shown in test results.
An array of parameters to use when formatting .
Thrown if every element in is also found in
.
Tests whether two collections contain the same elements and throws an
exception if either collection contains an element not in the other
collection.
The first collection to compare. This contains the elements the test
expects.
The second collection to compare. This is the collection produced by
the code under test.
Thrown if an element was found in one of the collections but not
the other.
Tests whether two collections contain the same elements and throws an
exception if either collection contains an element not in the other
collection.
The first collection to compare. This contains the elements the test
expects.
The second collection to compare. This is the collection produced by
the code under test.
The message to include in the exception when an element was found
in one of the collections but not the other. The message is shown
in test results.
Thrown if an element was found in one of the collections but not
the other.
Tests whether two collections contain the same elements and throws an
exception if either collection contains an element not in the other
collection.
The first collection to compare. This contains the elements the test
expects.
The second collection to compare. This is the collection produced by
the code under test.
The message to include in the exception when an element was found
in one of the collections but not the other. The message is shown
in test results.
An array of parameters to use when formatting .
Thrown if an element was found in one of the collections but not
the other.
Tests whether two collections contain the different elements and throws an
exception if the two collections contain identical elements without regard
to order.
The first collection to compare. This contains the elements the test
expects to be different than the actual collection.
The second collection to compare. This is the collection produced by
the code under test.
Thrown if the two collections contained the same elements, including
the same number of duplicate occurrences of each element.
Tests whether two collections contain the different elements and throws an
exception if the two collections contain identical elements without regard
to order.
The first collection to compare. This contains the elements the test
expects to be different than the actual collection.
The second collection to compare. This is the collection produced by
the code under test.
The message to include in the exception when
contains the same elements as . The message
is shown in test results.
Thrown if the two collections contained the same elements, including
the same number of duplicate occurrences of each element.
Tests whether two collections contain the different elements and throws an
exception if the two collections contain identical elements without regard
to order.
The first collection to compare. This contains the elements the test
expects to be different than the actual collection.
The second collection to compare. This is the collection produced by
the code under test.
The message to include in the exception when
contains the same elements as . The message
is shown in test results.
An array of parameters to use when formatting .
Thrown if the two collections contained the same elements, including
the same number of duplicate occurrences of each element.
Tests whether all elements in the specified collection are instances
of the expected type and throws an exception if the expected type is
not in the inheritance hierarchy of one or more of the elements.
The collection containing elements the test expects to be of the
specified type.
The expected type of each element of .
Thrown if an element in is null or
is not in the inheritance hierarchy
of an element in .
Tests whether all elements in the specified collection are instances
of the expected type and throws an exception if the expected type is
not in the inheritance hierarchy of one or more of the elements.
The collection containing elements the test expects to be of the
specified type.
The expected type of each element of .
The message to include in the exception when an element in
is not an instance of
. The message is shown in test results.
Thrown if an element in is null or
is not in the inheritance hierarchy
of an element in .
Tests whether all elements in the specified collection are instances
of the expected type and throws an exception if the expected type is
not in the inheritance hierarchy of one or more of the elements.
The collection containing elements the test expects to be of the
specified type.
The expected type of each element of .
The message to include in the exception when an element in
is not an instance of
. The message is shown in test results.
An array of parameters to use when formatting .
Thrown if an element in is null or
is not in the inheritance hierarchy
of an element in .
Tests whether the specified collections are equal and throws an exception
if the two collections are not equal. Equality is defined as having the same
elements in the same order and quantity. Whether two elements are the same
is checked using method.
Different references to the same value are considered equal.
The first collection to compare. This is the collection the tests expects.
The second collection to compare. This is the collection produced by the
code under test.
Thrown if is not equal to
.
Tests whether the specified collections are equal and throws an exception
if the two collections are not equal. Equality is defined as having the same
elements in the same order and quantity. Whether two elements are the same
is checked using method.
Different references to the same value are considered equal.
The first collection to compare. This is the collection the tests expects.
The second collection to compare. This is the collection produced by the
code under test.
The message to include in the exception when
is not equal to . The message is shown in
test results.
Thrown if is not equal to
.
Tests whether the specified collections are equal and throws an exception
if the two collections are not equal. Equality is defined as having the same
elements in the same order and quantity. Whether two elements are the same
is checked using method.
Different references to the same value are considered equal.
The first collection to compare. This is the collection the tests expects.
The second collection to compare. This is the collection produced by the
code under test.
The message to include in the exception when
is not equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not equal to
.
Tests whether the specified collections are unequal and throws an exception
if the two collections are equal. Equality is defined as having the same
elements in the same order and quantity. Whether two elements are the same
is checked using method.
Different references to the same value are considered equal.
The first collection to compare. This is the collection the tests expects
not to match .
The second collection to compare. This is the collection produced by the
code under test.
Thrown if is equal to .
Tests whether the specified collections are unequal and throws an exception
if the two collections are equal. Equality is defined as having the same
elements in the same order and quantity. Whether two elements are the same
is checked using method.
Different references to the same value are considered equal.
The first collection to compare. This is the collection the tests expects
not to match .
The second collection to compare. This is the collection produced by the
code under test.
The message to include in the exception when
is equal to . The message is shown in
test results.
Thrown if is equal to .
Tests whether the specified collections are unequal and throws an exception
if the two collections are equal. Equality is defined as having the same
elements in the same order and quantity. Whether two elements are the same
is checked using method.
Different references to the same value are considered equal.
The first collection to compare. This is the collection the tests expects
not to match .
The second collection to compare. This is the collection produced by the
code under test.
The message to include in the exception when
is equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Tests whether the specified collections are equal and throws an exception
if the two collections are not equal. Equality is defined as having the same
elements in the same order and quantity. Different references to the same
value are considered equal.
The first collection to compare. This is the collection the tests expects.
The second collection to compare. This is the collection produced by the
code under test.
The compare implementation to use when comparing elements of the collection.
Thrown if is not equal to
.
Tests whether the specified collections are equal and throws an exception
if the two collections are not equal. Equality is defined as having the same
elements in the same order and quantity. Different references to the same
value are considered equal.
The first collection to compare. This is the collection the tests expects.
The second collection to compare. This is the collection produced by the
code under test.
The compare implementation to use when comparing elements of the collection.
The message to include in the exception when
is not equal to . The message is shown in
test results.
Thrown if is not equal to
.
Tests whether the specified collections are equal and throws an exception
if the two collections are not equal. Equality is defined as having the same
elements in the same order and quantity. Different references to the same
value are considered equal.
The first collection to compare. This is the collection the tests expects.
The second collection to compare. This is the collection produced by the
code under test.
The compare implementation to use when comparing elements of the collection.
The message to include in the exception when
is not equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is not equal to
.
Tests whether the specified collections are unequal and throws an exception
if the two collections are equal. Equality is defined as having the same
elements in the same order and quantity. Different references to the same
value are considered equal.
The first collection to compare. This is the collection the tests expects
not to match .
The second collection to compare. This is the collection produced by the
code under test.
The compare implementation to use when comparing elements of the collection.
Thrown if is equal to .
Tests whether the specified collections are unequal and throws an exception
if the two collections are equal. Equality is defined as having the same
elements in the same order and quantity. Different references to the same
value are considered equal.
The first collection to compare. This is the collection the tests expects
not to match .
The second collection to compare. This is the collection produced by the
code under test.
The compare implementation to use when comparing elements of the collection.
The message to include in the exception when
is equal to . The message is shown in
test results.
Thrown if is equal to .
Tests whether the specified collections are unequal and throws an exception
if the two collections are equal. Equality is defined as having the same
elements in the same order and quantity. Different references to the same
value are considered equal.
The first collection to compare. This is the collection the tests expects
not to match .
The second collection to compare. This is the collection produced by the
code under test.
The compare implementation to use when comparing elements of the collection.
The message to include in the exception when
is equal to . The message is shown in
test results.
An array of parameters to use when formatting .
Thrown if is equal to .
Determines whether the first collection is a subset of the second
collection. If either set contains duplicate elements, the number
of occurrences of the element in the subset must be less than or
equal to the number of occurrences in the superset.
The collection the test expects to be contained in .
The collection the test expects to contain .
True if is a subset of
, false otherwise.
Constructs a dictionary containing the number of occurrences of each
element in the specified collection.
The collection to process.
The number of null elements in the collection.
A dictionary containing the number of occurrences of each element
in the specified collection.
Finds a mismatched element between the two collections. A mismatched
element is one that appears a different number of times in the
expected collection than it does in the actual collection. The
collections are assumed to be different non-null references with the
same number of elements. The caller is responsible for this level of
verification. If there is no mismatched element, the function returns
false and the out parameters should not be used.
The first collection to compare.
The second collection to compare.
The expected number of occurrences of
or 0 if there is no mismatched
element.
The actual number of occurrences of
or 0 if there is no mismatched
element.
The mismatched element (may be null) or null if there is no
mismatched element.
true if a mismatched element was found; false otherwise.
compares the objects using object.Equals
Base class for Framework Exceptions.
Initializes a new instance of the class.
Initializes a new instance of the class.
The message.
The exception.
Initializes a new instance of the class.
The message.
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Access string has invalid syntax..
Looks up a localized string similar to The expected collection contains {1} occurrence(s) of <{2}>. The actual collection contains {3} occurrence(s). {0}.
Looks up a localized string similar to Duplicate item found:<{1}>. {0}.
Looks up a localized string similar to Expected:<{1}>. Case is different for actual value:<{2}>. {0}.
Looks up a localized string similar to Expected a difference no greater than <{3}> between expected value <{1}> and actual value <{2}>. {0}.
Looks up a localized string similar to Expected:<{1} ({2})>. Actual:<{3} ({4})>. {0}.
Looks up a localized string similar to Expected:<{1}>. Actual:<{2}>. {0}.
Looks up a localized string similar to Expected a difference greater than <{3}> between expected value <{1}> and actual value <{2}>. {0}.
Looks up a localized string similar to Expected any value except:<{1}>. Actual:<{2}>. {0}.
Looks up a localized string similar to Do not pass value types to AreSame(). Values converted to Object will never be the same. Consider using AreEqual(). {0}.
Looks up a localized string similar to {0} failed. {1}.
Looks up a localized string similar to async TestMethod with UITestMethodAttribute are not supported. Either remove async or use TestMethodAttribute..
Looks up a localized string similar to UITestMethodAttribute.DispatcherQueue should not be null. To use UITestMethodAttribute within a WinUI Desktop App, remember to set the static UITestMethodAttribute.DispatcherQueue during the test initialization..
Looks up a localized string similar to Both collections are empty. {0}.
Looks up a localized string similar to Both collection contain same elements..
Looks up a localized string similar to Both collection references point to the same collection object. {0}.
Looks up a localized string similar to Both collections contain the same elements. {0}.
Looks up a localized string similar to {0}({1}).
Looks up a localized string similar to (null).
Looks up a localized string similar to (object).
Looks up a localized string similar to String '{0}' does not contain string '{1}'. {2}..
Looks up a localized string similar to {0} ({1}).
Looks up a localized string similar to Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead..
Looks up a localized string similar to Method {0} must match the expected signature: public static {1} {0}({2})..
Looks up a localized string similar to Property or method {0} on {1} returns empty IEnumerable<object[]>..
Looks up a localized string similar to Property or method {0} on {1} does not return IEnumerable<object[]>..
Looks up a localized string similar to Value returned by property or method {0} shouldn't be null..
Looks up a localized string similar to The number of elements in the collections do not match. Expected:<{1}>. Actual:<{2}>.{0}.
Looks up a localized string similar to Element at index {0} do not match..
Looks up a localized string similar to Element at index {1} is not of expected type. Expected type:<{2}>. Actual type:<{3}>.{0}.
Looks up a localized string similar to Element at index {1} is (null). Expected type:<{2}>.{0}.
Looks up a localized string similar to String '{0}' does not end with string '{1}'. {2}..
Looks up a localized string similar to Invalid argument- EqualsTester can't use nulls..
Looks up a localized string similar to Cannot convert object of type {0} to {1}..
Looks up a localized string similar to The internal object referenced is no longer valid..
Looks up a localized string similar to The parameter '{0}' is invalid. {1}..
Looks up a localized string similar to The property {0} has type {1}; expected type {2}..
Looks up a localized string similar to {0} Expected type:<{1}>. Actual type:<{2}>..
Looks up a localized string similar to String '{0}' does not match pattern '{1}'. {2}..
Looks up a localized string similar to Wrong Type:<{1}>. Actual type:<{2}>. {0}.
Looks up a localized string similar to String '{0}' matches pattern '{1}'. {2}..
Looks up a localized string similar to No test data source specified. Atleast one TestDataSource is required with DataTestMethodAttribute..
Looks up a localized string similar to No exception thrown. {1} exception was expected. {0}.
Looks up a localized string similar to The parameter '{0}' is invalid. The value cannot be null. {1}..
Looks up a localized string similar to Different number of elements..
Looks up a localized string similar to
The constructor with the specified signature could not be found. You might need to regenerate your private accessor,
or the member may be private and defined on a base class. If the latter is true, you need to pass the type
that defines the member into PrivateObject's constructor.
.
Looks up a localized string similar to
The member specified ({0}) could not be found. You might need to regenerate your private accessor,
or the member may be private and defined on a base class. If the latter is true, you need to pass the type
that defines the member into PrivateObject's constructor.
.
Looks up a localized string similar to String '{0}' does not start with string '{1}'. {2}..
Looks up a localized string similar to The expected exception type must be System.Exception or a type derived from System.Exception..
Looks up a localized string similar to (Failed to get the message for an exception of type {0} due to an exception.).
Looks up a localized string similar to Test method did not throw expected exception {0}. {1}.
Looks up a localized string similar to Test method did not throw an exception. An exception was expected by attribute {0} defined on the test method..
Looks up a localized string similar to Test method threw exception {0}, but exception {1} was expected. Exception message: {2}.
Looks up a localized string similar to Test method threw exception {0}, but exception {1} or a type derived from it was expected. Exception message: {2}.
Looks up a localized string similar to Threw exception {2}, but exception {1} was expected. {0}
Exception Message: {3}
Stack Trace: {4}.
unit test outcomes
Test was executed, but there were issues.
Issues may involve exceptions or failed assertions.
Test has completed, but we can't say if it passed or failed.
May be used for aborted tests.
Test was executed without any issues.
Test is currently executing.
There was a system error while we were trying to execute a test.
The test timed out.
Test was aborted by the user.
Test is in an unknown state
Test cannot be executed.
Provides helper functionality for the unit test framework
Gets the exception messages, including the messages for all inner exceptions
recursively
Exception to get messages for
string with error message information
Enumeration for timeouts, that can be used with the class.
The type of the enumeration must match
The infinite.
Enumeration for inheritance behavior, that can be used with both the class
and class.
Defines the behavior of the ClassInitialize and ClassCleanup methods of base classes.
The type of the enumeration must match
None.
Before each derived class.
The test class attribute.
Gets a test method attribute that enables running this test.
The test method attribute instance defined on this method.
The to be used to run this test.
Extensions can override this method to customize how all methods in a class are run.
The test method attribute.
Initializes a new instance of the class.
Initializes a new instance of the class.
Display Name for the Test Window
Gets display Name for the Test Window
Executes a test method.
The test method to execute.
An array of TestResult objects that represent the outcome(s) of the test.
Extensions can override this method to customize running a TestMethod.
Attribute for data driven test where data can be specified in-line.
The test initialize attribute.
The test cleanup attribute marks methods that are executed after every test marked with a .
The ignore attribute.
Initializes a new instance of the class.
Initializes a new instance of the class.
Message specifies reason for ignoring.
Gets the owner.
The test property attribute.
Initializes a new instance of the class.
The name.
The value.
Gets the name.
Gets the value.
The class initialize attribute.
Initializes a new instance of the class.
ClassInitializeAttribute
Initializes a new instance of the class.
ClassInitializeAttribute
Specifies the ClassInitialize Inheritance Behavior
Gets the Inheritance Behavior
The class cleanup attribute.
Initializes a new instance of the class.
ClassCleanupAttribute
Initializes a new instance of the class.
ClassCleanupAttribute
Specifies the ClassCleanup Inheritance Behavior
Gets the Inheritance Behavior
The assembly initialize attribute.
The assembly cleanup attribute.
Test Owner
Initializes a new instance of the class.
The owner.
Gets the owner.
Priority attribute; used to specify the priority of a unit test.
Initializes a new instance of the class.
The priority.
Gets the priority.
Description of the test
Initializes a new instance of the class to describe a test.
The description.
Gets the description of a test.
CSS Project Structure URI
Initializes a new instance of the class for CSS Project Structure URI.
The CSS Project Structure URI.
Gets the CSS Project Structure URI.
CSS Iteration URI
Initializes a new instance of the class for CSS Iteration URI.
The CSS Iteration URI.
Gets the CSS Iteration URI.
WorkItem attribute; used to specify a work item associated with this test.
Initializes a new instance of the class for the WorkItem Attribute.
The Id to a work item.
Gets the Id to a work item associated.
Timeout attribute; used to specify the timeout of a unit test.
Initializes a new instance of the class.
The timeout in milliseconds.
Initializes a new instance of the class with a preset timeout
The timeout
Gets the timeout in milliseconds.
TestResult object to be returned to adapter.
Initializes a new instance of the class.
Gets or sets the display name of the result. Useful when returning multiple results.
If null then Method name is used as DisplayName.
Gets or sets the outcome of the test execution.
Gets or sets the exception thrown when test is failed.
Gets or sets the output of the message logged by test code.
Gets or sets the output of the message logged by test code.
Gets or sets the debug traces by test code.
Gets or sets the debug traces by test code.
Gets or sets the execution id of the result.
Gets or sets the parent execution id of the result.
Gets or sets the inner results count of the result.
Gets or sets the duration of test execution.
Gets or sets the data row index in data source. Set only for results of individual
run of data row of a data driven test.
Gets or sets the return value of the test method. (Currently null always).
Gets or sets the result files attached by the test.
Specifies connection string, table name and row access method for data driven testing.
[DataSource("Provider=SQLOLEDB.1;Data Source=source;Integrated Security=SSPI;Initial Catalog=EqtCoverage;Persist Security Info=False", "MyTable")]
[DataSource("dataSourceNameFromConfigFile")]
The default provider name for DataSource.
The default data access method.
Initializes a new instance of the class. This instance will be initialized with a data provider, connection string, data table and data access method to access the data source.
Invariant data provider name, such as System.Data.SqlClient
Data provider specific connection string.
WARNING: The connection string can contain sensitive data (for example, a password).
The connection string is stored in plain text in source code and in the compiled assembly.
Restrict access to the source code and assembly to protect this sensitive information.
The name of the data table.
Specifies the order to access data.
Initializes a new instance of the class.This instance will be initialized with a connection string and table name.
Specify connection string and data table to access OLEDB data source.
Data provider specific connection string.
WARNING: The connection string can contain sensitive data (for example, a password).
The connection string is stored in plain text in source code and in the compiled assembly.
Restrict access to the source code and assembly to protect this sensitive information.
The name of the data table.
Initializes a new instance of the class. This instance will be initialized with a data provider and connection string associated with the setting name.
The name of a data source found in the <microsoft.visualstudio.qualitytools> section in the app.config file.
Gets a value representing the data provider of the data source.
The data provider name. If a data provider was not designated at object initialization, the default provider of System.Data.OleDb will be returned.
Gets a value representing the connection string for the data source.
Gets a value indicating the table name providing data.
Gets the method used to access the data source.
One of the values. If the is not initialized, this will return the default value .
Gets the name of a data source found in the <microsoft.visualstudio.qualitytools> section in the app.config file.
Specifies that null is allowed as an input even if the corresponding type disallows it.
Specifies that null is disallowed as an input even if the corresponding type allows it.
Specifies that an output may be null even if the corresponding type disallows it.
Specifies that an output will not be null even if the corresponding type allows it.
Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter may be null.
Gets the return value condition.
Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
Initializes the attribute with the specified return value condition.
The return value condition. If the method returns this value, the associated parameter will not be null.
Gets the return value condition.
Specifies that the output will be non-null if the named parameter is non-null.
Initializes the attribute with the associated parameter name.
The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
Gets the associated parameter name.
Applied to a method that will never return under any circumstance.
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
Initializes the attribute with the specified parameter value.
The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
the associated parameter matches this value.
Gets the condition parameter value.
Specifies that the method or property will ensure that the listed field and property members have not-null values.
Initializes the attribute with a field or property member.
The field or property member that is promised to be not-null.
Initializes the attribute with the list of field and property members.
The list of field and property members that are promised to be not-null.
Gets field or property member names.
Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
Initializes the attribute with the specified return value condition and a field or property member.
The return value condition. If the method returns this value, the associated parameter will not be null.
The field or property member that is promised to be not-null.
Initializes the attribute with the specified return value condition and list of field and property members.
The return value condition. If the method returns this value, the associated parameter will not be null.
The list of field and property members that are promised to be not-null.
Gets the return value condition.
Gets field or property member names.