diff --git a/build/InstallNugets.sh b/build/InstallNugets.sh index 666775f1..249ef1e9 100755 --- a/build/InstallNugets.sh +++ b/build/InstallNugets.sh @@ -1,5 +1,5 @@ wget https://nuget.org/nuget.exe BUILD_DIR=$(dirname -- $0) -mono nuget.exe install NUnit -Version 2.6.4 -OutputDirectory $BUILD_DIR/../deps -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory $BUILD_DIR/../deps -cp $BUILD_DIR/../deps/NUnit.2.6.4/lib/nunit.framework.* $BUILD_DIR/../deps/NUnit +mono nuget.exe install NUnit -Version 3.6.0 -OutputDirectory $BUILD_DIR/../deps +mono nuget.exe install NUnit.Runners -Version 3.6.0 -OutputDirectory $BUILD_DIR/../deps +cp $BUILD_DIR/../deps/NUnit.3.6.0/lib/nunit.framework.* $BUILD_DIR/../deps/NUnit diff --git a/deps/NUnit/nunit.framework.dll b/deps/NUnit/nunit.framework.dll index ed6550bb..a467965e 100644 Binary files a/deps/NUnit/nunit.framework.dll and b/deps/NUnit/nunit.framework.dll differ diff --git a/deps/NUnit/nunit.framework.xml b/deps/NUnit/nunit.framework.xml index 532d8286..178f06df 100644 --- a/deps/NUnit/nunit.framework.xml +++ b/deps/NUnit/nunit.framework.xml @@ -24,10961 +24,18789 @@ Target a suite of test cases - + - Delegate used by tests that execute code and - capture any thrown exception. + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. - + - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. + The default suite builder used by the test assembly builder. - + - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. + Initializes a new instance of the class. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Build a suite of tests from a provided assembly - - + The assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Build a suite of tests given the filename of an assembly - - + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + FrameworkController provides a facade for use in loading, browsing + and running tests without requiring a reference to the NUnit + framework. All calls are encapsulated in constructors for + this class and its nested classes, which only require the + types of the Common Type System as arguments. + + The controller supports four actions: Load, Explore, Count and Run. + They are intended to be called by a driver, which should allow for + proper sequencing of calls. Load must be called before any of the + other actions. The driver may support other actions, such as + reload on run, by combining these calls. - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + Construct a FrameworkController using the default builder and runner. - The message to initialize the with. + The AssemblyName or path to the test assembly + A prefix used for all test ids created under this controller. + A Dictionary of settings to use in loading and running the tests - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + Construct a FrameworkController using the default builder and runner. + The test assembly + A prefix used for all test ids created under this controller. + A Dictionary of settings to use in loading and running the tests - + - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - The message to initialize the with. - Arguments to be used in formatting the message + The full AssemblyName or the path to the test assembly + A prefix used for all test ids created under this controller. + A Dictionary of settings to use in loading and running the tests + The Type of the test runner + The Type of the test builder - + - Throws an with the message that is - passed in. This is used by the other Assert functions. + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - The message to initialize the with. + The test assembly + A prefix used for all test ids created under this controller. + A Dictionary of settings to use in loading and running the tests + The Type of the test runner + The Type of the test builder - + - Throws an . - This is used by the other Assert functions. + Gets the ITestAssemblyBuilder used by this controller instance. + The builder. - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. + Gets the ITestAssemblyRunner used by this controller instance. - The message to initialize the with. - Arguments to be used in formatting the message + The runner. - + - Throws an with the message that is - passed in. This causes the test to be reported as ignored. + Gets the AssemblyName or the path for which this FrameworkController was created - The message to initialize the with. - + - Throws an . - This causes the test to be reported as ignored. + Gets the Assembly for which this - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. + Gets a dictionary of settings for the FrameworkController - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. + Loads the tests in the assembly - The message to initialize the with. + - + - Throws an . - This causes the test to be reported as Inconclusive. + Returns info about the tests in an assembly + A string containing the XML representation of the filter to use + The XML result of exploring the tests - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Runs the tests in an assembly - The actual value to test - A Constraint to be applied + A string containing the XML representation of the filter to use + The XML result of the test run - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Runs the tests in an assembly synchronously reporting back the test results through the callback + or through the return value - The actual value to test - A Constraint to be applied - The message that will be displayed on failure + The callback that receives the test results + A string containing the XML representation of the filter to use + The XML result of the test run - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Runs the tests in an assembly asynchronously reporting back the test results through the callback - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message + The callback that receives the test results + A string containing the XML representation of the filter to use - + - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Stops the test run + + True to force the stop, false for a cooperative stop - + - Asserts that a condition is true. If the condition is false the method throws - an . + Counts the number of test cases in the loaded TestSuite - The evaluated condition - The message to display if the condition is false + A string containing the XML representation of the filter to use + The number of tests - + - Asserts that a condition is true. If the condition is false the method throws - an . + Inserts environment element - The evaluated condition + Target node + The new node - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Inserts settings element - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied + Target node + Settings dictionary + The new node - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + LoadTestsAction loads a test into the FrameworkController - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + LoadTestsAction loads the tests in an assembly. - The actual value to test - A Constraint to be applied + The controller. + The callback handler. - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + ExploreTestsAction returns info about the tests in an assembly - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Initializes a new instance of the class. - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message + The controller for which this action is being performed. + Filter used to control which tests are included (NYI) + The callback handler. - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Construct a CountsTestAction and perform the count of test cases. - The actual value to test - A Constraint to be applied + A FrameworkController holding the TestSuite whose cases are to be counted + A string containing the XML representation of the filter to use + A callback handler used to report results - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + RunTestsAction runs the loaded TestSuite held by the FrameworkController. - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Construct a RunTestsAction and run all tests in the loaded TestSuite. - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message + A FrameworkController holding the TestSuite to run + A string containing the XML representation of the filter to use + A callback handler used to report results - + - Verifies that a delegate throws a particular exception when called. + RunAsyncAction initiates an asynchronous test run, returning immediately - A constraint to be satisfied by the exception - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate throws a particular exception when called. + Construct a RunAsyncAction and run all tests in the loaded TestSuite. - A constraint to be satisfied by the exception - A TestDelegate - The message that will be displayed on failure + A FrameworkController holding the TestSuite to run + A string containing the XML representation of the filter to use + A callback handler used to report results - + - Verifies that a delegate throws a particular exception when called. + StopRunAction stops an ongoing run. - A constraint to be satisfied by the exception - A TestDelegate - + - Verifies that a delegate throws a particular exception when called. + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. - The exception Type expected - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The FrameworkController for which a run is to be stopped. + True the stop should be forced, false for a cooperative stop. + >A callback handler used to report results + A forced stop will cause threads and processes to be killed as needed. - + - Verifies that a delegate throws a particular exception when called. + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. - The exception Type expected - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Build a suite of tests from a provided assembly - The exception Type expected - A TestDelegate + The assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly - + - Verifies that a delegate throws a particular exception when called. + Build a suite of tests given the filename of an assembly - Type of the expected exception - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly - + - Verifies that a delegate throws a particular exception when called. + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. - Type of the expected exception - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Gets the tree of loaded tests, or null if + no tests have been loaded. - Type of the expected exception - A TestDelegate - + - Verifies that a delegate throws an exception when called - and returns it. + Gets the tree of test results, if the test + run is completed, otherwise null. - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate throws an exception when called - and returns it. + Indicates whether a test has been loaded - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception when called - and returns it. + Indicates whether a test is currently running - A TestDelegate - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Indicates whether a test run is complete - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. - The expected Exception Type - A TestDelegate - The message that will be displayed on failure + File name of the assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. - The expected Exception Type - A TestDelegate + The assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Count Test Cases using a filter - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The filter to apply + The number of test cases found - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. - The expected Exception Type - A TestDelegate - The message that will be displayed on failure + Interface to receive ITestListener notifications. + A test filter used to select tests to be run - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Run selected tests asynchronously, notifying the listener interface as it progresses. - The expected Exception Type - A TestDelegate + Interface to receive EventListener notifications. + A test filter used to select tests to be run - + - Verifies that a delegate does not throw an exception + Wait for the ongoing run to complete. - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + Time to wait in milliseconds + True if the run completed, otherwise false - + - Verifies that a delegate does not throw an exception. + Signal any test run that is in process to stop. Return without error if no test is running. - A TestDelegate - The message that will be displayed on failure + If true, kill any test-running threads - + - Verifies that a delegate does not throw an exception. + Implementation of ITestAssemblyRunner - A TestDelegate - + - Asserts that a condition is true. If the condition is false the method throws - an . + Initializes a new instance of the class. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The builder. - + - Asserts that a condition is true. If the condition is false the method throws - an . + Gets the default level of parallel execution (worker threads) - The evaluated condition - The message to display in case of failure - + - Asserts that a condition is true. If the condition is false the method throws - an . + The tree of tests that was loaded by the builder - The evaluated condition - + - Asserts that a condition is true. If the condition is false the method throws - an . + The test result, if a run has completed - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . + Indicates whether a test is loaded - The evaluated condition - The message to display in case of failure - + - Asserts that a condition is true. If the condition is false the method throws - an . + Indicates whether a test is running - The evaluated condition - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + Indicates whether a test run is complete + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure + Our settings, specified when loading the assembly + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + The top level WorkItem created for the assembly as a whole + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The TestExecutionContext for the top level WorkItem + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure + Loads the tests found in an Assembly + + File name of the assembly to load + Dictionary of option settings for loading the assembly + True if the load was successful - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Loads the tests found in an Assembly + + The assembly to load + Dictionary of option settings for loading the assembly + True if the load was successful - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Count Test Cases using a filter - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The filter to apply + The number of test cases found - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. - The object that is to be tested - The message to display in case of failure + Interface to receive EventListener notifications. + A test filter used to select tests to be run + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Run selected tests asynchronously, notifying the listener interface as it progresses. - The object that is to be tested + Interface to receive EventListener notifications. + A test filter used to select tests to be run + + RunAsync is a template method, calling various abstract and + virtual methods to be overridden by derived classes. + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Wait for the ongoing run to complete. - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + Time to wait in milliseconds + True if the run completed, otherwise false - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Signal any test run that is in process to stop. Return without error if no test is running. - The object that is to be tested - The message to display in case of failure + If true, kill any tests that are currently running - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Initiate the test run. - The object that is to be tested - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Create the initial TestExecutionContext used to run tests - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The ITestListener specified in the RunAsync call - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Handle the the Completed event for the top level work item - The object that is to be tested - The message to display in case of failure - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - The object that is to be tested - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Verifies that the first int is greater than the second + int. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Verifies that the first int is greater than the second + int. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two ints are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - - - Verifies that two ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - + - Verifies that two ints are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two longs are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two longs are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two longs are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two unsigned ints are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two unsigned ints are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two unsigned ints are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two unsigned longs are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two unsigned longs are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two unsigned longs are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two decimals are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two decimals are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two decimals are equal. If they are not, then an - is thrown. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The value that is expected - The actual value + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The value that is expected - The actual value - The message to display in case of failure + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The value that is expected - The actual value + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two ints are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two ints are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two ints are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two longs are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two longs are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two longs are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two unsigned ints are not equal. If they are equal, then an - is thrown. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be less + The second value, expected to be greater - + - Verifies that two unsigned ints are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two unsigned ints are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two unsigned longs are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two unsigned longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two unsigned longs are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two decimals are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two decimals are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two decimals are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two floats are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two floats are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two floats are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two doubles are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that two doubles are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value - The message to display in case of failure + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two doubles are not equal. If they are equal, then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The expected value - The actual value + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be greater + The second value, expected to be less - + - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The value that is expected - The actual value + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The value that is expected - The actual value + The first value, expected to be greater + The second value, expected to be less - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The expected object - The actual object + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The expected object - The actual object - The message to display in case of failure + The first value, expected to be less + The second value, expected to be greater - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The expected object - The actual object + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be less + The second value, expected to be greater - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The expected object - The actual object + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The expected object - The actual object + The first value, expected to be less + The second value, expected to be greater - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested - The message to display in case of failure + The first value, expected to be less + The second value, expected to be greater - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - + - Assert that a string is empty - that is equal to string.Empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The string to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - - + - Assert that a string is empty - that is equal to string.Empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The string to be tested + The first value, expected to be less + The second value, expected to be greater - + - Assert that an array, list or other collection is empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - An array, list or other collection implementing ICollection + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that an array, list or other collection is empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - An array, list or other collection implementing ICollection - The message to display in case of failure + The first value, expected to be less + The second value, expected to be greater - + - Assert that an array, list or other collection is empty + Asserts that a condition is true. If the condition is false the method throws + an . - An array, list or other collection implementing ICollection + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - + - Assert that a string is not empty - that is not equal to string.Empty + Asserts that a condition is true. If the condition is false the method throws + an . - The string to be tested + The evaluated condition The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that a string is not empty - that is not equal to string.Empty + Asserts that a condition is true. If the condition is false the method throws + an . - The string to be tested - The message to display in case of failure + The evaluated condition - + - Assert that a string is not empty - that is not equal to string.Empty + Asserts that a condition is true. If the condition is false the method throws + an . - The string to be tested + The evaluated condition - + - Assert that an array, list or other collection is not empty + Asserts that a condition is true. If the condition is false the method throws + an . - An array, list or other collection implementing ICollection + The evaluated condition The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that an array, list or other collection is not empty + Asserts that a condition is true. If the condition is false the method throws + an . - An array, list or other collection implementing ICollection + The evaluated condition The message to display in case of failure + Array of objects to be used in formatting the message - + - Assert that an array, list or other collection is not empty + Asserts that a condition is true. If the condition is false the method throws + an . - An array, list or other collection implementing ICollection + The evaluated condition - + - Assert that a string is either null or equal to string.Empty + Asserts that a condition is true. If the condition is false the method throws + an . - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The evaluated condition - + - Assert that a string is either null or equal to string.Empty - - The string to be tested + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition The message to display in case of failure + Array of objects to be used in formatting the message - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - - + - Assert that a string is not null or empty - - The string to be tested + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - Assert that a string is not null or empty - - The string to be tested + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - Asserts that an object may be assigned a value of a given Type. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The expected Type. - The object under examination + The object that is to be tested The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object may be assigned a value of a given Type. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The expected Type. - The object under examination + The object that is to be tested - + - Asserts that an object may not be assigned a value of a given Type. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The expected Type. - The object under examination + The object that is to be tested The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object may not be assigned a value of a given Type. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The expected Type. - The object under examination - The message to display in case of failure + The object that is to be tested - + - Asserts that an object may not be assigned a value of a given Type. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected Type. - The object under examination + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object may not be assigned a value of a given Type. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message + The object that is to be tested - + - Asserts that an object may not be assigned a value of a given Type. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected Type. - The object under examination + The object that is to be tested The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object may not be assigned a value of a given Type. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected Type. - The object under examination + The object that is to be tested - + - Asserts that an object is an instance of a given type. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The expected Type - The object being examined + The value that is to be tested The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object is an instance of a given type. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The expected Type - The object being examined - The message to display in case of failure + The value that is to be tested - + - Asserts that an object is an instance of a given type. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The expected Type - The object being examined + The value that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object is an instance of a given type. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The value that is to be tested - + - Asserts that an object is an instance of a given type. + Assert that a string is empty - that is equal to string.Empty - The expected Type - The object being examined + The string to be tested The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object is an instance of a given type. + Assert that a string is empty - that is equal to string.Empty - The expected Type - The object being examined + The string to be tested - + - Asserts that an object is an instance of a given type. + Assert that an array, list or other collection is empty - The expected Type - The object being examined + An array, list or other collection implementing ICollection The message to display in case of failure Array of objects to be used in formatting the message - + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing ICollection + + - Asserts that an object is an instance of a given type. + Assert that a string is not empty - that is not equal to string.Empty - The expected Type - The object being examined + The string to be tested The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object is an instance of a given type. + Assert that a string is not empty - that is not equal to string.Empty - The expected Type - The object being examined + The string to be tested - + - Asserts that an object is not an instance of a given type. + Assert that an array, list or other collection is not empty - The expected Type - The object being examined + An array, list or other collection implementing ICollection The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Assert that an array, list or other collection is not empty - The expected Type - The object being examined - The message to display in case of failure + An array, list or other collection implementing ICollection - + - Asserts that an object is not an instance of a given type. + Asserts that an int is zero. - The expected Type - The object being examined + The number to be examined - + - Asserts that an object is not an instance of a given type. + Asserts that an int is zero. - The expected Type - The object being examined + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Asserts that an unsigned int is zero. - The expected Type - The object being examined + The number to be examined + + + + Asserts that an unsigned int is zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Asserts that a Long is zero. - The expected Type - The object being examined + The number to be examined - + - Asserts that an object is not an instance of a given type. + Asserts that a Long is zero. - The expected Type - The object being examined + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Asserts that an unsigned Long is zero. - The expected Type - The object being examined + The number to be examined + + + + Asserts that an unsigned Long is zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Asserts that a decimal is zero. - The expected Type - The object being examined + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a decimal is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a double is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that a double is zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a float is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a float is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an int is not zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that an int is not zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned int is not zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned int is not zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a Long is not zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that a Long is not zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned Long is not zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned Long is not zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a decimal is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that a decimal is zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a double is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a double is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a float is zero. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that a float is zero. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an int is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an int is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned int is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that an unsigned int is negative. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a Long is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a Long is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned Long is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + + + + Asserts that an unsigned Long is negative. + + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a decimal is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a decimal is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a double is negative. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The number to be examined - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Asserts that a double is negative. - The first value, expected to be greater - The second value, expected to be less + The number to be examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a float is negative. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a float is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that an int is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that an int is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned int is negative. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned int is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a Long is negative. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a Long is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned Long is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that an unsigned Long is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a decimal is negative. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a decimal is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a double is negative. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a double is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a float is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Asserts that a float is negative. - The first value, expected to be less - The second value, expected to be greater + The number to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + DO NOT USE! Use Assert.AreEqual(...) instead. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - The first value, expected to be less - The second value, expected to be greater + + - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + + - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The message to initialize the with. + Arguments to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. - The first value, expected to be less - The second value, expected to be greater + The message to initialize the with. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The message to initialize the with. + Arguments to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Throws an with the message that is + passed in. This is used by the other Assert functions. - The first value, expected to be less - The second value, expected to be greater + The message to initialize the with. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Throws an . + This is used by the other Assert functions. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Issues a warning using the message and arguments provided. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The message to display. + Arguments to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Issues a warning using the message provided. - The first value, expected to be greater - The second value, expected to be less + The message to display. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The message to initialize the with. + Arguments to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Throws an with the message that is + passed in. This causes the test to be reported as ignored. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The message to initialize the with. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Throws an . + This causes the test to be reported as ignored. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. - The first value, expected to be greater - The second value, expected to be less + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws an with the message that is + passed in. This causes the test to be reported as inconclusive. + + The message to initialize the with. + + + + Throws an . + This causes the test to be reported as Inconclusive. + + + + + Asserts that an object is contained in a collection. + + The expected object + The collection to be examined The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that an object is contained in a collection. - The first value, expected to be greater - The second value, expected to be less + The expected object + The collection to be examined + + + + Wraps code containing a series of assertions, which should all + be executed, even if they fail. Failed results are saved and + reported at the end of the code block. + + A TestDelegate to be executed in Multiple Assertion mode. + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. - The first value, expected to be greater - The second value, expected to be less + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. - The first value, expected to be greater - The second value, expected to be less + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. - The first value, expected to be greater - The second value, expected to be less + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + + + + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. + + The value that is expected + The actual value The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. - The first value, expected to be greater - The second value, expected to be less + The value that is expected + The actual value - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. - The first value, expected to be greater - The second value, expected to be less + The value that is expected + The actual value The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. - The first value, expected to be greater - The second value, expected to be less + The value that is expected + The actual value + + + + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + + The expected object + The actual object The message to display in case of failure + Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that two objects refer to the same object. If they + are not the same an is thrown. - The first value, expected to be greater - The second value, expected to be less + The expected object + The actual object - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. - The first value, expected to be greater - The second value, expected to be less + The expected object + The actual object + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. + + The expected object + The actual object + + + + Helper for Assert.AreEqual(double expected, double actual, ...) + allowing code generation to work consistently. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual The message to display in case of failure Array of objects to be used in formatting the message - + + + Verifies that an async delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + + + + Verifies that an async delegate throws a particular exception when called. + + The exception Type expected + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate throws a particular exception when called. + + The exception Type expected + A TestDelegate + + + + Verifies that an async delegate throws a particular exception when called. + + Type of the expected exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate throws a particular exception when called. + + Type of the expected exception + A TestDelegate + + + + Verifies that an async delegate throws an exception when called + and returns it. + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate throws an exception when called + and returns it. + + A TestDelegate + + + + Verifies that an async delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + + + + Verifies that an async delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + A TestDelegate + + + + Verifies that an async delegate does not throw an exception + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that an async delegate does not throw an exception. + + A TestDelegate + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + + + + Verifies that a delegate throws a particular exception when called. + + The exception Type expected + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + The exception Type expected + A TestDelegate + + + + Verifies that a delegate throws a particular exception when called. + + Type of the expected exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + Type of the expected exception + A TestDelegate + + + + Verifies that a delegate throws an exception when called + and returns it. + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws an exception when called + and returns it. + + A TestDelegate + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + A TestDelegate + + + + Verifies that a delegate does not throw an exception + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate does not throw an exception. + + A TestDelegate + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + A function to build the message included with the Exception + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + A function to build the message included with the Exception + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + A function to build the message included with the Exception + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + A function to build the message included with the Exception + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The Type being compared. + The actual value to test + A Constraint to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The Type being compared. + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The Type being compared. + The actual value to test + A Constraint expression to be applied + A function to build the message included with the Exception + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + + This method is provided for use by VB developers needing to test + the value of properties with private setters. + + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + Delegate used by tests that execute code and + capture any thrown exception. + + + + + Delegate used by tests that execute async code and + capture any thrown exception. + + + + + AssertionHelper is an optional base class for user tests, + allowing the use of shorter ids for constraints and + asserts and avoiding conflict with the definition of + , from which it inherits much of its + behavior, in certain mock object frameworks. + + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to . + + The evaluated condition + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Returns a ListMapper based on a collection. + + The original collection + + + + + The NonTestAssemblyAttribute may be used by third-party frameworks + or other software that references the nunit framework but does not + contain tests. Applying the attribute indicates that the assembly + is not a test assembly and may prevent errors if certain runners + attempt to load the assembly. Note that recognition of the attribute + depends on each individual runner. + + + + + Provides static methods to express conditions + that must be met for the test to succeed. If + any test fails, a warning is issued. + + + + + DO NOT USE! + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + The left object. + The right object. + Not applicable + + + + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + The left object. + The right object. + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + A function to build the message included with the Exception + + + + Asserts that a condition is true. If the condition is false a warning is issued. + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false a warning is issued. + + The evaluated condition + + + + Asserts that a condition is true. If the condition is false a warning is issued. + + The evaluated condition + A function to build the message included with the Exception + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + A function to build the message included with the Exception + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + The actual value to test + A Constraint to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + The actual value to test + A Constraint to be applied + A function to build the message included with the Exception + + + + Apply a constraint to an actual value, succeeding if the constraint + fails and issuing a warning on success. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + fails and issuing a warning on success. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + fails and issuing a warning on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + A function to build the message included with the Exception + + + + Asserts that a condition is true. If the condition is false a warning is issued. + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false a warning is issued. + + The evaluated condition + + + + Asserts that a condition is true. If the condition is false a warning is issued. + + The evaluated condition + A function to build the message included with the Exception + + + + Asserts that a condition is false. If the condition is true a warning is issued. + + A lambda that returns a Boolean + The message to display if the condition is true + Arguments to be used in formatting the message + + + + Asserts that a condition is false. If the condition is true a warning is issued. + + A lambda that returns a Boolean + + + + Asserts that a condition is false. If the condition is true a warning is issued. + + A lambda that returns a Boolean + A function to build the message included with the Exception + + + + Apply a constraint to an actual value, succeeding if the constraint + fails and issuing a warning if it succeeds. + + The Type being compared. + The actual value to test + A Constraint to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + fails and issuing a warning if it succeeds. + + The Type being compared. + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and issuing a warning on failure. + + The Type being compared. + The actual value to test + A Constraint to be applied + A function to build the message included with the Exception + + + + Provides static methods to express the assumptions + that must be met for a test to give a meaningful + result. If an assumption is not met, the test + should produce an inconclusive result. + + + + + DO NOT USE! + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + The left object. + The right object. + Not applicable + + + + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + The left object. + The right object. + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + The Type being compared. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + A function to build the message included with the Exception + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the + method throws an . + + The evaluated condition + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + A function to build the message included with the Exception + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + A lambda that returns a Boolean + A function to build the message included with the Exception + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + The Type being compared. + The actual value to test + A Constraint to be applied + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + The Type being compared. + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + The Type being compared. + The actual value to test + A Constraint to be applied + A function to build the message included with the Exception + + + + Marks a test that must run in a particular threading apartment state, causing it + to run in a separate thread if necessary. + + + + + Construct an ApartmentAttribute + + The apartment state that this test must be run under. You must pass in a valid apartment state. + + + + Provides the Author of a test or test fixture. + + + + + Initializes a new instance of the class. + + The name of the author. + + + + Initializes a new instance of the class. + + The name of the author. + The email address of the author. + + + + Attribute used to apply a category to a test + + + + + The name of the category + + + + + Construct attribute for a given category based on + a name. The name may not contain the characters ',', + '+', '-' or '!'. However, this is not checked in the + constructor since it would cause an error to arise at + as the test was loaded without giving a clear indication + of where the problem is located. The error is handled + in NUnitFramework.cs by marking the test as not + runnable. + + The name of the category + + + + Protected constructor uses the Type name as the name + of the category. + + + + + The name of the category + + + + + Modifies a test by adding a category to it. + + The test to modify + + + + Marks a test to use a combinatorial join of any argument + data provided. Since this is the default, the attribute is + optional. + + + + + Default constructor + + + + + Marks a test to use a particular CombiningStrategy to join + any parameter data provided. Since this is the default, the + attribute is optional. + + + + + Construct a CombiningStrategyAttribute incorporating an + ICombiningStrategy and an IParameterDataProvider. + + Combining strategy to be used in combining data + An IParameterDataProvider to supply data + + + + Construct a CombiningStrategyAttribute incorporating an object + that implements ICombiningStrategy and an IParameterDataProvider. + This constructor is provided for CLS compliance. + + Combining strategy to be used in combining data + An IParameterDataProvider to supply data + + + + Construct one or more TestMethods from a given MethodInfo, + using available parameter data. + + The MethodInfo for which tests are to be constructed. + The suite to which the tests will be added. + One or more TestMethods + + + + Modify the test by adding the name of the combining strategy + to the properties. + + The test to modify + + + + CultureAttribute is used to mark a test fixture or an + individual method as applying to a particular Culture only. + + + + + Constructor with no cultures specified, for use + with named property syntax. + + + + + Constructor taking one or more cultures + + Comma-deliminted list of cultures + + + + Causes a test to be skipped if this CultureAttribute is not satisfied. + + The test to modify + + + + Tests to determine if the current culture is supported + based on the properties of this attribute. + + True, if the current culture is supported + + + + Test to determine if the a particular culture or comma- + delimited set of cultures is in use. + + Name of the culture or comma-separated list of culture ids + True if the culture is in use on the system + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + The abstract base class for all data-providing attributes + defined by NUnit. Used to select all data sources for a + method, class or parameter. + + + + + Default constructor + + + + + Used to mark a field for use as a datapoint when executing a theory + within the same fixture that requires an argument of the field's Type. + + + + + Used to mark a field, property or method providing a set of datapoints to + be used in executing any theories within the same fixture that require an + argument of the Type provided. The data source may provide an array of + the required Type or an . + Synonymous with DatapointSourceAttribute. + + + + + Used to mark a field, property or method providing a set of datapoints to + be used in executing any theories within the same fixture that require an + argument of the Type provided. The data source may provide an array of + the required Type or an . + Synonymous with DatapointsAttribute. + + + + + Attribute used to provide descriptive text about a + test case or fixture. + + + + + Construct a description Attribute + + The text of the description + + + + ExplicitAttribute marks a test or test fixture so that it will + only be run if explicitly executed from the gui or command line + or if it is included by use of a filter. The test will not be + run simply because an enclosing suite is run. + + + + + Default constructor + + + + + Constructor with a reason + + The reason test is marked explicit + + + + Modifies a test by marking it as explicit. + + The test to modify + + + + Attribute used to mark a test that is to be ignored. + Ignored tests result in a warning message when the + tests are run. + + + + + Constructs the attribute giving a reason for ignoring the test + + The reason for ignoring the test + + + + The date in the future to stop ignoring the test as a string in UTC time. + For example for a date and time, "2014-12-25 08:10:00Z" or for just a date, + "2014-12-25". If just a date is given, the Ignore will expire at midnight UTC. + + + Once the ignore until date has passed, the test will be marked + as runnable. Tests with an ignore until date will have an IgnoreUntilDate + property set which will appear in the test results. + + The string does not contain a valid string representation of a date and time. + + + + Modifies a test by marking it as Ignored. + + The test to modify + + + + Abstract base for Attributes that are used to include tests + in the test run based on environmental settings. + + + + + Constructor with no included items specified, for use + with named property syntax. + + + + + Constructor taking one or more included items + + Comma-delimited list of included items + + + + Name of the item that is needed in order for + a test to run. Multiple items may be given, + separated by a comma. + + + + + Name of the item to be excluded. Multiple items + may be given, separated by a comma. + + + + + The reason for including or excluding the test + + + + + SingleThreadedAttribute applies to a test fixture and indicates + that all the child tests must be run on the same thread as the + OneTimeSetUp and OneTimeTearDown. It sets a flag in the + TestExecutionContext and forces all tests to be run sequentially + on the current thread. Any ParallelScope setting is ignored. + + + + + Apply changes to the TestExecutionContext + + The TestExecutionContext + + + + TestAssemblyDirectoryResolveAttribute is used to mark a test assembly as needing a + special assembly resolution hook that will explicitly search the test assembly's + directory for dependent assemblies. This works around a conflict between mixed-mode + assembly initialization and tests running in their own AppDomain in some cases. + + + + + LevelOfParallelismAttribute is used to set the number of worker threads + that may be allocated by the framework for running tests. + + + + + Construct a LevelOfParallelismAttribute. + + The number of worker threads to be created by the framework. + + + + Summary description for MaxTimeAttribute. + + + + + Construct a MaxTimeAttribute, given a time in milliseconds. + + The maximum elapsed time in milliseconds + + + + The abstract base class for all custom attributes defined by NUnit. + + + + + Default constructor + + + + + Attribute used to identify a method that is called once + to perform setup before any child tests are run. + + + + + Attribute used to identify a method that is called once + after all the child tests have run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + Defines the order that the test will run in + + + + + Defines the order that the test will run in + + + + + Defines the order that the test will run in + + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + Marks a test to use a pairwise join of any argument + data provided. Arguments will be combined in such a + way that all possible pairs of arguments are used. + + + + + Default constructor + + + + + ParallelizableAttribute is used to mark tests that may be run in parallel. + + + + + Construct a ParallelizableAttribute using default ParallelScope.Self. + + + + + Construct a ParallelizableAttribute with a specified scope. + + The ParallelScope associated with this attribute. + + + + Modify the context to be used for child tests + + The current TestExecutionContext + + + + The ParallelScope enumeration permits specifying the degree to + which a test and its descendants may be run in parallel. + + + + + No Parallelism is permitted + + + + + The test itself may be run in parallel with others at the same level + + + + + Descendants of the test may be run in parallel with one another + + + + + Descendants of the test down to the level of TestFixtures may be run in parallel + + + + + PlatformAttribute is used to mark a test fixture or an + individual method as applying to a particular platform only. + + + + + Constructor with no platforms specified, for use + with named property syntax. + + + + + Constructor taking one or more platforms + + Comma-delimited list of platforms + + + + Causes a test to be skipped if this PlatformAttribute is not satisfied. + + The test to modify + + + + PropertyAttribute is used to attach information to a test as a name/value pair.. + + + + + Construct a PropertyAttribute with a name and string value + + The name of the property + The property value + + + + Construct a PropertyAttribute with a name and int value + + The name of the property + The property value + + + + Construct a PropertyAttribute with a name and double value + + The name of the property + The property value + + + + Constructor for derived classes that set the + property dictionary directly. + + + + + Constructor for use by derived classes that use the + name of the type as the property name. Derived classes + must ensure that the Type of the property value is + a standard type supported by the BCL. Any custom + types will cause a serialization Exception when + in the client. + + + + + Gets the property dictionary for this attribute + + + + + Modifies a test by adding properties to it. + + The test to modify + + + + RandomAttribute is used to supply a set of random _values + to a single parameter of a parameterized test. + + + + + Construct a random set of values appropriate for the Type of the + parameter on which the attribute appears, specifying only the count. + + + + + + Construct a set of ints within a specified range + + + + + Construct a set of unsigned ints within a specified range + + + + + Construct a set of longs within a specified range + + + + + Construct a set of unsigned longs within a specified range + + + + + Construct a set of shorts within a specified range + + + + + Construct a set of unsigned shorts within a specified range + + + + + Construct a set of doubles within a specified range + + + + + Construct a set of floats within a specified range + + + + + Construct a set of bytes within a specified range + + + + + Construct a set of sbytes within a specified range + + + + + Get the collection of _values to be used as arguments. + + + + + RangeAttribute is used to supply a range of _values to an + individual parameter of a parameterized test. + + + + + Construct a range of ints using default step of 1 + + + + + + + Construct a range of ints specifying the step size + + + + + + + + Construct a range of unsigned ints using default step of 1 + + + + + + + Construct a range of unsigned ints specifying the step size + + + + + + + + Construct a range of longs using a default step of 1 + + + + + + + Construct a range of longs + + + + + + + + Construct a range of unsigned longs using default step of 1 + + + + + + + Construct a range of unsigned longs specifying the step size + + + + + + + + Construct a range of doubles + + + + + + + + Construct a range of floats + + + + + + + + RepeatAttribute may be applied to test case in order + to run it multiple times. + + + + + Construct a RepeatAttribute + + The number of times to run the test + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + The test command for the RepeatAttribute + + + + + Initializes a new instance of the class. + + The inner command. + The number of repetitions + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + Marks a test that must run in the MTA, causing it + to run in a separate thread if necessary. + + On methods, you may also use MTAThreadAttribute + to serve the same purpose. + + + + + Construct a RequiresMTAAttribute + + + + + Marks a test that must run in the STA, causing it + to run in a separate thread if necessary. + + + + + Construct a RequiresSTAAttribute + + + + + Marks a test that must run on a separate thread. + + + + + Construct a RequiresThreadAttribute + + + + + Construct a RequiresThreadAttribute, specifying the apartment + + + + + RepeatAttribute may be applied to test case in order + to run it multiple times. + + + + + Construct a RepeatAttribute + + The number of times to run the test + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + The test command for the RetryAttribute + + + + + Initializes a new instance of the class. + + The inner command. + The number of repetitions + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + Marks a test to use a Sequential join of any argument + data provided. Arguments will be combined into test cases, + taking the next value of each argument until all are used. + + + + + Default constructor + + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + SetUpFixtureAttribute is used to identify a SetUpFixture + + + + + Build a SetUpFixture from type provided. Normally called for a Type + on which the attribute has been placed. + + The type info of the fixture to be used. + A SetUpFixture object as a TestSuite. + + + + Attribute used to identify a method that is called + immediately after each test is run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + Provide actions to execute before and after tests. + + + + + Executed before each test is run + + The test that is going to be run. + + + + Executed after each test is run + + The test that has just been run. + + + + Provides the target for the action attribute + + + + + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. + + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + public void TestDescriptionMethod() + {} + } + + + + + + Descriptive text for this test + + + + + The author of this test + + + + + The type that this test is testing + + + + + Modifies a test by adding a description, if not already set. + + The test to modify + + + + Gets or sets the expected result. + + The result. + + + + Returns true if an expected result has been set + + + + + Construct a TestMethod from a given method. + + The method for which a test is to be constructed. + The suite to which the test will be added. + A TestMethod + + + + TestCaseAttribute is used to mark parameterized test cases + and provide them with their arguments. + + + + + Construct a TestCaseAttribute with a list of arguments. + This constructor is not CLS-Compliant + + + + + + Construct a TestCaseAttribute with a single argument + + + + + + Construct a TestCaseAttribute with a two arguments + + + + + + + Construct a TestCaseAttribute with a three arguments + + + + + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the RunState of this test case. + + + + + Gets the list of arguments to a test case + + + + + Gets the properties of the test case + + + + + Gets or sets the expected result. + + The result. + + + + Returns true if the expected result has been set + + + + + Gets or sets the description. + + The description. + + + + The author of this test + + + + + The type that this test is testing + + + + + Gets or sets the reason for ignoring the test + + + + + Gets or sets a value indicating whether this is explicit. + + + true if explicit; otherwise, false. + + + + + Gets or sets the reason for not running the test. + + The reason. + + + + Gets or sets the ignore reason. When set to a non-null + non-empty value, the test is marked as ignored. + + The ignore reason. + + + + Comma-delimited list of platforms to run the test for + + + + + Comma-delimited list of platforms to not run the test for + + + + + Gets and sets the category for this test case. + May be a comma-separated list of categories. + + + + + Performs several special conversions allowed by NUnit in order to + permit arguments with types that cannot be used in the constructor + of an Attribute such as TestCaseAttribute or to simplify their use. + + The arguments to be converted + The ParameterInfo array for the method + + + + Construct one or more TestMethods from a given MethodInfo, + using available parameter data. + + The MethodInfo for which tests are to be constructed. + The suite to which the tests will be added. + One or more TestMethods + + + + TestCaseSourceAttribute indicates the source to be used to + provide test cases for a test method. + + + + + Construct with the name of the method, property or field that will provide data + + The name of a static method, property or field that will provide data. + + + + Construct with a Type and name + + The Type that will provide data + The name of a static method, property or field that will provide data. + A set of parameters passed to the method, works only if the Source Name is a method. + If the source name is a field or property has no effect. + + + + Construct with a Type and name + + The Type that will provide data + The name of a static method, property or field that will provide data. + + + + Construct with a name + + The name of a static method, property or field that will provide data. + A set of parameters passed to the method, works only if the Source Name is a method. + If the source name is a field or property has no effect. + + + + Construct with a Type + + The type that will provide data + + + + A set of parameters passed to the method, works only if the Source Name is a method. + If the source name is a field or property has no effect. + + + + + The name of a the method, property or fiend to be used as a source + + + + + A Type to be used as a source + + + + + Gets or sets the category associated with every fixture created from + this attribute. May be a single category or a comma-separated list. + + + + + Construct one or more TestMethods from a given MethodInfo, + using available parameter data. + + The IMethod for which tests are to be constructed. + The suite to which the tests will be added. + One or more TestMethods + + + + Returns a set of ITestCaseDataItems for use as arguments + to a parameterized test method. + + The method for which data is needed. + + + + + TestFixtureAttribute is used to mark a class that represents a TestFixture. + + + + + Default constructor + + + + + Construct with a object[] representing a set of arguments. + In .NET 2.0, the arguments may later be separated into + type arguments and constructor arguments. + + + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the RunState of this test fixture. + + + + + The arguments originally provided to the attribute + + + + + Properties pertaining to this fixture + + + + + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. + + + + + Descriptive text for this fixture + + + + + The author of this fixture + + + + + The type that this fixture is testing + + + + + Gets or sets the ignore reason. May set RunState as a side effect. + + The ignore reason. + + + + Gets or sets the reason for not running the fixture. + + The reason. + + + + Gets or sets the ignore reason. When set to a non-null + non-empty value, the test is marked as ignored. + + The ignore reason. + + + + Gets or sets a value indicating whether this is explicit. + + + true if explicit; otherwise, false. + + + + + Gets and sets the category for this fixture. + May be a comma-separated list of categories. + + + + + Build a fixture from type provided. Normally called for a Type + on which the attribute has been placed. + + The type info of the fixture to be used. + A an IEnumerable holding one TestFixture object. + + + + Attribute used to identify a method that is + called before any tests in a fixture are run. + + + + + TestCaseSourceAttribute indicates the source to be used to + provide test fixture instances for a test class. + + + + + Error message string is public so the tests can use it + + + + + Construct with the name of the method, property or field that will provide data + + The name of a static method, property or field that will provide data. + + + + Construct with a Type and name + + The Type that will provide data + The name of a static method, property or field that will provide data. + + + + Construct with a Type + + The type that will provide data + + + + The name of a the method, property or fiend to be used as a source + + + + + A Type to be used as a source + + + + + Gets or sets the category associated with every fixture created from + this attribute. May be a single category or a comma-separated list. + + + + + Construct one or more TestFixtures from a given Type, + using available parameter data. + + The TypeInfo for which fixtures are to be constructed. + One or more TestFixtures as TestSuite + + + + Returns a set of ITestFixtureData items for use as arguments + to a parameterized test fixture. + + The type for which data is needed. + + + + + Attribute used to identify a method that is called after + all the tests in a fixture have run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + Indicates which class the test or test fixture is testing + + + + + Initializes a new instance of the class. + + The type that is being tested. + + + + Initializes a new instance of the class. + + The type that is being tested. + + + + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. + + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + public void TestDescriptionMethod() + {} + } + + + + + + Construct the attribute, specifying a combining strategy and source of parameter data. + + + + + Used on a method, marks the test with a timeout value in milliseconds. + The test will be run in a separate thread and is cancelled if the timeout + is exceeded. Used on a class or assembly, sets the default timeout + for all contained test methods. + + + + + Construct a TimeoutAttribute given a time in milliseconds + + The timeout value in milliseconds + + + + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. + + + + + The collection of data to be returned. Must + be set by any derived attribute classes. + We use an object[] so that the individual + elements may have their type changed in GetData + if necessary + + + + + Constructs for use with an Enum parameter. Will pass every enum + value in to the test. + + + + + Construct with one argument + + + + + + Construct with two arguments + + + + + + + Construct with three arguments + + + + + + + + Construct with an array of arguments + + + + + + Get the collection of _values to be used as arguments + + + + + ValueSourceAttribute indicates the source to be used to + provide data for one parameter of a test method. + + + + + Construct with the name of the factory - for use with languages + that don't support params arrays. + + The name of a static method, property or field that will provide data. + + + + Construct with a Type and name - for use with languages + that don't support params arrays. + + The Type that will provide data + The name of a static method, property or field that will provide data. + + + + The name of a the method, property or fiend to be used as a source + + + + + A Type to be used as a source + + + + + Gets an enumeration of data items for use as arguments + for a test method parameter. + + The parameter for which data is needed + + An enumeration containing individual data items + + + + + A set of Assert methods operating on one or more collections + + + + + DO NOT USE! Use CollectionAssert.AreEqual(...) instead. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + Asserts that all items contained in collection are of the type specified by expectedType. + + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + + + + Asserts that all items contained in collection are of the type specified by expectedType. + + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that all items contained in collection are not equal to null. + + IEnumerable containing objects to be considered + + + + Asserts that all items contained in collection are not equal to null. + + IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Ensures that every object contained in collection exists within the collection + once and only once. + + IEnumerable of objects to be considered + + + + Ensures that every object contained in collection exists within the collection + once and only once. + + IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are not exactly equal. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + + + + Asserts that expected and actual are not exactly equal. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are not equivalent. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are not equivalent. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that collection contains actual as an item. + + IEnumerable of objects to be considered + Object to be found within collection + + + + Asserts that collection contains actual as an item. + + IEnumerable of objects to be considered + Object to be found within collection + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that collection does not contain actual as an item. + + IEnumerable of objects to be considered + Object that cannot exist within collection + + + + Asserts that collection does not contain actual as an item. + + IEnumerable of objects to be considered + Object that cannot exist within collection + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the superset does not contain the subset + + The IEnumerable subset to be considered + The IEnumerable superset to be considered + + + + Asserts that the superset does not contain the subset + + The IEnumerable subset to be considered + The IEnumerable superset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the superset contains the subset. + + The IEnumerable subset to be considered + The IEnumerable superset to be considered + + + + Asserts that the superset contains the subset. + + The IEnumerable subset to be considered + The IEnumerable superset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the subset does not contain the superset + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that the subset does not contain the superset + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the subset contains the superset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that the subset contains the superset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array,list or other collection is empty + + An array, list or other collection implementing IEnumerable + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array,list or other collection is empty + + An array, list or other collection implementing IEnumerable + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + + + + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + + + + + Construct an AllItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + AndConstraint succeeds only if both members succeed. + + + + + Create an AndConstraint from two other constraints + + The first constraint + The second constraint + + + + Gets text describing a constraint + + + + + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. + + The actual value + True if the constraints both succeeded + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + + + + + Construct an AssignableFromConstraint for the type provided + + + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + + + + + Construct an AssignableToConstraint for the type provided + + + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + AttributeConstraint tests that a specified attribute is present + on a Type or other provider and that the value of the attribute + satisfies some other constraint. + + + + + Constructs an AttributeConstraint for a specified attribute + Type and base constraint. + + + + + + + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. + + + + + Returns a string representation of the constraint. + + + + + AttributeExistsConstraint tests for the presence of a + specified attribute on a Type. + + + + + Constructs an AttributeExistsConstraint for a specific attribute Type + + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Tests whether the object provides the expected attribute. + + A Type, MethodInfo, or other ICustomAttributeProvider + True if the expected attribute is present, otherwise false + + + + BinaryConstraint is the abstract base of all constraints + that combine two other constraints in some fashion. + + + + + The first constraint being combined + + + + + The second constraint being combined + + + + + Construct a BinaryConstraint from two other constraints + + The first constraint + The second constraint + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation + + + + + CollectionConstraint is the abstract base class for + constraints that operate on collections. + + + + + Construct an empty CollectionConstraint + + + + + Construct a CollectionConstraint + + + + + + Determines whether the specified enumerable is empty. + + The enumerable. + + true if the specified enumerable is empty; otherwise, false. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Protected method to be implemented by derived classes + + + + + + + CollectionContainsConstraint is used to test whether a collection + contains an expected object as a member. + + + + + Construct a CollectionContainsConstraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Gets the expected object + + + + + Test whether the expected item is contained in the collection + + + + + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + + + + CollectionEquivalentConstraint is used to determine whether two + collections are equivalent. + + + + + Construct a CollectionEquivalentConstraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether two collections are equivalent + + + + + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + + + + CollectionItemsEqualConstraint is the abstract base class for all + collection constraints that apply some notion of item equality + as a part of their operation. + + + + + Construct an empty CollectionConstraint + + + + + Construct a CollectionConstraint + + + + + + Flag the constraint to ignore case and return self. + + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied Comparison object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Compares two collection members for equality + + + + + Return a new CollectionTally for use in making tests + + The collection to be included in the tally + + + + CollectionOrderedConstraint is used to test whether a collection is ordered. + + + + + Construct a CollectionOrderedConstraint + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + If used performs a default ascending comparison + + + + + If used performs a reverse comparison + + + + + Modifies the constraint to use an and returns self. + + + + + Modifies the constraint to use an and returns self. + + + + + Modifies the constraint to use a and returns self. + + + + + Modifies the constraint to test ordering by the value of + a specified property and returns self. + + + + + Then signals a break between two ordering steps + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the collection is ordered + + + + + + + Returns the string representation of the constraint. + + + + + + An OrderingStep represents one stage of the sort + + + + + CollectionSubsetConstraint is used to determine whether + one collection is a subset of another + + + + + Construct a CollectionSubsetConstraint + + The collection that the actual value is expected to be a subset of + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the actual collection is a subset of + the expected collection provided. + + + + + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + + + + CollectionSupersetConstraint is used to determine whether + one collection is a superset of another + + + + + Construct a CollectionSupersetConstraint + + The collection that the actual value is expected to be a superset of + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the actual collection is a superset of + the expected collection provided. + + + + + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + + + + CollectionTally counts (tallies) the number of + occurrences of each object in one or more enumerations. + + + + + Construct a CollectionTally object from a comparer and a collection + + + + + The number of objects remaining in the tally + + + + + Try to remove an object from the tally + + The object to remove + True if successful, false if the object was not found + + + + Try to remove a set of objects from the tally + + The objects to remove + True if successful, false if any object was not found + + + + ComparisonAdapter class centralizes all comparisons of + _values in NUnit, adapting to the use of any provided + , + or . + + + + + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. + + + + + Returns a ComparisonAdapter that wraps an + + + + + Returns a ComparisonAdapter that wraps an + + + + + Returns a ComparisonAdapter that wraps a + + + + + Compares two objects + + + + + Construct a default ComparisonAdapter + + + + + Construct a ComparisonAdapter for an + + + + + Compares two objects + + + + + + + + ComparerAdapter extends and + allows use of an or + to actually perform the comparison. + + + + + Construct a ComparisonAdapter for an + + + + + Compare a Type T to an object + + + + + Construct a ComparisonAdapter for a + + + + + Compare a Type T to an object + + + + + Abstract base class for constraints that compare _values to + determine if one is greater than, equal to or less than + the other. + + + + + The value against which a comparison is to be made + + + + + If true, less than returns success + + + + + if true, equal returns success + + + + + if true, greater than returns success + + + + + ComparisonAdapter to be used in making the comparison + + + + + Initializes a new instance of the class. + + The value against which to make a comparison. + if set to true less succeeds. + if set to true equal succeeds. + if set to true greater succeeds. + String used in describing the constraint. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Modifies the constraint to use an and returns self + + The comparer used for comparison tests + A constraint modified to use the given comparer + + + + Modifies the constraint to use an and returns self + + The comparer used for comparison tests + A constraint modified to use the given comparer + + + + Modifies the constraint to use a and returns self + + The comparer used for comparison tests + A constraint modified to use the given comparer + + + + Delegate used to delay evaluation of the actual value + to be used in evaluating a constraint + + + + + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + + + + + Construct a constraint with optional arguments + + Arguments to be saved + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Arguments provided to this Constraint, for use in + formatting the description. + + + + + The ConstraintBuilder holding this constraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + A ConstraintResult + + + + Retrieves the value to be tested from an ActualValueDelegate. + The default implementation simply evaluates the delegate but derived + classes may override it to provide for delayed processing. + + An ActualValueDelegate + Delegate evaluation result + + + + Default override of ToString returns the constraint DisplayName + followed by any arguments within angle brackets. + + + + + + Returns the string representation of this constraint + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. + + + + + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. + + + + + Returns a ConstraintExpression by appending And + to the current constraint. + + + + + Returns a ConstraintExpression by appending And + to the current constraint. + + + + + Returns a ConstraintExpression by appending Or + to the current constraint. + + + + + Returns a DelayedConstraint.WithRawDelayInterval with the specified delay time. + + The delay, which defaults to milliseconds. + + + + + Returns a DelayedConstraint with the specified delay time + and polling interval. + + The delay in milliseconds. + The interval at which to test the constraint. + + + + + Resolves any pending operators and returns the resolved constraint. + + + + + ConstraintBuilder maintains the stacks that are used in + processing a ConstraintExpression. An OperatorStack + is used to hold operators that are waiting for their + operands to be reorganized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + + + + + OperatorStack is a type-safe stack for holding ConstraintOperators + + + + + Initializes a new instance of the class. + + The ConstraintBuilder using this stack. + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost operator without modifying the stack. + + + + + Pushes the specified operator onto the stack. + + The operator to put onto the stack. + + + + Pops the topmost operator from the stack. + + The topmost operator on the stack + + + + ConstraintStack is a type-safe stack for holding Constraints + + + + + Initializes a new instance of the class. + + The ConstraintBuilder using this stack. + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Pushes the specified constraint. As a side effect, + the constraint's Builder field is set to the + ConstraintBuilder owning this stack. + + The constraint to put onto the stack + + + + Pops this topmost constraint from the stack. + As a side effect, the constraint's Builder + field is set to null. + + The topmost contraint on the stack + + + + Initializes a new instance of the class. + + + + + Appends the specified operator to the expression by first + reducing the operator stack and then pushing the new + operator on the stack. + + The operator to push. + + + + Appends the specified constraint to the expression by pushing + it on the constraint stack. + + The constraint to push. + + + + Sets the top operator right context. + + The right context. + + + + Reduces the operator stack until the topmost item + precedence is greater than or equal to the target precedence. + + The target precedence. + + + + Resolves this instance, returning a Constraint. If the Builder + is not currently in a resolvable state, an exception is thrown. + + The resolved constraint + + + + Gets a value indicating whether this instance is resolvable. + + + true if this instance is resolvable; otherwise, false. + + + + + ConstraintExpression represents a compound constraint in the + process of being constructed from a series of syntactic elements. + + Individual elements are appended to the expression as they are + reorganized. When a constraint is appended, it is returned as the + value of the operation so that modifiers may be applied. However, + any partially built expression is attached to the constraint for + later resolution. When an operator is appended, the partial + expression is returned. If it's a self-resolving operator, then + a ResolvableConstraintExpression is returned. + + + + + The ConstraintBuilder holding the elements recognized so far + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the + class passing in a ConstraintBuilder, which may be pre-populated. + + The builder. + + + + Returns a string representation of the expression as it + currently stands. This should only be used for testing, + since it has the side-effect of resolving the expression. + + + + + + Appends an operator to the expression and returns the + resulting expression itself. + + + + + Appends a self-resolving operator to the expression and + returns a new ResolvableConstraintExpression. + + + + + Appends a constraint to the expression and returns that + constraint, which is associated with the current state + of the expression being built. Note that the constraint + is not reduced at this time. For example, if there + is a NotOperator on the stack we don't reduce and + return a NotConstraint. The original constraint must + be returned because it may support modifiers that + are yet to be applied. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. + + + + + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + With is currently a NOP - reserved for future use. + + + + + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. + + + + + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. + + + + + Returns a constraint that tests for null + + + + + Returns a constraint that tests for True + + + + + Returns a constraint that tests for False + + + + + Returns a constraint that tests for a positive value + + + + + Returns a constraint that tests for a negative value + + + + + Returns a constraint that tests if item is equal to zero + + + + + Returns a constraint that tests for NaN + + + + + Returns a constraint that tests for empty + + + + + Returns a constraint that tests whether a collection + contains all unique items. + + + + + Returns a constraint that tests whether an object graph is serializable in binary format. + + + + + Returns a constraint that tests whether an object graph is serializable in xml format. + + + + + Returns a constraint that tests two items for equality + + + + + Returns a constraint that tests that two references are the same object + + + + + Returns a constraint that tests whether the + actual value is greater than the supplied argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument + + + + + Returns a constraint that tests whether the + actual value is less than the supplied argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a superset of the collection supplied as an argument. + + + + + Returns a constraint that tests whether a collection is ordered + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the Dictionary key collection. + + The key to be matched in the Dictionary key collection + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the Dictionary value collection. + + The value to be matched in the Dictionary value collection + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the a subpath of the expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the actual value falls + within a specified range. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. + + + + + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a constraint that tests for null + + + + + Returns a constraint that tests for True + + + + + Returns a constraint that tests for False + + + + + Returns a constraint that tests for a positive value + + + + + Returns a constraint that tests for a negative value + + + + + Returns a constraint that tests for equality with zero + + + + + Returns a constraint that tests for NaN + + + + + Returns a constraint that tests for empty + + + + + Returns a constraint that tests whether a collection + contains all unique items. + + + + + Returns a constraint that tests whether an object graph is serializable in binary format. + + + + + Returns a constraint that tests whether an object graph is serializable in xml format. + + + + + Returns a constraint that tests two items for equality + + + + + Returns a constraint that tests that two references are the same object + + + + + Returns a constraint that tests whether the + actual value is greater than the supplied argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument + + + + + Returns a constraint that tests whether the + actual value is less than the supplied argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a superset of the collection supplied as an argument. + + + + + Returns a constraint that tests whether a collection is ordered + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is a subpath of the expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the actual value falls + within a specified range. + + + + + ConstraintStatus represents the status of a ConstraintResult + returned by a Constraint being applied to an actual value. + + + + + The status has not yet been set + + + + + The constraint succeeded + + + + + The constraint failed + + + + + An error occured in applying the constraint (reserved for future use) + + + + + Contain the result of matching a against an actual value. + + + + + Constructs a for a particular . + + The Constraint to which this result applies. + The actual value to which the Constraint was applied. + + + + Constructs a for a particular . + + The Constraint to which this result applies. + The actual value to which the Constraint was applied. + The status of the new ConstraintResult. + + + + Constructs a for a particular . + + The Constraint to which this result applies. + The actual value to which the Constraint was applied. + If true, applies a status of Success to the result, otherwise Failure. + + + + The actual value that was passed to the method. + + + + + Gets and sets the ResultStatus for this result. + + + + + True if actual value meets the Constraint criteria otherwise false. + + + + + Display friendly name of the constraint. + + + + + Description of the constraint may be affected by the state the constraint had + when was performed against the actual value. + + + + + Write the failure message to the MessageWriter provided + as an argument. The default implementation simply passes + the result and the actual value to the writer, which + then displays the constraint description and the value. + + Constraints that need to provide additional details, + such as where the error occured can override this. + + The MessageWriter on which to display the message + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + ContainsConstraint tests a whether a string contains a substring + or a collection contains an object. It postpones the decision of + which test to use until the type of the actual argument is known. + This allows testing whether a string is contained in a collection + or as a substring of another string using the same syntax. + + + + + Initializes a new instance of the class. + + The _expected. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Flag the constraint to ignore case and return self. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Applies a delay to the match so that a match can be evaluated in the future. + + + + + Allows only changing the time dimension of delay interval and setting a polling interval of a DelayedConstraint + + + + + Creates a new DelayedConstraint.WithRawDelayInterval + + Parent DelayedConstraint on which delay interval dimension is required to be set + + + + Changes delay interval dimension to minutes + + + + + Changes delay interval dimension to seconds + + + + + Changes delay interval dimension to milliseconds + + + + + Set polling interval, in milliseconds + + A time interval, in milliseconds + + + + + Allows only setting the polling interval of a DelayedConstraint + + + + + Creates a new DelayedConstraint.WithDimensionedDelayInterval + + Parent DelayedConstraint on which polling interval is required to be set + + + + Set polling interval, in milliseconds + + A time interval, in milliseconds + + + + + Allows only changing the time dimension of the polling interval of a DelayedConstraint + + + + + Creates a new DelayedConstraint.WithRawPollingInterval + + Parent DelayedConstraint on which polling dimension is required to be set + + + + Changes polling interval dimension to minutes + + + + + Changes polling interval dimension to seconds + + + + + Changes polling interval dimension to milliseconds + + + + + Delay value store as an Interval object + + + + + Polling value stored as an Interval object + + + + + Creates a new DelayedConstraint + + The inner constraint to decorate + The time interval after which the match is performed + If the value of is less than 0 + + + + Creates a new DelayedConstraint + + The inner constraint to decorate + The time interval after which the match is performed, in milliseconds + The time interval used for polling, in milliseconds + If the value of is less than 0 + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a delegate + + The delegate whose value is to be tested + A ConstraintResult + + + + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. + + A reference to the value to be tested + True for success, false for failure + + + + Returns the string representation of the constraint. + + + + + Adjusts a Timestamp by a given TimeSpan + + + + + + + + Returns the difference between two Timestamps as a TimeSpan + + + + + + + + DictionaryContainsKeyConstraint is used to test whether a dictionary + contains an expected object as a key. + + + + + Construct a DictionaryContainsKeyConstraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the expected key is contained in the dictionary + + + + + DictionaryContainsValueConstraint is used to test whether a dictionary + contains an expected object as a value. + + + + + Construct a DictionaryContainsValueConstraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the expected value is contained in the dictionary + + + + + EmptyCollectionConstraint tests whether a collection is empty. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that the collection is empty + + + + + + + EmptyConstraint tests a whether a string or collection is empty, + postponing the decision about which test is applied until the + type of the actual argument is known. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + EmptyDirectoryConstraint is used to test that a directory is empty + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + EmptyStringConstraint tests whether a string is empty. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + EndsWithConstraint can test whether a string ends + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + EqualConstraint is able to compare an actual value with the + expected value provided in its constructor. Two objects are + considered equal if both are null, or if both have the same + value. NUnit has special semantics for some object types. + + + + + NUnitEqualityComparer used to test equality. + + + + + Initializes a new instance of the class. + + The expected value. + + + + Gets the tolerance for this comparison. + + + The tolerance. + + + + + Gets a value indicating whether to compare case insensitive. + + + true if comparing case insensitive; otherwise, false. + + + + + Gets a value indicating whether or not to clip strings. + + + true if set to clip strings otherwise, false. + + + + + Gets the failure points. + + + The failure points. + + + + + Flag the constraint to ignore case and return self. + + + + + Flag the constraint to suppress string clipping + and return self. + + + + + Flag the constraint to compare arrays as collections + and return self. + + + + + Flag the constraint to use a tolerance when determining equality. + + Tolerance value to be used + Self. + + + + Flags the constraint to include + property in comparison of two values. + + + Using this modifier does not allow to use the + constraint modifier. + + + + + Switches the .Within() modifier to interpret its tolerance as + a distance in representable _values (see remarks). + + Self. + + Ulp stands for "unit in the last place" and describes the minimum + amount a given value can change. For any integers, an ulp is 1 whole + digit. For floating point _values, the accuracy of which is better + for smaller numbers and worse for larger numbers, an ulp depends + on the size of the number. Using ulps for comparison of floating + point results instead of fixed tolerances is safer because it will + automatically compensate for the added inaccuracy of larger numbers. + + + + + Switches the .Within() modifier to interpret its tolerance as + a percentage that the actual _values is allowed to deviate from + the expected value. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in days. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in hours. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in minutes. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in seconds. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + + Self + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied Comparison object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + EqualityAdapter class handles all equality comparisons + that use an , + or a . + + + + + Compares two objects, returning true if they are equal + + + + + Returns true if the two objects can be compared by this adapter. + The base adapter cannot handle IEnumerables except for strings. + + + + + Returns an that wraps an . + + + + + that wraps an . + + + + + Returns an that wraps an . + + + + + Returns an EqualityAdapter that uses a predicate function for items comparison. + + + + + + + + + Returns true if the two objects can be compared by this adapter. + The base adapter cannot handle IEnumerables except for strings. + + + + + Compares two objects, returning true if they are equal + + + + + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. + + + + + Returns an that wraps an . + + + + + Returns an that wraps an . + + + + + that wraps an . + + + + + Returns an that wraps a . + + + + + ExactTypeConstraint is used to test that an object + is of the exact type provided in the constructor + + + + + Construct an ExactTypeConstraint for a given Type + + The expected Type. + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + FileExistsConstraint is used to determine if a file exists + + + + + Initializes a new instance of the class. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + FileOrDirectoryExistsConstraint is used to determine if a file or directory exists + + + + + If true, the constraint will only check if files exist, not directories + + + + + If true, the constraint will only check if directories exist, not files + + + + + Initializes a new instance of the class that + will check files and directories. + + + + + Initializes a new instance of the class that + will only check files if ignoreDirectories is true. + + if set to true [ignore directories]. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + Helper routines for working with floating point numbers + + + The floating point comparison code is based on this excellent article: + http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm + + + "ULP" means Unit in the Last Place and in the context of this library refers to + the distance between two adjacent floating point numbers. IEEE floating point + numbers can only represent a finite subset of natural numbers, with greater + accuracy for smaller numbers and lower accuracy for very large numbers. + + + If a comparison is allowed "2 ulps" of deviation, that means the _values are + allowed to deviate by up to 2 adjacent floating point _values, which might be + as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. + + + + + Union of a floating point variable and an integer + + + The union's value as a floating point variable + + + The union's value as an integer + + + The union's value as an unsigned integer + + + Union of a double precision floating point variable and a long + + + The union's value as a double precision floating point variable + + + The union's value as a long + + + The union's value as an unsigned long + + + Compares two floating point _values for equality + First floating point value to be compared + Second floating point value t be compared + + Maximum number of representable floating point _values that are allowed to + be between the left and the right floating point _values + + True if both numbers are equal or close to being equal + + + Floating point _values can only represent a finite subset of natural numbers. + For example, the _values 2.00000000 and 2.00000024 can be stored in a float, + but nothing inbetween them. + + + This comparison will count how many possible floating point _values are between + the left and the right number. If the number of possible _values between both + numbers is less than or equal to maxUlps, then the numbers are considered as + being equal. + + + Implementation partially follows the code outlined here: + http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ + + + + + Compares two double precision floating point _values for equality + First double precision floating point value to be compared + Second double precision floating point value t be compared + + Maximum number of representable double precision floating point _values that are + allowed to be between the left and the right double precision floating point _values + + True if both numbers are equal or close to being equal + + + Double precision floating point _values can only represent a limited series of + natural numbers. For example, the _values 2.0000000000000000 and 2.0000000000000004 + can be stored in a double, but nothing inbetween them. + + + This comparison will count how many possible double precision floating point + _values are between the left and the right number. If the number of possible + _values between both numbers is less than or equal to maxUlps, then the numbers + are considered as being equal. + + + Implementation partially follows the code outlined here: + http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ + + + + + + Reinterprets the memory contents of a floating point value as an integer value + + + Floating point value whose memory contents to reinterpret + + + The memory contents of the floating point value interpreted as an integer + + + + + Reinterprets the memory contents of a double precision floating point + value as an integer value + + + Double precision floating point value whose memory contents to reinterpret + + + The memory contents of the double precision floating point value + interpreted as an integer + + + + + Reinterprets the memory contents of an integer as a floating point value + + Integer value whose memory contents to reinterpret + + The memory contents of the integer value interpreted as a floating point value + + + + + Reinterprets the memory contents of an integer value as a double precision + floating point value + + Integer whose memory contents to reinterpret + + The memory contents of the integer interpreted as a double precision + floating point value + + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Tests whether a value is greater than or equal to the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Interface for all constraints + + + + + The display name of this Constraint for use by ToString(). + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Arguments provided to this Constraint, for use in + formatting the description. + + + + + The ConstraintBuilder holding this constraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + A ConstraintResult + + + + InstanceOfTypeConstraint is used to test that an object + is of the same type provided or derived from it. + + + + + Construct an InstanceOfTypeConstraint for the type provided + + The expected Type + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + Keeps track of an interval time which can be represented in + Minutes, Seconds or Milliseconds + + + + + Constructs a interval given an value in milliseconds + + + + + Gets Interval value represented as a TimeSpan object + + + + + Returns the interval with the current value as a number of minutes. + + + + + Returns the interval with the current value as a number of seconds. + + + + + Returns the interval with the current value as a number of milliseconds. + + + + + Is true for intervals created with a non zero value + + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + + + + IntervalUnit provides the semantics to the value stored in Interval class. + + + + + Unit representing an Interval in minutes + + + + + Unit representing an Interval in seconds + + + + + Unit representing an Interval in milliseconds + + + + + The IResolveConstraint interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + An extension of ResolvableConstraintExpression that adds a no-op Items property for readability. + + + + + Create a new instance of ItemsConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + + No-op property for readability. + + + + + Tests whether a value is less than the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Tests whether a value is less than or equal to the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + MessageWriter is the abstract base for classes that write + constraint descriptions and messages in some form. The + class has separate methods for writing various components + of a message, allowing implementations to tailor the + presentation as needed. + + + + + Construct a MessageWriter given a culture + + + + + Abstract method to get the max line length + + + + + Method to write single line message with optional args, usually + written to precede the general failure message. + + The message to be written + Any arguments used in formatting the message + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The failing constraint result + + + + Display Expected and Actual lines for given _values. This + method may be called by constraints that need more control over + the display of actual and expected _values than is provided + by the default implementation. + + The expected value + The actual value causing the failure + + + + Display Expected and Actual lines for given _values, including + a tolerance value on the Expected line. + + The expected value + The actual value causing the failure + The tolerance within which the test was made + + + + Display the expected and actual string _values on separate lines. + If the mismatch parameter is >=0, an additional line is displayed + line containing a caret that points to the mismatch point. + + The expected string value + The actual string value + The point at which the strings don't match or -1 + If true, case is ignored in locating the point where the strings differ + If true, the strings should be clipped to fit the line + + + + Writes the text for an actual value. + + The actual value. + + + + Writes the text for a generalized value. + + The value. + + + + Writes the text for a collection value, + starting at a particular point, to a max length + + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write + + + + Custom value formatter function + + The value + + + + + Custom value formatter factory function + + The next formatter function + ValueFormatter + If the given formatter is unable to handle a certain format, it must call the next formatter in the chain + + + + Static methods used in creating messages + + + + + Static string used when strings are clipped + + + + + Formatting strings used for expected and actual _values + + + + + Current head of chain of value formatters. Public for testing. + + + + + Add a formatter to the chain of responsibility. + + + + + + Formats text to represent a generalized value. + + The value + The formatted text + + + + Formats text for a collection value, + starting at a particular point, to a max length + + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write + + + + Returns the representation of a type as used in NUnitLite. + This is the same as Type.ToString() except for arrays, + which are displayed with their declared sizes. + + + + + + + Converts any control characters in a string + to their escaped representation. + + The string to be converted + The converted string + + + + Converts any null characters in a string + to their escaped representation. + + The string to be converted + The converted string + + + + Return the a string representation for a set of indices into an array + + Array of indices for which a string is needed + + + + Get an array of indices representing the point in a collection or + array corresponding to a single int index into the collection. + + The collection to which the indices apply + Index in the collection + Array of indices + + + + Clip a string to a given length, starting at a particular offset, returning the clipped + string with ellipses representing the removed parts + + The string to be clipped + The maximum permitted length of the result string + The point at which to start clipping + The clipped string + + + + Clip the expected and actual strings in a coordinated fashion, + so that they may be displayed together. + + + + + + + + + Shows the position two strings start to differ. Comparison + starts at the start index. + + The expected string + The actual string + The index in the strings at which comparison should start + Boolean indicating whether case should be ignored + -1 if no mismatch found, or the index where mismatch found + + + + NaNConstraint tests that the actual value is a double or float NaN + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test that the actual value is an NaN + + + + + + + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + NotConstraint negates the effect of some other constraint + + + + + Initializes a new instance of the class. + + The base constraint to be negated. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for if the base constraint fails, false if it succeeds + + + + NullConstraint tests that the actual value is null + + + + + Initializes a new instance of the class. + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + The Numerics class contains common operations on numeric _values. + + + + + Checks the type of the object, returning true if + the object is a numeric type. + + The object to check + true if the object is a numeric type + + + + Checks the type of the object, returning true if + the object is a floating point numeric type. + + The object to check + true if the object is a floating point numeric type + + + + Checks the type of the object, returning true if + the object is a fixed point numeric type. + + The object to check + true if the object is a fixed point numeric type + + + + Test two numeric _values for equality, performing the usual numeric + conversions and using a provided or default tolerance. If the tolerance + provided is Empty, this method may set it to a default tolerance. + + The expected value + The actual value + A reference to the tolerance in effect + True if the _values are equal + + + + Compare two numeric _values, performing the usual numeric conversions. + + The expected value + The actual value + The relationship of the _values to each other + + + + NUnitComparer encapsulates NUnit's default behavior + in comparing two objects. + + + + + Returns the default NUnitComparer. + + + + + Compares two objects + + + + + + + + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. + + + + + If true, all string comparisons will ignore case + + + + + If true, arrays will be treated as collections, allowing + those of different dimensions to be compared + + + + + Comparison objects used in comparisons for some constraints. + + + + + List of points at which a failure occurred. + + + + + Returns the default NUnitEqualityComparer + + + + + Gets and sets a flag indicating whether case should + be ignored in determining equality. + + + + + Gets and sets a flag indicating that arrays should be + compared as collections, without regard to their shape. + + + + + Gets the list of external comparers to be used to + test for equality. They are applied to members of + collections, in place of NUnit's own logic. + + + + + Gets the list of failure points for the last Match performed. + The list consists of objects to be interpreted by the caller. + This generally means that the caller may only make use of + objects it has placed on the list at a particular depth. + + + + + Flags the comparer to include + property in comparison of two values. + + + Using this modifier does not allow to use the + modifier. + + + + + Compares two objects for equality within a tolerance. + + + + + Helper method to compare two arrays + + + + + Method to compare two DirectoryInfo objects + + first directory to compare + second directory to compare + true if equivalent, false if not + + + + FailurePoint class represents one point of failure + in an equality test. + + + + + The location of the failure + + + + + The expected value + + + + + The actual value + + + + + Indicates whether the expected value is valid + + + + + Indicates whether the actual value is valid + + + + + Represents a constraint that succeeds if all the + members of a collection match a base constraint. + + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + they all succeed. + + + + + Operator that requires both it's arguments to succeed + + + + + Construct an AndOperator + + + + + Apply the operator to produce an AndConstraint + + + + + Operator that tests for the presence of a particular attribute + on a type and optionally applies further tests to the attribute. + + + + + Construct an AttributeOperator for a particular Type + + The Type of attribute tested + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + Abstract base class for all binary operators + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Gets the left precedence of the operator + + + + + Gets the right precedence of the operator + + + + + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. + + + + + Abstract base for operators that indicate how to + apply a constraint to items in a collection. + + + + + Constructs a CollectionOperator + + + + + The ConstraintOperator class is used internally by a + ConstraintBuilder to represent an operator that + modifies or combines constraints. + + Constraint operators use left and right precedence + _values to determine whether the top operator on the + stack should be reduced before pushing a new operator. + + + + + The precedence value used when the operator + is about to be pushed to the stack. + + + + + The precedence value used when the operator + is on the top of the stack. + + + + + The syntax element preceding this operator + + + + + The syntax element following this operator + + + + + The precedence value used when the operator + is about to be pushed to the stack. + + + + + The precedence value used when the operator + is on the top of the stack. + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Represents a constraint that succeeds if none of the + members of a collection match a base constraint. + + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + Negates the test of the constraint it wraps. + + + + + Constructs a new NotOperator + + + + + Returns a NotConstraint applied to its argument. + + + + + Operator that requires at least one of it's arguments to succeed + + + + + Construct an OrOperator + + + + + Apply the operator to produce an OrConstraint + + + + + PrefixOperator takes a single constraint and modifies + it's action in some way. + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Returns the constraint created by applying this + prefix to another constraint. + + + + + + + Operator used to test for the presence of a named Property + on an object and optionally apply further tests to the + value of that property. + + + + + Gets the name of the property to which the operator applies + + + + + Constructs a PropOperator for a particular named property + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. + + + + + Represents a constraint that succeeds if any of the + members of a collection match a base constraint. + + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + any of them succeed. + + + + + Operator that tests that an exception is thrown and + optionally applies further tests to the exception. + + + + + Construct a ThrowsOperator + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + Represents a constraint that simply wraps the + constraint provided as an argument, without any + further functionality, but which modifies the + order of evaluation because of its precedence. + + + + + Constructor for the WithOperator + + + + + Returns a constraint that wraps its argument + + + + + OrConstraint succeeds if either member succeeds + + + + + Create an OrConstraint from two other constraints + + The first constraint + The second constraint + + + + Gets text describing a constraint + + + + + Apply the member constraints to an actual value, succeeding + succeeding as soon as one of them succeeds. + + The actual value + True if either constraint succeeded + + + + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. + + + + + Construct a PathConstraint for a give expected path + + The expected path + + + + Modifies the current instance to be case-sensitive + and returns it. + + + + + Returns the string representation of this constraint + + + + + Canonicalize the provided path + + + The path in standardized form + + + + Test whether one path in canonical form is a subpath of another path + + The first path - supposed to be the parent path + The second path - supposed to be the child path + + + + + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. + + + + + Construct a PredicateConstraint from a predicate + + + + + Gets text describing a constraint + + + + + Determines whether the predicate succeeds when applied + to the actual value. + + + + + Abstract base class used for prefixes + + + + + The base constraint + + + + + Prefix used in forming the constraint description + + + + + Construct given a base constraint + + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Formats a prefix constraint's description. + + + + + PropertyConstraint extracts a named property and uses + its value as the actual value for a chained constraint. + + + + + Initializes a new instance of the class. + + The name. + The constraint to apply to the property. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of the constraint. + + + + + + PropertyExistsConstraint tests that a named property + exists on the object provided through Match. + + Originally, PropertyConstraint provided this feature + in addition to making optional tests on the value + of the property. The two constraints are now separate. + + + + + Initializes a new instance of the class. + + The name of the property. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the property exists for a given object + + The object to be tested + True for success, false for failure + + + + Returns the string representation of the constraint. + + + + + + RangeConstraint tests whether two _values are within a + specified range. + + + + + Initializes a new instance of the class. + + from must be less than or equal to true + Inclusive beginning of the range. Must be less than or equal to to. + Inclusive end of the range. Must be greater than or equal to from. + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Modifies the constraint to use an and returns self. + + + + + Modifies the constraint to use an and returns self. + + + + + Modifies the constraint to use a and returns self. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + The EqualConstraintResult class is tailored for formatting + and displaying the result of an EqualConstraint. + + + + + Construct an EqualConstraintResult + + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Display the failure information for two collections that did not match. + + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections + + + + Displays a single line showing the types and sizes of the expected + and actual collections or arrays. If both are identical, the value is + only shown once. + + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line + + + + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both _values are shown. + + The MessageWriter on which to display + The expected array + The actual array + Index of the failure point in the underlying collections + The indentation level for the message line + + + + Display the failure information for two IEnumerables that did not match. + + The MessageWriter on which to display + The expected enumeration. + The actual enumeration + The depth of this failure in a set of nested collections + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + XmlSerializableConstraint tests whether + an object is serializable in xml format. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct a standalone ExactCountConstraint + + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Asserts on Directories + + + + + DO NOT USE! Use DirectoryAssert.AreEqual(...) instead. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if the directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the Dictionary key collection. + + The key to be matched in the Dictionary key collection + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the Dictionary value collection. + + The value to be matched in the Dictionary value collection + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Thrown when an assertion failed. + + + + + Default Constructor (normally used) + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Asserts on Files + + + + + DO NOT USE! Use FileAssert.AreEqual(...) instead. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file exists. If it does not exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + A file containing the actual value - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file exists. If it does not exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file exists. If it does not exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The path to a file containing the actual value - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file does not exist. If it does exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file does not exist. If it does exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less + A file containing the actual value - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file does not exist. If it does exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Asserts that the file does not exist. If it does exist + an is thrown. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The path to a file containing the actual value - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + GlobalSettings is a place for setting default values used + by the framework in performing asserts. Anything set through + this class applies to the entire test run. It should not normally + be used from within a test, since it is not thread-safe. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Default tolerance for floating point equality - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Throws an exception if an argument is null - The first value, expected to be less - The second value, expected to be greater + The value to be tested + The name of the argument - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Throws an exception if a string argument is null or empty - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The value to be tested + The name of the argument - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Throws an ArgumentOutOfRangeException if the specified condition is not met. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The condition that must be met + The exception message to be used + The name of the argument - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Throws an ArgumentException if the specified condition is not met. - The first value, expected to be less - The second value, expected to be greater + The condition that must be met + The exception message to be used + The name of the argument - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Throws an InvalidOperationException if the specified condition is not met. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The condition that must be met + The exception message to be used - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a ConstraintExpression that negates any + following constraint. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + The AssertionResult class represents the result of a single assertion. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Construct an AssertionResult - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + + The pass/fail status of the assertion + + + The message produced by the assertion, or null + + + The stacktrace associated with the assertion, or null + + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + ToString Override - The first value, expected to be less - The second value, expected to be greater - + - Asserts that an object is contained in a list. + Override GetHashCode - The expected object - The list to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object is contained in a list. + Override Equals - The expected object - The list to be examined - The message to display in case of failure + - + - Asserts that an object is contained in a list. + AssertionStatus enumeration represents the possible outcomes of an assertion. + The order of definition is significant, higher level values override lower + ones in determining the overall result of a test. - The expected object - The list to be examined - + - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. + An assumption failed - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - + - Gets the number of assertions executed so far and - resets the counter to zero. + The assertion succeeded - + - AssertionHelper is an optional base class for user tests, - allowing the use of shorter names for constraints and - asserts and avoiding conflict with the definition of - , from which it inherits much of its - behavior, in certain mock object frameworks. + A warning message was issued - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + The assertion failed - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + An unexpected exception was thrown - + - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Apply changes to the execution context + The execution context - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. - + - Returns a constraint that tests two items for equality + Modifies a test as defined for the specific attribute. + The test to modify - + - Returns a constraint that tests that two references are the same object + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Wrap a command and return the result. + The command to be wrapped + The wrapped command - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + The IFixtureBuilder interface is exposed by a class that knows how to + build a TestFixture from one or more Types. In general, it is exposed + by an attribute, but may be implemented in a helper class used by the + attribute in some cases. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Build one or more TestFixtures from type provided. At least one + non-null TestSuite must always be returned, since the method is + generally called because the user has marked the target class as + a fixture. If something prevents the fixture from being used, it + will be returned nonetheless, labelled as non-runnable. + The type info of the fixture to be used. + A TestSuite object or one derived from TestSuite. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + IImplyFixture is an empty marker interface used by attributes like + TestAttribute that cause the class where they are used to be treated + as a TestFixture even without a TestFixtureAttribute. + + Marker interfaces are not usually considered a good practice, but + we use it here to avoid cluttering the attribute hierarchy with + classes that don't contain any extra implementation. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the Type from which this method was reflected. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the MethodInfo for this method. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the name of the method. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets a value indicating whether the method is abstract. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets a value indicating whether the method is public. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets a value indicating whether the method contains unassigned generic type parameters. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets a value indicating whether the method is a generic method. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Gets the return Type of the method. - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Gets the parameters of the method. + - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. + The type arguments to be used + A new IMethodInfo with the type arguments replaced - + - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. + Invokes the method, converting any TargetInvocationException to an NUnitException. + The object on which to invoke the method + The argument list for the method + The return value from the invoked method - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The IDataPointProvider interface is used by extensions + that provide data for a single test parameter. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Determine whether any data is available for a parameter. + An IParameterInfo representing one + argument to a parameterized test + True if any data is available, otherwise false. - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + Return an IEnumerable providing data for use with the + supplied parameter. + An IParameterInfo representing one + argument to a parameterized test + An IEnumerable providing the required data - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Gets an enumeration of data items for use as arguments + for a test method parameter. + The parameter for which data is needed + An enumeration containing individual data items - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + The IParameterInfo interface is an abstraction of a .NET parameter. - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets a value indicating whether the parameter is optional - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets an IMethodInfo representing the method for which this is a parameter - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Gets the underlying .NET ParameterInfo - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Gets the Type of the parameter - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + A PropertyBag represents a collection of name/value pairs + that allows duplicate entries with the same key. Methods + are provided for adding a new pair as well as for setting + a key to a single value. All keys are strings but _values + may be of any type. Null _values are not permitted, since + a null entry represents the absence of the key. + + The entries in a PropertyBag are of two kinds: those that + take a single value and those that take multiple _values. + However, the PropertyBag has no knowledge of which entries + fall into each category and the distinction is entirely + up to the code using the PropertyBag. + + When working with multi-valued properties, client code + should use the Add method to add name/value pairs and + indexing to retrieve a list of all _values for a given + key. For example: + + bag.Add("Tag", "one"); + bag.Add("Tag", "two"); + Assert.That(bag["Tag"], + Is.EqualTo(new string[] { "one", "two" })); + + When working with single-valued properties, client code + should use the Set method to set the value and Get to + retrieve the value. The GetSetting methods may also be + used to retrieve the value in a type-safe manner while + also providing default. For example: + + bag.Set("Priority", "low"); + bag.Set("Priority", "high"); // replaces value + Assert.That(bag.Get("Priority"), + Is.EqualTo("high")); + Assert.That(bag.GetSetting("Priority", "low"), + Is.EqualTo("high")); - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Adds a key/value pair to the property bag + The key + The value - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Sets the value for a key, removing any other + _values that are already in the property set. + + - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Gets a single value for a key, using the first + one if multiple _values are present and returning + null if the value is not found. - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Gets a flag indicating whether the specified key has + any entries in the property set. + The key to be checked + True if their are _values present, otherwise false - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Gets or sets the list of _values for a particular key + The key for which the _values are to be retrieved or set - + - Returns a ConstraintExpression that negates any - following constraint. + Gets a collection containing all the keys in the property set - + - Returns a ConstraintExpression that negates any - following constraint. + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Returns an array of custom attributes of the specified type applied to this object - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Returns a value indicating whether an attribute of the specified type is defined on this object. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + The ISimpleTestBuilder interface is exposed by a class that knows how to + build a single TestMethod from a suitable MethodInfo Types. In general, + it is exposed by an attribute, but may be implemented in a helper class + used by the attribute in some cases. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Build a TestMethod from the provided MethodInfo. + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + The type of the fixture to be used + True if the type can be used to build a TestSuite - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Build a TestSuite from type provided. + The type of the fixture to be used + A TestSuite - + - Returns a constraint that tests for null + Common interface supported by all representations + of a test. Only includes informational fields. + The Run method is specifically excluded to allow + for data-only representations of a test. - + - Returns a constraint that tests for True + Gets the id of the test - + - Returns a constraint that tests for False + Gets the name of the test - + - Returns a constraint that tests for a positive value + Gets the fully qualified name of the test - + - Returns a constraint that tests for a negative value + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. - + - Returns a constraint that tests for NaN + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. - + - Returns a constraint that tests for empty + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. - + - Returns a constraint that tests whether a collection - contains all unique items. + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Gets the RunState of the test, indicating whether it can be run. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Count of the test cases ( 1 if this is a test case ) - + - Returns a constraint that tests whether a collection is ordered + Gets the properties of the test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. + Gets the parent test, if any. - The actual value to test - A Constraint to be applied + The parent test or null if none exists. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. + Returns true if this is a test suite - The actual value to test - A Constraint to be applied - The message to be displayed in case of failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. + Gets a bool indicating whether the current test + has any descendant tests. - The actual value to test - A Constraint to be applied - The message to be displayed in case of failure - Arguments to use in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Gets this test's child tests + + A list of child tests - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . + Gets a fixture object for running this test. - The evaluated condition - The message to display if the condition is false - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to . + The ITestCaseBuilder interface is exposed by a class that knows how to + build a test case from certain methods. - The evaluated condition + + This interface is not the same as the ITestCaseBuilder interface in NUnit 2.x. + We have reused the name because the two products don't interoperate at all. + - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Examine the method and determine if it is suitable for + this builder to use in building a TestCase to be + included in the suite being populated. + + Note that returning false will cause the method to be ignored + in loading the tests. If it is desired to load the method + but label it as non-runnable, ignored, etc., then this + method must return true. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + The test method to examine + The suite being populated + True is the builder can use this method - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Build a TestCase from the provided MethodInfo for + inclusion in the suite being constructed. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + The method to be used as a test case + The test suite being populated, or null + A TestCase or null - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Gets the expected result of the test case - The actual value to test - A Constraint to be applied - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns true if an expected result has been set - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Gets the name to be used for the test - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - Returns a ListMapper based on a collection. + Gets the RunState for this test case. - The original collection - - + - Provides static methods to express the assumptions - that must be met for a test to give a meaningful - result. If an assumption is not met, the test - should produce an inconclusive result. + Gets the argument list to be provided to the test - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Gets the property dictionary for the test case - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Interface to be implemented by filters applied to tests. + The filter applies when running the test, after it has been + loaded, since this is the only time an ITest exists. - - - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Determine if a particular test passes the filter criteria. Pass + may examine the parents and/or descendants of a test, depending + on the semantics of the particular filter - A Constraint expression to be applied - The actual value to test + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Determine if a test matches the filter explicitly. That is, it must + be a direct match of the test itself or one of it's children. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure + The test to which the filter is applied + True if the test matches the filter explicitly, otherwise false - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + The ITestCaseData interface is implemented by a class + that is able to return the data required to create an + instance of a parameterized test fixture. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Get the TypeArgs if separately set + - + - Asserts that a condition is true. If the condition is false the method throws - an . + The ITestListener interface is used internally to receive + notifications of significant events while a test is being + run. The events are propagated to clients by means of an + AsyncCallback. NUnit extensions may also monitor these events. - The evaluated condition - The message to display if the condition is false - + - Asserts that a condition is true. If the condition is false the - method throws an . + Called when a test has just started - The evaluated condition + The test that is starting - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Called when a test has finished - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + The result of the test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Called when a test produces output for immediate display - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + A TestOutput object containing the text to display - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + The ITestBuilder interface is exposed by a class that knows how to + build one or more TestMethods from a MethodInfo. In general, it is exposed + by an attribute, which has additional information available to provide + the necessary test parameters to distinguish the test cases built. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Build one or more TestMethods from the provided MethodInfo. - A Constraint expression to be applied - The actual value to test + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + The ITestResult interface represents the result of a test. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Gets the ResultState of the test result, which + indicates the success or failure of the test. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Gets the name of the test result - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - Waits for pending asynchronous operations to complete, if appropriate, - and returns a proper result of the invocation by unwrapping task results + Gets the full name of the test result - The raw result of the method invocation - The unwrapped result, if necessary - + - A set of Assert methods operationg on one or more collections + Gets the elapsed time for running the test in seconds - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Gets or sets the time the test started running. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Gets or sets the time the test finished running. - - - + - Asserts that all items contained in collection are of the type specified by expectedType. + Gets the message associated with a test + failure or with not running the test - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - + - Asserts that all items contained in collection are of the type specified by expectedType. + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - + - Asserts that all items contained in collection are of the type specified by expectedType. + Gets the number of asserts executed + when running the test and all its children. - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that all items contained in collection are not equal to null. + Gets the number of test cases that failed + when running the test and all its children. - IEnumerable containing objects to be considered - + - Asserts that all items contained in collection are not equal to null. + Gets the number of test cases that had warnings + when running the test and all its children. - IEnumerable containing objects to be considered - The message that will be displayed on failure - + - Asserts that all items contained in collection are not equal to null. + Gets the number of test cases that passed + when running the test and all its children. - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Ensures that every object contained in collection exists within the collection - once and only once. + Gets the number of test cases that were skipped + when running the test and all its children. - IEnumerable of objects to be considered - + - Ensures that every object contained in collection exists within the collection - once and only once. + Gets the number of test cases that were inconclusive + when running the test and all its children. - IEnumerable of objects to be considered - The message that will be displayed on failure - + - Ensures that every object contained in collection exists within the collection - once and only once. + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + Gets the collection of child results. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + Gets the Test to which this result applies. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + Gets any text output written to this result. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + Gets a list of AssertionResults associated with the test - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + The ITypeInfo interface is an abstraction of a .NET Type - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + Gets the underlying Type on which this ITypeInfo is based - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + Gets the base type of this type as an ITypeInfo - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - + - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + Returns true if the Type wrapped is equal to the argument - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - + - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + Gets the Name of the Type - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are not exactly equal. + Gets the FullName of the Type - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Gets the assembly in which the type is declared - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - + - Asserts that expected and actual are not exactly equal. + Gets the Namespace of the Type - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Gets a value indicating whether the type is abstract. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - + - Asserts that expected and actual are not exactly equal. + Gets a value indicating whether the Type is a generic Type - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are not equivalent. + Gets a value indicating whether the Type is a generic Type definition - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - + - Asserts that expected and actual are not equivalent. + Gets a value indicating whether the type is sealed. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - + - Asserts that expected and actual are not equivalent. + Gets a value indicating whether this type is a static class. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that collection contains actual as an item. + Get the display name for this typeInfo. - IEnumerable of objects to be considered - Object to be found within collection - + - Asserts that collection contains actual as an item. + Get the display name for an object of this type, constructed with specific arguments - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - + - Asserts that collection contains actual as an item. + Returns a Type representing a generic type definition from which this Type can be constructed. - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that collection does not contain actual as an item. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - IEnumerable of objects to be considered - Object that cannot exist within collection - + - Asserts that collection does not contain actual as an item. + Returns a value indicating whether this type has a method with a specified public attribute - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - + - Asserts that collection does not contain actual as an item. + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that the superset does not contain the subset + Gets the public constructor taking the specified argument Types - The IEnumerable subset to be considered - The IEnumerable superset to be considered - + - Asserts that the superset does not contain the subset + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - + - Asserts that the superset does not contain the subset + Construct an object of this Type, using the specified arguments. - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that the superset contains the subset. + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. - The IEnumerable subset to be considered - The IEnumerable superset to be considered - + - Asserts that the superset contains the subset. + Returns a TNode representing the current object. - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure + If true, children are included where applicable + A TNode representing the result - + - Asserts that the superset contains the subset. + Returns a TNode representing the current object after + adding it as a child of the supplied parent node. - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The parent node. + If true, children are included, where applicable + - + - Assert that an array, list or other collection is empty + The ResultState class represents the outcome of running a test. + It contains two pieces of information. The Status of the test + is an enum indicating whether the test passed, failed, was + skipped or was inconclusive. The Label provides a more + detailed breakdown for use by client runners. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - + - Assert that an array, list or other collection is empty + Initializes a new instance of the class. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + The TestStatus. - + - Assert that an array,list or other collection is empty + Initializes a new instance of the class. - An array, list or other collection implementing IEnumerable + The TestStatus. + The label. - + - Assert that an array, list or other collection is empty + Initializes a new instance of the class. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The TestStatus. + The stage at which the result was produced - + - Assert that an array, list or other collection is empty + Initializes a new instance of the class. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + The TestStatus. + The label. + The stage at which the result was produced - + - Assert that an array,list or other collection is empty + The result is inconclusive - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + The test has been skipped. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - + - Assert that an array, list or other collection is ordered + The test has been ignored. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - + - Assert that an array, list or other collection is ordered + The test was skipped because it is explicit - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + The test succeeded - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message - + - Assert that an array, list or other collection is ordered + The test issued a warning - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - + - Assert that an array, list or other collection is ordered + The test failed - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + The test encountered an unexpected exception - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + The test was cancelled by the user - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The test was not runnable. - + - Summary description for DirectoryAssert + A suite failed because one or more child tests failed or had errors - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + A suite failed in its OneTimeSetUp - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + A suite had an unexpected exception in its OneTimeSetUp - - - + - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. + A suite had an unexpected exception in its OneTimeDown - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets the TestStatus for the test. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message + The status. - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets the label under which this test result is + categorized, if any. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets the stage of test execution in which + the failure or other result took place. - A directory containing the value that is expected - A directory containing the actual value - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Get a new ResultState, which is the same as the current + one but with the FailureSite set to the specified value. - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message + The FailureSite to use + A new ResultState - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Test whether this ResultState has the same Status and Label + as another one. In other words, the whether two are equal + ignoring the Site. - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal + + - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Determines whether the specified , is equal to this instance. - A directory path string containing the value that is expected - A directory path string containing the actual value + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns a hash code for this instance. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns a that represents this instance. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal + + A that represents this instance. + - + - Asserts that two directories are not equal. If they are equal - an is thrown. + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. - A directory containing the value that is expected - A directory containing the actual value - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Failure in the test itself - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - Arguments to be used in formatting the message - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Failure in the SetUp method - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Failure in the TearDown method - A directory path string containing the value that is expected - A directory path string containing the actual value - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Failure of a parent test - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Failure of a child test - A directory to search - The message to display if directories are not equal - + - Asserts that the directory is empty. If it is not empty - an is thrown. + The RunState enum indicates whether a test can be executed. - A directory to search - + - Asserts that the directory is empty. If it is not empty - an is thrown. + The test is not runnable. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that the directory is empty. If it is not empty - an is thrown. + The test is runnable. - A directory to search - The message to display if directories are not equal - + - Asserts that the directory is empty. If it is not empty - an is thrown. + The test can only be run explicitly - A directory to search - + - Asserts that the directory is not empty. If it is empty - an is thrown. + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that the directory is not empty. If it is empty - an is thrown. + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. - A directory to search - The message to display if directories are not equal - + - Asserts that the directory is not empty. If it is empty - an is thrown. + The TestOutput class holds a unit of output from + a test to a specific output stream - A directory to search - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Construct with text, output destination type and + the name of the test that produced the output. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message + Text to be output + Name of the stream or channel to which the text should be written + FullName of test that produced the output - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Return string representation of the object for debugging - A directory to search - The message to display if directories are not equal + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Get the text - A directory to search - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Get the output type - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Get the name of the test that created the output - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Convert the TestOutput object to an XML string - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path contains actual as a subdirectory or - an is thrown. + The TestStatus enum indicates the result of running a test - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - + - Asserts that path contains actual as a subdirectory or - an is thrown. + The test was inconclusive - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - + - Asserts that path contains actual as a subdirectory or - an is thrown. + The test has skipped - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + The test succeeded - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + There was a warning - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + The test failed - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + TNode represents a single node in the XML representation + of a Test or TestResult. It replaces System.Xml.XmlNode and + System.Xml.Linq.XElement, providing a minimal set of methods + for operating on the XML in a platform-independent manner. - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Constructs a new instance of TNode - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path + The name of the node - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Constructs a new instance of TNode with a value - A directory to search - sub-directory asserted to exist under directory + The name of the node + The text content of the node - + - Summary description for FileAssert. + Constructs a new instance of TNode with a value + The name of the node + The text content of the node + Flag indicating whether to use CDATA when writing the text - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Gets the name of the node - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Gets the value of the node - - - + - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. + Gets a flag indicating whether the value should be output using CDATA. - + - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets the dictionary of attributes - The expected Stream - The actual Stream - The message to display if Streams are not equal - Arguments to be used in formatting the message - + - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets a list of child nodes - The expected Stream - The actual Stream - The message to display if objects are not equal - + - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets the first ChildNode - The expected Stream - The actual Stream - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Gets the XML representation of this node. - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Create a TNode from it's XML text representation - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal + The XML text to be parsed + A TNode - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Adds a new element as a child of the current node and returns it. - A file containing the value that is expected - A file containing the actual value + The element name. + The newly created child element - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Adds a new element with a value as a child of the current node and returns it. - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message + The element name + The text content of the new element + The newly created child element - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Adds a new element with a value as a child of the current node and returns it. + The value will be output using a CDATA section. - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal + The element name + The text content of the new element + The newly created child element - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Adds an attribute with a specified name and value to the XmlNode. - The path to a file containing the value that is expected - The path to a file containing the actual value + The name of the attribute. + The value of the attribute. - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Finds a single descendant of this node matching an xpath + specification. The format of the specification is + limited to what is needed by NUnit and its tests. - The expected Stream - The actual Stream - The message to be displayed when the two Stream are the same. - Arguments to be used in formatting the message + + - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Finds all descendants of this node matching an xpath + specification. The format of the specification is + limited to what is needed by NUnit and its tests. - The expected Stream - The actual Stream - The message to be displayed when the Streams are the same. - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Writes the XML representation of the node to an XmlWriter - The expected Stream - The actual Stream + - + - Asserts that two files are not equal. If they are equal - an is thrown. + Class used to represent a list of XmlResults - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - + - Asserts that two files are not equal. If they are equal - an is thrown. + Class used to represent the attributes of a node - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - + - Asserts that two files are not equal. If they are equal - an is thrown. + Gets or sets the value associated with the specified key. + Overridden to return null if attribute is not found. - A file containing the value that is expected - A file containing the actual value + The key. + Value of the attribute or null - + - Asserts that two files are not equal. If they are equal - an is thrown. + CombiningStrategy is the abstract base for classes that + know how to combine values provided for individual test + parameters to create a set of test cases. - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - + - Asserts that two files are not equal. If they are equal - an is thrown. + Gets the test cases generated by the CombiningStrategy. - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal + The test cases. - + - Asserts that two files are not equal. If they are equal - an is thrown. + AssemblyHelper provides static methods for working + with assemblies. - The path to a file containing the value that is expected - The path to a file containing the actual value - + - GlobalSettings is a place for setting default values used - by the framework in performing asserts. + Gets the path from which an assembly was loaded. + For builds where this is not possible, returns + the name of the assembly. + The assembly. + The path. - + - Default tolerance for floating point equality + Gets the path to the directory from which an assembly was loaded. + The assembly. + The path. - + - Class used to guard against unexpected argument values - by throwing an appropriate exception. + Gets the AssemblyName of an assembly. + The assembly + An AssemblyName - + - Throws an exception if an argument is null + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName - The value to be tested - The name of the argument + + - + - Throws an exception if a string argument is null or empty + Gets the assembly path from code base. - The value to be tested - The name of the argument + Public for testing purposes + The code base. + - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + Gets the test cases generated by the CombiningStrategy. + The test cases. - + - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Determine whether any data is available for a parameter. + A ParameterInfo representing one + argument to a parameterized test + + True if any data is available, otherwise false. + - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Return an IEnumerable providing data for use with the + supplied parameter. + A ParameterInfo representing one + argument to a parameterized test + + An IEnumerable providing the required data + - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Built-in SuiteBuilder for all types of test classes. - + - Returns a ConstraintExpression that negates any - following constraint. + Checks to see if the provided Type is a fixture. + To be considered a fixture, it must be a non-abstract + class with one or more attributes implementing the + IFixtureBuilder interface or one or more methods + marked as tests. + The fixture type to check + True if the fixture can be built, false if not - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Build a TestSuite from TypeInfo provided. + The fixture type to build + A TestSuite built from that type - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + We look for attributes implementing IFixtureBuilder at one level + of inheritance at a time. Attributes on base classes are not used + unless there are no fixture builder attributes at all on the derived + class. This is by design. + The type being examined for attributes + A list of the attributes found. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Class to build ether a parameterized or a normal NUnitTestMethod. + There are four cases that the builder must deal with: + 1. The method needs no params and none are provided + 2. The method needs params and they are provided + 3. The method needs no params but they are provided in error + 4. The method needs params but they are not provided + This could have been done using two different builders, but it + turned out to be simpler to have just one. The BuildFrom method + takes a different branch depending on whether any parameters are + provided, but all four cases are dealt with in lower-level methods - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Determines if the method can be used to build an NUnit test + test method of some kind. The method must normally be marked + with an identifying attribute for this to be true. + + Note that this method does not check that the signature + of the method for validity. If we did that here, any + test methods with invalid signatures would be passed + over in silence in the test run. Since we want such + methods to be reported, the check for validity is made + in BuildFrom rather than here. + An IMethodInfo for the method being used as a test method + True if the builder can create a test case from this method - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Build a Test from the provided MethodInfo. Depending on + whether the method takes arguments and on the availability + of test case data, this method may return a single test + or a group of tests contained in a ParameterizedMethodSuite. + The method for which a test is to be built + A Test representing one or more method invocations - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Determines if the method can be used to build an NUnit test + test method of some kind. The method must normally be marked + with an identifying attribute for this to be true. + + Note that this method does not check that the signature + of the method for validity. If we did that here, any + test methods with invalid signatures would be passed + over in silence in the test run. Since we want such + methods to be reported, the check for validity is made + in BuildFrom rather than here. + An IMethodInfo for the method being used as a test method + The test suite being built, to which the new test would be added + True if the builder can create a test case from this method - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Build a Test from the provided MethodInfo. Depending on + whether the method takes arguments and on the availability + of test case data, this method may return a single test + or a group of tests contained in a ParameterizedMethodSuite. + The method for which a test is to be built + The test fixture being populated, or null + A Test representing one or more method invocations - + - Interface implemented by a user fixture in order to - validate any expected exceptions. It is only called - for test methods marked with the ExpectedException - attribute. + Builds a ParameterizedMethodSuite containing individual test cases. + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases - + - Method to handle an expected exception + Build a simple, non-parameterized TestMethod for this method. - The exception to be handled + The MethodInfo for which a test is to be built + The test suite for which the method is being built + A TestMethod. - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Class that can build a tree of automatic namespace + suites from a group of fixtures. - + - Returns a constraint that tests two items for equality + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. - + - Returns a constraint that tests that two references are the same object + The root of the test suite being created by this builder. - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Initializes a new instance of the class. + The root suite. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Gets the root entry in the tree created by the NamespaceTreeBuilder. + The root suite. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Adds the specified fixtures to the tree. + The fixtures to be added. - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + Adds the specified fixture to the tree. + The fixture to be added. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Constructs an - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + - + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + NUnitTestFixtureBuilder is able to build a fixture given + a class marked with a TestFixtureAttribute or an unmarked + class containing test methods. In the first case, it is + called by the attribute and in the second directly by + NUnitSuiteBuilder. + + + + + Build a TestFixture from type provided. A non-null TestSuite + must always be returned, since the method is generally called + because the user has marked the target class as a fixture. + If something prevents the fixture from being used, it should + be returned nonetheless, labelled as non-runnable. + + An ITypeInfo for the fixture to be used. + A TestSuite object or one derived from TestSuite. + + + + Overload of BuildFrom called by tests that have arguments. + Builds a fixture using the provided type and information + in the ITestFixtureData object. + + The TypeInfo for which to construct a fixture. + An object implementing ITestFixtureData or null. + + + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Method to add test cases to the newly constructed fixture. + The fixture to which cases should be added - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Method to create a test case from a MethodInfo and add + it to the fixture being built. It first checks to see if + any global TestCaseBuilder addin wants to build the + test case. If not, it uses the internal builder + collection maintained by this fixture builder. + + The default implementation has no test case builders. + Derived classes should add builders to the collection + in their constructor. + The method for which a test is to be created + The test suite being built. + A newly constructed Test - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + PairwiseStrategy creates test cases by combining the parameter + data so that all possible pairs of data items are used. + + + The number of test cases that cover all possible pairs of test function + parameters values is significantly less than the number of test cases + that cover all possible combination of test function parameters values. + And because different studies show that most of software failures are + caused by combination of no more than two parameters, pairwise testing + can be an effective ways to test the system when it's impossible to test + all combinations of parameters. + + + The PairwiseStrategy code is based on "jenny" tool by Bob Jenkins: + http://burtleburtle.net/bob/math/jenny.html + + - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Initializes a new instance of the FleaRand class. + The seed. - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + + + FeatureInfo represents coverage of a single value of test function + parameter, represented as a pair of indices, Dimension and Feature. In + terms of unit testing, Dimension is the index of the test parameter and + Feature is the index of the supplied value in that parameter's list of + sources. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Initializes a new instance of FeatureInfo class. + Index of a dimension. + Index of a feature. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + A FeatureTuple represents a combination of features, one per test + parameter, which should be covered by a test case. In the + PairwiseStrategy, we are only trying to cover pairs of features, so the + tuples actually may contain only single feature or pair of features, but + the algorithm itself works with triplets, quadruples and so on. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Initializes a new instance of FeatureTuple class for a single feature. + Single feature. - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Initializes a new instance of FeatureTuple class for a pair of features. + First feature. + Second feature. - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + TestCase represents a single test case covering a list of features. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Initializes a new instance of TestCaseInfo class. + A number of features in the test case. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + PairwiseTestCaseGenerator class implements an algorithm which generates + a set of test cases which covers all pairs of possible values of test + function. + + + The algorithm starts with creating a set of all feature tuples which we + will try to cover (see method). This set + includes every single feature and all possible pairs of features. We + store feature tuples in the 3-D collection (where axes are "dimension", + "feature", and "all combinations which includes this feature"), and for + every two feature (e.g. "A" and "B") we generate both ("A", "B") and + ("B", "A") pairs. This data structure extremely reduces the amount of + time needed to calculate coverage for a single test case (this + calculation is the most time-consuming part of the algorithm). + + + Then the algorithm picks one tuple from the uncovered tuple, creates a + test case that covers this tuple, and then removes this tuple and all + other tuples covered by this test case from the collection of uncovered + tuples. + + + Picking a tuple to cover + + + There are no any special rules defined for picking tuples to cover. We + just pick them one by one, in the order they were generated. + + + Test generation + + + Test generation starts from creating a completely random test case which + covers, nevertheless, previously selected tuple. Then the algorithm + tries to maximize number of tuples which this test covers. + + + Test generation and maximization process repeats seven times for every + selected tuple and then the algorithm picks the best test case ("seven" + is a magic number which provides good results in acceptable time). + + Maximizing test coverage + + To maximize tests coverage, the algorithm walks thru the list of mutable + dimensions (mutable dimension is a dimension that are not included in + the previously selected tuple). Then for every dimension, the algorithm + walks thru the list of features and checks if this feature provides + better coverage than randomly selected feature, and if yes keeps this + feature. + + + This process repeats while it shows progress. If the last iteration + doesn't improve coverage, the process ends. + + + In addition, for better results, before start every iteration, the + algorithm "scrambles" dimensions - so for every iteration dimension + probes in a different order. + + - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Creates a set of test cases for specified dimensions. + + An array which contains information about dimensions. Each element of + this array represents a number of features in the specific dimension. + + + A set of test cases. + - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Gets the test cases generated by this strategy instance. + A set of test cases. - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. - + - Returns a constraint that tests whether the path provided - is under an expected path after canonicalization. + Construct with a collection of individual providers - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Determine whether any data is available for a parameter. + An IParameterInfo representing one + argument to a parameterized test + True if any data is available, otherwise false. - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Return an IEnumerable providing data for use with the + supplied parameter. + An IParameterInfo representing one + argument to a parameterized test + An IEnumerable providing the required data - + - Returns a ConstraintExpression that negates any - following constraint. + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Determine whether any data is available for a parameter. + A ParameterInfo representing one + argument to a parameterized test + + True if any data is available, otherwise false. + - + - Returns a constraint that tests for null + Return an IEnumerable providing data for use with the + supplied parameter. + An IParameterInfo representing one + argument to a parameterized test + + An IEnumerable providing the required data + - + - Returns a constraint that tests for True + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. - + - Returns a constraint that tests for False + Gets the test cases generated by the CombiningStrategy. + The test cases. - + - Returns a constraint that tests for a positive value + Waits for pending asynchronous operations to complete, if appropriate, + and returns a proper result of the invocation by unwrapping task results + The raw result of the method invocation + The unwrapped result, if necessary - + - Returns a constraint that tests for a negative value + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. - + - Returns a constraint that tests for NaN + Constructs a OneTimeSetUpCommand for a suite + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup - + - Returns a constraint that tests for empty + Overridden to run the one-time setup for a suite. + The TestExecutionContext to be used. + A TestResult - + - Returns a constraint that tests whether a collection - contains all unique items. + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Construct a OneTimeTearDownCommand + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Overridden to run the teardown methods specified on the test. + The TestExecutionContext to be used. + A TestResult - + - Returns a constraint that tests whether a collection is ordered + ContextSettingsCommand applies specified changes to the + TestExecutionContext prior to running a test. No special + action is needed after the test runs, since the prior + context will be restored automatically. - + - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. - - NOTE: This interface is used in both the framework - and the core, even though that results in two different - types. However, sharing the source code guarantees that - the various implementations will be compatible and that - the core is able to reflect successfully over the - framework implementations of ITestCaseData. + The CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + - + - Gets the argument list to be provided to the test + Use an application-defined default value. - + - Gets the expected result + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. - + - Indicates whether a result has been specified. - This is necessary because the result may be - null, so it's value cannot be checked. + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. - + - Gets the expected exception Type + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. - + - Gets the FullName of the expected exception + TODO: Documentation needed for class - + + TODO: Documentation needed for field + + - Gets the name to be used for the test + TODO: Documentation needed for constructor + - + - Gets the description of the test + TODO: Documentation needed for class - + - Gets a value indicating whether this is ignored. + Initializes a new instance of the class. - true if ignored; otherwise, false. + The inner command. + The max time allowed in milliseconds - + - Gets a value indicating whether this is explicit. + Runs the test, saving a TestResult in the supplied TestExecutionContext - true if explicit; otherwise, false. + The context in which the test should run. + A TestResult - + - Gets the ignore reason. + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. - The ignore reason. - + - The Iz class is a synonym for Is intended for use in VB, - which regards Is as a keyword. + Initializes a new instance of the class. + The inner command. - + - The List class is a helper class with properties and methods - that supply a number of constraints used with lists and collections. + Runs the test, saving a TestResult in the supplied TestExecutionContext. + The context in which the test should run. + A TestResult - + - List.Map returns a ListMapper, which can be used to map - the original collection to another collection. + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. - - - + - ListMapper is used to transform a collection used as an actual argument - producing another collection to be used in the assertion. + Construct a SetUpTearDownNode + A list of setup methods for this level + A list teardown methods for this level - + - Construct a ListMapper based on a collection + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. - The collection to be transformed - + - Produces a collection containing all the values of a property + Run SetUp on this level. - The collection of property values - + The execution context to use for running. - + - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. + Run TearDown for this level. + - + - Get a randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. + TODO: Documentation needed for class - + - Get a randomizer for a particular parameter, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. + Initializes a new instance of the class. + The test being skipped. - + - Construct a randomizer using a random seed + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + The execution context for the test + A TestResult - + - Construct a randomizer using a specified seed + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. - + - Return an array of random doubles between 0.0 and 1.0. + Initializes a new instance of the class. - - + The inner command. - + - Return an array of random doubles with values in a specified range. + Runs the test, saving a TestResult in the supplied TestExecutionContext. + The context in which the test should run. + A TestResult - + - Return an array of random ints with values in a specified range. + TestActionItem represents a single execution of an + ITestAction. It is used to track whether the BeforeTest + method has been called and suppress calling the + AfterTest method if it has not. - + - Get a random seed for use in creating a randomizer. + Construct a TestActionItem + The ITestAction to be included - + - The SpecialValue enum is used to represent TestCase arguments - that cannot be used as arguments to an Attribute. + Run the BeforeTest method of the action and remember that it has been run. + The test to which the action applies - + - Null represents a null value, which cannot be used as an - argument to an attribute under .NET 1.x + Run the AfterTest action, but only if the BeforeTest + action was actually run. + The test to which the action applies - + - Basic Asserts on strings. + TestCommand is the abstract base class for all test commands + in the framework. A TestCommand represents a single stage in + the execution of a test, e.g.: SetUp/TearDown, checking for + Timeout, verifying the returned result from a method, etc. + + TestCommands may decorate other test commands so that the + execution of a lower-level command is nested within that + of a higher level command. All nested commands are executed + synchronously, as a single unit. Scheduling test execution + on separate threads is handled at a higher level, using the + task dispatcher. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Construct a TestCommand for a test. - - + The test to be executed - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Gets the test associated with this command. - - - + - Asserts that a string is found within another string. + Runs the test in a specified context, returning a TestResult. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message + The TestExecutionContext to be used for running the test. + A TestResult - + - Asserts that a string is found within another string. + TestMethodCommand is the lowest level concrete command + used to run actual test cases. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string is found within another string. + Initializes a new instance of the class. - The expected string - The string to be examined + The test. - + - Asserts that a string is not found within another string. + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message + The execution context - + - Asserts that a string is found within another string. + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string is found within another string. + Constructs a TheoryResultCommand - The expected string - The string to be examined + The command to be wrapped by this one - + - Asserts that a string starts with another string. + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message + + - + - Asserts that a string starts with another string. + EventListenerTextWriter sends text output to the currently active + ITestEventListener in the form of a TestOutput object. If no event + listener is active in the contet, or if there is no context, + the output is forwarded to the supplied default writer. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string starts with another string. + Construct an EventListenerTextWriter - The expected string - The string to be examined + The name of the stream to use for events + The default writer to use if no listener is available - + - Asserts that a string does not start with another string. + Write a single char - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string does not start with another string. + Write a string - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string does not start with another string. + Write a string followed by a newline - The expected string - The string to be examined - + - Asserts that a string ends with another string. + Get the Encoding for this TextWriter - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string ends with another string. + A utility class to create TestCommands - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string ends with another string. + Gets the command to be executed before any of + the child tests are run. - The expected string - The string to be examined + A TestCommand - + - Asserts that a string does not end with another string. + Gets the command to be executed after all of the + child tests are run. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message + A TestCommand - + - Asserts that a string does not end with another string. + Creates a test command for use in running this test. - The expected string - The string to be examined - The message to display in case of failure + - + - Asserts that a string does not end with another string. + Creates a command for skipping a test. The result returned will + depend on the test RunState. - The expected string - The string to be examined - + - Asserts that two strings are equal, without regard to case. + Builds the set up tear down list. - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message + Type of the fixture. + Type of the set up attribute. + Type of the tear down attribute. + A list of SetUpTearDownItems - + - Asserts that two strings are equal, without regard to case. + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. - The expected string - The actual string - The message to display in case of failure - + - Asserts that two strings are equal, without regard to case. + List of Child WorkItems - The expected string - The actual string - + - Asserts that two strings are not equal, without regard to case. + A count of how many tests in the work item have a value for the Order Property - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that two strings are Notequal, without regard to case. + Construct a CompositeWorkItem for executing a test suite + using a filter to select child tests. - The expected string - The actual string - The message to display in case of failure + The TestSuite to be executed + A filter used to select child tests - + - Asserts that two strings are not equal, without regard to case. + Method that actually performs the work. Overridden + in CompositeWorkItem to do setup, run all child + items and then do teardown. - The expected string - The actual string - + - Asserts that a string matches an expected regular expression pattern. + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. - The regex pattern to be matched - The actual string - The message to display in case of failure - Arguments used in formatting the message + + A signed integer that indicates the relative values of and , as shown in the following table.Value Meaning Less than zero is less than .Zero equals .Greater than zero is greater than . + + The first object to compare.The second object to compare. - + - Asserts that a string matches an expected regular expression pattern. + Sorts tests under this suite. - The regex pattern to be matched - The actual string - The message to display in case of failure - + - Asserts that a string matches an expected regular expression pattern. + Cancel (abort or stop) a CompositeWorkItem and all of its children - The regex pattern to be matched - The actual string + true if the CompositeWorkItem and all of its children should be aborted, false if it should allow all currently running tests to complete - + - Asserts that a string does not match an expected regular expression pattern. + The EventPumpState enum represents the state of an + EventPump. - The regex pattern to be used - The actual string - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string does not match an expected regular expression pattern. + The pump is stopped - The regex pattern to be used - The actual string - The message to display in case of failure - + - Asserts that a string does not match an expected regular expression pattern. + The pump is pumping events with no stop requested - The regex pattern to be used - The actual string - + - The TestCaseData class represents a set of arguments - and other parameter info to be used for a parameterized - test case. It provides a number of instance modifiers - for use in initializing the test case. - - Note: Instance modifiers are getters that return - the same instance after modifying it's state. + The pump is pumping events but a stop has been requested - + - The argument list to be provided to the test + EventPump pulls events out of an EventQueue and sends + them to a listener. It is used to send events back to + the client without using the CallContext of the test + runner thread. - + - The expected result to be returned + The downstream listener to which we send events - + - Set to true if this has an expected result + The queue that holds our events - + - The expected exception Type + Thread to do the pumping - + - The FullName of the expected exception + The current state of the eventpump - + - The name to be used for the test + Constructor + The EventListener to receive events + The event queue to pull events from - + - The description of the test + Gets or sets the current state of the pump - + - A dictionary of properties, used to add information - to tests without requiring the class to change. + Gets or sets the name of this EventPump + (used only internally and for testing). - + - If true, indicates that the test case is to be ignored + Dispose stops the pump + Disposes the used WaitHandle, too. - + - If true, indicates that the test case is marked explicit + Start the pump - + - The reason for ignoring a test case + Tell the pump to stop after emptying the queue. - + - Initializes a new instance of the class. + Our thread proc for removing items from the event + queue and sending them on. Note that this would + need to do more locking if any other thread were + removing events from the queue. - The arguments. - + - Initializes a new instance of the class. + NUnit.Core.Event is the abstract base for all stored events. + An Event is the stored representation of a call to the + ITestListener interface and is used to record such calls + or to queue them for forwarding on another thread or at + a later time. - The argument. - + - Initializes a new instance of the class. + The Send method is implemented by derived classes to send the event to the specified listener. - The first argument. - The second argument. + The listener. - + - Initializes a new instance of the class. + TestStartedEvent holds information needed to call the TestStarted method. - The first argument. - The second argument. - The third argument. - + - Sets the expected result for the test + Initializes a new instance of the class. - The expected result - A modified TestCaseData + The test. - + - Sets the expected exception type for the test + Calls TestStarted on the specified listener. - Type of the expected exception. - The modified TestCaseData instance + The listener. - + - Sets the expected exception type for the test + TestFinishedEvent holds information needed to call the TestFinished method. - FullName of the expected exception. - The modified TestCaseData instance - + - Sets the name of the test case + Initializes a new instance of the class. - The modified TestCaseData instance + The result. - + - Sets the description for the test case - being constructed. + Calls TestFinished on the specified listener. - The description. - The modified TestCaseData instance. + The listener. - + - Applies a category to the test + TestOutputEvent holds information needed to call the TestOutput method. - - - + - Applies a named property to the test + Initializes a new instance of the class. - - - + The output object. - + - Applies a named property to the test + Calls TestOutput on the specified listener. - - - + The listener. - + - Applies a named property to the test + Implements a queue of work items each of which + is queued as a WaitCallback. - - - - + - Ignores this TestCase. + Gets the count of items in the queue. - - + - Ignores this TestCase, specifying the reason. + Enqueues the specified event - The reason. - + The event to enqueue. - + - Marks this TestCase as Explicit + Removes the first element from the queue and returns it (or null). - + + If true and the queue is empty, the calling thread is blocked until + either an element is enqueued, or is called. + + + + + If the queue not empty + the first element. + + + otherwise, if ==false + or has been called + null. + + + - + - Marks this TestCase as Explicit, specifying the reason. + Stop processing of the queue - The reason. - - + - Gets the argument list to be provided to the test + An IWorkItemDispatcher handles execution of work items. - + - Gets the expected result + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + The item to dispatch - + - Returns true if the result has been set + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete - + - Gets the expected exception Type + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. - + - Gets the FullName of the expected exception + Construct a ParallelWorkItemDispatcher + Number of workers to use - + - Gets the name to be used for the test + Enumerates all the shifts supported by the dispatcher - + - Gets the description of the test + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + The item to dispatch - + - Gets a value indicating whether this is ignored. + Cancel the ongoing run completely. + If no run is in process, the call has no effect. - true if ignored; otherwise, false. - + - Gets a value indicating whether this is explicit. + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. - true if explicit; otherwise, false. - + - Gets the ignore reason. + The EventQueue created and filled by this listener - The ignore reason. - + - Gets a list of categories associated with this test. + Construct a QueuingEventListener - + - Gets the property dictionary for this test + A test has started + The test that is starting - + - Provide the context information of the current test + A test case finished + Result of the test case - + - Constructs a TestContext using the provided context dictionary + Called when a test produces output for immediate display - A context dictionary + A TestOutput object containing the text to display - + - Get the current test context. This is created - as needed. The user may save the context for - use within a test, but it should not be used - outside the test for which it is created. + A SimpleWorkItem represents a single test case and is + marked as completed immediately upon execution. This + class is also used for skipped or ignored test suites. - + - Gets a TestAdapter representing the currently executing test in this context. + Construct a simple work item for a test. + The test to be executed + The filter used to select this test - + - Gets a ResultAdapter representing the current result for the test - executing in this context. + Method that performs actually performs the work. - + - Gets the directory containing the current test assembly. + SimpleWorkItemDispatcher handles execution of WorkItems by + directly executing them. It is provided so that a dispatcher + is always available in the context, thereby simplifying the + code needed to run child tests. - + - Gets the directory to be used for outputing files created - by this test run. + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and a thread is created on which to + run it. Subsequent calls come from the top level + item or its descendants on the proper thread. + The item to dispatch - + - TestAdapter adapts a Test for consumption by - the user test code. + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + true if the run should be aborted, false if it should allow its currently running test to complete - + - Constructs a TestAdapter for this context + A TestWorker pulls work items from a queue + and executes them. - The context dictionary - + - The name of the test. + Event signaled immediately before executing a WorkItem - + - The FullName of the test + Event signaled immediately after executing a WorkItem - + - The properties of the test. + Construct a new TestWorker. + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests - + - ResultAdapter adapts a TestResult for consumption by - the user test code. + The name of this worker - also used for the thread - + - Construct a ResultAdapter for a context + Indicates whether the worker thread is running - The context holding the result - + - The TestState of current test. This maps to the ResultState - used in nunit.core and is subject to change in the future. + Our ThreadProc, which pulls and runs tests in a loop - + - The TestStatus of current test. This enum will be used - in future versions of NUnit and so is to be preferred - to the TestState value. + Start processing work items. - + - Provides details about a test + Stop the thread, either immediately or after finishing the current WorkItem + true if the thread should be aborted, false if it should allow the currently running test to complete - + - Creates an instance of TestDetails + The TextCapture class intercepts console output and writes it + to the current execution context, if one is present on the thread. + If no execution context is found, the output is written to a + default destination, normally the original destination of the + intercepted output. - The fixture that the test is a member of, if available. - The method that implements the test, if available. - The full name of the test. - A string representing the type of test, e.g. "Test Case". - Indicates if the test represents a suite of tests. - + - The fixture that the test is a member of, if available. + Construct a TextCapture object + The default destination for non-intercepted output - + - The method that implements the test, if available. + Gets the Encoding in use by this TextWriter - + - The full name of the test. + Writes a single character + The char to write - + - A string representing the type of test, e.g. "Test Case". + Writes a string + The string to write - + - Indicates if the test represents a suite of tests. + Writes a string followed by a line terminator + The string to write + + + + A WorkItem may be an individual test case, a fixture or + a higher level grouping of tests. All WorkItems inherit + from the abstract WorkItem class, which uses the template + pattern to allow derived classes to perform work in + whatever way is needed. + + A WorkItem is created with a particular TestExecutionContext + and is responsible for re-establishing that context in the + current thread before it begins or resumes execution. + - + - The ResultState enum indicates the result of running a test + Creates a work item. + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + - + - The result is inconclusive + Construct a WorkItem for a particular test. + The test that the WorkItem will run - + - The test was not runnable. + Initialize the TestExecutionContext. This must be done + before executing the WorkItem. + + Originally, the context was provided in the constructor + but delaying initialization of the context until the item + is about to be dispatched allows changes in the parent + context during OneTimeSetUp to be reflected in the child. + + The TestExecutionContext to use - + - The test has been skipped. + Event triggered when the item is complete - + - The test has been ignored. + Gets the current state of the WorkItem - + - The test succeeded + The test being executed by the work item - + - The test failed + The execution context - + - The test encountered an unexpected exception + The unique id of the worker executing this item. - + - The test was cancelled by the user + The test actions to be performed before and after this test - + - The TestStatus enum indicates the result of running a test + Indicates whether this WorkItem may be run in parallel - + - The test was inconclusive + The test result - + - The test has skipped + Execute the current work item, including any + child work items. - + - The test succeeded + Cancel (abort or stop) a WorkItem + true if the WorkItem should be aborted, false if it should run to completion - + - The test failed + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. - + - Helper class with static methods used to supply constraints - that operate on strings. + Method called by the derived class when all work is complete - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + WorkItemQueueState indicates the current state of a WorkItemQueue - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + The queue is paused - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + The queue is running - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + The queue is stopped - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Initializes a new instance of the class. + The name of the queue. - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Gets the name of the work item queue. - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Gets the total number of items processed so far - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Gets the maximum number of work items. - + - TextMessageWriter writes constraint descriptions and messages - in displayable form as a text stream. It tailors the display - of individual message components to form the standard message - format of NUnit assertion failure messages. + Gets the current state of the queue - + - MessageWriter is the abstract base for classes that write - constraint descriptions and messages in some form. The - class has separate methods for writing various components - of a message, allowing implementations to tailor the - presentation as needed. + Get a bool indicating whether the queue is empty. - + - Construct a MessageWriter given a culture + Enqueue a WorkItem to be processed + The WorkItem to process - + - Method to write single line message with optional args, usually - written to precede the general failure message. + Dequeue a WorkItem for processing - The message to be written - Any arguments used in formatting the message + A WorkItem or null if the queue has stopped - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. + Start or restart processing of items from the queue - The indentation level of the message - The message to be written - Any arguments used in formatting the message - + - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. + Signal the queue to stop - The constraint that failed - + - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. + Pause the queue for restarting later - The expected value - The actual value causing the failure - + - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. + The current state of a work item - The expected value - The actual value causing the failure - The tolerance within which the test was made - + - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. + Ready to run or continue - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in locating the point where the strings differ - If true, the strings should be clipped to fit the line - + - Writes the text for a connector. + Work Item is executing - The connector. - + - Writes the text for a predicate. + Complete - The predicate. - + + + The dispatcher needs to do different things at different, + non-overlapped times. For example, non-parallel tests may + not be run at the same time as parallel tests. We model + this using the metaphor of a working shift. The WorkShift + class associates one or more WorkItemQueues with one or + more TestWorkers. + + Work in the queues is processed until all queues are empty + and all workers are idle. Both tests are needed because a + worker that is busy may end up adding more work to one of + the queues. At that point, the shift is over and another + shift may begin. This cycle continues until all the tests + have been run. + + + - Writes the text for an expected value. + Construct a WorkShift - The expected value. - + - Writes the text for a modifier + Event that fires when the shift has ended - The modifier. - + - Writes the text for an actual value. + Gets a flag indicating whether the shift is currently active - The actual value. - + - Writes the text for a generalized value. + Gets a list of the queues associated with this shift. - The value. + Used for testing - + - Writes the text for a collection value, - starting at a particular point, to a max length + Gets the list of workers associated with this shift. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - + - Abstract method to get the max line length + Gets a bool indicating whether this shift has any work to do - + - Prefix used for the expected value line of a message + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. - + - Prefix used for the actual value line of a message + Assign a worker to the shift. + - + - Length of a message prefix + Start or restart processing for the shift - + - Construct a TextMessageWriter + End the shift, pausing all queues and raising + the EndOfShift event. - + - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. + Shut down the shift. - - - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. + Cancel (abort or stop) the shift without completing all work - The indentation level of the message - The message to be written - Any arguments used in formatting the message + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete - + - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. + ClassName filter selects tests based on the class FullName - The constraint that failed - + - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. + Construct a FullNameFilter for a single name - The expected value - The actual value causing the failure + The name the filter will recognize. - + - Display Expected and Actual lines for given values, including - a tolerance value on the expected line. + Match a test against a single value. - The expected value - The actual value causing the failure - The tolerance within which the test was made - + - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. + Gets the element name - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in string comparisons - If true, clip the strings to fit the max line length + Element name - + - Writes the text for a connector. + A base class for multi-part filters - The connector. - + - Writes the text for a predicate. + Constructs an empty CompositeFilter - The predicate. - + - Write the text for a modifier. + Constructs a CompositeFilter from an array of filters - The modifier. + - + - Writes the text for an expected value. + Adds a filter to the list of filters - The expected value. + The filter to be added - + - Writes the text for an actual value. + Return a list of the composing filters. - The actual value. - + - Writes the text for a generalized value. + Checks whether the CompositeFilter is matched by a test. - The value. + The test to be matched - + - Writes the text for a collection value, - starting at a particular point, to a max length + Checks whether the CompositeFilter is matched by a test. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write + The test to be matched - + - Write the generic 'Expected' line for a constraint + Checks whether the CompositeFilter is explicit matched by a test. - The constraint that failed + The test to be matched - + - Write the generic 'Expected' line for a given value + Adds an XML node - The expected value + Parent node + True if recursive + The added XML node - + - Write the generic 'Expected' line for a given value - and tolerance. + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName - The expected value - The tolerance within which the test was made - + - Write the generic 'Actual' line for a constraint + Construct a FullNameFilter for a single name - The constraint for which the actual value is to be written + The name the filter will recognize. - + - Write the generic 'Actual' line for a given value + Match a test against a single value. - The actual value causing a failure - + - Gets or sets the maximum line length for this writer + Gets the element name + Element name - + - Helper class with properties and methods that supply - constraints that operate on exceptions. + FullName filter selects tests based on their FullName - + - Creates a constraint specifying the exact type of exception expected + Construct a MethodNameFilter for a single name + The name the filter will recognize. - + - Creates a constraint specifying the exact type of exception expected + Match a test against a single value. - + - Creates a constraint specifying the type of exception expected + Gets the element name + Element name - + - Creates a constraint specifying the type of exception expected + PropertyFilter is able to select or exclude tests + based on their properties. + - + - Creates a constraint specifying an expected exception + Construct a PropertyFilter using a property name and expected value + A property name + The expected value of the property - + - Creates a constraint specifying an exception with a given InnerException + Check whether the filter matches a test + The test to be matched + - + - Creates a constraint specifying an expected TargetInvocationException + Adds an XML node + Parent node + True if recursive + The added XML node - + - Creates a constraint specifying an expected TargetInvocationException + Gets the element name + Element name - + - Creates a constraint specifying an expected TargetInvocationException + TestName filter selects tests based on their Name - + - Creates a constraint specifying that no exception is thrown + Construct a TestNameFilter for a single name + The name the filter will recognize. - + - Attribute used to apply a category to a test + Match a test against a single value. - + - The name of the category + Gets the element name + Element name - + - Construct attribute for a given category based on - a name. The name may not contain the characters ',', - '+', '-' or '!'. However, this is not checked in the - constructor since it would cause an error to arise at - as the test was loaded without giving a clear indication - of where the problem is located. The error is handled - in NUnitFramework.cs by marking the test as not - runnable. + Combines multiple filters so that a test must pass all + of them in order to pass this filter. - The name of the category - + - Protected constructor uses the Type name as the name - of the category. + Constructs an empty AndFilter - + - The name of the category + Constructs an AndFilter from an array of filters + - + - Used to mark a field for use as a datapoint when executing a theory - within the same fixture that requires an argument of the field's Type. + Checks whether the AndFilter is matched by a test + The test to be matched + True if all the component filters pass, otherwise false - + - Used to mark an array as containing a set of datapoints to be used - executing a theory within the same fixture that requires an argument - of the Type of the array elements. + Checks whether the AndFilter is matched by a test + The test to be matched + True if all the component filters match, otherwise false - + - Attribute used to provide descriptive text about a - test case or fixture. + Checks whether the AndFilter is explicit matched by a test. + The test to be matched + True if all the component filters explicit match, otherwise false - + - Construct the attribute + Gets the element name - Text describing the test + Element name - + - Gets the test description + CategoryFilter is able to select or exclude tests + based on their categories. + - + - Enumeration indicating how the expected message parameter is to be used + Construct a CategoryFilter using a single category name + A category name - - Expect an exact match + + + Check whether the filter matches a test + + The test to be matched + - - Expect a message containing the parameter string + + + Gets the element name + + Element name - - Match the regular expression provided as a parameter + + + IdFilter selects tests based on their id + - - Expect a message that starts with the parameter string + + + Construct an IdFilter for a single value + + The id the filter will recognize. - + - ExpectedExceptionAttribute + Match a test against a single value. - - + - Constructor for a non-specific exception + Gets the element name + Element name - + - Constructor for a given type of exception + NotFilter negates the operation of another filter - The type of the expected exception - + - Constructor for a given exception name + Construct a not filter on another filter - The full name of the expected exception + The filter to be negated - + - Gets or sets the expected exception type + Gets the base filter - + - Gets or sets the full Type name of the expected exception + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Gets or sets the expected message text + Check whether the filter matches a test + The test to be matched + True if it matches, otherwise false - + - Gets or sets the user message displayed in case of failure + Determine if a test matches the filter explicitly. That is, it must + be a direct match of the test itself or one of it's children. + The test to which the filter is applied + True if the test matches the filter explicitly, otherwise false - + - Gets or sets the type of match to be performed on the expected message + Adds an XML node + Parent node + True if recursive + The added XML node - + - Gets the name of a method to be used as an exception handler + Combines multiple filters so that a test must pass one + of them in order to pass this filter. - + - ExplicitAttribute marks a test or test fixture so that it will - only be run if explicitly executed from the gui or command line - or if it is included by use of a filter. The test will not be - run simply because an enclosing suite is run. + Constructs an empty OrFilter - + - Default constructor + Constructs an AndFilter from an array of filters + - + - Constructor with a reason + Checks whether the OrFilter is matched by a test - The reason test is marked explicit + The test to be matched + True if any of the component filters pass, otherwise false - + - The reason test is marked explicit + Checks whether the OrFilter is matched by a test + The test to be matched + True if any of the component filters match, otherwise false - + - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. + Checks whether the OrFilter is explicit matched by a test + The test to be matched + True if any of the component filters explicit match, otherwise false - + - Constructs the attribute without giving a reason - for ignoring the test. + Gets the element name + Element name - + - Constructs the attribute giving a reason for ignoring the test + ValueMatchFilter selects tests based on some value, which + is expected to be contained in the test. - The reason for ignoring the test - + - The reason for ignoring a test + Returns the value matched by the filter - used for testing - + - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. + Indicates whether the value is a regular expression - + - Constructor with no included items specified, for use - with named property syntax. + Construct a ValueMatchFilter for a single value. + The value to be included. - + - Constructor taking one or more included items + Match the input provided by the derived class - Comma-delimited list of included items + The value to be matchedT + True for a match, false otherwise. - + - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. + Adds an XML node + Parent node + True if recursive + The added XML node - + - Name of the item to be excluded. Multiple items - may be given, separated by a comma. + Gets the element name + Element name - + - The reason for including or excluding the test + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. - + - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. + Construct a GenericMethodHelper for a method + MethodInfo for the method to examine - + - Constructor with no platforms specified, for use - with named property syntax. + Return the type arguments for the method, deducing them + from the arguments actually provided. + The arguments to the method + An array of type arguments. - + - Constructor taking one or more platforms + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - Comma-deliminted list of platforms - + - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. + Initializes a new instance of the class. - + - Constructor with no cultures specified, for use - with named property syntax. + Initializes a new instance of the class. + The message. - + - Constructor taking one or more cultures + Initializes a new instance of the class. - Comma-deliminted list of cultures + The message. + The inner. - + - Marks a test to use a combinatorial join of any argument data - provided. NUnit will create a test case for every combination of - the arguments provided. This can result in a large number of test - cases and so should be used judiciously. This is the default join - type, so the attribute need not be used except as documentation. + Serialization Constructor - + - PropertyAttribute is used to attach information to a test as a name/value pair.. + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. - + - Construct a PropertyAttribute with a name and string value + Default constructor uses the current culture. - The name of the property - The property value - + - Construct a PropertyAttribute with a name and int value + Construct a CultureDetector for a particular culture for testing. - The name of the property - The property value + The culture to be used - + - Construct a PropertyAttribute with a name and double value + Test to determine if one of a collection of cultures + is being used currently. - The name of the property - The property value + + - + - Constructor for derived classes that set the - property dictionary directly. + Tests to determine if the current culture is supported + based on a culture attribute. + The attribute to examine + - + - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. + Test to determine if the a particular culture or comma- + delimited set of cultures is in use. + Name of the culture or comma-separated list of culture ids + True if the culture is in use on the system - + - Gets the property dictionary for this attribute + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - + - Default constructor + ExceptionHelper provides static methods for working with exceptions - + - Marks a test to use pairwise join of any argument data provided. - NUnit will attempt too excercise every pair of argument values at - least once, using as small a number of test cases as it can. With - only two arguments, this is the same as a combinatorial join. + Rethrows an exception, preserving its stack trace + The exception to rethrow - + - Default constructor + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + The exception. + A combined message string. - + - Marks a test to use a sequential join of any argument data - provided. NUnit will use arguements for each parameter in - sequence, generating test cases up to the largest number - of argument values provided and using null for any arguments - for which it runs out of values. Normally, this should be - used with the same number of arguments for each parameter. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + The exception. + A combined stack trace. - + - Default constructor + Gets the stack trace of the exception. + The exception. + A string representation of the stack trace. - + - Summary description for MaxTimeAttribute. + TextMessageWriter writes constraint descriptions and messages + in displayable form as a text stream. It tailors the display + of individual message components to form the standard message + format of NUnit assertion failure messages. - + - Construct a MaxTimeAttribute, given a time in milliseconds. + Prefix used for the expected value line of a message - The maximum elapsed time in milliseconds - + - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. + Prefix used for the actual value line of a message - + - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. + Length of a message prefix - + - Abstract base class for attributes that apply to parameters - and supply data for the parameter. + Construct a TextMessageWriter - + - Gets the data to be provided to the specified parameter + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + - + - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary. + Gets or sets the maximum line length for this writer - + - Construct with one argument + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. - + The indentation level of the message + The message to be written + Any arguments used in formatting the message - + - Construct with two arguments + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. - - + The result of the constraint that failed - + - Construct with three arguments + Gets the unique type name between expected and actual. - - - + The expected value + The actual value causing the failure + Output of the unique type name for expected + Output of the unique type name for actual - + - Construct with an array of arguments + Display Expected and Actual lines for given _values. This + method may be called by constraints that need more control over + the display of actual and expected _values than is provided + by the default implementation. - + The expected value + The actual value causing the failure - + - Get the collection of values to be used as arguments + Display Expected and Actual lines for given _values, including + a tolerance value on the expected line. + The expected value + The actual value causing the failure + The tolerance within which the test was made - + - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. + Display the expected and actual string _values on separate lines. + If the mismatch parameter is >=0, an additional line is displayed + line containing a caret that points to the mismatch point. - + The expected string value + The actual string value + The point at which the strings don't match or -1 + If true, case is ignored in string comparisons + If true, clip the strings to fit the max line length - + - Construct a set of doubles from min to max + Writes the text for an actual value. - - - + The actual value. - + - Construct a set of ints from min to max + Writes the text for a generalized value. - - - + The value. - + - Get the collection of values to be used as arguments + Writes the text for a collection value, + starting at a particular point, to a max length + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write - + - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. + Write the generic 'Expected' line for a constraint + The constraint that failed - + - Construct a range of ints using default step of 1 + Write the generic 'Expected' line for a given value - - + The expected value - + - Construct a range of ints specifying the step size + Write the generic 'Expected' line for a given value + and tolerance. - - - + The expected value + The tolerance within which the test was made - + - Construct a range of longs + Write the generic 'Actual' line for a constraint - - - + The ConstraintResult for which the actual value is to be written - + - Construct a range of doubles + Write the generic 'Actual' line for a given value - - - + The actual value causing a failure - + - Construct a range of floats + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - - - - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + Initializes a new instance of the class. - + - Construct a RepeatAttribute + Initializes a new instance of the class. - The number of times to run the test + The message. - + - RequiredAddinAttribute may be used to indicate the names of any addins - that must be present in order to run some or all of the tests in an - assembly. If the addin is not loaded, the entire assembly is marked - as NotRunnable. + Initializes a new instance of the class. + The message. + The inner. - + - Initializes a new instance of the class. + Serialization Constructor - The required addin. - + - Gets the name of required addin. + Interface for logging within the engine - The required addin name. - + - Summary description for SetCultureAttribute. + Logs the specified message at the error level. + The message. - + - Construct given the name of a culture + Logs the specified message at the error level. - + The message. + The arguments. - + - Summary description for SetUICultureAttribute. + Logs the specified message at the warning level. + The message. - + - Construct given the name of a culture + Logs the specified message at the warning level. - + The message. + The arguments. - + - SetUpAttribute is used in a TestFixture to identify a method - that is called immediately before each test is run. It is - also used in a SetUpFixture to identify the method that is - called once, before any of the subordinate tests are run. + Logs the specified message at the info level. + The message. - + - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. + Logs the specified message at the info level. + The message. + The arguments. - + - Attribute used to mark a static (shared in VB) property - that returns a list of tests. + Logs the specified message at the debug level. + The message. - + - Attribute used in a TestFixture to identify a method that is - called immediately after each test is run. It is also used - in a SetUpFixture to identify the method that is called once, - after all subordinate tests have run. In either case, the method - is guaranteed to be called, even if an exception is thrown. + Logs the specified message at the debug level. + The message. + The arguments. - + - Provide actions to execute before and after tests. + InternalTrace provides facilities for tracing the execution + of the NUnit framework. Tests and classes under test may make use + of Console writes, System.Diagnostics.Trace or various loggers and + NUnit itself traps and processes each of them. For that reason, a + separate internal trace is needed. + + Note: + InternalTrace uses a global lock to allow multiple threads to write + trace messages. This can easily make it a bottleneck so it must be + used sparingly. Keep the trace Level as low as possible and only + insert InternalTrace writes where they are needed. + TODO: add some buffering and a separate writer thread as an option. + TODO: figure out a way to turn on trace in specific classes only. - + - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + Gets a flag indicating whether the InternalTrace is initialized - + - Executed before each test is run + Initialize the internal trace facility using the name of the log + to be written to and the trace level. - Provides details about the test that is going to be run. + The log name + The trace level - + - Executed after each test is run + Initialize the internal trace using a provided TextWriter and level - Provides details about the test that has just been run. + A TextWriter + The InternalTraceLevel - + - Provides the target for the action attribute + Get a named Logger - The target for the action attribute + - + - Method called before each test + Get a logger named for a particular Type. - Info about the test to be run - + - Method called after each test + InternalTraceLevel is an enumeration controlling the + level of detailed presented in the internal log. - Info about the test that was just run - + - Gets or sets the ActionTargets for this attribute + Use the default settings as specified by the user. - + - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. + Do not display any trace messages - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - + - Descriptive text for this test + Display Error messages only - + - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. + Display Warning level and higher messages - + - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant + Display informational and higher messages - - + - Construct a TestCaseAttribute with a single argument + Display debug messages and higher - i.e. all messages - - + - Construct a TestCaseAttribute with a two arguments + Display debug messages and higher - i.e. all messages - - - + - Construct a TestCaseAttribute with a three arguments + A trace listener that writes to a separate file per domain + and process using it. - - - - + - Gets the list of arguments to a test case + Construct an InternalTraceWriter that writes to a file. + Path to the file to use - + - Gets or sets the expected result. Use - ExpectedResult by preference. + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. - The result. + - + - Gets or sets the expected result. + Returns the character encoding in which the output is written. - The result. + The character encoding in which the output is written. - + - Gets a flag indicating whether an expected - result has been set. + Writes a character to the text string or stream. + The character to write to the text stream. - + - Gets a list of categories associated with this test; + Writes a string to the text string or stream. + The string to write. - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Writes a string followed by a line terminator to the text string or stream. + The string to write. If is null, only the line terminator is written. - + - Gets or sets the expected exception. + Releases the unmanaged resources used by the and optionally releases the managed resources. - The expected exception. + true to release both managed and unmanaged resources; false to release only unmanaged resources. - + - Gets or sets the name the expected exception. + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. - The expected name of the exception. - + - Gets or sets the expected message of the expected exception + Provides internal logging to the NUnit framework - The expected message of the exception. - + - Gets or sets the type of match to be performed on the expected message + Initializes a new instance of the class. + The name. + The log level. + The writer where logs are sent. - + - Gets or sets the description. + Logs the message at error level. - The description. + The message. - + - Gets or sets the name of the test. + Logs the message at error level. - The name of the test. + The message. + The message arguments. - + - Gets or sets the ignored status of the test + Logs the message at warm level. + The message. - + - Gets or sets the ignored status of the test + Logs the message at warning level. + The message. + The message arguments. - + - Gets or sets the explicit status of the test + Logs the message at info level. + The message. - + - Gets or sets the reason for not running the test + Logs the message at info level. + The message. + The message arguments. - + - Gets or sets the reason for not running the test. - Set has the side effect of marking the test as ignored. + Logs the message at debug level. - The ignore reason. + The message. - + - FactoryAttribute indicates the source to be used to - provide test cases for a test method. + Logs the message at debug level. + The message. + The message arguments. - + - Construct with the name of the data source, which must - be a property, field or method of the test class itself. + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. - An array of the names of the factories that will provide data - + - Construct with a Type, which must implement IEnumerable + Construct a MethodWrapper for a Type and a MethodInfo. - The Type that will provide data - + - Construct with a Type and name. - that don't support params arrays. + Construct a MethodInfo for a given Type and method name. - The Type that will provide data - The name of the method, property or field that will provide data - + - The name of a the method, property or fiend to be used as a source + Gets the Type from which this method was reflected. - + - A Type to be used as a source + Gets the MethodInfo for this method. - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Gets the name of the method. - - - [TestFixture] - public class ExampleClass - {} - - - + - Default constructor + Gets a value indicating whether the method is abstract. - + - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. + Gets a value indicating whether the method is public. - - + - Descriptive text for this fixture + Gets a value indicating whether the method contains unassigned generic type parameters. - + - Gets and sets the category for this fixture. - May be a comma-separated list of categories. + Gets a value indicating whether the method is a generic method. - + - Gets a list of categories for this fixture + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - + - The arguments originally provided to the attribute + Gets the return Type of the method. - + - Gets or sets a value indicating whether this should be ignored. + Gets the parameters of the method. - true if ignore; otherwise, false. + - + - Gets or sets the ignore reason. May set Ignored as a side effect. + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - The ignore reason. - + - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. + Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. + The type arguments to be used + A new IMethodInfo with the type arguments replaced - + - Attribute used to identify a method that is - called before any tests in a fixture are run. + Returns an array of custom attributes of the specified type applied to this method - + - Attribute used to identify a method that is called after - all the tests in a fixture have run. The method is - guaranteed to be called, even if an exception is thrown. + Gets a value indicating whether one or more attributes of the specified type are defined on the method. - + - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. + Invokes the method, converting any TargetInvocationException to an NUnitException. - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - + The object on which to invoke the method + The argument list for the method + The return value from the invoked method - + - Used on a method, marks the test with a timeout value in milliseconds. - The test will be run in a separate thread and is cancelled if the timeout - is exceeded. Used on a method or assembly, sets the default timeout - for all contained test methods. + Override ToString() so that error messages in NUnit's own tests make sense - + - Construct a TimeoutAttribute given a time in milliseconds + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. - The timeout value in milliseconds - + - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. - - On methods, you may also use STAThreadAttribute - to serve the same purpose. + Initializes a new instance of the class. - + - Construct a RequiresSTAAttribute + Initializes a new instance of the class. + The error message that explains + the reason for the exception - + - Marks a test that must run in the MTA, causing it - to run in a separate thread if necessary. - - On methods, you may also use MTAThreadAttribute - to serve the same purpose. + Initializes a new instance of the class. + The error message that explains + the reason for the exception + The exception that caused the + current exception - + - Construct a RequiresMTAAttribute + Serialization Constructor - + - Marks a test that must run on a separate thread. + OSPlatform represents a particular operating system platform - + - Construct a RequiresThreadAttribute + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater - + - Construct a RequiresThreadAttribute, specifying the apartment + Platform ID for Unix as defined by Mono - + - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. + Platform ID for XBox as defined by .NET and Mono - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Platform ID for MacOSX as defined by .NET and Mono - The name of the data source to be used - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Get the OSPlatform under which we are currently running - The Type that will provide data - The name of the method, property or field that will provide data - + - The name of a the method, property or fiend to be used as a source + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 + + If an application is not manifested as Windows 8.1 or Windows 10, + the version returned from Environment.OSVersion will not be 6.3 and 10.0 + respectively, but will be 6.2 and 6.3. The correct value can be found in + the registry. + + The original version + The correct OS version - + - A Type to be used as a source + Product Type Enumeration used for Windows - + - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. + Product type is unknown or unspecified - + - Abstract base class used for prefixes + Product type is Workstation - + - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. + Product type is Domain Controller - + - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. + Product type is Server - + - Return the top-level constraint for this expression + Construct from a platform ID and version - - + - Static UnsetObject used to detect derived constraints - failing to set the actual value. + Construct from a platform ID, version and product type - + - The actual value being tested against a constraint + Get the platform ID of this instance - + - The display name of this Constraint for use by ToString() + Get the Version of this instance - + - Argument fields used by ToString(); + Get the Product Type of this instance - + - The builder holding this constraint + Return true if this is a windows platform - + - Construct a constraint with no arguments + Return true if this is a Unix or Linux platform - + - Construct a constraint with one argument + Return true if the platform is Win32S - + - Construct a constraint with two arguments + Return true if the platform is Win32Windows - + - Sets the ConstraintBuilder holding this constraint + Return true if the platform is Win32NT - - - Write the failure message to the MessageWriter provided - as an argument. The default implementation simply passes - the constraint and the actual value to the writer, which - then displays the constraint description and the value. - - Constraints that need to provide additional details, - such as where the error occured can override this. + + + Return true if the platform is Windows CE - The MessageWriter on which to display the message - + - Test whether the constraint is satisfied by a given value + Return true if the platform is Xbox - The value to be tested - True for success, false for failure - + - Test whether the constraint is satisfied by an - ActualValueDelegate that returns the value to be tested. - The default implementation simply evaluates the delegate - but derived classes may override it to provide for delayed - processing. + Return true if the platform is MacOSX - An - True for success, false for failure - + - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. + Return true if the platform is Windows 95 - A reference to the value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Return true if the platform is Windows 98 - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Return true if the platform is Windows ME - The writer on which the actual value is displayed - + - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. + Return true if the platform is NT 3 - - + - Returns the string representation of this constraint + Return true if the platform is NT 4 - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Return true if the platform is NT 5 - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Return true if the platform is Windows 2000 - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + Return true if the platform is Windows XP - + - Returns a DelayedConstraint with the specified delay time. + Return true if the platform is Windows 2003 Server - The delay in milliseconds. - - + - Returns a DelayedConstraint with the specified delay time - and polling interval. + Return true if the platform is NT 6 - The delay in milliseconds. - The interval at which to test the constraint. - - + - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. + Return true if the platform is NT 6.0 - + - Returns a ConstraintExpression by appending And - to the current constraint. + Return true if the platform is NT 6.1 - + - Returns a ConstraintExpression by appending And - to the current constraint. + Return true if the platform is NT 6.2 - + - Returns a ConstraintExpression by appending Or - to the current constraint. + Return true if the platform is NT 6.3 - + - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. + Return true if the platform is Vista - + - The base constraint + Return true if the platform is Windows 2008 Server (original or R2) - + - Construct given a base constraint + Return true if the platform is Windows 2008 Server (original) - - + - Construct an AllItemsConstraint on top of an existing constraint + Return true if the platform is Windows 2008 Server R2 - - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Return true if the platform is Windows 2012 Server (original or R2) - - - + - Write a description of this constraint to a MessageWriter + Return true if the platform is Windows 2012 Server (original) - - + - AndConstraint succeeds only if both members succeed. + Return true if the platform is Windows 2012 Server R2 - + - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. + Return true if the platform is Windows 7 - + - The first constraint being combined + Return true if the platform is Windows 8 - + - The second constraint being combined + Return true if the platform is Windows 8.1 - + - Construct a BinaryConstraint from two other constraints + Return true if the platform is Windows 10 - The first constraint - The second constraint - + - Create an AndConstraint from two other constraints + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. - The first constraint - The second constraint - + - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. - The actual value - True if the constraints both succeeded - + - Write a description for this contraint to a MessageWriter + Construct a ParameterWrapper for a given method and parameter - The MessageWriter to receive the description + + - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Gets a value indicating whether the parameter is optional - The writer on which the actual value is displayed - + - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. + Gets an IMethodInfo representing the method for which this is a parameter. - + - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. + Gets the underlying ParameterInfo - + - The expected Type used by the constraint + Gets the Type of the parameter - + - Construct a TypeConstraint for a given Type + Returns an array of custom attributes of the specified type applied to this method - - + - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. - The writer on which the actual value is displayed - + - Construct an AssignableFromConstraint for the type provided + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. - - + - Test whether an object can be assigned from the specified type + Comma-delimited list of all supported OS platform constants - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - + - Write a description of this constraint to a MessageWriter + Comma-delimited list of all supported Runtime platform constants - The MessageWriter to use - + - AssignableToConstraint is used to test that an object - can be assigned to a given Type. + Default constructor uses the operating system and + common language runtime of the system. - + - Construct an AssignableToConstraint for the type provided + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. - + RuntimeFramework to be used + OperatingSystem to be used - + - Test whether an object can be assigned to the specified type + Test to determine if one of a collection of platforms + is being used currently. - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. + + - + - Write a description of this constraint to a MessageWriter + Tests to determine if the current platform is supported + based on a platform attribute. - The MessageWriter to use + The attribute to examine + - + - AttributeConstraint tests that a specified attribute is present - on a Type or other provider and that the value of the attribute - satisfies some other constraint. + Tests to determine if the current platform is supported + based on a platform attribute. + The attribute to examine + - + - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. - - + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system - + - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - + - Writes a description of the attribute to the specified writer. + A PropertyBag represents a collection of name value pairs + that allows duplicate entries with the same key. Methods + are provided for adding a new pair as well as for setting + a key to a single value. All keys are strings but _values + may be of any type. Null _values are not permitted, since + a null entry represents the absence of the key. - + - Writes the actual value supplied to the specified writer. + Adds a key/value pair to the property set + The key + The value - + - Returns a string representation of the constraint. + Sets the value for a key, removing any other + _values that are already in the property set. + + - + - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. + Gets a single value for a key, using the first + one if multiple _values are present and returning + null if the value is not found. + + - + - Constructs an AttributeExistsConstraint for a specific attribute Type + Gets a flag indicating whether the specified key has + any entries in the property set. - + The key to be checked + + True if their are _values present, otherwise false + - + - Tests whether the object provides the expected attribute. + Gets a collection containing all the keys in the property set - A Type, MethodInfo, or other ICustomAttributeProvider - True if the expected attribute is present, otherwise false + - + - Writes the description of the constraint to the specified writer + Gets or sets the list of _values for a particular key - + - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. + Returns an XmlNode representing the current PropertyBag. + Not used + An XmlNode representing the PropertyBag - + - Initializes a new instance of the class. + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. - The expected. - The description. + The parent node. + Not used + - + - Test whether the constraint is satisfied by a given value + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + The FriendlyName of the AppDomain in which the assembly is running - The writer on which the description is displayed - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + The selected strategy for joining parameter data into test cases - + - Test whether the constraint is satisfied by a given value + The process ID of the executing assembly - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + The stack trace from any data provider that threw + an exception. - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + The reason a test was not run - The writer on which the actual value is displayed - + - Returns the string representation + The author of the tests - + - CollectionConstraint is the abstract base class for - constraints that operate on collections. + The ApartmentState required for running the test - + - Construct an empty CollectionConstraint + The categories applying to a test - + - Construct a CollectionConstraint + The Description of a test - - + - Determines whether the specified enumerable is empty. + The number of threads to be used in running tests - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - - + - Test whether the constraint is satisfied by a given value + The maximum time in ms, above which the test is considered to have failed - The value to be tested - True for success, false for failure - + - Protected method to be implemented by derived classes + The ParallelScope associated with a test - - - + - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. + The number of times the test should be repeated - + - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. + Indicates that the test should be run on a separate thread - + - Construct an empty CollectionConstraint + The culture to be set for a test - + - Construct a CollectionConstraint + The UI culture to be set for a test - - + - Flag the constraint to use the supplied EqualityAdapter. - NOTE: For internal use only. + The type that is under test - The EqualityAdapter to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + The timeout value for the test - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + The test will be ignored until the given date - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied Comparison object. + The optional Order the test will run in - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Randomizer returns a set of random _values in a repeatable + way, to allow re-running of tests if necessary. It extends + the .NET Random class, providing random values for a much + wider range of types. + + The class is used internally by the framework to generate + test case data and is also exposed for use by users through + the TestContext.Random property. - The IComparer object to use. - Self. + + For consistency with the underlying Random Type, methods + returning a single value use the prefix "Next..." Those + without an argument return a non-negative value up to + the full positive range of the Type. Overloads are provided + for specifying a maximum or a range. Methods that return + arrays or strings use the prefix "Get..." to avoid + confusion with the single-value methods. + - + - Flag the constraint to use the supplied IEqualityComparer object. + Initial seed used to create randomizers for this run - The IComparer object to use. - Self. - + - Compares two collection members for equality + Get a Randomizer for a particular member, returning + one that has already been created if it exists. + This ensures that the same _values are generated + each time the tests are reloaded. - + - Return a new CollectionTally for use in making tests + Get a randomizer for a particular parameter, returning + one that has already been created if it exists. + This ensures that the same values are generated + each time the tests are reloaded. - The collection to be included in the tally - + - Flag the constraint to ignore case and return self. + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + - + - Construct a CollectionContainsConstraint + Default constructor - - + - Test whether the expected item is contained in the collection + Construct based on seed value - - + - + - Write a descripton of the constraint to a MessageWriter + Returns a random unsigned int. - - + - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. + Returns a random unsigned int less than the specified maximum. - + - Construct a CollectionEquivalentConstraint + Returns a random unsigned int within a specified range. - - + - Test whether two collections are equivalent + Returns a non-negative random short. - - - + - Write a description of this constraint to a MessageWriter + Returns a non-negative random short less than the specified maximum. - - + - CollectionOrderedConstraint is used to test whether a collection is ordered. + Returns a non-negative random short within a specified range. - + - Construct a CollectionOrderedConstraint + Returns a random unsigned short. - + - Modifies the constraint to use an IComparer and returns self. + Returns a random unsigned short less than the specified maximum. - + - Modifies the constraint to use an IComparer<T> and returns self. + Returns a random unsigned short within a specified range. - + - Modifies the constraint to use a Comparison<T> and returns self. + Returns a random long. - + - Modifies the constraint to test ordering by the value of - a specified property and returns self. + Returns a random long less than the specified maximum. - + - Test whether the collection is ordered + Returns a non-negative random long within a specified range. - - - + - Write a description of the constraint to a MessageWriter + Returns a random ulong. - - + - Returns the string representation of the constraint. + Returns a random ulong less than the specified maximum. - - + - If used performs a reverse comparison + Returns a non-negative random long within a specified range. - + - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another + Returns a random Byte - + - Construct a CollectionSubsetConstraint + Returns a random Byte less than the specified maximum. - The collection that the actual value is expected to be a subset of - + - Test whether the actual collection is a subset of - the expected collection provided. + Returns a random Byte within a specified range - - - + - Write a description of this constraint to a MessageWriter + Returns a random SByte - - + - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. + Returns a random sbyte less than the specified maximum. - + - Construct a CollectionTally object from a comparer and a collection + Returns a random sbyte within a specified range - + - Try to remove an object from the tally + Returns a random bool - The object to remove - True if successful, false if the object was not found - + - Try to remove a set of objects from the tally + Returns a random bool based on the probability a true result - The objects to remove - True if successful, false if any object was not found - + - The number of objects remaining in the tally + Returns a random double between 0.0 and the specified maximum. - + - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> + Returns a random double within a specified range. - + - Returns a ComparisonAdapter that wraps an IComparer + Returns a random float. - + - Returns a ComparisonAdapter that wraps an IComparer<T> + Returns a random float between 0.0 and the specified maximum. - + - Returns a ComparisonAdapter that wraps a Comparison<T> + Returns a random float within a specified range. - + - Compares two objects + Returns a random enum value of the specified Type as an object. - + - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. + Returns a random enum value of the specified Type. - + - Construct a ComparisonAdapter for an IComparer + Default characters for random functions. + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore - + - Compares two objects + Generate a random string based on the characters from the input string. - - - + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length - + - Construct a default ComparisonAdapter + Generate a random string based on the characters from the input string. + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set - + - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. + Generate a random string based on the characters from the input string. + A random string of the default length + Uses DefaultStringChars as the input character set - + - Construct a ComparisonAdapter for an IComparer<T> + Returns a random decimal. - + - Compare a Type T to an object + Returns a random decimal between positive zero and the specified maximum. - + - Construct a ComparisonAdapter for a Comparison<T> + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + - + - Compare a Type T to an object + Helper methods for inspecting a type by reflection. + + Many of these methods take ICustomAttributeProvider as an + argument to avoid duplication, even though certain attributes can + only appear on specific types of members, like MethodInfo or Type. + + In the case where a type is being examined for the presence of + an attribute, interface or named member, the Reflect methods + operate with the full name of the member being sought. This + removes the necessity of the caller having a reference to the + assembly that defines the item being sought and allows the + NUnit core to inspect assemblies that reference an older + version of the NUnit framework. - + - Abstract base class for constraints that compare values to - determine if one is greater than, equal to or less than - the other. This class supplies the Using modifiers. + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found - + - ComparisonAdapter to be used in making the comparison + Examine a fixture type and return true if it has a method with + a particular attribute. + The type to examine + The attribute Type to look for + True if found, otherwise false - + - Initializes a new instance of the class. + Invoke the default constructor on a Type + The Type to be constructed + An instance of the Type - + - Initializes a new instance of the class. + Invoke a constructor on a Type with arguments + The Type to be constructed + Arguments to the constructor + An instance of the Type - + - Modifies the constraint to use an IComparer and returns self + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + An array of objects + An array of Types - + - Modifies the constraint to use an IComparer<T> and returns self + Invoke a parameterless method returning void on an object. + A MethodInfo for the method to be invoked + The object on which to invoke the method - + - Modifies the constraint to use a Comparison<T> and returns self + Invoke a method, converting any TargetInvocationException to an NUnitException. + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method - + - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint + The TestResult class represents the result of a test. - + - ConstraintBuilder maintains the stacks that are used in - processing a ConstraintExpression. An OperatorStack - is used to hold operators that are waiting for their - operands to be reognized. a ConstraintStack holds - input constraints as well as the results of each - operator applied. + Error message for when child tests have errors - + - Initializes a new instance of the class. + Error message for when child tests have warnings - + - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. + Error message for when child tests are ignored - The operator to push. - + - Appends the specified constraint to the expresson by pushing - it on the constraint stack. + The minimum duration for tests - The constraint to push. - + - Sets the top operator right context. + Aggregate assertion count - The right context. - + - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. + ReaderWriterLock - The target precedence. - + - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. + Construct a test result given a Test - The resolved constraint + The test to be used - + - Gets a value indicating whether this instance is resolvable. + Gets the test with which this result is associated. - - true if this instance is resolvable; otherwise, false. - - + - OperatorStack is a type-safe stack for holding ConstraintOperators + Gets the ResultState of the test result, which + indicates the success or failure of the test. - + - Initializes a new instance of the class. + Gets the name of the test result - The builder. - + - Pushes the specified operator onto the stack. + Gets the full name of the test result - The op. - + - Pops the topmost operator from the stack. + Gets or sets the elapsed time for running the test in seconds - - + - Gets a value indicating whether this is empty. + Gets or sets the time the test started running. - true if empty; otherwise, false. - + - Gets the topmost operator without modifying the stack. + Gets or sets the time the test finished running. - The top. - + - ConstraintStack is a type-safe stack for holding Constraints + Gets the message associated with a test + failure or with not running the test - + - Initializes a new instance of the class. + Gets any stacktrace associated with an + error or failure. - The builder. - + - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. + Gets or sets the count of asserts executed + when running the test. - The constraint. - + - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. + Gets the number of test cases that failed + when running the test and all its children. - - + - Gets a value indicating whether this is empty. + Gets the number of test cases that had warnings + when running the test and all its children. - true if empty; otherwise, false. - + - Gets the topmost constraint without modifying the stack. + Gets the number of test cases that passed + when running the test and all its children. - The topmost constraint - + - ConstraintExpression represents a compound constraint in the - process of being constructed from a series of syntactic elements. - - Individual elements are appended to the expression as they are - reognized. Once an actual Constraint is appended, the expression - returns a resolvable Constraint. + Gets the number of test cases that were skipped + when running the test and all its children. - + - ConstraintExpressionBase is the abstract base class for the - ConstraintExpression class, which represents a - compound constraint in the process of being constructed - from a series of syntactic elements. - - NOTE: ConstraintExpressionBase is separate because the - ConstraintExpression class was generated in earlier - versions of NUnit. The two classes may be combined - in a future version. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - The ConstraintBuilder holding the elements recognized so far + Indicates whether this result has any child results. - + - Initializes a new instance of the class. + Gets the collection of child results. - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + Gets a TextWriter, which will write output to be included in the result. - The builder. - + - Returns a string representation of the expression as it - currently stands. This should only be used for testing, - since it has the side-effect of resolving the expression. + Gets any text output written to this result. - - + - Appends an operator to the expression and returns the - resulting expression itself. + Gets a list of assertion results associated with the test. - + - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. + Returns the Xml representation of the result. + If true, descendant results are included + An XmlNode representing the result - + - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. + Adds the XML representation of the result as a child of the + supplied parent node.. + The parent node. + If true, descendant results are included + - + - Initializes a new instance of the class. + Gets a count of pending failures (from Multiple Assert) - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + Gets the worst assertion status (highest enum) in all the assertion results - The builder. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + Set the result of the test + The ResultState to use in the result - + - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. + Set the result of the test + The ResultState to use in the result + A message associated with the result state - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Set the result of the test + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Set the test result based on the type of exception thrown + The exception that was thrown - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Set the test result based on the type of exception thrown + The exception that was thrown + The FailureSite to use in the result - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + The Exception to be recorded - + - Returns a constraint that tests two items for equality + Determine result after test has run to completion. - + - Returns a constraint that tests that two references are the same object + Record an assertion result - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Record an assertion result - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Record an assertion result - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Adds a reason element to a node and returns it. + The target node. + The new reason element. - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + Adds a failure element to a node and returns it. + The target node. + The new failure element. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Creates a failure message incorporating failures + from a Multiple Assert block for use by runners + that don't know about AssertionResults. + Message as a string - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Enumeration identifying a common language + runtime implementation. - + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft Shared Source CLI + + + Mono + + + MonoTouch + + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + RuntimeFramework represents a particular version + of a common language runtime implementation. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Construct from a runtime type and version. If the version has + two parts, it is taken as a framework version. If it has three + or more, it is taken as a CLR version. In either case, the other + version is deduced based on the runtime type and provided version. + The runtime type of the framework + The version of the framework - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Static method to return a RuntimeFramework object + for the framework that is currently in use. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + The type of this runtime framework - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + The framework version for this runtime framework - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + The CLR version for this runtime framework - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Return true if any CLR version may be used in + matching this RuntimeFramework object. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns the Display name for this framework - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Parses a string representing a RuntimeFramework. + The string may be just a RuntimeType name or just + a Version or a hyphenated RuntimeType-Version or + a Version prefixed by 'versionString'. + + - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Overridden to return the short name of the framework + - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Returns true if the current framework matches the + one supplied as an argument. Two frameworks match + if their runtime types are the same or either one + is RuntimeType.Any and all specified version components + are equal. Negative (i.e. unspecified) version + components are ignored. + The RuntimeFramework to be matched. + True on match, otherwise false - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Single instance of our default filter - + - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. + Construct a stack filter instance + Regex pattern used to delete lines from the top of the stack + Regex pattern used to delete lines from the bottom of the stack - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Construct a stack filter instance + Regex pattern used to delete lines from the top of the stack - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Construct a stack filter instance - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Filters a raw stack trace and returns the result. + The original stack trace + A filtered stack trace - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Provides methods to support legacy string comparison methods. - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + + + Compares two strings for equality, ignoring case if requested. + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Compares two strings for equality, ignoring case if requested. + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + The expected result to be returned - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Default Constructor creates an empty parameter set - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Construct a parameter set with a list of arguments + - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Construct a ParameterSet from an object implementing ITestCaseData + - + - Returns a ConstraintExpression that negates any - following constraint. + The expected result of the test, which + must match the method return type. - + - Returns a ConstraintExpression that negates any - following constraint. + Gets a value indicating whether an expected result was specified. - + + + Helper class used to save and restore certain static or + singleton settings in the environment that affect tests + or which might be changed by the user tests. + + An internal class is used to hold settings and a stack + of these objects is pushed and popped as Save and Restore + are called. + + + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Link to a prior saved context - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Indicates that a stop has been requested - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + The event listener currently receiving notifications - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + The number of assertions for the current test - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + The current culture - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + The current UI culture - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + The current test result - + - With is currently a NOP - reserved for future use. + The current Principal. - + - Returns a constraint that tests for null + Initializes a new instance of the class. - + - Returns a constraint that tests for True + Initializes a new instance of the class. + An existing instance of TestExecutionContext. - + - Returns a constraint that tests for False + Gets and sets the current context. - + - Returns a constraint that tests for a positive value + Get the current context or return null if none is found. + - + - Returns a constraint that tests for a negative value + Clear the current context. This is provided to + prevent "leakage" of the CallContext containing + the current context back to any runners. - + - Returns a constraint that tests for NaN + Gets or sets the current test - + - Returns a constraint that tests for empty + The time the current test started execution - + - Returns a constraint that tests whether a collection - contains all unique items. + The time the current test started in Ticks - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Gets or sets the current test result - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Gets a TextWriter that will send output to the current test result. - + - Returns a constraint that tests whether a collection is ordered + The current test object - that is the user fixture + object on which tests are being executed. - + - ContainsConstraint tests a whether a string contains a substring - or a collection contains an object. It postpones the decision of - which test to use until the type of the actual argument is known. - This allows testing whether a string is contained in a collection - or as a substring of another string using the same syntax. + Get or set the working directory - + - Initializes a new instance of the class. + Get or set indicator that run should stop on the first error - The expected. - + - Test whether the constraint is satisfied by a given value + Gets an enum indicating whether a stop has been requested. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + The current test event listener - The writer on which the description is displayed - + - Flag the constraint to use the supplied IComparer object. + The current WorkItemDispatcher. Made public for + use by nunitlite.tests - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied Comparison object. + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Gets the RandomGenerator specific to this Test - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Gets the assert count. - The IComparer object to use. - Self. + The assert count. - + - Flag the constraint to ignore case and return self. + The current nesting level of multiple assert blocks - + - Applies a delay to the match so that a match can be evaluated in the future. + Gets or sets the test case timeout value - + - Creates a new DelayedConstraint + Gets a list of ITestActions set by upstream tests - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 - + - Creates a new DelayedConstraint + Saves or restores the CurrentCulture - The inner constraint two decorate - The time interval after which the match is performed - The time interval used for polling - If the value of is less than 0 - + - Test whether the constraint is satisfied by a given value + Saves or restores the CurrentUICulture - The value to be tested - True for if the base constraint fails, false if it succeeds - + - Test whether the constraint is satisfied by a delegate + Gets or sets the current for the Thread. - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds - + - Test whether the constraint is satisfied by a given reference. - Overridden to wait for the specified delay period before - calling the base constraint with the dereferenced value. + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter - A reference to the value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + If true, all tests must run on the same thread. No new thread may be spawned. - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a MessageWriter. + Record any changes in the environment made by + the test code in the execution context so it + will be passed on to lower level tests. - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Set up the execution environment to match a context. + Note that we may be running on the same thread where the + context was initially created or on a different thread. - + - EmptyCollectionConstraint tests whether a collection is empty. + Increments the assert count by one. - + - Check that the collection is empty + Increments the assert count by a specified amount. - - - + - Write the constraint description to a MessageWriter + Adds a new ValueFormatterFactory to the chain of formatters - + The new factory - + - EmptyConstraint tests a whether a string or collection is empty, - postponing the decision about which test is applied until the - type of the actual argument is known. + Obtain lifetime service object + - + - Test whether the constraint is satisfied by a given value + An IsolatedContext is used when running code + that may effect the current result in ways that + should not impact the final result of the test. + A new TestExecutionContext is created with an + initially clear result, which is discarded on + exiting the context. - The value to be tested - True for success, false for failure + + using (new TestExecutionContext.IsolatedContext()) + { + // Code that should not impact the result + } + - + - Write the constraint description to a MessageWriter + Save the original current TestExecutionContext and + make a new isolated context current. - The writer on which the description is displayed - + - EmptyDirectoryConstraint is used to test that a directory is empty + Restore the original TestExecutionContext. - + - Test whether the constraint is satisfied by a given value + Enumeration indicating whether the tests are + running normally or being cancelled. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Running normally with no stop requested - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + A graceful stop has been requested - The writer on which the actual value is displayed - + - EmptyStringConstraint tests whether a string is empty. + A forced stop has been requested - + - Test whether the constraint is satisfied by a given value + Interface to be implemented by filters applied to tests. + The filter applies when running the test, after it has been + loaded, since this is the only time an ITest exists. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Unique Empty filter. - The writer on which the description is displayed - + - EndsWithConstraint can test whether a string ends - with an expected substring. + Indicates whether this is the EmptyFilter - + - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. + Indicates whether this is a top-level filter, + not contained in any other filter. - + - The expected value + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Indicates whether tests should be case-insensitive + Determine if a test matches the filter explicitly. That is, it must + be a direct match of the test itself or one of it's children. + The test to which the filter is applied + True if the test matches the filter explicitly, otherwise false - + - Constructs a StringConstraint given an expected value + Determine whether the test itself matches the filter criteria, without + examining either parents or descendants. This is overridden by each + different type of filter to perform the necessary tests. - The expected value + The test to which the filter is applied + True if the filter matches the any parent of the test - + - Test whether the constraint is satisfied by a given value + Determine whether any ancestor of the test matches the filter criteria - The value to be tested - True for success, false for failure + The test to which the filter is applied + True if the filter matches the an ancestor of the test - + - Test whether the constraint is satisfied by a given string + Determine whether any descendant of the test matches the filter criteria. - The string to be tested - True for success, false for failure + The test to be matched + True if at least one descendant matches the filter criteria - + - Modify the constraint to ignore case in matching. + Create a TestFilter instance from an xml representation. - + - Initializes a new instance of the class. + Create a TestFilter from it's TNode representation - The expected string - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. - - - + - Write the constraint description to a MessageWriter + Adds an XML node - The writer on which the description is displayed + True if recursive + The added XML node - + - EqualConstraint is able to compare an actual value with the - expected value provided in its constructor. Two objects are - considered equal if both are null, or if both have the same - value. NUnit has special semantics for some object types. + Adds an XML node + Parent node + True if recursive + The added XML node - + - If true, strings in error messages will be clipped + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - + - NUnitEqualityComparer used to test equality. + Default Constructor creates an empty parameter set - + - Initializes a new instance of the class. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - The expected value. - + - Flag the constraint to use a tolerance when determining equality. + Construct a parameter set with a list of arguments - Tolerance value to be used - Self. + - + - Flag the constraint to use the supplied IComparer object. + Construct a ParameterSet from an object implementing ITestCaseData - The IComparer object to use. - Self. + - + - Flag the constraint to use the supplied IComparer object. + Type arguments used to create a generic fixture instance - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied Comparison object. + Called when a test has just started - The IComparer object to use. - Self. + The test that is starting - + - Flag the constraint to use the supplied IEqualityComparer object. + Called when a test case has finished - The IComparer object to use. - Self. + The result of the test - + - Flag the constraint to use the supplied IEqualityComparer object. + Called when a test produces output for immediate display - The IComparer object to use. - Self. + A TestOutput object containing the text to display - + - Test whether the constraint is satisfied by a given value + Construct a new TestListener - private so it may not be used. - The value to be tested - True for success, false for failure - + - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. + Get a listener that does nothing - The MessageWriter to write to - + - Write description of this constraint + TestNameGenerator is able to create test names according to + a coded pattern. - The MessageWriter to write to - + - Display the failure information for two collections that did not match. + Default pattern used to generate names - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections - + - Displays a single line showing the types and sizes of the expected - and actual enumerations, collections or arrays. If both are identical, - the value is only shown once. + Construct a TestNameGenerator - The MessageWriter on which to display - The expected collection or array - The actual collection or array - The indentation level for the message line - + - Displays a single line showing the point in the expected and actual - arrays at which the comparison failed. If the arrays have different - structures or dimensions, both values are shown. + Construct a TestNameGenerator - The MessageWriter on which to display - The expected array - The actual array - Index of the failure point in the underlying collections - The indentation level for the message line + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name - + - Display the failure information for two IEnumerables that did not match. + Get the display name for a TestMethod and it's arguments - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections + A TestMethod + Arguments to be used + The display name - + - Flag the constraint to ignore case and return self. + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. - + - Flag the constraint to suppress string clipping - and return self. + Default Constructor creates an empty parameter set - + - Flag the constraint to compare arrays as collections - and return self. + Construct a parameter set with a list of arguments + - + - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - Self. - - Ulp stands for "unit in the last place" and describes the minimum - amount a given value can change. For any integers, an ulp is 1 whole - digit. For floating point values, the accuracy of which is better - for smaller numbers and worse for larger numbers, an ulp depends - on the size of the number. Using ulps for comparison of floating - point results instead of fixed tolerances is safer because it will - automatically compensate for the added inaccuracy of larger numbers. - - + - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual values is allowed to deviate from - the expected value. + Construct a ParameterSet from an object implementing ITestData - Self + - + - Causes the tolerance to be interpreted as a TimeSpan in days. + The RunState for this set of parameters. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in hours. + The arguments to be used in running the test, + which must match the method signature. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in minutes. + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in seconds. + Gets the property dictionary for this test - Self - + - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + Applies ParameterSet _values to the test itself. - Self + A test. - + - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + The original arguments provided by the user, + used for display purposes. - Self - + - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. - + - Compares two objects, returning true if they are equal + Initializes a new instance of the class. + The callback handler to be used for reporting progress. - + - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. + Called when a test has just started + The test that is starting - + - Returns an EqualityAdapter that wraps an IComparer. + Called when a test has finished. Sends a result summary to the callback. + to + The result of the test - + - Returns an EqualityAdapter that wraps an IEqualityComparer. + Called when a test produces output for immediate display + A TestOutput object containing the text to display - + - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + Returns the parent test item for the targer test item if it exists + + parent test item - + - Returns an EqualityAdapter that wraps an IComparer<T>. + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + The string to be used + A new string with the _values replaced - + - Returns an EqualityAdapter that wraps a Comparison<T>. + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. - + - EqualityAdapter that wraps an IComparer. + Initializes a new instance of the class. + The ITypeInfo for the type that represents the suite. - + - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. + Gets a string representing the type of test + - + - EqualityAdapter that wraps an IComparer. + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. - + - EqualityAdapterList represents a list of EqualityAdapters - in a common class across platforms. + Construct from a MethodInfo + - + - ExactCountConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. + Gets a string representing the type of test + - + - Construct an ExactCountConstraint on top of an existing constraint + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. - - - + - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. + Initializes a new instance of the class. - - + The type. - + - Write a description of this constraint to a MessageWriter + The Test abstract class represents a test within the framework. - - + - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. - + - Construct an ExactTypeConstraint for a given Type + The SetUp methods. - The expected Type. - + - Test that an object is of the exact type specified + The teardown methods - The actual value. - True if the tested object is of the exact type provided, otherwise false. - + - Write the description of this constraint to a MessageWriter + Used to cache the declaring type for this MethodInfo - The MessageWriter to use - + - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. + Method property backing field - + - Constructs an ExceptionTypeConstraint + Constructs a test given its name + The name of the test - + - Write the actual value for a failing constraint test to a - MessageWriter. Overriden to write additional information - in the case of an Exception. + Constructs a test given the path through the + test hierarchy to its parent and a name. - The MessageWriter to use + The parent tests full name + The name of the test - + - FailurePoint class represents one point of failure - in an equality test. + TODO: Documentation needed for constructor + - + - The location of the failure + Construct a test from a MethodInfo + - + - The expected value + Gets or sets the id of the test + - + - The actual value + Gets or sets the name of the test - + - Indicates whether the expected value is valid + Gets or sets the fully qualified name of the test + - + - Indicates whether the actual value is valid + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. - + - FailurePointList represents a set of FailurePoints - in a cross-platform way. + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. - + - FalseConstraint tests that the actual value is false + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. - + - Initializes a new instance of the class. + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. - - Helper routines for working with floating point numbers - - - The floating point comparison code is based on this excellent article: - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - - - "ULP" means Unit in the Last Place and in the context of this library refers to - the distance between two adjacent floating point numbers. IEEE floating point - numbers can only represent a finite subset of natural numbers, with greater - accuracy for smaller numbers and lower accuracy for very large numbers. - - - If a comparison is allowed "2 ulps" of deviation, that means the values are - allowed to deviate by up to 2 adjacent floating point values, which might be - as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. - - + + + Whether or not the test should be run + - - Compares two floating point values for equality - First floating point value to be compared - Second floating point value t be compared - - Maximum number of representable floating point values that are allowed to - be between the left and the right floating point values - - True if both numbers are equal or close to being equal - - - Floating point values can only represent a finite subset of natural numbers. - For example, the values 2.00000000 and 2.00000024 can be stored in a float, - but nothing inbetween them. - - - This comparison will count how many possible floating point values are between - the left and the right number. If the number of possible values between both - numbers is less than or equal to maxUlps, then the numbers are considered as - being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - + + + Gets the name used for the top-level element in the + XML representation of this test + - - Compares two double precision floating point values for equality - First double precision floating point value to be compared - Second double precision floating point value t be compared - - Maximum number of representable double precision floating point values that are - allowed to be between the left and the right double precision floating point values - - True if both numbers are equal or close to being equal - - - Double precision floating point values can only represent a limited series of - natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 - can be stored in a double, but nothing inbetween them. - - - This comparison will count how many possible double precision floating point - values are between the left and the right number. If the number of possible - values between both numbers is less than or equal to maxUlps, then the numbers - are considered as being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - + + + Gets a string representing the type of test. Used as an attribute + value in the XML representation of a test and has no other + function in the framework. + - + - Reinterprets the memory contents of a floating point value as an integer value + Gets a count of test cases represented by + or contained under this test. - - Floating point value whose memory contents to reinterpret - - - The memory contents of the floating point value interpreted as an integer - - + - Reinterprets the memory contents of a double precision floating point - value as an integer value + Gets the properties for this test - - Double precision floating point value whose memory contents to reinterpret - - - The memory contents of the double precision floating point value - interpreted as an integer - - + - Reinterprets the memory contents of an integer as a floating point value + Returns true if this is a TestSuite - Integer value whose memory contents to reinterpret - - The memory contents of the integer value interpreted as a floating point value - - + - Reinterprets the memory contents of an integer value as a double precision - floating point value + Gets a bool indicating whether the current test + has any descendant tests. - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - - - Union of a floating point variable and an integer + + + Gets the parent as a Test object. + Used by the core to set the parent. + - - The union's value as a floating point variable + + + Gets this test's child tests + + A list of child tests - - The union's value as an integer + + + Gets or sets a fixture object for running this test. + - - The union's value as an unsigned integer + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + - - Union of a double precision floating point variable and a long + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + - - The union's value as a double precision floating point variable + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. - - The union's value as a long + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object implementing ICustomAttributeProvider - - The union's value as an unsigned long + + + Add standard attributes and members to a test node. + + + - + - Tests whether a value is greater than the value supplied to its constructor + Returns the Xml representation of the test + If true, include child tests recursively + - + - The value against which a comparison is to be made + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + The parent node. + If true, descendant results are included + - + - Initializes a new instance of the class. + Compares this test to another test for sorting purposes - The expected value. + The other test + Value of -1, 0 or +1 depending on whether the current test is less than, equal to or greater than the other test - + - Write the constraint description to a MessageWriter + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. - The value to be tested - True for success, false for failure + The assembly this test represents. + The path used to load the assembly. - + - Tests whether a value is greater than or equal to the value supplied to its constructor + Initializes a new instance of the class + for a path which could not be loaded. + The path used to load the assembly. - + - The value against which a comparison is to be made + Gets the Assembly represented by this instance. - + - Initializes a new instance of the class. + Gets the name used for the top-level element in the + XML representation of this test - The expected value. - + - Write the constraint description to a MessageWriter + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Initializes a new instance of the class. - The value to be tested - True for success, false for failure + Type of the fixture. - + - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. + The TestMethod class represents a Test implemented as a method. - + - Construct an InstanceOfTypeConstraint for the type provided + The ParameterSet used to create this test method - The expected Type - + + + Initializes a new instance of the class. + + The method to be used as a test. + + - Test whether an object is of the specified type or a derived type + Initializes a new instance of the class. - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. + The method to be used as a test. + The suite or fixture to which the new test will be added - + - Write a description of this constraint to a MessageWriter + Overridden to return a TestCaseResult. - The MessageWriter to use + A TestResult for this test. - + - Tests whether a value is less than the value supplied to its constructor + Gets a bool indicating whether the current test + has any descendant tests. - + - The value against which a comparison is to be made + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + The parent node. + If true, descendant results are included + - + - Initializes a new instance of the class. + Gets this test's child tests - The expected value. + A list of child tests - + - Write the constraint description to a MessageWriter + Gets the name used for the top-level element in the + XML representation of this test - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Returns the name of the method - The value to be tested - True for success, false for failure - + - Tests whether a value is less than or equal to the value supplied to its constructor + TestSuite represents a composite test, which contains other tests. - + - The value against which a comparison is to be made + Our collection of child tests - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The expected value. + The name of the suite. - + - Write the constraint description to a MessageWriter + Initializes a new instance of the class. - The writer on which the description is displayed + Name of the parent suite. + The name of the suite. - + - Test whether the constraint is satisfied by a given value + Initializes a new instance of the class. - The value to be tested - True for success, false for failure + Type of the fixture. - + - Static methods used in creating messages + Initializes a new instance of the class. + Type of the fixture. - + - Static string used when strings are clipped + Sorts tests under this suite. - + - Returns the representation of a type as used in NUnitLite. - This is the same as Type.ToString() except for arrays, - which are displayed with their declared sizes. + Adds a test to the suite. - - + The test. - + - Converts any control characters in a string - to their escaped representation. + Gets this test's child tests - The string to be converted - The converted string + The list of child tests - + - Return the a string representation for a set of indices into an array + Gets a count of test cases represented by + or contained under this test. - Array of indices for which a string is needed + - + - Get an array of indices representing the point in a enumerable, - collection or array corresponding to a single int index into the - collection. + The arguments to use in creating the fixture - The collection to which the indices apply - Index in the collection - Array of indices - + - Clip a string to a given length, starting at a particular offset, returning the clipped - string with ellipses representing the removed parts + Set to true to suppress sorting this suite's contents - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string - + - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. + Overridden to return a TestSuiteResult. - - - - + A TestResult for this test. - + - Shows the position two strings start to differ. Comparison - starts at the start index. + Gets a bool indicating whether the current test + has any descendant tests. - The expected string - The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found - + - NaNConstraint tests that the actual value is a double or float NaN + Gets the name used for the top-level element in the + XML representation of this test - + - Test that the actual value is an NaN + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. - + The parent node. + If true, descendant results are included - + - Write the constraint description to a specified writer + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. - + The attribute type to check for - + - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. + ThreadUtility provides a set of static methods convenient + for working with threads. - + - Construct a NoItemConstraint on top of an existing constraint + Do our best to Kill a thread - + The thread to kill - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Do our best to kill a thread, passing state info - - + The thread to kill + Info for the ThreadAbortException handler - + - Write a description of this constraint to a MessageWriter + TypeHelper provides static methods that operate on Types. - - + - NotConstraint negates the effect of some other constraint + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. - + - Initializes a new instance of the class. + Gets the display name for a Type as used by NUnit. - The base constraint to be negated. + The Type for which a display name is needed. + The display name for the Type - + - Test whether the constraint is satisfied by a given value + Gets the display name for a Type as used by NUnit. - The value to be tested - True for if the base constraint fails, false if it succeeds + The Type for which a display name is needed. + The arglist provided. + The display name for the Type - + - Write the constraint description to a MessageWriter + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. - The writer on which the description is displayed + The first type. + The second type. + Either type1 or type2, depending on which is more general. - + - Write the actual value for a failing constraint test to a MessageWriter. + Determines whether the specified type is numeric. - The writer on which the actual value is displayed + The type to be examined. + + true if the specified type is numeric; otherwise, false. + - + - NullConstraint tests that the actual value is null + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + An array of args to be converted + A ParameterInfo[] whose types will be used as targets - + - Initializes a new instance of the class. + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + - + - NullEmptyStringConstraint tests whether a string is either null or empty. + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + - + - Constructs a new NullOrEmptyStringConstraint + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + - + - Test whether the constraint is satisfied by a given value + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Construct a TypeWrapper for a specified Type. - The writer on which the description is displayed - + - The Numerics class contains common operations on numeric values. + Gets the underlying Type on which this TypeWrapper is based. - + - Checks the type of the object, returning true if - the object is a numeric type. + Gets the base type of this type as an ITypeInfo - The object to check - true if the object is a numeric type - + - Checks the type of the object, returning true if - the object is a floating point numeric type. + Gets the Name of the Type - The object to check - true if the object is a floating point numeric type - + - Checks the type of the object, returning true if - the object is a fixed point numeric type. + Gets the FullName of the Type - The object to check - true if the object is a fixed point numeric type - + - Test two numeric values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. + Gets the assembly in which the type is declared - The expected value - The actual value - A reference to the tolerance in effect - True if the values are equal - + - Compare two numeric values, performing the usual numeric conversions. + Gets the namespace of the Type - The expected value - The actual value - The relationship of the values to each other - + - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. + Gets a value indicating whether the type is abstract. - + - Compares two objects + Gets a value indicating whether the Type is a generic Type - - - - + - Returns the default NUnitComparer. + Returns true if the Type wrapped is T - + - Generic version of NUnitComparer + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - - + - Compare two objects of the same type + Gets a value indicating whether the Type is a generic Type definition - + - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. + Gets a value indicating whether the type is sealed. - + - + Gets a value indicating whether this type represents a static class. - + - Compares two objects for equality within a tolerance + Get the display name for this type - The first object to compare - The second object to compare - The tolerance to use in the comparison - - + - If true, all string comparisons will ignore case + Get the display name for an object of this type, constructed with the specified args. - + - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - + - Comparison objects used in comparisons for some constraints. + Returns a Type representing a generic type definition from which this Type can be constructed. - + - List of points at which a failure occured. + Returns an array of custom attributes of the specified type applied to this type - + - RecursionDetector used to check for recursion when - evaluating self-referencing enumerables. + Returns a value indicating whether the type has an attribute of the specified type. + + + - + - Compares two objects for equality within a tolerance, setting - the tolerance to the actual tolerance used if an empty - tolerance is supplied. + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + - + - Helper method to compare two arrays + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - + - Method to compare two DirectoryInfo objects + Gets the public constructor taking the specified argument Types - first directory to compare - second directory to compare - true if equivalent, false if not - + - Returns the default NUnitEqualityComparer + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - + - Gets and sets a flag indicating whether case should - be ignored in determining equality. + Construct an object of this Type, using the specified arguments. - + - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. + Override ToString() so that error messages in NUnit's own tests make sense - + - Gets the list of external comparers to be used to - test for equality. They are applied to members of - collections, in place of NUnit's own logic. + Represents the result of running a single test case. - + - Gets the list of failure points for the last Match performed. - The list consists of objects to be interpreted by the caller. - This generally means that the caller may only make use of - objects it has placed on the list at a particular depthy. + Construct a TestCaseResult based on a TestMethod + A TestMethod to which the result applies. - + - RecursionDetector detects when a comparison - between two enumerables has reached a point - where the same objects that were previously - compared are again being compared. This allows - the caller to stop the comparison if desired. + Gets the number of test cases that failed + when running the test and all its children. - + - Check whether two objects have previously - been compared, returning true if they have. - The two objects are remembered, so that a - second call will always return true. + Gets the number of test cases that had warnings + when running the test and all its children. - + - OrConstraint succeeds if either member succeeds + Gets the number of test cases that passed + when running the test and all its children. - + - Create an OrConstraint from two other constraints + Gets the number of test cases that were skipped + when running the test and all its children. - The first constraint - The second constraint - + - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. + Gets the number of test cases that were inconclusive + when running the test and all its children. - The actual value - True if either constraint succeeded - + - Write a description for this contraint to a MessageWriter + Indicates whether this result has any child results. - The MessageWriter to receive the description - + - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. + Gets the collection of child results. - + - The expected path used in the constraint + Represents the result of running a test suite - + - Flag indicating whether a caseInsensitive comparison should be made + Construct a TestSuiteResult base on a TestSuite + The TestSuite to which the result applies - + - Construct a PathConstraint for a give expected path + Gets the number of test cases that failed + when running the test and all its children. - The expected path - + - Test whether the constraint is satisfied by a given value + Gets the number of test cases that passed + when running the test and all its children. - The value to be tested - True for success, false for failure - + - Returns true if the expected path and actual path match + Gets the number of test cases that passed + when running the test and all its children. - + - Returns the string representation of this constraint + Gets the number of test cases that were skipped + when running the test and all its children. - + - Transform the provided path to its canonical form so that it - may be more easily be compared with other paths. + Gets the number of test cases that were inconclusive + when running the test and all its children. - The original path - The path in canonical form - + - Test whether one path in canonical form is under another. + Indicates whether this result has any child results. - The first path - supposed to be the parent path - The second path - supposed to be the child path - Indicates whether case should be ignored - - + - Modifies the current instance to be case-insensitve - and returns it. + Gets the collection of child results. - + - Modifies the current instance to be case-sensitve - and returns it. + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + The result to be added - + - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Construct a PredicateConstraint from a predicate + Returns a ConstraintExpression that negates any + following constraint. - + - Determines whether the predicate succeeds when applied - to the actual value. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - + - Writes the description to a MessageWriter + Returns a constraint that tests for null - + - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. + Returns a constraint that tests for True - + - Initializes a new instance of the class. + Returns a constraint that tests for False - The name. - The constraint to apply to the property. - + - Test whether the constraint is satisfied by a given value + Returns a constraint that tests for a positive value - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that tests for a negative value - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Returns a constraint that tests for equality with zero - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Returns a constraint that tests for NaN - - + - PropertyExistsConstraint tests that a named property - exists on the object provided through Match. - - Originally, PropertyConstraint provided this feature - in addition to making optional tests on the vaue - of the property. The two constraints are now separate. + Returns a constraint that tests for empty - + - Initializes a new instance of the class. + Returns a constraint that tests whether a collection + contains all unique items. - The name of the property. - + - Test whether the property exists for a given object + Returns a constraint that tests whether an object graph is serializable in binary format. - The object to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that tests whether an object graph is serializable in xml format. - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. + Returns a constraint that tests two items for equality - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Returns a constraint that tests that two references are the same object - - + - RangeConstraint tests whether two values are within a - specified range. + Returns a constraint that tests whether the + actual value is greater than the supplied argument - + - Initializes a new instance of the class. + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument - From. - To. - + - Test whether the constraint is satisfied by a given value + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that tests whether the + actual value is less than the supplied argument - The writer on which the description is displayed - + - RegexConstraint can test whether a string matches - the pattern provided. + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument - + - Initializes a new instance of the class. + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument - The pattern. - + - Test whether the constraint is satisfied by a given value + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The writer on which the description is displayed - + - ResolvableConstraintExpression is used to represent a compound - constraint being constructed at a point where the last operator - may either terminate the expression or may have additional - qualifying constraints added to it. - - It is used, for example, for a Property element or for - an Exception element, either of which may be optionally - followed by constraints that apply to the property or - exception. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - + - Create a new instance of ResolvableConstraintExpression + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - + - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - + - Resolve the current expression to a Constraint + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Returns a constraint that tests whether the actual value + is assignable to the type supplied as an argument. - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Returns a constraint that tests whether the actual value + is assignable to the type supplied as an argument. - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Returns a constraint that tests whether the actual value + is a superset of the collection supplied as an argument. - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Returns a constraint that tests whether a collection is ordered - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Appends an And Operator to the expression + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - Appends an Or operator to the expression. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - ReusableConstraint wraps a constraint expression after - resolving it so that it can be reused consistently. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Construct a ReusableConstraint from a constraint expression + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. - The expression to be resolved and reused - + - Converts a constraint to a ReusableConstraint + Returns a constraint that tests whether the path provided + is a subpath of the expected path after canonicalization. - The constraint to be converted - A ReusableConstraint - + - Returns the string representation of the constraint. + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - A string representing the constraint - + - Resolves the ReusableConstraint by returning the constraint - that it originally wrapped. + Returns a constraint that tests whether the actual value falls + inclusively within a specified range. - A resolved constraint + from must be less than or equal to true + Inclusive beginning of the range. Must be less than or equal to to. + Inclusive end of the range. Must be greater than or equal to from. + - + - SameAsConstraint tests whether an object is identical to - the object passed to its constructor + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - + - Initializes a new instance of the class. + Executed before each test is run - The expected object. + The test that is going to be run. - + - Test whether the constraint is satisfied by a given value + Executed after each test is run - The value to be tested - True for success, false for failure + The test that has just been run. - + - Write the constraint description to a MessageWriter + Provides the target for the action attribute - The writer on which the description is displayed + The target for the action attribute - + - Summary description for SamePathConstraint. + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. - + - Initializes a new instance of the class. + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. - The expected path - + - Test whether the constraint is satisfied by a given value + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. - The expected path - The actual path - True for success, false for failure + + - + - Write the constraint description to a MessageWriter + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. - The writer on which the description is displayed - + - SamePathOrUnderConstraint tests that one path is under another + Construct a ListMapper based on a collection + The collection to be transformed - + - Initializes a new instance of the class. + Produces a collection containing all the _values of a property - The expected path + The collection of property _values + - + - Test whether the constraint is satisfied by a given value + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Null represents a null value, which cannot be used as an + argument to an attribute under .NET 1.x - The writer on which the description is displayed - + - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. + Basic Asserts on strings. - + - Construct a SomeItemsConstraint on top of an existing constraint + DO NOT USE! Use StringAssert.AreEqualIgnoringCase(...) or Assert.AreEqual(...) instead. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - + + - + - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. + DO NOT USE! + The ReferenceEquals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - - + + - + - Write a description of this constraint to a MessageWriter + Asserts that a string is found within another string. - + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - StartsWithConstraint can test whether a string starts - with an expected substring. + Asserts that a string is found within another string. + The expected string + The string to be examined - + - Initializes a new instance of the class. + Asserts that a string is not found within another string. The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + Asserts that a string is found within another string. - - + The expected string + The string to be examined - + - Write the constraint description to a MessageWriter + Asserts that a string starts with another string. - The writer on which the description is displayed + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - SubPathConstraint tests that the actual path is under the expected path + Asserts that a string starts with another string. + The expected string + The string to be examined - + - Initializes a new instance of the class. + Asserts that a string does not start with another string. - The expected path + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Test whether the constraint is satisfied by a given value + Asserts that a string does not start with another string. - The expected path - The actual path - True for success, false for failure + The expected string + The string to be examined - + - Write the constraint description to a MessageWriter + Asserts that a string ends with another string. - The writer on which the description is displayed + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - SubstringConstraint can test whether a string contains - the expected substring. + Asserts that a string ends with another string. + The expected string + The string to be examined - + - Initializes a new instance of the class. + Asserts that a string does not end with another string. - The expected. + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Test whether the constraint is satisfied by a given value + Asserts that a string does not end with another string. - The value to be tested - True for success, false for failure + The expected string + The string to be examined - + - Write the constraint description to a MessageWriter + Asserts that two strings are equal, without regard to case. - The writer on which the description is displayed + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. + Asserts that two strings are equal, without regard to case. + The expected string + The actual string - + - Initializes a new instance of the class, - using a constraint to be applied to the exception. + Asserts that two strings are not equal, without regard to case. - A constraint to apply to the caught exception. + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Executes the code of the delegate and captures any exception. - If a non-null base constraint was provided, it applies that - constraint to the exception. + Asserts that two strings are not equal, without regard to case. - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false + The expected string + The actual string - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Asserts that a string matches an expected regular expression pattern. + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Write the constraint description to a MessageWriter + Asserts that a string matches an expected regular expression pattern. - The writer on which the description is displayed + The regex pattern to be matched + The actual string - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Asserts that a string does not match an expected regular expression pattern. - The writer on which the actual value is displayed + The regex pattern to be used + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Returns the string representation of this constraint + Asserts that a string does not match an expected regular expression pattern. + The regex pattern to be used + The actual string - + - Get the actual exception thrown - used by Assert.Throws. + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. - + - ThrowsNothingConstraint tests that a delegate does not - throw an exception. + Initializes a new instance of the class. + The arguments. - + - Test whether the constraint is satisfied by a given value + Initializes a new instance of the class. - The value to be tested - True if no exception is thrown, otherwise false + The argument. - + - Test whether the constraint is satisfied by a given delegate + Initializes a new instance of the class. - Delegate returning the value to be tested - True if no exception is thrown, otherwise false + The first argument. + The second argument. - + - Write the constraint description to a MessageWriter + Initializes a new instance of the class. - The writer on which the description is displayed + The first argument. + The second argument. + The third argument. - + - Write the actual value for a failing constraint test to a - MessageWriter. Overridden in ThrowsNothingConstraint to write - information about the exception that was actually caught. + Sets the expected result for the test - The writer on which the actual value is displayed + The expected result + A modified TestCaseData - + - The Tolerance class generalizes the notion of a tolerance - within which an equality test succeeds. Normally, it is - used with numeric types, but it can be used with any - type that supports taking a difference between two - objects and comparing that difference to a value. + Sets the name of the test case + The modified TestCaseData instance - + - Constructs a linear tolerance of a specdified amount + Sets the description for the test case + being constructed. + The description. + The modified TestCaseData instance. - + - Constructs a tolerance given an amount and ToleranceMode + Applies a category to the test + + - + - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. + Applies a named property to the test + + + - + - Returns an empty Tolerance object, equivalent to - specifying no tolerance. In most cases, it results - in an exact match but for floats and doubles a - default tolerance may be used. + Applies a named property to the test + + + - + - Returns a zero Tolerance object, equivalent to - specifying an exact match. + Applies a named property to the test + + + - + - Gets the ToleranceMode for the current Tolerance + Marks the test case as explicit. - + - Gets the value of the current Tolerance instance. + Marks the test case as explicit, specifying the reason. - + - Returns a new tolerance, using the current amount as a percentage. + Ignores this TestCase, specifying the reason. + The reason. + - + - Returns a new tolerance, using the current amount in Ulps. + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. + Construct a TestContext for an ExecutionContext + The ExecutionContext to adapt - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. + Get the current test context. This is created + as needed. The user may save the context for + use within a test, but it should not be used + outside the test for which it is created. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. + Gets a TextWriter that will send output to the current test result. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. + Gets a TextWriter that will send output directly to Console.Error - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. + Gets a TextWriter for use in displaying immediate progress messages - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. + TestParameters object holds parameters for the test run, if any are specified - + - Returns true if the current tolerance is empty. + Get a representation of the current test. - + - Modes in which the tolerance value for a comparison can be interpreted. + Gets a Representation of the TestResult for the current test. - + - The tolerance was created with a value, without specifying - how the value would be used. This is used to prevent setting - the mode more than once and is generally changed to Linear - upon execution of the test. + Gets the unique name of the Worker that is executing this test. - + - The tolerance is used as a numeric range within which - two compared values are considered to be equal. + Gets the directory containing the current test assembly. - + - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. + Gets the directory to be used for outputting files created + by this test run. - + - Compares two values based in their distance in - representable numbers. + Gets the random generator. + + The random generator. + - + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + - TrueConstraint tests that the actual value is true + This method adds the a new ValueFormatterFactory to the + chain of responsibility used for formatting values in messages. + The scope of the change is the current TestContext. + The factory delegate - + - Initializes a new instance of the class. + This method provides a simplified way to add a ValueFormatter + delegate to the chain of responsibility, creating the factory + delegate internally. It is useful when the Type of the object + is the only criterion for selection of the formatter, since + it can be used without getting involved with a compound function. + The type supported by this formatter + The ValueFormatter delegate - + - UniqueItemsConstraint tests whether all the items in a - collection are unique. + TestAdapter adapts a Test for consumption by + the user test code. - + - Check that all items are unique. + Construct a TestAdapter for a Test - - + The Test to be adapted - + - Write a description of this constraint to a MessageWriter + Gets the unique Id of a test - - + - XmlSerializableConstraint tests whether - an object is serializable in XML format. + The name of the test, which may or may not be + the same as the method name. - + - Test whether the constraint is satisfied by a given value + The name of the method representing the test. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + The FullName of the test - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + The ClassName of the test - The writer on which the actual value is displayed - + - Returns the string representation of this constraint + The properties of the test. - + - Represents a constraint that succeeds if all the - members of a collection match a base constraint. + ResultAdapter adapts a TestResult for consumption by + the user test code. - + - Abstract base for operators that indicate how to - apply a constraint to items in a collection. + Construct a ResultAdapter for a TestResult + The TestResult to be adapted - + - PrefixOperator takes a single constraint and modifies - it's action in some way. + Gets a ResultState representing the outcome of the test. - + - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - values to determine whether the top operator on the - stack should be reduced before pushing a new operator. + Gets the message associated with a test + failure or with not running the test - + - The precedence value used when the operator - is about to be pushed to the stack. + Gets any stacktrace associated with an + error or failure. - + - The precedence value used when the operator - is on the top of the stack. + Gets the number of test cases that failed + when running the test and all its children. - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Gets the number of test cases that had warnings + when running the test and all its children. - - + - The syntax element preceding this operator + Gets the number of test cases that passed + when running the test and all its children. - + - The syntax element folowing this operator + Gets the number of test cases that were skipped + when running the test and all its children. - + - The precedence value used when the operator - is about to be pushed to the stack. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - The precedence value used when the operator - is on the top of the stack. + The TestFixtureData class represents a set of arguments + and other parameter info to be used for a parameterized + fixture. It is derived from TestFixtureParameters and adds a + fluent syntax for use in initializing the fixture. - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Initializes a new instance of the class. - + The arguments. - + - Returns the constraint created by applying this - prefix to another constraint. + Initializes a new instance of the class. - - + The argument. - + - Constructs a CollectionOperator + Initializes a new instance of the class. + The first argument. + The second argument. - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. + Initializes a new instance of the class. + The first argument. + The second argument. + The third argument. - + - Operator that requires both it's arguments to succeed + Marks the test fixture as explicit. - + - Abstract base class for all binary operators + Marks the test fixture as explicit, specifying the reason. - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Ignores this TestFixture, specifying the reason. - + The reason. + - + - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. + TestParameters class holds any named parameters supplied to the test run - + - Gets the left precedence of the operator + Gets the number of test parameters - + - Gets the right precedence of the operator + Gets a collection of the test parameter names - + - Construct an AndOperator + Gets a flag indicating whether a parameter with the specified name exists.N + Name of the parameter + True if it exists, otherwise false - + - Apply the operator to produce an AndConstraint + Indexer provides access to the internal dictionary + Name of the parameter + Value of the parameter or null if not present - + - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. + Get method is a simple alternative to the indexer + Name of the parameter + Value of the parameter or null if not present - + - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. + Get the value of a parameter or a default string + Name of the parameter + Default value of the parameter + Value of the parameter or default value if not present - + - Construct an AttributeOperator for a particular Type + Get the value of a parameter or return a default - The Type of attribute tested + The return Type + Name of the parameter + Default value of the parameter + Value of the parameter or default value if not present - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Adds a parameter to the list + Name of the parameter + Value of the parameter - + - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. + Helper class with properties and methods that supply + constraints that operate on exceptions. - + - Construct an ExactCountOperator for a specified count + Creates a constraint specifying an expected exception - The expected count - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Creates a constraint specifying an exception with a given InnerException - + - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. + Creates a constraint specifying an expected TargetInvocationException - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Creates a constraint specifying an expected ArgumentException - + - Negates the test of the constraint it wraps. + Creates a constraint specifying an expected ArgumentNUllException - + - Constructs a new NotOperator + Creates a constraint specifying an expected InvalidOperationException - + - Returns a NotConstraint applied to its argument. + Creates a constraint specifying that no exception is thrown - + - Operator that requires at least one of it's arguments to succeed + Creates a constraint specifying the exact type of exception expected - + - Construct an OrOperator + Creates a constraint specifying the exact type of exception expected - + - Apply the operator to produce an OrConstraint + Creates a constraint specifying the type of exception expected - + - Operator used to test for the presence of a named Property - on an object and optionally apply further tests to the - value of that property. + Creates a constraint specifying the type of exception expected - + - Constructs a PropOperator for a particular named property + FrameworkPackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the framework, and set in the runner. Setting values may be a string, int or bool. - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Flag (bool) indicating whether tests are being debugged. - - + - Gets the name of the property to which the operator applies + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. - + - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. + Full path of the directory to be used for work and result files. + This path is provided to tests by the framework TestContext. - + - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. + Integer value in milliseconds for the default timeout value + for test cases. If not specified, there is no timeout except + as specified by attributes on the tests themselves. - + - Construct a ThrowsOperator + A TextWriter to which the internal trace will be sent. - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + A list of tests to be loaded. - + - Represents a constraint that simply wraps the - constraint provided as an argument, without any - further functionality, but which modifes the - order of evaluation because of its precedence. + The number of test threads to run for the assembly. If set to + 1, a single queue is used. If set to 0, tests are executed + directly, without queuing. - + - Constructor for the WithOperator + The random seed to be used for this assembly. If specified + as the value reported from a prior run, the framework should + generate identical random values for tests as were used for + that run, provided that no change has been made to the test + assembly. Default is a random value itself. - + - Returns a constraint that wraps its argument + If true, execution stops after the first error or failure. - + - Thrown when an assertion failed. + If true, use of the event queue is suppressed and test events are synchronous. - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + The default naming pattern used in generating test names - + - Thrown when an assertion failed. + Parameters to be passed on to the tests, serialized to a single string which needs parsing. Obsoleted by ; kept for backward compatibility. - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + Parameters to be passed on to the tests, already parsed into an IDictionary<string, string>. Replaces . - + - Thrown when a test executes inconclusively. + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + Gets the custom attributes from the given object. + Portable libraries do not have an ICustomAttributeProvider, so we need to cast to each of + it's direct subtypes and try to get attributes off those instead. + The actual. + Type of the attribute. + if set to true [inherit]. + A list of the given attribute on the given object. - + - Thrown when an assertion failed. + A MarshalByRefObject that lives forever - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception + + + Obtains a lifetime service object to control the lifetime policy for this instance. + - + - Serialization Constructor + Type extensions that apply to all target frameworks - + - + Determines if the given array is castable/matches the array. - + + + - + - Compares two objects of a given Type for equality within a tolerance + Determines if one type can be implicitly converted from another - The first object to compare - The second object to compare - The tolerance to use in the comparison + + + + + This class is used as a flag when we get a parameter list for a method/constructor, but + we do not know one of the types because null was passed in. + + diff --git a/src/Generator.Tests/GeneratorTest.cs b/src/Generator.Tests/GeneratorTest.cs index e66cb349..7df2e49c 100644 --- a/src/Generator.Tests/GeneratorTest.cs +++ b/src/Generator.Tests/GeneratorTest.cs @@ -68,7 +68,8 @@ namespace CppSharp.Utils #region Helpers public static string GetTestsDirectory(string name) { - var directory = Directory.GetParent(Directory.GetCurrentDirectory()); + var directory = new DirectoryInfo( + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); while (directory != null) { diff --git a/tests/CSharp/CSharp.Tests.cs b/tests/CSharp/CSharp.Tests.cs index 4e6b53af..b6e361a5 100644 --- a/tests/CSharp/CSharp.Tests.cs +++ b/tests/CSharp/CSharp.Tests.cs @@ -550,8 +550,7 @@ public unsafe class CSharpTests : GeneratorTestFixture //Assert.That(CSharp.HasFreeConstant.AnotherUnit.STD_STRING_CONSTANT, Is.EqualTo("test")); } - // HACK: the completion of types is temporarily suspended because of problems with QtWidgets - [Test, Ignore] + [Test, Ignore("The completion of types is temporarily suspended because of problems with QtWidgets.")] public void TestTemplateInternals() { foreach (var internalType in new[] diff --git a/tests/Common/Common.Tests.cs b/tests/Common/Common.Tests.cs index cf2cf67b..32eec86a 100644 --- a/tests/Common/Common.Tests.cs +++ b/tests/Common/Common.Tests.cs @@ -283,13 +283,20 @@ public class CommonTests : GeneratorTestFixture public void TestConversionOperator() { var bar = new Bar2 { A = 1, B = 2, C = 3 }; - Foo2 foo = bar; - Assert.AreEqual(foo.A, 1); - Assert.AreEqual(foo.B, 2); - Assert.AreEqual(foo.C, 3); + using (Foo2 foo = bar) + { + Assert.That(1, Is.EqualTo(foo.A)); + Assert.That(2, Is.EqualTo(foo.B)); + Assert.That(3, Is.EqualTo(foo.C)); + } + using (var bar2Nested = new Bar2.Nested()) + { + int bar2NestedInt = bar2Nested; + Assert.That(bar2NestedInt, Is.EqualTo(300)); + } - Assert.AreEqual(300, new Bar2.Nested()); - Assert.AreEqual(500, new Bar2()); + int bar2Int = new Bar2(); + Assert.That(bar2Int, Is.EqualTo(500)); } [Test] @@ -387,10 +394,18 @@ public class CommonTests : GeneratorTestFixture [Test] public void TestOperators() { - var @class = new ClassWithOverloadedOperators(); - Assert.AreEqual(1, (char) @class); - Assert.AreEqual(2, @class); - Assert.AreEqual(3, (short) @class); + using (var @class = new ClassWithOverloadedOperators()) + { + char @char = @class; + Assert.That(@char, Is.EqualTo(1)); + short @short = @class; + Assert.That(@short, Is.EqualTo(3)); + } + using (var @class = new ClassWithOverloadedOperators()) + { + int classInt = @class; + Assert.That(classInt, Is.EqualTo(2)); + } } [Test] @@ -493,8 +508,7 @@ public class CommonTests : GeneratorTestFixture new TestDelegates().MarshalUnattributedDelegate(i => i); } - // TODO: this test crashes our Windows build, possibly a problem with the NUnit runner there - [Test, Platform(Exclude = "Win")] + [Test, Platform(Exclude = "Win", Reason = "This test crashes our Windows build, possibly a problem with the NUnit runner there.")] public void TestPassAnonymousDelegate() { var testDelegates = new TestDelegates();