diff --git a/NHibernate.nunit b/NHibernate.nunit index a91f3140198..1458f998950 100644 --- a/NHibernate.nunit +++ b/NHibernate.nunit @@ -3,11 +3,13 @@ + + \ No newline at end of file diff --git a/ShowBuildMenu.bat b/ShowBuildMenu.bat index e859d4c304d..03c6547a77e 100644 --- a/ShowBuildMenu.bat +++ b/ShowBuildMenu.bat @@ -5,7 +5,7 @@ set NANT="%~dp0Tools\nant\bin\NAnt.exe" -t:net-4.0 set BUILDTOOL="%~dp0Tools\BuildTool\bin\Release\BuildTool.exe" set AVAILABLE_CONFIGURATIONS=%~dp0available-test-configurations set CURRENT_CONFIGURATION=%~dp0current-test-configuration -set NUNIT="%~dp0Tools\nunit\nunit-x86.exe" +set NUNIT="%~dp0Tools\nunit\nunit3-console.exe" :main-menu echo ========================= NHIBERNATE BUILD MENU ========================== @@ -161,7 +161,7 @@ echo Configuration activated. goto main-menu :test-run -start "" %NUNIT% NHibernate.nunit +start "nunit3-console" cmd /K %NUNIT% --x86 --agents=1 --process=separate NHibernate.nunit goto main-menu rem :build-test diff --git a/Tools/nunit/CHANGES.txt b/Tools/nunit/CHANGES.txt new file mode 100644 index 00000000000..44014fe99b6 --- /dev/null +++ b/Tools/nunit/CHANGES.txt @@ -0,0 +1,12 @@ +NUnit msi Installer 3.5.0 - October 12th, 2016 + + * Framework is no longer installed, now solely distributed via NuGet. + +Components Installed: + * NUnit.Engine 3.4.1 + * NUnit.Console 3.4.1 + * NUnit.Extension.VSProjectLoader 3.4.1 + * NUnit.Extension.NUnitProjectLoader 3.4.1 + * NUnit.Extension.NUnitV2Driver 3.4.1 + * NUnit.Extension.NUnitV2ResultWriter 3.4.1 + * NUnit.Extension.TeamCityEventListener 1.0.2 diff --git a/Tools/nunit/LICENSE.txt b/Tools/nunit/LICENSE.txt new file mode 100644 index 00000000000..1a8c7b8ffd9 --- /dev/null +++ b/Tools/nunit/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2016 Charlie Poole + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/Tools/nunit/License.rtf b/Tools/nunit/License.rtf new file mode 100644 index 00000000000..88df775e0d2 --- /dev/null +++ b/Tools/nunit/License.rtf @@ -0,0 +1,6 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}} +{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\b\f0\fs22 Copyright (c) 2016 Charlie Poole\b0\par +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\par +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\par +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\par +} diff --git a/Tools/nunit/Mono.Cecil.dll b/Tools/nunit/Mono.Cecil.dll new file mode 100644 index 00000000000..8e3610fe2dc Binary files /dev/null and b/Tools/nunit/Mono.Cecil.dll differ diff --git a/Tools/nunit/NOTICES.txt b/Tools/nunit/NOTICES.txt new file mode 100644 index 00000000000..02f3f84d68d --- /dev/null +++ b/Tools/nunit/NOTICES.txt @@ -0,0 +1,5 @@ +NUnit 3.0 is based on earlier versions of NUnit, with Portions + +Copyright (c) 2002-2014 Charlie Poole or +Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or +Copyright (c) 2000-2002 Philip A. Craig diff --git a/Tools/nunit/NUnitFitTests.html b/Tools/nunit/NUnitFitTests.html deleted file mode 100644 index ca5cd4ff70d..00000000000 --- a/Tools/nunit/NUnitFitTests.html +++ /dev/null @@ -1,277 +0,0 @@ - - - -

NUnit Acceptance Tests

-

- Developers love self-referential programs! Hence, NUnit has always run all it's - own tests, even those that are not really unit tests. -

Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's - FIT framework. At this time, the tests are pretty rudimentary, but it's a start - and it's a framework for doing more. -

Running the Tests

-

Open a console or shell window and navigate to the NUnit bin directory, which - contains this file. To run the test under Microsoft .Net, enter the command -

    runFile NUnitFitTests.html TestResults.html .
- To run it under Mono, enter -
    mono runFile.exe NUnitFitTests.html TestResults.html .
- Note the space and dot at the end of each command. The results of your test - will be in TestResults.html in the same directory. -

Platform and CLR Version

- - - - -
NUnit.Fixtures.PlatformInfo
-

Verify Unit Tests

-

- Load and run the NUnit unit tests, verifying that the results are as expected. - When these tests are run on different platforms, different numbers of tests may - be skipped, so the values for Skipped and Run tests are informational only. -

- The number of tests in each assembly should be constant across all platforms - - any discrepancy usually means that one of the test source files was not - compiled on the platform. There should be no failures and no tests ignored. -

Note: - At the moment, the nunit.extensions.tests assembly is failing because the - fixture doesn't initialize addins in the test domain. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NUnit.Fixtures.AssemblyRunner
AssemblyTests()Run()Skipped()Ignored()Failures()
nunit.framework.tests.dll397  00
nunit.core.tests.dll355  00
nunit.util.tests.dll238  00
nunit.mocks.tests.dll43  00
nunit.extensions.tests.dll5  00
nunit-console.tests.dll40  00
nunit.uikit.tests.dll34  00
nunit-gui.tests.dll15  00
nunit.fixtures.tests.dll6  00
-

Code Snippet Tests

-

- These tests create a test assembly from a snippet of code and then load and run - the tests that it contains, verifying that the structure of the loaded tests is - as expected and that the number of tests run, skipped, ignored or failed is - correct. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NUnit.Fixtures.SnippetRunner
CodeTree()Run()Skipped()Ignored()Failures()
public class TestClass
-{
-}
-
EMPTY0000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-}
-
TestClass0000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-    [Test]
-    public void T1() { }
-    [Test]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass
->T1
->T2
->T3
-
3000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass1
-{
-    [Test]
-    public void T1() { }
-}
-
-[TestFixture]
-public class TestClass2
-{
-    [Test]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass1
->T1
-TestClass2
->T2
->T3
-
3000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-    [Test]
-    public void T1() { }
-    [Test, Ignore]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass
->T1
->T2
->T3
-
2010
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-    [Test]
-    public void T1() { }
-    [Test, Explicit]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass
->T1
->T2
->T3
-
2100
-

Summary Information

- - - - -
fit.Summary
- - diff --git a/Tools/nunit/NUnitTests.config b/Tools/nunit/NUnitTests.config deleted file mode 100644 index 72ed67c79a4..00000000000 --- a/Tools/nunit/NUnitTests.config +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/NUnitTests.nunit b/Tools/nunit/NUnitTests.nunit deleted file mode 100644 index 15b98d3f03b..00000000000 --- a/Tools/nunit/NUnitTests.nunit +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Tools/nunit/addins/nunit-project-loader.dll b/Tools/nunit/addins/nunit-project-loader.dll new file mode 100644 index 00000000000..2677499cb30 Binary files /dev/null and b/Tools/nunit/addins/nunit-project-loader.dll differ diff --git a/Tools/nunit/addins/nunit-v2-result-writer.dll b/Tools/nunit/addins/nunit-v2-result-writer.dll new file mode 100644 index 00000000000..4d9755c28c4 Binary files /dev/null and b/Tools/nunit/addins/nunit-v2-result-writer.dll differ diff --git a/Tools/nunit/addins/nunit.core.dll b/Tools/nunit/addins/nunit.core.dll new file mode 100644 index 00000000000..8bbe3e2cdba Binary files /dev/null and b/Tools/nunit/addins/nunit.core.dll differ diff --git a/Tools/nunit/addins/nunit.core.interfaces.dll b/Tools/nunit/addins/nunit.core.interfaces.dll new file mode 100644 index 00000000000..b18127d3a7c Binary files /dev/null and b/Tools/nunit/addins/nunit.core.interfaces.dll differ diff --git a/Tools/nunit/addins/nunit.v2.driver.dll b/Tools/nunit/addins/nunit.v2.driver.dll new file mode 100644 index 00000000000..acf1336eef0 Binary files /dev/null and b/Tools/nunit/addins/nunit.v2.driver.dll differ diff --git a/Tools/nunit/addins/teamcity-event-listener.dll b/Tools/nunit/addins/teamcity-event-listener.dll new file mode 100644 index 00000000000..eeeb99add72 Binary files /dev/null and b/Tools/nunit/addins/teamcity-event-listener.dll differ diff --git a/Tools/nunit/addins/vs-project-loader.dll b/Tools/nunit/addins/vs-project-loader.dll new file mode 100644 index 00000000000..b3eb0f49c8c Binary files /dev/null and b/Tools/nunit/addins/vs-project-loader.dll differ diff --git a/Tools/nunit/agent.conf b/Tools/nunit/agent.conf deleted file mode 100644 index ddbcd8ea6d8..00000000000 --- a/Tools/nunit/agent.conf +++ /dev/null @@ -1,4 +0,0 @@ - - 8080 - . - \ No newline at end of file diff --git a/Tools/nunit/agent.log.conf b/Tools/nunit/agent.log.conf deleted file mode 100644 index b5bcd9da484..00000000000 --- a/Tools/nunit/agent.log.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/framework/mock-assembly.exe b/Tools/nunit/framework/mock-assembly.exe new file mode 100644 index 00000000000..a6df3d91b7b Binary files /dev/null and b/Tools/nunit/framework/mock-assembly.exe differ diff --git a/Tools/nunit/framework/nunit.framework.dll b/Tools/nunit/framework/nunit.framework.dll index 215767d2fb3..f08e57564d2 100644 Binary files a/Tools/nunit/framework/nunit.framework.dll and b/Tools/nunit/framework/nunit.framework.dll differ diff --git a/Tools/nunit/framework/nunit.framework.tests.dll b/Tools/nunit/framework/nunit.framework.tests.dll new file mode 100644 index 00000000000..a4f2c4d153f Binary files /dev/null and b/Tools/nunit/framework/nunit.framework.tests.dll differ diff --git a/Tools/nunit/framework/nunit.framework.xml b/Tools/nunit/framework/nunit.framework.xml index 7b0e798cada..47332e24fe5 100644 --- a/Tools/nunit/framework/nunit.framework.xml +++ b/Tools/nunit/framework/nunit.framework.xml @@ -4,9549 +4,16915 @@ nunit.framework - + - Attribute used to apply a category to a test + The different targets a test action attribute can be applied to - + - The name of the category + Default target, which is determined by where the action attribute is attached - + - 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. + Target a individual test case - The name of the category - + - Protected constructor uses the Type name as the name - of the category. + Target a suite of test cases - + - The name of the category + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. - + - 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. + The default suite builder used by the test assembly builder. - + - 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. + Initializes a new instance of the class. - + - Attribute used to provide descriptive text about a - test case or fixture. + 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 + - + - Construct the attribute + Build a suite of tests given the filename of an assembly - Text describing the test + 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 + - + - Gets the test description + 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. - + - Enumeration indicating how the expected message parameter is to be used + Construct a FrameworkController using the default builder and runner. + 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 - - Expect an exact match - - - Expect a message containing the parameter string - - - Match the regular expression provided as a parameter - - - Expect a message that starts with the parameter string - - + - ExpectedExceptionAttribute + 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 - + - Constructor for a non-specific exception + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + 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 - + - Constructor for a given type of exception + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - The type of the expected exception + 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 - + - Constructor for a given exception name + Gets the ITestAssemblyBuilder used by this controller instance. - The full name of the expected exception + The builder. - + - Gets or sets the expected exception type + Gets the ITestAssemblyRunner used by this controller instance. + The runner. - + - Gets or sets the full Type name of the expected exception + Gets the AssemblyName or the path for which this FrameworkController was created - + - Gets or sets the expected message text + Gets the Assembly for which this - + - Gets or sets the user message displayed in case of failure + Gets a dictionary of settings for the FrameworkController - + - Gets or sets the type of match to be performed on the expected message + Loads the tests in the assembly + - + - Gets the name of a method to be used as an exception handler + 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 - + - 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. + Runs the tests in an assembly + A string containing the XML representation of the filter to use + The XML result of the test run - + - Default constructor + Runs the tests in an assembly syncronously reporting back the test results through the callback + or through the return value + 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 - + - Constructor with a reason + Runs the tests in an assembly asyncronously reporting back the test results through the callback - The reason test is marked explicit + The callback that receives the test results + A string containing the XML representation of the filter to use - + - The reason test is marked explicit + Stops the test run + True to force the stop, false for a cooperative stop - + - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. + Counts the number of test cases in the loaded TestSuite + A string containing the XML representation of the filter to use + The number of tests - + - Constructs the attribute without giving a reason - for ignoring the test. + Inserts environment element + Target node + The new node - + - Constructs the attribute giving a reason for ignoring the test + Inserts settings element - The reason for ignoring the test + Target node + Settings dictionary + The new node - + - The reason for ignoring a test + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. - + - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. + LoadTestsAction loads a test into the FrameworkController - + - Constructor with no included items specified, for use - with named property syntax. + LoadTestsAction loads the tests in an assembly. + The controller. + The callback handler. - + - Constructor taking one or more included items + ExploreTestsAction returns info about the tests in an assembly - Comma-delimited list of included items - + - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. + Initializes a new instance of the class. + The controller for which this action is being performed. + Filter used to control which tests are included (NYI) + The callback handler. - + - Name of the item to be excluded. Multiple items - may be given, separated by a comma. + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. - + - The reason for including or excluding the test + Construct a CountsTestAction and perform the count of test cases. + 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 - + - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. + RunTestsAction runs the loaded TestSuite held by the FrameworkController. - + - Constructor with no platforms specified, for use - with named property syntax. + Construct a RunTestsAction and run all tests in the loaded TestSuite. + 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 - + - Constructor taking one or more platforms + RunAsyncAction initiates an asynchronous test run, returning immediately - Comma-deliminted list of platforms - + - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. + Construct a RunAsyncAction and run all tests in the loaded TestSuite. + 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 - + - Constructor with no cultures specified, for use - with named property syntax. + StopRunAction stops an ongoing run. - + - Constructor taking one or more cultures + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. - Comma-deliminted list of cultures + 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. - + - 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. + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. - + - PropertyAttribute is used to attach information to a test as a name/value pair.. + 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 - + - Construct a PropertyAttribute with a name and string value + Build a suite of tests given the filename of an assembly - The name of the property - The property value + 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 - + - Construct a PropertyAttribute with a name and int value + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. - The name of the property - The property value - + - Construct a PropertyAttribute with a name and double value + Gets the tree of loaded tests, or null if + no tests have been loaded. - The name of the property - The property value - + - Constructor for derived classes that set the - property dictionary directly. + Gets the tree of test results, if the test + run is completed, otherwise null. - + - 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. + Indicates whether a test has been loaded - + - Gets the property dictionary for this attribute + Indicates whether a test is currently running - + - Default constructor + Indicates whether a test run is complete - + - 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. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. + File name of the assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Default constructor + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. + The assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - 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. + Count Test Cases using a filter + The filter to apply + The number of test cases found - + - Default constructor + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. + Interface to receive ITestListener notifications. + A test filter used to select tests to be run - + - Summary description for MaxTimeAttribute. + Run selected tests asynchronously, notifying the listener interface as it progresses. + Interface to receive EventListener notifications. + A test filter used to select tests to be run - + - Construct a MaxTimeAttribute, given a time in milliseconds. + Wait for the ongoing run to complete. - The maximum elapsed time in milliseconds + Time to wait in milliseconds + True if the run completed, otherwise false - + - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. + Signal any test run that is in process to stop. Return without error if no test is running. + If true, kill any test-running threads - + - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. + Implementation of ITestAssemblyRunner - + - Abstract base class for attributes that apply to parameters - and supply data for the parameter. + Initializes a new instance of the class. + The builder. - + - Gets the data to be provided to the specified parameter + Gets the default level of parallel execution (worker threads) - + - 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. + The tree of tests that was loaded by the builder - + - Construct with one argument + The test result, if a run has completed - - + - Construct with two arguments + Indicates whether a test is loaded - - - + - Construct with three arguments + Indicates whether a test is running - - - - + - Construct with an array of arguments + Indicates whether a test run is complete - - + - Get the collection of values to be used as arguments + Our settings, specified when loading the assembly - + - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. + The top level WorkItem created for the assembly as a whole - - + - Construct a set of doubles from min to max + The TestExecutionContext for the top level WorkItem - - - - + - Construct a set of ints from min to max + 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 - + - Get the collection of values to be used as arguments + 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 - + - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. + Count Test Cases using a filter + The filter to apply + The number of test cases found - + - Construct a range of ints using default step of 1 + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. - - + Interface to receive EventListener notifications. + A test filter used to select tests to be run + - + - Construct a range of ints specifying the step size + Run selected tests asynchronously, notifying the listener interface as it progresses. - - - + 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. + - + - Construct a range of longs + Wait for the ongoing run to complete. - - - + Time to wait in milliseconds + True if the run completed, otherwise false - + - Construct a range of doubles + Signal any test run that is in process to stop. Return without error if no test is running. - - - + If true, kill any tests that are currently running - + - Construct a range of floats + Initiate the test run. - - - - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + Create the initial TestExecutionContext used to run tests + The ITestListener specified in the RunAsync call - + - Construct a RepeatAttribute + Handle the the Completed event for the top level work item - The number of times to run the test - + - 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. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - - - Initializes a new instance of the class. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - The required addin. - + - Gets the name of required addin. + Verifies that the first int is greater than the second + int. If it is not, then an + is thrown. - The required addin name. + 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 - + - Summary description for SetCultureAttribute. + Verifies that the first int is greater than the second + int. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Construct given the name of a culture + Verifies that the first value is greater than the second + value. If it is not, then 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 - + - Summary description for SetUICultureAttribute. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Construct given the name of a culture + Verifies that the first value is greater than the second + value. If it is not, then 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 - + - 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. - - + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + 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. + + 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + Asserts that a condition is true. If the condition is false 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 a condition is true. If the condition is false 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 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 + + + + Asserts that a condition is true. If the condition is false 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 a condition is true. If the condition is false 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 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 + + + + 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 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 a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + 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 + + + + 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 a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + 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 not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + 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 not equal to null + If the object is null then an + is thrown. + + 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 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. + + 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 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. + + The object that is to be tested + + + + 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 + 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. + + The value that is to be tested + + + + 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 + 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. + + The value that is to be tested + + + + 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 + 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 + + + + Assert that an array, list or other collection is empty + + 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 + + + + Assert that a string is not empty - that is not equal to string.Empty + + The string to be tested + 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 + + The string to be tested + + + + Assert that an array, list or other collection is not empty + + 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 not empty + + An array, list or other collection implementing ICollection + + + + Asserts that an int is zero. + + The number to be examined + + + + Asserts that an 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 unsigned int is zero. + + 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 a Long is zero. + + The number to be examined + + + + Asserts that a 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 unsigned Long is zero. + + 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 a decimal is zero. + + 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 + + + + Asserts that a double is zero. + + 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 + + + + Asserts that a float is zero. + + 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 + + + + Asserts that an int is not zero. + + 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 + + + + Asserts that an unsigned int is not zero. + + The number to be examined + + + + Asserts that an unsigned 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 + + + + Asserts that a Long is not zero. + + 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 + + + + Asserts that an unsigned Long is not zero. + + The number to be examined + + + + Asserts that an unsigned 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 + + + + Asserts that a decimal is zero. + + 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 + + + + Asserts that a double is zero. + + 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 + + + + Asserts that a float is zero. + + 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 + + + + Asserts that an int is negative. + + The number to be examined + + + + Asserts that an 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 + + + + Asserts that an unsigned int is negative. + + 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 + + + + Asserts that a Long is negative. + + The number to be examined + + + + Asserts that a 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 + + + + Asserts that an unsigned Long is negative. + + 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 + + + + Asserts that a decimal is negative. + + The number to be examined + + + + Asserts that a decimal 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 + + + + Asserts that a double is negative. + + The number to be examined + + + + Asserts that a double 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 + + + + Asserts that a float is negative. + + The number to be examined + + + + Asserts that a float 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 + + + + Asserts that an int is negative. + + The number to be examined + + + + Asserts that an 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 + + + + Asserts that an unsigned int is negative. + + 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 + + + + Asserts that a Long is negative. + + The number to be examined + + + + Asserts that a 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 + + + + Asserts that an unsigned Long is negative. + + 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 + + + + Asserts that a decimal is negative. + + The number to be examined + + + + Asserts that a decimal 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 + + + + Asserts that a double is negative. + + The number to be examined + + + + Asserts that a double 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 + + + + Asserts that a float is negative. + + The number to be examined + + + + Asserts that a float 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 + + + + 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 Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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 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. + + The message to initialize the with. + + + + 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. + + + + + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. + + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws an with the message that is + passed in. This is used by the other Assert functions. + + The message to initialize the with. + + + + Throws an . + This is used by the other Assert functions. + + + + + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. + + 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 ignored. + + The message to initialize the with. + + + + Throws an . + This causes the test to be reported as ignored. + + + + + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. + + 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 list. + + 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. + + The expected object + The list to be examined + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 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 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 + + + + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + + The expected object + The actual object + + + + 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 + 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 + + + + + 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. + + + + + 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 + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + 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 IParamterDataProvider. + + 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. + + - 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 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 fixures 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 + + + + + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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 with the specified delay time. + + The delay in 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 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. + + + + + 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. + + + + The IResolveConstraint interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + 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 givel + 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 depthy. + + + + + 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. + + + + + 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. - + - Attribute used to mark a static (shared in VB) property - that returns a list of tests. + RegexConstraint can test whether a string matches + the pattern provided. - + - 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. + Initializes a new instance of the class. + The pattern. - + - Provide actions to execute before and after tests. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + 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. - + - Executed before each test is run + Create a new instance of ResolvableConstraintExpression - Provides details about the test that is going to be run. - + - Executed after each test is run + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. - Provides details about the test that has just been run. - + - Provides the target for the action attribute + Appends an And Operator to the expression - 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. + 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. - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - + - Descriptive text for this test + Constructs a StringConstraint without an expected value - + - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. + Constructs a StringConstraint given an expected value + The expected value - + - 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. + Modify the constraint to ignore case in matching. - + - Gets the argument list to be provided to the test + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Gets the expected result + Test whether the constraint is satisfied by a given string + The string to be tested + True for success, false for failure - + - Indicates whether a result has been specified. - This is necessary because the result may be - null, so it's value cannot be checked. + SubPathConstraint tests that the actual path is under the expected path - + - Gets the expected exception Type + Initializes a new instance of the class. + The expected path - + - Gets the FullName of the expected exception + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Gets the name to be used for the test + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Gets the description of the test + SubstringConstraint can test whether a string contains + the expected substring. - + - Gets a value indicating whether this is ignored. + Initializes a new instance of the class. - true if ignored; otherwise, false. + The expected. - + - Gets a value indicating whether this is explicit. + Test whether the constraint is satisfied by a given value - true if explicit; otherwise, false. + The value to be tested + True for success, false for failure - + - Gets the ignore reason. + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. - The ignore reason. - + - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant + Initializes a new instance of the class, + using a constraint to be applied to the exception. - + A constraint to apply to the caught exception. - + - Construct a TestCaseAttribute with a single argument + Get the actual exception thrown - used by Assert.Throws. - - + - Construct a TestCaseAttribute with a two arguments + Gets text describing a constraint - - - + - Construct a TestCaseAttribute with a three arguments + 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 - + - Gets the list of arguments to a test case + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + - + - Gets or sets the expected result. + 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 result. + The writer on which the actual value is displayed - + - Gets the expected result. + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. - The result. - + - Gets a flag indicating whether an expected - result has been set. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Gets a list of categories associated with this test; + 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 - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Returns the ActualValueDelegate itself as the value to be tested. + A delegate representing the code to be tested + The delegate itself - + - Gets or sets the expected exception. + ThrowsNothingConstraint tests that a delegate does not + throw an exception. - The expected exception. - + - Gets or sets the name the expected exception. + Gets text describing a constraint - The expected name of the exception. - + - Gets or sets the expected message of the expected exception + Test whether the constraint is satisfied by a given value - The expected message of the exception. + The value to be tested + True if no exception is thrown, otherwise false - + - Gets or sets the type of match to be performed on the expected message + 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 - + - Gets or sets the description. + 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. - The description. - + - Gets or sets the name of the test. + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. - The name of the test. - + - Gets or sets the ignored status of the test + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. - + - Gets or sets the ignored status of the test + Constructs a linear tolerance of a specified amount - + - Gets or sets the explicit status of the test + Constructs a tolerance given an amount and - + - Gets or sets the reason for not running the test + Gets the for the current Tolerance - + - Gets or sets the reason for not running the test. - Set has the side effect of marking the test as ignored. + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. - The ignore reason. - + - FactoryAttribute indicates the source to be used to - provide test cases for a test method. + Gets the value of the current Tolerance instance. - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Returns a new tolerance, using the current amount as a percentage. - An array of the names of the factories that will provide data - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Returns a new tolerance, using the current amount in Ulps - 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 + Returns a new tolerance with a as the amount, using + the current amount as a number of days. - + - A Type to be used as a source + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. - - - [TestFixture] - public class ExampleClass - {} - + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + - + - Default constructor + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. - + - 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. + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. - - + - Descriptive text for this fixture + Returns true if the current tolerance has not been set or is using the . - + - Gets and sets the category for this fixture. - May be a comma-separated list of categories. + Modes in which the tolerance value for a comparison can be interpreted. - + - Gets a list of categories for this fixture + 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 arguments originally provided to the attribute + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. - + - Gets or sets a value indicating whether this should be ignored. + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. - true if ignore; otherwise, false. - + - Gets or sets the ignore reason. May set Ignored as a side effect. + Compares two _values based in their distance in + representable numbers. - The ignore reason. - + - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. + TrueConstraint tests that the actual value is true - + - Attribute used to identify a method that is - called before any tests in a fixture are run. + Initializes a new instance of the class. - + - 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. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - 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. + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - + - 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. + The expected Type used by the constraint - + - Construct a TimeoutAttribute given a time in milliseconds + The type of the actual argument to which the constraint was applied - 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. + Construct a TypeConstraint for a given Type + The expected type for the constraint + Prefix used in forming the constraint description - + - Construct a RequiresSTAAttribute + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - 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. + Apply the constraint to an actual value, returning true if it succeeds + The actual argument + True if the constraint succeeds, otherwise false. - + - Construct a RequiresMTAAttribute + UniqueItemsConstraint tests whether all the items in a + collection are unique. - + - Marks a test that must run on a separate thread. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Construct a RequiresThreadAttribute + Check that all items are unique. + + - + - Construct a RequiresThreadAttribute, specifying the apartment + XmlSerializableConstraint tests whether + an object is serializable in xml format. - + - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. + Gets text describing a constraint - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Test whether the constraint is satisfied by a given value - The name of the data source to be used + The value to be tested + True for success, false for failure - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Returns the string representation of this constraint - 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 + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. - + - A Type to be used as a source + Construct an ExactCountConstraint on top of an existing constraint + + - + - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + - + - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. - + - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. + Construct an ExactCountOperator for a specified count + The expected count - + - Return the top-level constraint for this expression + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. - - + - Static UnsetObject used to detect derived constraints - failing to set the actual value. + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. - + - The actual value being tested against a constraint + Constructs an ExceptionTypeConstraint - + - The display name of this Constraint for use by ToString() + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - Argument fields used by ToString(); + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - The builder holding this constraint + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Construct a constraint with no arguments + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. - + - Construct a constraint with one argument + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. - + - Construct a constraint with two arguments + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Sets the ConstraintBuilder holding this constraint + Asserts on Directories - + - 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. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - The MessageWriter on which to display the message + + - + - Test whether the constraint is satisfied by a given value + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - 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. + 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. - An ActualValueDelegate - True for success, false for failure + 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 - + - 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. + 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 reference to the value to be tested - True for success, false for failure + A directory containing the value that is expected + A directory containing the actual value - + - Write the constraint description to a MessageWriter + Asserts that two directories are not equal. If they are equal + an is thrown. - The writer on which the description is displayed + 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 - + - 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 two directories are not equal. If they are equal + an is thrown. - The writer on which the actual value is displayed + A directory containing the value that is expected + A directory containing the actual value - + - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. + 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 - + - Returns the string representation of this constraint + Asserts that the directory exists. If it does not exist + an is thrown. + A directory containing the actual value - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + 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 - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Asserts that the directory exists. If it does not exist + an is thrown. + The path to a directory containing the actual value - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + 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 - + - Returns a DelayedConstraint with the specified delay time. + Asserts that the directory does not exist. If it does exist + an is thrown. - The delay in milliseconds. - + A directory containing the actual value - + - Returns a DelayedConstraint with the specified delay time - and polling interval. + Asserts that the directory does not exist. If it does exist + an is thrown. - The delay in milliseconds. - The interval at which to test the constraint. - + 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 - + - 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. + Asserts that the directory does not exist. If it does exist + an is thrown. + The path to a directory containing the actual value - + - Returns a ConstraintExpression by appending And - to the current constraint. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Returns a ConstraintExpression by appending And - to the current constraint. + Returns a ConstraintExpression that negates any + following constraint. - + - Returns a ConstraintExpression by appending Or - to the current constraint. + Returns a constraint that succeeds if the value + is a file or directory and it exists. - + - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Constructs an AttributeExistsConstraint for a specific attribute Type + 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. - - + - Tests whether the object provides the expected attribute. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - 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 + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - 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. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Abstract base class used for prefixes + 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 + + - The base constraint + Serialization Constructor - + - Construct given a base constraint + Gets the ResultState provided by this exception - - + - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. + Thrown when an assertion failed. - - - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. + Serialization Constructor - + - Writes a description of the attribute to the specified writer. + Gets the ResultState provided by this exception - + - Writes the actual value supplied to the specified writer. + 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 + + - Returns a string representation of the constraint. + Serialization Constructor - + - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. + Gets the ResultState provided by this exception - + - Initializes a new instance of the class. + Abstract base for Exceptions that terminate a test and provide a ResultState. - The expected. - The description. - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure + + The error message that explains + the reason for the exception - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed + + The error message that explains + the reason for the exception + The exception that caused the + current exception - + - NullConstraint tests that the actual value is null + Serialization Constructor - + - Initializes a new instance of the class. + Gets the ResultState provided by this exception - + - TrueConstraint tests that the actual value is true + Thrown when an assertion failed. - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Initializes a new instance of the class. + Serialization Constructor - + - FalseConstraint tests that the actual value is false + Gets the ResultState provided by this exception - + - Initializes a new instance of the class. + Asserts on Files - + - NaNConstraint tests that the actual value is a double or float NaN + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + - + - Test that the actual value is an NaN + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - - + + - + - Write the constraint description to a specified writer + 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 - + - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. + 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 first constraint being combined + 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 - + - The second constraint being combined + 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 - + - Construct a BinaryConstraint from two other constraints + 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 first constraint - The second constraint + 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 - + - AndConstraint succeeds only if both members succeed. + 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 - + - Create an AndConstraint from two other constraints + Asserts that two Streams are not equal. If they are equal + an is thrown. - The first constraint - The second constraint + 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 - + - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. + Asserts that two Streams are not equal. If they are equal + an is thrown. - The actual value - True if the constraints both succeeded + The expected Stream + The actual Stream - + - Write a description for this contraint to a MessageWriter + Asserts that two files are not equal. If they are equal + an is thrown. - The MessageWriter to receive the description + 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 - + - 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 two files are not equal. If they are equal + an is thrown. - The writer on which the actual value is displayed + A file containing the value that is expected + A file containing the actual value - + - OrConstraint succeeds if either member succeeds + 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 - + - Create an OrConstraint from two other constraints + Asserts that two files are not equal. If they are equal + an is thrown. - The first constraint - The second constraint + The path to a file containing the value that is expected + The path to a file containing the actual value - + - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. + Asserts that the file exists. If it does not exist + an is thrown. - The actual value - True if either constraint succeeded + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Write a description for this contraint to a MessageWriter + Asserts that the file exists. If it does not exist + an is thrown. - The MessageWriter to receive the description + A file containing the actual value - + - CollectionConstraint is the abstract base class for - constraints that operate on collections. + Asserts that the file exists. If it does not exist + an is thrown. + 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 - + - Construct an empty CollectionConstraint + Asserts that the file exists. If it does not exist + an is thrown. + The path to a file containing the actual value - + - Construct a CollectionConstraint + Asserts that the file does not exist. If it does 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 - + - Determines whether the specified enumerable is empty. + Asserts that the file does not exist. If it does exist + an is thrown. - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - + A file containing the actual value - + - Test whether the constraint is satisfied by a given value + Asserts that the file does not exist. If it does exist + an is thrown. - The value to be tested - True for success, false for failure + 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 - + - Protected method to be implemented by derived classes + Asserts that the file does not exist. If it does exist + an is thrown. - - + The path to a file containing the actual value - + - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. + 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. - + - Construct an empty CollectionConstraint + Default tolerance for floating point equality - + - Construct a CollectionConstraint + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. - - + - Flag the constraint to use the supplied IComparer object. + Throws an exception if an argument is null - The IComparer object to use. - Self. + The value to be tested + The name of the argument - + - Flag the constraint to use the supplied IComparer object. + Throws an exception if a string argument is null or empty - The IComparer object to use. - Self. + The value to be tested + The name of the argument - + - Flag the constraint to use the supplied Comparison object. + Throws an ArgumentOutOfRangeException if the specified condition is not met. - The IComparer object to use. - Self. + The condition that must be met + The exception message to be used + The name of the argument - + - Flag the constraint to use the supplied IEqualityComparer object. + Throws an ArgumentException if the specified condition is not met. - The IComparer object to use. - Self. + The condition that must be met + The exception message to be used + The name of the argument - + - Flag the constraint to use the supplied IEqualityComparer object. + Throws an InvalidOperationException if the specified condition is not met. - The IComparer object to use. - Self. + The condition that must be met + The exception message to be used - + - Compares two collection members for equality + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Return a new CollectionTally for use in making tests + Returns a ConstraintExpression that negates any + following constraint. - The collection to be included in the tally - + - Flag the constraint to ignore case and return self. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - + - EmptyCollectionConstraint tests whether a collection is empty. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - + - Check that the collection is empty + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - - - + - Write the constraint description to a MessageWriter + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - - + - UniqueItemsConstraint tests whether all the items in a - collection are unique. + 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. - + - Check that all items are unique. + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - - - + - Write a description of this constraint to a MessageWriter + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - - + - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - + - Construct a CollectionContainsConstraint + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - - + - Test whether the expected item is contained in the collection + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - - - + - Write a descripton of the constraint to a MessageWriter + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - - + - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Construct a CollectionEquivalentConstraint + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. - - + - Test whether two collections are equivalent + Apply changes to the execution context - - + The execution context - + - Write a description of this constraint to a MessageWriter + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. - - + - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another + Modifies a test as defined for the specific attribute. + The test to modify - + - Construct a CollectionSubsetConstraint + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. - The collection that the actual value is expected to be a subset of + + 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. + - + - Test whether the actual collection is a subset of - the expected collection provided. + Wrap a command and return the result. - - + The command to be wrapped + The wrapped command - + - Write a description of this constraint to a MessageWriter + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. - - + - CollectionOrderedConstraint is used to test whether a collection is ordered. + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. - + - Construct a CollectionOrderedConstraint + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run - + - Modifies the constraint to use an IComparer and returns self. + 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. - + - Modifies the constraint to use an IComparer<T> and returns self. + 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. - + - Modifies the constraint to use a Comparison<T> and returns self. + 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. - + - Modifies the constraint to test ordering by the value of - a specified property and returns self. + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. - + - Test whether the collection is ordered + Gets the Type from which this method was reflected. - - - + - Write a description of the constraint to a MessageWriter + Gets the MethodInfo for this method. - - + - Returns the string representation of the constraint. + Gets the name of the method. - - + - If used performs a reverse comparison + Gets a value indicating whether the method is abstract. - + - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. + Gets a value indicating whether the method is public. - + - Construct a CollectionTally object from a comparer and a collection + Gets a value indicating whether the method contains unassigned generic type parameters. - + - Try to remove an object from the tally + Gets a value indicating whether the method is a generic method. - The object to remove - True if successful, false if the object was not found - + - Try to remove a set of objects from the tally + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - The objects to remove - True if successful, false if any object was not found - + - The number of objects remaining in the tally + Gets the return Type of the method. - + - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> + Gets the parameters of the method. + - + - Returns a ComparisonAdapter that wraps an IComparer + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - Returns a ComparisonAdapter that wraps an IComparer<T> + 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 ComparisonAdapter that wraps a Comparison<T> + 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 - + - Compares two objects + The IDataPointProvider interface is used by extensions + that provide data for a single test parameter. - + - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. + 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. - + - Construct a ComparisonAdapter for an IComparer + 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 - + - Compares two objects + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. - - - - + - Construct a default ComparisonAdapter + 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 - + - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. + The IParameterInfo interface is an abstraction of a .NET parameter. - + - Construct a ComparisonAdapter for an IComparer<T> + Gets a value indicating whether the parameter is optional - + - Compare a Type T to an object + Gets an IMethodInfo representing the method for which this is a parameter - + - Construct a ComparisonAdapter for a Comparison<T> + Gets the underlying .NET ParameterInfo - + - Compare a Type T to an object + Gets the Type of the parameter - + - 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. + 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 propeties, 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")); - + - ComparisonAdapter to be used in making the comparison + Adds a key/value pair to the property bag + The key + The value - + - Initializes a new instance of the class. + Sets the value for a key, removing any other + _values that are already in the property set. + + - + - Initializes a new instance of the class. + 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. - + - Modifies the constraint to use an IComparer and returns self + 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 - + - Modifies the constraint to use an IComparer<T> and returns self + Gets or sets the list of _values for a particular key + The key for which the _values are to be retrieved or set - + - Modifies the constraint to use a Comparison<T> and returns self + Gets a collection containing all the keys in the property set - + - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. - + - 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. + Returns an array of custom attributes of the specified type applied to this object - + - Initializes a new instance of the class. + Returns a value indicating whether an attribute of the specified type is defined on this object. - + - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. + 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. - The operator to push. - + - Appends the specified constraint to the expresson by pushing - it on the constraint stack. + Build a TestMethod from the provided MethodInfo. - The constraint to push. + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object - + - Sets the top operator right context. + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. - The right context. - + - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. + 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 target precedence. + The type of the fixture to be used + True if the type can be used to build a TestSuite - + - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. + Build a TestSuite from type provided. - The resolved constraint + The type of the fixture to be used + A TestSuite - + - Gets a value indicating whether this instance is resolvable. + 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. - - true if this instance is resolvable; otherwise, false. - - + - OperatorStack is a type-safe stack for holding ConstraintOperators + Gets the id of the test - + - Initializes a new instance of the class. + Gets the name of the test - The builder. - + - Pushes the specified operator onto the stack. + Gets the fully qualified name of the test - The op. - + - Pops the topmost operator from the stack. + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. - - + - Gets a value indicating whether this is empty. + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. - true if empty; otherwise, false. - + - Gets the topmost operator without modifying the stack. + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. - The top. - + - ConstraintStack is a type-safe stack for holding Constraints + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. - + - Initializes a new instance of the class. + Gets the RunState of the test, indicating whether it can be run. - The builder. - + - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. + Count of the test cases ( 1 if this is a test case ) - The constraint. - + - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. + Gets the properties of the test - - + - Gets a value indicating whether this is empty. + Gets the parent test, if any. - true if empty; otherwise, false. + The parent test or null if none exists. - + - Gets the topmost constraint without modifying the stack. + Returns true if this is a test suite - 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 a bool indicating whether the current test + has any descendant tests. - + - 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 this test's child tests + A list of child tests - + - The ConstraintBuilder holding the elements recognized so far + Gets a fixture object for running this test. - + - Initializes a new instance of the class. + The ITestCaseBuilder interface is exposed by a class that knows how to + build a test case from certain methods. + + 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. + - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + 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. - The builder. + The test method to examine + The suite being populated + True is the builder can use this method - + - 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. + Build a TestCase from the provided MethodInfo for + inclusion in the suite being constructed. - + The method to be used as a test case + The test suite being populated, or null + A TestCase or null - + - Appends an operator to the expression and returns the - resulting expression itself. + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. - + - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. + Gets the expected result of the test case - + - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. + Returns true if an expected result has been set - + - Initializes a new instance of the class. + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + Gets the name to be used for the test - 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. + Gets the RunState for this test case. - + - 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. + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + 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. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + 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 + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Determine if a test matches the filter expicitly. 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 explicityly, otherwise false - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + 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. - + - Returns a constraint that tests two items for equality + Get the TypeArgs if separately set - + - Returns a constraint that tests that two references are the same object + 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. - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Called when a test has just started + The test that is starting - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Called when a test has finished + The result of the test - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Called when a test produces output for immediate display + A TestOutput object containing the text to display - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + 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. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Build one or more TestMethods 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 constraint that tests whether the - actual value is less than or equal to the suppled argument + The ITestResult interface represents the result of a test. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the ResultState of the test result, which + indicates the success or failure of the test. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the name of the test result - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the full name of the test result - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the elapsed time for running the test in seconds - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets or sets the time the test started running. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets or sets the time the test finished running. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets the message associated with a test + failure or with not running the test - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets the number of asserts executed + when running the test and all its children. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets the number of test cases that failed + when running the test and all its children. - + - 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 number of test cases that passed + when running the test and all its children. - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Gets the number of test cases that were skipped + when running the test and all its children. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. - + - 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. + Gets the the collection of child results. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets the Test to which this result applies. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets any text output written to this result. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + The ITypeInfo interface is an abstraction of a .NET Type - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Gets the underlying Type on which this ITypeInfo is based - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets the base type of this type as an ITypeInfo - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Returns true if the Type wrapped is equal to the argument - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Gets the Name of the Type - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Gets the FullName of the Type - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Gets the assembly in which the type is declared - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Gets the Namespace of the Type - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Gets a value indicating whether the type is abstract. - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Gets a value indicating whether the Type is a generic Type - + - Returns a ConstraintExpression that negates any - following constraint. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - + - Returns a ConstraintExpression that negates any - following constraint. + Gets a value indicating whether the Type is a generic Type definition - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Gets a value indicating whether the type is sealed. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Gets a value indicating whether this type is a static class. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Get the display name for this typeInfo. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Get the display name for an oject of this type, constructed with specific arguments - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Returns a Type representing a generic type definition from which this Type can be constructed. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Returns a value indicating whether this type has a method with a specified public attribute - + - With is currently a NOP - reserved for future use. + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - + - Returns a constraint that tests for null + Gets the public constructor taking the specified argument Types - + - Returns a constraint that tests for True + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - + - Returns a constraint that tests for False + Construct an object of this Type, using the specified arguments. - + - Returns a constraint that tests for a positive value + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. - + - Returns a constraint that tests for a negative value + Returns a TNode representing the current object. + If true, children are included where applicable + A TNode representing the result - + - Returns a constraint that tests for NaN + Returns a TNode representing the current object after + adding it as a child of the supplied parent node. + The parent node. + If true, children are included, where applicable + - + - Returns a constraint that tests for 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. - + - Returns a constraint that tests whether a collection - contains all unique items. + Initializes a new instance of the class. + The TestStatus. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Initializes a new instance of the class. + The TestStatus. + The label. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Initializes a new instance of the class. + The TestStatus. + The stage at which the result was produced - + - Returns a constraint that tests whether a collection is ordered + Initializes a new instance of the class. + The TestStatus. + The label. + The stage at which the result was produced - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + The result is inconclusive - + - 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 test has been skipped. - + - 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 test has been ignored. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + The test was skipped because it is explicit - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + The test succeeded - + - Returns a constraint that tests two items for equality + The test failed - + - Returns a constraint that tests that two references are the same object + The test encountered an unexpected exception - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + The test was cancelled by the user - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + The test was not runnable. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + A suite failed because one or more child tests failed or had errors - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + A suite failed in its OneTimeSetUp - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + A suite had an unexpected exception in its OneTimeSetUp - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + A suite had an unexpected exception in its OneTimeDown - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the TestStatus for the test. + The status. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the label under which this test result is + categorized, if any. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the stage of test execution in which + the failure or other result took place. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Get a new ResultState, which is the same as the current + one but with the FailureSite set to the specified value. + The FailureSite to use + A new ResultState - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Determines whether the specified , is equal to this instance. + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns a that represents this instance. + + A that represents this instance. + - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Failure in the test itself - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Failure in the SetUp method - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Failure in the TearDown method - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Failure of a parent test - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Failure of a child test - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. - + - 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. + The test is runnable. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The test can only be run explicitly - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + The TestOutput class holds a unit of output from + a test to a specific output stream - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Construct with text, ouput destination type and + the name of the test that produced the output. + Text to be output + Name of the stream or channel to which the text should be written + FullName of test that produced the output - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + Return string representation of the object for debugging + - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Get the text - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Get the output type - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Get the name of the test that created the output - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Convert the TestOutput object to an XML string - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + The TestStatus enum indicates the result of running a test - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + The test was inconclusive - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + The test has skipped - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + The test succeeded - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + The test failed - + - Returns a constraint that tests whether the actual value falls - within a specified range. + 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. - + - Returns a ConstraintExpression that negates any - following constraint. + Constructs a new instance of TNode + The name of the node - + - Returns a ConstraintExpression that negates any - following constraint. + Constructs a new instance of TNode with a value + The name of the node + The text content of the node - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + 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 - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Gets the name of the node - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Gets the value of the node - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Gets a flag indicating whether the value should be output using CDATA. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Gets the dictionary of attributes - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Gets a list of child nodes - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Gets the first ChildNode - + - Returns a constraint that tests for null + Gets the XML representation of this node. - + - Returns a constraint that tests for True + Create a TNode from it's XML text representation + The XML text to be parsed + A TNode - + - Returns a constraint that tests for False + Adds a new element as a child of the current node and returns it. + The element name. + The newly created child element - + - Returns a constraint that tests for a positive value + Adds a new element with a value as a child of the current node and returns it. + The element name + The text content of the new element + The newly created child element - + - Returns a constraint that tests for a negative value + 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 element name + The text content of the new element + The newly created child element - + - Returns a constraint that tests for NaN + Adds an attribute with a specified name and value to the XmlNode. + The name of the attribute. + The value of the attribute. - + - Returns a constraint that tests for empty + 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. + + - + - Returns a constraint that tests whether a collection - contains all unique items. + 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. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Writes the XML representation of the node to an XmlWriter + - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Class used to represent a list of XmlResults - + - Returns a constraint that tests whether a collection is ordered + Class used to represent the attributes of a node - + - 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 or sets the value associated with the specified key. + Overridden to return null if attribute is not found. + The key. + Value of the attribute or null - + - The precedence value used when the operator - is about to be pushed to the stack. + 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 precedence value used when the operator - is on the top of the stack. + Gets the test cases generated by the CombiningStrategy. + The test cases. - + - 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. + AssemblyHelper provides static methods for working + with assemblies. - - + - The syntax element preceding this operator + 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. - + - The syntax element folowing this operator + Gets the path to the directory from which an assembly was loaded. + The assembly. + The path. - + - The precedence value used when the operator - is about to be pushed to the stack. + Gets the AssemblyName of an assembly. + The assembly + An AssemblyName - + - The precedence value used when the operator - is on the top of the stack. + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + - + - PrefixOperator takes a single constraint and modifies - it's action in some way. + Gets the assembly path from code base. + Public for testing purposes + The code base. + - + - 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. + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. - - + - Returns the constraint created by applying this - prefix to another constraint. + Gets the test cases generated by the CombiningStrategy. - - + The test cases. - + - Negates the test of the constraint it wraps. + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. - + - Constructs a new NotOperator + 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 NotConstraint applied to its argument. + 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 + - + - Abstract base for operators that indicate how to - apply a constraint to items in a collection. + Built-in SuiteBuilder for all types of test classes. - + - Constructs a CollectionOperator + 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 - + - Represents a constraint that succeeds if all the - members of a collection match a base constraint. + Build a TestSuite from TypeInfo provided. + The fixture type to build + A TestSuite built from that type - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. + 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. - + - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. + 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 constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. + 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 - + - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. + 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 constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + 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 - + - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. + 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 - + - Construct an ExactCountOperator for a specified count + Builds a ParameterizedMethodSuite containing individual test cases. - The expected count + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Build a simple, non-parameterized TestMethod for this method. + The MethodInfo for which a test is to be built + The test suite for which the method is being built + A TestMethod. - + - 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. + Class that can build a tree of automatic namespace + suites from a group of fixtures. - + - Constructor for the WithOperator + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. - + - Returns a constraint that wraps its argument + The root of the test suite being created by this builder. - + - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. + Initializes a new instance of the class. + The root suite. - + - 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 root entry in the tree created by the NamespaceTreeBuilder. + The root suite. - + - Constructs a PropOperator for a particular named property + Adds the specified fixtures to the tree. + The fixtures to be added. - + - 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 the specified fixture to the tree. - + The fixture to be added. - + - Gets the name of the property to which the operator applies + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. - + - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. + Constructs an - + - Construct an AttributeOperator for a particular Type + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. - The Type of attribute tested + 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. + + + - 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. + Method to add test cases to the newly constructed fixture. + The fixture to which cases should be added - + - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. + 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 - + - Construct a ThrowsOperator + 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 + + - + - 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. + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea - + - Abstract base class for all binary operators + Initializes a new instance of the FleaRand class. + The seed. - + - 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. + 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. - - + - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. + Initializes a new instance of FeatureInfo class. + Index of a dimension. + Index of a feature. - + - Gets the left precedence of the operator + 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. - + - Gets the right precedence of the operator + Initializes a new instance of FeatureTuple class for a single feature. + Single feature. - + - Operator that requires both it's arguments to succeed + Initializes a new instance of FeatureTuple class for a pair of features. + First feature. + Second feature. - + - Construct an AndOperator + TestCase represents a single test case covering a list of features. - + - Apply the operator to produce an AndConstraint + Initializes a new instance of TestCaseInfo class. + A number of features in the test case. - + - Operator that requires at least one of it's arguments to succeed + 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. + + - + - Construct an OrOperator + 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. + - + - Apply the operator to produce an OrConstraint + Gets the test cases generated by this strategy instance. + A set of test cases. - + - 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. + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. - + - Initializes a new instance of the class. + Construct with a collection of individual providers - The expected. - + - Test whether the constraint is satisfied by a given value + Determine whether any data is available for a parameter. - The value to be tested - True for success, false for failure + An IParameterInfo representing one + argument to a parameterized test + True if any data is available, otherwise false. - + - Write the constraint description to a MessageWriter + Return an IEnumerable providing data for use with the + supplied parameter. - The writer on which the description is displayed + An IParameterInfo representing one + argument to a parameterized test + An IEnumerable providing the required data - + - Flag the constraint to use the supplied IComparer object. + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Determine whether any data is available for a parameter. - The IComparer object to use. - Self. + A ParameterInfo representing one + argument to a parameterized test + + True if any data is available, otherwise false. + - + - Flag the constraint to use the supplied Comparison object. + Return an IEnumerable providing data for use with the + supplied parameter. - The IComparer object to use. - Self. + An IParameterInfo representing one + argument to a parameterized test + + An IEnumerable providing the required data + - + - Flag the constraint to use the supplied IEqualityComparer object. + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Gets the test cases generated by the CombiningStrategy. - The IComparer object to use. - Self. + The test cases. - + - Flag the constraint to ignore case and return self. + 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 - + - Applies a delay to the match so that a match can be evaluated in the future. + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. - + - Creates a new DelayedConstraint + Constructs a OneTimeSetUpCommand for a suite - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup - + - Creates a new DelayedConstraint + Overridden to run the one-time setup for a suite. - 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 + The TestExecutionContext to be used. + A TestResult - + - Test whether the constraint is satisfied by a given value + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. - 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 + Construct a OneTimeTearDownCommand - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. - + - 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. + Overridden to run the teardown methods specified on the test. - A reference to the value to be tested - True for success, false for failure + The TestExecutionContext to be used. + A TestResult - + - Write the constraint description to a MessageWriter + 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 writer on which the description is displayed - + - Write the actual value for a failing constraint test to a MessageWriter. + 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. - The writer on which the actual value is displayed + + 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. + - + - Returns the string representation of the constraint. + Use an application-defined default value. - + - EmptyDirectoryConstraint is used to test that a directory is empty + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. - + - Test whether the constraint is satisfied by a given value + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. - 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. + TODO: Documentation needed for class - The writer on which the actual value is displayed - + + TODO: Documentation needed for field + + - 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. + TODO: Documentation needed for constructor + - + - Test whether the constraint is satisfied by a given value + TODO: Documentation needed for class - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Initializes a new instance of the class. - The writer on which the description is displayed + The inner command. + The max time allowed in milliseconds - + - 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. + Runs the test, saving a TestResult in the supplied TestExecutionContext + The context in which the test should run. + A TestResult - + - If true, strings in error messages will be clipped + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. - + - NUnitEqualityComparer used to test equality. + Initializes a new instance of the class. + The inner command. - + - Initializes a new instance of the class. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The expected value. + The context in which the test should run. + A TestResult - + - Flag the constraint to use a tolerance when determining equality. + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. - Tolerance value to be used - Self. - + - Flag the constraint to use the supplied IComparer object. + Construct a SetUpTearDownNode - The IComparer object to use. - Self. + A list of setup methods for this level + A list teardown methods for this level - + - Flag the constraint to use the supplied IComparer object. + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Run SetUp on this level. - The IComparer object to use. - Self. + The execution context to use for running. - + - Flag the constraint to use the supplied Comparison object. + Run TearDown for this level. - The IComparer object to use. - Self. + - + - Flag the constraint to use the supplied IEqualityComparer object. + TODO: Documentation needed for class - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Initializes a new instance of the class. - The IComparer object to use. - Self. + The test being skipped. - + - Test whether the constraint is satisfied by a given value + Overridden to simply set the CurrentResult to the + appropriate Skipped state. - The value to be tested - True for success, false for failure + The execution context for the test + A TestResult - + - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. - The MessageWriter to write to - + - Write description of this constraint + Initializes a new instance of the class. - The MessageWriter to write to + The inner command. - + - Display the failure information for two collections that did not match. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections + The context in which the test should run. + A TestResult - + - 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. + 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. - 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 TestActionItem - 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 ITestAction to be included - + - Display the failure information for two IEnumerables that did not match. + Run the BeforeTest method of the action and remember that it has been run. - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections + The test to which the action applies - + - Flag the constraint to ignore case and return self. + Run the AfterTest action, but only if the BeforeTest + action was actually run. + The test to which the action applies - + - Flag the constraint to suppress string clipping - and return self. + 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. - + - Flag the constraint to compare arrays as collections - and return self. + Construct a TestCommand for a test. + The test to be executed - + - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). + Gets the test associated with this command. - 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. + Runs the test in a specified context, returning a TestResult. - Self + The TestExecutionContext to be used for running the test. + A TestResult - + - Causes the tolerance to be interpreted as a TimeSpan in days. + TestMethodCommand is the lowest level concrete command + used to run actual test cases. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in hours. + Initializes a new instance of the class. - Self + The test. - + - Causes the tolerance to be interpreted as a TimeSpan in minutes. + 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. - Self + The execution context - + - Causes the tolerance to be interpreted as a TimeSpan in seconds. + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + Constructs a TheoryResultCommand - Self + The command to be wrapped by this one - + - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. - Self + + - + - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. + 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. - + - Compares two objects, returning true if they are equal + Construct an EventListenerTextWriter + The name of the stream to use for events + The default writer to use if no listener is available - + - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. + Write a single char - + - Returns an EqualityAdapter that wraps an IComparer. + Write a string - + - Returns an EqualityAdapter that wraps an IEqualityComparer. + Write a string followed by a newline - + - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + Get the Encoding for this TextWriter - + - Returns an EqualityAdapter that wraps an IComparer<T>. + A utility class to create TestCommands - + - Returns an EqualityAdapter that wraps a Comparison<T>. + Gets the command to be executed before any of + the child tests are run. + A TestCommand - + - EqualityAdapter that wraps an IComparer. + Gets the command to be executed after all of the + child tests are run. + A TestCommand - + - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. + Creates a test command for use in running this test. + - + - EqualityAdapter that wraps an IComparer. + Creates a command for skipping a test. The result returned will + depend on the test RunState. - - 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. - - - - - 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/ - - + + + Builds the set up tear down list. + + Type of the fixture. + Type of the set up attribute. + Type of the tear down attribute. + A list of SetUpTearDownItems - + - Reinterprets the memory contents of a floating point value as an integer value + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. - - 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 + List of Child WorkItems - - 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 + A count of how many tests in the work item have a value for the Order Property - 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 + Construct a CompositeWorkItem for executing a test suite + using a filter to select child tests. + + The TestSuite to be executed + A filter used to select child tests + + + + Method that actually performs the work. Overridden + in CompositeWorkItem to do setup, run all child + items and then do teardown. + + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. - Integer whose memory contents to reinterpret - The memory contents of the integer interpreted as a double precision - floating point value + 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. - - Union of a floating point variable and an integer - - - The union's value as a floating point variable + + + Sorts tests under this suite. + - - The union's value as an integer + + + Cancel (abort or stop) a CompositeWorkItem and all of its children + + true if the CompositeWorkItem and all of its children should be aborted, false if it should allow all currently running tests to complete - - The union's value as an unsigned integer + + + The EventPumpState enum represents the state of an + EventPump. + - - Union of a double precision floating point variable and a long + + + The pump is stopped + - - The union's value as a double precision floating point variable + + + The pump is pumping events with no stop requested + - - The union's value as a long + + + The pump is pumping events but a stop has been requested + - - The union's value as an unsigned long + + + 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. + - + - Tests whether a value is greater than the value supplied to its constructor + The downstream listener to which we send events - + - The value against which a comparison is to be made + The queue that holds our events - + - Initializes a new instance of the class. + Thread to do the pumping - The expected value. - + - Write the constraint description to a MessageWriter + The current state of the eventpump - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Constructor - The value to be tested - True for success, false for failure + The EventListener to receive events + The event queue to pull events from - + - Tests whether a value is greater than or equal to the value supplied to its constructor + Gets or sets the current state of the pump - + - The value against which a comparison is to be made + Gets or sets the name of this EventPump + (used only internally and for testing). - + - Initializes a new instance of the class. + Dispose stops the pump + Disposes the used WaitHandle, too. - The expected value. - + - Write the constraint description to a MessageWriter + Start the pump - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Tell the pump to stop after emptying the queue. - The value to be tested - True for success, false for failure - + - Tests whether a value is less than the value supplied to its constructor + 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 value against which a comparison is to be made + 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. - + - Initializes a new instance of the class. + The Send method is implemented by derived classes to send the event to the specified listener. - The expected value. + The listener. - + - Write the constraint description to a MessageWriter + TestStartedEvent holds information needed to call the TestStarted method. - 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 + The test. - + - Tests whether a value is less than or equal to the value supplied to its constructor + Calls TestStarted on the specified listener. + The listener. - + - The value against which a comparison is to be made + TestFinishedEvent holds information needed to call the TestFinished method. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The expected value. + The result. - + - Write the constraint description to a MessageWriter + Calls TestFinished on the specified listener. - The writer on which the description is displayed + The listener. - + - Test whether the constraint is satisfied by a given value + TestOutputEvent holds information needed to call the TestOutput method. - The value to be tested - True for success, false for failure - + - 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. + Initializes a new instance of the class. + The output object. - + - Construct a MessageWriter given a culture + Calls TestOutput on the specified listener. + The listener. - + - Method to write single line message with optional args, usually - written to precede the general failure message. + Implements a queue of work items each of which + is queued as a WaitCallback. - 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 givel - indentation level. + Gets the count of items in 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. + Enqueues the specified event - The constraint that failed + The event to enqueue. - + - 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. + Removes the first element from the queue and returns it (or null). - The expected value - The actual value causing the failure + + 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. + + + - + - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. + Stop processing of the queue - 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. + An IWorkItemDispatcher handles execution of work items. - 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. + 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 connector. + The item to dispatch - + - Writes the text for a predicate. + Cancel the ongoing run completely. + If no run is in process, the call has no effect. - The predicate. + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete - + - Writes the text for an expected value. + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. - The expected value. - + - Writes the text for a modifier + Construct a ParallelWorkItemDispatcher - The modifier. + Number of workers to use - + - Writes the text for an actual value. + Enumerates all the shifts supported by the dispatcher - The actual value. - + - Writes the text for a generalized value. + 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 value. + The item to dispatch - + - Writes the text for a collection value, - starting at a particular point, to a max length + Cancel the ongoing run completely. + If no run is in process, the call has no effect. - 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 + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. - + - Static methods used in creating messages + The EventQueue created and filled by this listener - + - Static string used when strings are clipped + Construct a QueuingEventListener - + - 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. + A test has started - - + The test that is starting - + - Converts any control characters in a string - to their escaped representation. + A test case finished - The string to be converted - The converted string + Result of the test case - + - Return the a string representation for a set of indices into an array + Called when a test produces output for immediate display - Array of indices for which a string is needed + A TestOutput object containing the text to display - + - Get an array of indices representing the point in a enumerable, - collection or array corresponding to a single int index into the - collection. + 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. - 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 + Construct a simple work item for a test. - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string + The test to be executed + The filter used to select this test - + - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. + Method that performs actually performs the work. - - - - - + - Shows the position two strings start to differ. Comparison - starts at the start index. + 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. - 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 - + - The Numerics class contains common operations on numeric values. + 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 - + - Checks the type of the object, returning true if - the object is a numeric type. + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. - The object to check - true if the object is a numeric type + true if the run should be aborted, false if it should allow its currently running test to complete - + - Checks the type of the object, returning true if - the object is a floating point numeric type. + A TestWorker pulls work items from a queue + and executes them. - 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. + Event signaled immediately before executing a WorkItem - 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. + Event signaled immediately after executing a WorkItem - 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. + Construct a new TestWorker. - The expected value - The actual value - The relationship of the values to each other + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests - + - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. + The name of this worker - also used for the thread - + - Compares two objects + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop - - - - + - Returns the default NUnitComparer. + Start processing work items. - + - Generic version of NUnitComparer + 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 - + - Compare two objects of the same type + 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. - + - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. + Construct a TextCapture object + The default destination for non-intercepted output - + - + Gets the Encoding in use by this TextWriter - + - Compares two objects for equality within a tolerance + Writes a single character - The first object to compare - The second object to compare - The tolerance to use in the comparison - + The char to write - + - If true, all string comparisons will ignore case + Writes a string + The string to write - + - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared + 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. + + + - Comparison objects used in comparisons for some constraints. + Creates a work item. + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + - + - Compares two objects for equality within a tolerance. + Construct a WorkItem for a particular test. + The test that the WorkItem will run - + - Helper method to compare two arrays + 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 - + - Method to compare two DirectoryInfo objects + Event triggered when the item is complete - first directory to compare - second directory to compare - true if equivalent, false if not - + - Returns the default NUnitEqualityComparer + Gets the current state of the WorkItem - + - Gets and sets a flag indicating whether case should - be ignored in determining equality. + The test being executed by the work item - + - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. + The execution context - + - Gets and sets an external comparer to be used to - test for equality. It is applied to members of - collections, in place of NUnit's own logic. + The unique id of the worker executing this item. - + - Gets the list of failure points for the last Match performed. + The test actions to be performed before and after this test - + - FailurePoint class represents one point of failure - in an equality test. + Indicates whether this WorkItem may be run in parallel - + - The location of the failure + The test result - + - The expected value + Execute the current work item, including any + child work items. - + - The actual value + Cancel (abort or stop) a WorkItem + true if the WorkItem should be aborted, false if it should run to completion - + - Indicates whether the expected value is valid + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. - + - Indicates whether the actual value is valid + Method called by the derived class when all work is complete - + - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. + WorkItemQueueState indicates the current state of a WorkItemQueue - + - The expected path used in the constraint + The queue is paused - + - The actual path being tested + The queue is running - + - Flag indicating whether a caseInsensitive comparison should be made + The queue is stopped - + - Construct a PathConstraint for a give expected path + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. - The expected path - + - 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 + The name of the queue. - + - Returns true if the expected path and actual path match + Gets the name of the work item queue. - + - Returns the string representation of this constraint + Gets the total number of items processed so far - + - Canonicalize the provided path + Gets the maximum number of work items. - - The path in standardized form - + - Test whether two paths are the same + Gets the current state of the queue - The first path - The second path - Indicates whether case should be ignored - - + - Test whether one path is under another path + Get a bool indicating whether the queue is empty. - The first path - supposed to be the parent path - The second path - supposed to be the child path - Indicates whether case should be ignored - - + - Test whether one path is the same as or under another path + Enqueue a WorkItem to be processed - The first path - supposed to be the parent path - The second path - supposed to be the child path - + The WorkItem to process - + - Modifies the current instance to be case-insensitve - and returns it. + Dequeue a WorkItem for processing + A WorkItem or null if the queue has stopped - + - Modifies the current instance to be case-sensitve - and returns it. + Start or restart processing of items from the queue - + - Summary description for SamePathConstraint. + Signal the queue to stop - + - Initializes a new instance of the class. + Pause the queue for restarting later - The expected path - + - Test whether the constraint is satisfied by a given value + The current state of a work item - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Ready to run or continue - The writer on which the description is displayed - + - SubPathConstraint tests that the actual path is under the expected path + Work Item is executing - + - Initializes a new instance of the class. + Complete - The expected path - + + + 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. + + + - Test whether the constraint is satisfied by a given value + Construct a WorkShift - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Event that fires when the shift has ended - The writer on which the description is displayed - + - SamePathOrUnderConstraint tests that one path is under another + Gets a flag indicating whether the shift is currently active - + - Initializes a new instance of the class. + Gets a list of the queues associated with this shift. - The expected path + Used for testing - + - Test whether the constraint is satisfied by a given value + Gets the list of workers associated with this shift. - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Gets a bool indicating whether this shift has any work to do - The writer on which the description is displayed - + - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. - + - Construct a PredicateConstraint from a predicate + Assign a worker to the shift. + - + - Determines whether the predicate succeeds when applied - to the actual value. + Start or restart processing for the shift - + - Writes the description to a MessageWriter + End the shift, pausing all queues and raising + the EndOfShift event. - + - NotConstraint negates the effect of some other constraint + Shut down the shift. - + - Initializes a new instance of the class. + Cancel (abort or stop) the shift without completing all work - The base constraint to be negated. + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete - + - Test whether the constraint is satisfied by a given value + ClassName filter selects tests based on the class FullName - The value to be tested - True for if the base constraint fails, false if it succeeds - + - Write the constraint description to a MessageWriter + Construct a FullNameFilter for a single name - The writer on which the description is displayed + The name the filter will recognize. - + - Write the actual value for a failing constraint test to a MessageWriter. + Match a test against a single value. - The writer on which the actual value is displayed - + - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. + Gets the element name + Element name - + - Construct an AllItemsConstraint on top of an existing constraint + A base class for multi-part filters - - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Constructs an empty CompositeFilter - - - + - Write a description of this constraint to a MessageWriter + Constructs a CompositeFilter from an array of filters - + - + - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. + Adds a filter to the list of filters + The filter to be added - + - Construct a SomeItemsConstraint on top of an existing constraint + Return a list of the composing filters. - - + - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. + Checks whether the CompositeFilter is matched by a test. - - + The test to be matched - + - Write a description of this constraint to a MessageWriter + Checks whether the CompositeFilter is matched by a test. - + The test to be matched - + - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. + Checks whether the CompositeFilter is explicit matched by a test. + The test to be matched - + - Construct a NoItemConstraint on top of an existing constraint + Adds an XML node - + Parent node + True if recursive + The added XML node - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Gets the element name - - + Element name - + - Write a description of this constraint to a MessageWriter + FullName filter selects tests based on their FullName - - + - ExactCoutConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. + Construct a FullNameFilter for a single name + The name the filter will recognize. - + - Construct an ExactCountConstraint on top of an existing constraint + Match a test against a single value. - - - + - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. + Gets the element name - - + Element name - + - Write a description of this constraint to a MessageWriter + FullName filter selects tests based on their FullName - - + - 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. + Construct a MethodNameFilter for a single name + The name the filter will recognize. - + - Initializes a new instance of the class. + Match a test against a single value. - The name of the property. - + - Test whether the property exists for a given object + Gets the element name - The object to be tested - True for success, false for failure + Element name - + - Write the constraint description to a MessageWriter + PropertyFilter is able to select or exclude tests + based on their properties. - The writer on which the description is displayed + - + - Write the actual value for a failing constraint test to a - MessageWriter. + Construct a PropertyFilter using a property name and expected value - The writer on which the actual value is displayed + A property name + The expected value of the property - + - Returns the string representation of the constraint. + Check whether the filter matches a test + The test to be matched - + - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. + Adds an XML node + Parent node + True if recursive + The added XML node - + - Initializes a new instance of the class. + Gets the element name - The name. - The constraint to apply to the property. + Element name - + - Test whether the constraint is satisfied by a given value + TestName filter selects tests based on their Name - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Construct a TestNameFilter for a single name - The writer on which the description is displayed + The name the filter will recognize. - + - 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. + Match a test against a single value. - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Gets the element name - + Element name - + - RangeConstraint tests whethe two values are within a - specified range. + Combines multiple filters so that a test must pass all + of them in order to pass this filter. - + - Initializes a new instance of the class. + Constructs an empty AndFilter - From. - To. - + - Test whether the constraint is satisfied by a given value + Constructs an AndFilter from an array of filters - The value to be tested - True for success, false for failure + - + - Write the constraint description to a MessageWriter + Checks whether the AndFilter is matched by a test - The writer on which the description is displayed + The test to be matched + True if all the component filters pass, otherwise false - + - 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. + Checks whether the AndFilter is matched by a test + The test to be matched + True if all the component filters match, otherwise false - + - Create a new instance of ResolvableConstraintExpression + 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 - + - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. + Gets the element name + Element name - + - Resolve the current expression to a Constraint + CategoryFilter is able to select or exclude tests + based on their categories. + - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Construct a CategoryFilter using a single category name + A category name - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Check whether the filter matches a test + The test to be matched + - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Gets the element name + Element name - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + IdFilter selects tests based on their id - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Construct an IdFilter for a single value + The id the filter will recognize. - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Match a test against a single value. - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + Gets the element name + Element name - + - Appends an And Operator to the expression + NotFilter negates the operation of another filter - + - Appends an Or operator to the expression. + Construct a not filter on another filter + The filter to be negated - + - ReusableConstraint wraps a resolved constraint so that it - may be saved and reused as needed. + Gets the base filter - + - Construct a ReusableConstraint + 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 constraint or expression to be reused + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Conversion operator from a normal constraint to a ReusableConstraint. + Check whether the filter matches a test - The original constraint to be wrapped as a ReusableConstraint - + The test to be matched + True if it matches, otherwise false - + - Returns the string representation of the constraint. + Determine if a test matches the filter expicitly. That is, it must + be a direct match of the test itself or one of it's children. - A string representing the constraint + The test to which the filter is applied + True if the test matches the filter explicityly, otherwise false - + - Resolves the ReusableConstraint by returning the constraint - that it originally wrapped. + Adds an XML node - A resolved constraint + Parent node + True if recursive + The added XML node - + - SameAsConstraint tests whether an object is identical to - the object passed to its constructor + Combines multiple filters so that a test must pass one + of them in order to pass this filter. - + - Initializes a new instance of the class. + Constructs an empty OrFilter - The expected object. - + - Test whether the constraint is satisfied by a given value + Constructs an AndFilter from an array of filters - The value to be tested - True for success, false for failure + - + - Write the constraint description to a MessageWriter + Checks whether the OrFilter is matched by a test - The writer on which the description is displayed + The test to be matched + True if any of the component filters pass, otherwise false - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Checks whether the OrFilter is matched by a test + The test to be matched + True if any of the component filters match, otherwise false - + - Test whether the constraint is satisfied by a given value + Checks whether the OrFilter is explicit matched by a test - The value to be tested - True for success, false for failure + The test to be matched + True if any of the component filters explicit match, otherwise false - + - Write the constraint description to a MessageWriter + Gets the element name - The writer on which the description is displayed + Element name - + - 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. + ValueMatchFilter selects tests based on some value, which + is expected to be contained in the test. + + + + + Returns the value matched by the filter - used for testing - The writer on which the actual value is displayed - + - Returns the string representation + Indicates whether the value is a regular expression - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Construct a ValueMatchFilter for a single value. + The value to be included. - + - Test whether the constraint is satisfied by a given value + Match the input provided by the derived class - The value to be tested - True for success, false for failure + The value to be matchedT + True for a match, false otherwise. - + - Write the constraint description to a MessageWriter + Adds an XML node - The writer on which the description is displayed + Parent node + True if recursive + The added XML node - + - 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 the element name - The writer on which the actual value is displayed + Element name - + - Returns the string representation of this constraint + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. - + - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. + Construct a GenericMethodHelper for a method + MethodInfo for the method to examine - + - The expected value + Return the type argments for the method, deducing them + from the arguments actually provided. + The arguments to the method + An array of type arguments. - + - Indicates whether tests should be case-insensitive + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - + - Constructs a StringConstraint given an expected value + Initializes a new instance of the class. - The expected value - + - Modify the constraint to ignore case in matching. + Initializes a new instance of the class. + The message. - + - EmptyStringConstraint tests whether a string is empty. + Initializes a new instance of the class. + The message. + The inner. - + - Test whether the constraint is satisfied by a given value + Serialization Constructor - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. - The writer on which the description is displayed - + - NullEmptyStringConstraint tests whether a string is either null or empty. + Default constructor uses the current culture. - + - Constructs a new NullOrEmptyStringConstraint + Construct a CultureDetector for a particular culture for testing. + The culture to be used - + - Test whether the constraint is satisfied by a given value + Test to determine if one of a collection of cultures + is being used currently. - The value to be tested - True for success, false for failure + + - + - Write the constraint description to a MessageWriter + Tests to determine if the current culture is supported + based on a culture attribute. - The writer on which the description is displayed + The attribute to examine + - + - SubstringConstraint can test whether a string contains - the expected substring. + 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 - + - Initializes a new instance of the class. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - The expected. - + - Test whether the constraint is satisfied by a given value + ExceptionHelper provides static methods for working with exceptions - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Rethrows an exception, preserving its stack trace - The writer on which the description is displayed + The exception to rethrow - + - StartsWithConstraint can test whether a string starts - with an expected substring. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + The exception. + A combined message string. - + - Initializes a new instance of the class. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. - The expected string + The exception. + A combined stack trace. - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + Gets the stack trace of the exception. - - + The exception. + A string representation of the stack trace. - + - Write the constraint description to a MessageWriter + 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. - The writer on which the description is displayed - + - EndsWithConstraint can test whether a string ends - with an expected substring. + Prefix used for the expected value line of a message - + - Initializes a new instance of the class. + Prefix used for the actual value line of a message - 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. + Length of a message prefix - - - + - Write the constraint description to a MessageWriter + Construct a TextMessageWriter - The writer on which the description is displayed - + - RegexConstraint can test whether a string matches - the pattern provided. + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + - + - Initializes a new instance of the class. + Gets or sets the maximum line length for this writer - The pattern. - + - Test whether the constraint is satisfied by a given value + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. - The value to be tested - True for success, false for failure + The indentation level of the message + The message to be written + Any arguments used in formatting the message - + - Write the constraint description to a MessageWriter + 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 writer on which the description is displayed + The result of the constraint that failed - + - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. + 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 - + - Initializes a new instance of the class, - using a constraint to be applied to the exception. + Display Expected and Actual lines for given _values, including + a tolerance value on the expected line. - A constraint to apply to the caught exception. + The expected value + The actual value causing the failure + The tolerance within which the test was made - + - 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. + 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. - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false + 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 - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Writes the text for an actual value. - - + The actual value. - + - Write the constraint description to a MessageWriter + Writes the text for a generalized value. - The writer on which the description is displayed + The value. - + - 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. + Writes the text for a collection value, + starting at a particular point, to a max length - The writer on which the actual value is displayed + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write - + - Returns the string representation of this constraint + Write the generic 'Expected' line for a constraint + The constraint that failed - + - Get the actual exception thrown - used by Assert.Throws. + Write the generic 'Expected' line for a given value + The expected value - + - ThrowsNothingConstraint tests that a delegate does not - throw an exception. + Write the generic 'Expected' line for a given value + and tolerance. + The expected value + The tolerance within which the test was made - + - Test whether the constraint is satisfied by a given value + Write the generic 'Actual' line for a constraint - The value to be tested - True if no exception is thrown, otherwise false + The ConstraintResult for which the actual value is to be written - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Write the generic 'Actual' line for a given value - - + The actual value causing a failure - + - Write the constraint description to a MessageWriter + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - 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. + Initializes a new instance of the class. - The writer on which the actual value is displayed - + - Modes in which the tolerance value for a comparison can - be interpreted. + Initializes a new instance of the class. + The message. - + - 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. + Initializes a new instance of the class. + The message. + The inner. - + - The tolerance is used as a numeric range within which - two compared values are considered to be equal. + Serialization Constructor - + - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. + Interface for logging within the engine - + - Compares two values based in their distance in - representable numbers. + Logs the specified message at the error level. + The message. - + - 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. + Logs the specified message at the error level. + The message. + The arguments. - + - Constructs a linear tolerance of a specdified amount + Logs the specified message at the warning level. + The message. - + - Constructs a tolerance given an amount and ToleranceMode + Logs the specified message at the warning level. + The message. + The arguments. - + - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. + Logs the specified message at the info level. + The message. - + - 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. + Logs the specified message at the info level. + The message. + The arguments. - + - Returns a zero Tolerance object, equivalent to - specifying an exact match. + Logs the specified message at the debug level. + The message. - + - Gets the ToleranceMode for the current Tolerance + Logs the specified message at the debug level. + The message. + The arguments. - + - Gets the value of the current Tolerance instance. + 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. - + - Returns a new tolerance, using the current amount as a percentage. + Gets a flag indicating whether the InternalTrace is initialized - + - Returns a new tolerance, using the current amount in Ulps. + Initialize the internal trace facility using the name of the log + to be written to and the trace level. + The log name + The trace level - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. + Initialize the internal trace using a provided TextWriter and level + A TextWriter + The InternalTraceLevel - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. + Get a named Logger + - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. + Get a logger named for a particular Type. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. + InternalTraceLevel is an enumeration controlling the + level of detailed presented in the internal log. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. + Use the default settings as specified by the user. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. + Do not display any trace messages - + - Returns true if the current tolerance is empty. + Display Error messages only - + - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. + Display Warning level and higher messages - + - The expected Type used by the constraint + Display informational and higher messages - + - Construct a TypeConstraint for a given Type + Display debug messages and higher - i.e. all messages - - + - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. + Display debug messages and higher - i.e. all messages - The writer on which the actual value is displayed - + - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor + A trace listener that writes to a separate file per domain + and process using it. - + - Construct an ExactTypeConstraint for a given Type + Construct an InternalTraceWriter that writes to a file. - The expected Type. + Path to the file to use - + - Test that an object is of the exact type specified + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. - 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 + Returns the character encoding in which the output is written. - The MessageWriter to use + The character encoding in which the output is written. - + - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. + Writes a character to the text string or stream. + The character to write to the text stream. - + - Constructs an ExceptionTypeConstraint + Writes a string to the text string or stream. + The string to write. - + - Write the actual value for a failing constraint test to a - MessageWriter. Overriden to write additional information - in the case of an Exception. + Writes a string followed by a line terminator to the text string or stream. - The MessageWriter to use + The string to write. If is null, only the line terminator is written. - + - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. + Releases the unmanaged resources used by the and optionally releases the managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. - + - Construct an InstanceOfTypeConstraint for the type provided + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. - The expected Type - + - Test whether an object is of the specified type or a derived type + Provides internal logging to the NUnit framework - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. - + - Write a description of this constraint to a MessageWriter + Initializes a new instance of the class. - The MessageWriter to use + The name. + The log level. + The writer where logs are sent. - + - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. + Logs the message at error level. + The message. - + - Construct an AssignableFromConstraint for the type provided + Logs the message at error level. - + The message. + The message arguments. - + - Test whether an object can be assigned from the specified type + Logs the message at warm level. - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. + The message. - + - Write a description of this constraint to a MessageWriter + Logs the message at warning level. - The MessageWriter to use + The message. + The message arguments. - + - AssignableToConstraint is used to test that an object - can be assigned to a given Type. + Logs the message at info level. + The message. - + - Construct an AssignableToConstraint for the type provided + Logs the message at info level. - + The message. + The message arguments. - + - Test whether an object can be assigned to the specified type + Logs the message at debug level. - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. + The message. - + - Write a description of this constraint to a MessageWriter + Logs the message at debug level. - The MessageWriter to use + The message. + The message arguments. - + - Thrown when an assertion failed. + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. - - - - 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 + Construct a MethodWrapper for a Type and a MethodInfo. - + - Thrown when an assertion failed. + Construct a MethodInfo for a given Type and method name. - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + Gets the Type from which this method was reflected. - + - Thrown when a test executes inconclusively. + Gets the MethodInfo for this method. - - - 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 + + + Gets the name of the method. + - + - Serialization Constructor + Gets a value indicating whether the method is abstract. - + - Thrown when an assertion failed. + Gets a value indicating whether the method is public. - - + + + Gets a value indicating whether the method contains unassigned generic type parameters. + - - The error message that explains - the reason for the exception - The exception that caused the - current exception + + + Gets a value indicating whether the method is a generic method. + - + - Serialization Constructor + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - + - + Gets the return Type of the method. - - + - Compares two objects of a given Type for equality within a tolerance + Gets the parameters of the method. - The first object to compare - The second object to compare - The tolerance to use in the comparison - + - The different targets a test action attribute can be applied to + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - Default target, which is determined by where the action attribute is attached + 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 - + - Target a individual test case + Returns an array of custom attributes of the specified type applied to this method - + - Target a suite of test cases + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. - + - Delegate used by tests that execute code and - capture any thrown exception. + 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 - + - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. + Override ToString() so that error messages in NUnit's own tests make sense - + - 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. + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Initializes a new instance of the class. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Initializes a new instance of the class. - - + The error message that explains + the reason for the exception - + - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. + Initializes a new instance of the class. - 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 error message that explains + the reason for the exception + The exception that caused the + current exception - + - 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. + Serialization Constructor - 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. + OSPlatform represents a particular operating system platform - The message to initialize the with. - + - 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. + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater - + - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. + Platform ID for Unix as defined by Mono - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws an with the message that is - passed in. This is used by the other Assert functions. + Platform ID for XBox as defined by .NET and Mono, but not CF - The message to initialize the with. - + - Throws an . - This is used by the other Assert functions. + Platform ID for MacOSX as defined by .NET and Mono, but not CF - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. + Get the OSPlatform under which we are currently running - 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 ignored. + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 - The message to initialize the with. + + 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 - + - Throws an . - This causes the test to be reported as ignored. + Product Type Enumeration used for Windows - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. + Product type is unknown or unspecified - 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. + Product type is Workstation - The message to initialize the with. - + - Throws an . - This causes the test to be reported as Inconclusive. + Product type is Domain Controller - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Product type is Server - 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. + Construct from a platform ID and version - A Constraint to be applied - The actual value to test - 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. + Construct from a platform ID, version and product type - 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 - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Get the platform ID of this instance - 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. + Get the Version of this instance - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - 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. + Get the Product Type of this instance - 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. + Return true if this is a windows platform - A Constraint to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Return true if this is a Unix or Linux platform - A Constraint 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 assertion exception on failure. + Return true if the platform is Win32S - A Constraint 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 + Return true if the platform is Win32Windows + - + - Asserts that a condition is true. If the condition is false the method throws - an . + Return true if the platform is Win32NT - 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 . + Return true if the platform is Windows CE - The evaluated condition - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Return true if the platform is Xbox - 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. + Return true if the platform is MacOSX - 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. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Return true if the platform is Windows 95 - A Constraint to be applied - The actual value to test - 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. + Return true if the platform is Windows 98 - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - 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 - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is Windows ME - 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. + Return true if the platform is NT 3 - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is NT 4 - A constraint to be satisfied by the exception - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is NT 5 - The exception Type expected - 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. + Return true if the platform is Windows 2000 - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is Windows XP - The exception Type expected - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is Windows 2003 Server - Type of the expected 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. + Return true if the platform is NT 6 - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is NT 6.0 - Type of the expected exception - A TestSnippet delegate - + - Verifies that a delegate throws an exception when called - and returns it. + Return true if the platform is NT 6.1 - 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. + Return true if the platform is NT 6.2 - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception when called - and returns it. + Return true if the platform is NT 6.3 - A TestDelegate - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Return true if the platform is Vista - 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. + Return true if the platform is Windows 2008 Server (original or R2) - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Return true if the platform is Windows 2008 Server (original) - 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. + Return true if the platform is Windows 2008 Server R2 - 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. + Return true if the platform is Windows 2012 Server (original or R2) - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Return true if the platform is Windows 2012 Server (original) - The expected Exception Type - A TestDelegate - + - Verifies that a delegate does not throw an exception + Return true if the platform is Windows 2012 Server R2 - A TestSnippet delegate - 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. + Return true if the platform is Windows 7 - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate does not throw an exception. + Return true if the platform is Windows 8 - A TestSnippet delegate - + - Asserts that a condition is true. If the condition is false the method throws - an . + Return true if the platform is Windows 8.1 - 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 . + Return true if the platform is Windows 10 - 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 . + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. - The evaluated condition - + - Asserts that a condition is true. If the condition is false the method throws - an . + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. - 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 . + Construct a ParameterWrapper for a given method and parameter - 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 . + Gets a value indicating whether the parameter is optional - 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 + Gets an IMethodInfo representing the method for which this is a parameter. + - + - 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 + Gets the underlying ParameterInfo + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Gets the Type of the parameter + - + - 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 + Returns an array of custom attributes of the specified type applied to this method + - + - 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 + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Comma-delimited list of all supported OS platform constants - 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 not equal to null - If the object is null then an - is thrown. + Comma-delimited list of all supported Runtime platform constants - The object that is to be tested - The message to display in case of failure - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Default constructor uses the operating system and + common language runtime of the system. - The object that is to be tested - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. - 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 + OperatingSystem to be used + RuntimeFramework to be used - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Test to determine if one of a collection of platforms + is being used currently. - The object that is to be tested - The message to display in case of failure + + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Tests to determine if the current platform is supported + based on a platform attribute. - The object that is to be tested + The attribute to examine + - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Tests to determine if the current platform is supported + based on a platform attribute. - 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 attribute to examine + - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. - The object that is to be tested - The message to display in case of failure + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - 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. + 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 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. + Adds a key/value pair to the property set - The object that is to be tested - The message to display in case of failure + The key + The value - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Sets the value for a key, removing any other + _values that are already in the property set. - The object that is to be tested + + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + 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. - 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 + + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Gets a flag indicating whether the specified key has + any entries in the property set. - The value that is to be tested - The message to display in case of failure + The key to be checked + + True if their are _values present, otherwise false + - + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Returns an XmlNode representating the current PropertyBag. - The value that is to be tested + Not used + An XmlNode representing the PropertyBag - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. - 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 + The parent node. + Not used + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. - The value that is to be tested - The message to display in case of failure - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The FriendlyName of the AppDomain in which the assembly is running - The value that is to be tested - + - Assert that a string is empty - that is equal to string.Empty + The selected strategy for joining parameter data into test cases - The string to be tested - 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 process ID of the executing assembly - 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 + The stack trace from any data provider that threw + an exception. - The string to be tested - + - Assert that an array, list or other collection is empty + The reason a test was not run - 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 + The author of the tests - An array, list or other collection implementing ICollection - The message to display in case of failure - + - Assert that an array, list or other collection is empty + The ApartmentState required for running the test - An array, list or other collection implementing ICollection - + - Assert that a string is not empty - that is not equal to string.Empty + The categories applying to a test - The string to be tested - 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 + The Description of a test - The string to be tested - The message to display in case of failure - + - Assert that a string is not empty - that is not equal to string.Empty + The number of threads to be used in running tests - The string to be tested - + - Assert that an array, list or other collection is not empty + The maximum time in ms, above which the test is considered to have failed - 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 not empty + The ParallelScope associated with a test - An array, list or other collection implementing ICollection - The message to display in case of failure - + - Assert that an array, list or other collection is not empty + The number of times the test should be repeated - An array, list or other collection implementing ICollection - + - Assert that a string is either null or equal to string.Empty + Indicates that the test should be run on a separate thread - The string to be tested - 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 culture to be set for a test - The string to be tested - The message to display in case of failure - + - Assert that a string is either null or equal to string.Empty + The UI culture to be set for a test - The string to be tested - + - Assert that a string is not null or empty + The type that is under test - The string to be tested - 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 timeout value for the test - The string to be tested - The message to display in case of failure - + - Assert that a string is not null or empty + The test will be ignored until the given date - The string to be tested - + - Asserts that an object may be assigned a value of a given Type. + The optional Order the test will run in - 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. + 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 expected Type. - The object under examination - The message to display in case of failure + + 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. + - + - Asserts that an object may be assigned a value of a given Type. + Initial seed used to create randomizers for this run - The expected Type. - The object under examination - + - Asserts that an object may be assigned a value of a given Type. + 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. - 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. + 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 expected Type. - The object under examination - The message to display in case of failure - + - Asserts that an object may be assigned a value of a given Type. + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. - The expected Type. - The object under examination + - + - Asserts that an object may not be assigned a value of a given Type. + Default constructor - 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. + Construct based on seed value - The expected Type. - The object under examination - The message to display in case of failure + - + - Asserts that an object may not be assigned a value of a given Type. + Returns a random unsigned int. - The expected Type. - The object under examination - + - Asserts that an object may not be assigned a value of a given Type. + Returns a random unsigned int less than the specified maximum. - 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. + Returns a random unsigned int within a specified range. - The expected Type. - The object under examination - The message to display in case of failure - + - Asserts that an object may not be assigned a value of a given Type. + Returns a non-negative random short. - The expected Type. - The object under examination - + - Asserts that an object is an instance of a given type. + Returns a non-negative random short less than the specified maximum. - 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. + Returns a non-negative random short within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Returns a random unsigned short. - The expected Type - The object being examined - + - Asserts that an object is an instance of a given type. + Returns a random unsigned short less than the specified maximum. - 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. + Returns a random unsigned short within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Returns a random long. - The expected Type - The object being examined - + - Asserts that an object is an instance of a given type. + Returns a random long less than the specified maximum. - 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. + Returns a non-negative random long within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Returns a random ulong. - The expected Type - The object being examined - + - Asserts that an object is not an instance of a given type. + Returns a random ulong less than the specified maximum. - 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. + Returns a non-negative random long within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Returns a random Byte - The expected Type - The object being examined - + - Asserts that an object is not an instance of a given type. + Returns a random Byte less than the specified maximum. - 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. + Returns a random Byte within a specified range - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Returns a random SByte - The expected Type - The object being examined - + - Asserts that an object is not an instance of a given type. + Returns a random sbyte less than the specified maximum. - 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. + Returns a random sbyte within a specified range - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Returns a random bool - The expected Type - The object being examined - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random bool based on the probablility a true result - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random double between 0.0 and the specified maximum. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random double within a specified range. - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random float. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random float between 0.0 and the specified maximum. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random float within a specified range. - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random enum value of the specified Type as an object. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random enum value of the specified Type. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Default characters for random functions. - The expected value - The actual value + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore - + - Verifies that two values are equal. If they are not, then an - is thrown. + Generate a random string based on the characters from the input string. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length - + - Verifies that two values are equal. If they are not, then an - is thrown. + Generate a random string based on the characters from the input string. - The expected value - The actual value - The message to display in case of failure + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set - + - Verifies that two values are equal. If they are not, then an - is thrown. + Generate a random string based on the characters from the input string. - The expected value - The actual value + A random string of the default length + Uses DefaultStringChars as the input character set - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random decimal. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random decimal between positive zero and the specified maximum. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. - The expected value - The actual value + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + - + - 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. + 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. - 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 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. + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. - 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 type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found - + - 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. + Examine a fixture type and return true if it has a method with + a particular attribute. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The type to examine + The attribute Type to look for + True if found, otherwise false - + - 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. + Invoke the default constructor on a Type - 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 Type to be constructed + An instance of the Type - + - 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. + Invoke a constructor on a Type with arguments - 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 Type to be constructed + Arguments to the constructor + An instance of the Type - + - 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. + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + An array of objects + An array of Types - + - 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. + Invoke a parameterless method returning void on an object. - 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 + A MethodInfo for the method to be invoked + The object on which to invoke the method - + - 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. + Invoke a method, converting any TargetInvocationException to an NUnitException. - The value that is expected - The actual value - The message to display in case of failure + 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 - + - 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 TestResult class represents the result of a test. - The value that is expected - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Error message for when child tests have errors - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Error message for when child tests are ignored - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + The minimum duration for tests - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Aggregate assertion count - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + ReaderWriterLock - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Construct a test result given a Test - The expected value - The actual value + The test to be used - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the test with which this result is associated. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the ResultState of the test result, which + indicates the success or failure of the test. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the name of the test result - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the full name of the test result - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the elapsed time for running the test in seconds - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the time the test started running. - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the time the test finished running. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the message associated with a test + failure or with not running the test - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets any stacktrace associated with an + error or failure. - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the count of asserts executed + when running the test. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that failed + when running the test and all its children. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that passed + when running the test and all its children. - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that were skipped + when running the test and all its children. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that were inconclusive + when running the test and all its children. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Indicates whether this result has any child results. - The expected value - The actual value - + - 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. + Gets the collection of child results. - 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 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. + Gets a TextWriter, which will write output to be included in the result. - The value that is expected - The actual value - The message to display in case of failure - + - 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. + Gets any text output written to this result. - 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. + Returns the Xml representation of the result. - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message + If true, descendant results are included + An XmlNode representing the result - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Adds the XML representation of the result as a child of the + supplied parent node.. - The expected object - The actual object - The message to display in case of failure + The parent node. + If true, descendant results are included + - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Set the result of the test - The expected object - The actual object + The ResultState to use in the result - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Set the result of the test - 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 ResultState to use in the result + A message associated with the result state - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Set the result of the test - The expected object - The actual object - The message to display in case of failure + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Set the test result based on the type of exception thrown - The expected object - The actual object + The exception that was thrown - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Set the test result based on the type of exception 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 exception that was thrown + THe FailureSite to use in the result - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The Exception to be recorded - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Adds a reason element to a node and returns it. - The first value, expected to be greater - The second value, expected to be less + The target node. + The new reason element. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Adds a failure element to a node and returns it. - 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 target node. + The new failure element. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Enumeration identifying a common language + runtime implementation. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less + RuntimeFramework represents a particular version + of a common language runtime implementation. + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. - 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 the second - value. If it is not, then an - is thrown. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The runtime type of the framework + The version of the framework - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Static method to return a RuntimeFramework object + for the framework that is currently in use. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The type of this runtime framework - 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 the second - value. If it is not, then an - is thrown. + The framework version for this runtime framework - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The CLR version for this runtime framework - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Return true if any CLR version may be used in + matching this RuntimeFramework object. - 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 the second - value. If it is not, then an - is thrown. + Returns the Display name for this framework - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + 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'. - The first value, expected to be greater - The second value, expected to be less + + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Overridden to return the short name of the framework - 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 the second - value. If it is not, then an - is thrown. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The RuntimeFramework to be matched. + True on match, otherwise false - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Filters a raw stack trace and returns the result. - 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 original stack trace + A filtered stack trace - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Provides methods to support legacy string comparison methods. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compares two strings for equality, ignoring case if requested. - The first value, expected to be greater - The second value, expected to be less + 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 - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compares two strings for equality, ignoring case if requested. - 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 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. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The expected result to be returned - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Default Constructor creates an empty parameter set - 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. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - 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. + Construct a parameter set with a list of arguments - 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. + Construct a ParameterSet from an object implementing ITestCaseData - 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. + The expected result of the test, which + must match the method return type. - 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. + Gets a value indicating whether an expected result was specified. - The first value, expected to be less - The second value, expected to be greater - + + + 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. + + + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Link to a prior saved context - 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. + Indicates that a stop has been requested - 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. + The event listener currently receiving notifications - 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. + The number of assertions for the current test - 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. + The current culture - 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. + The current UI culture - 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. + The current test result - 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. + The current Principal. - 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. + Initializes a new instance of the class. - 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. + Initializes a new instance of the class. - 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 + An existing instance of TestExecutionContext. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets and sets the current context. - 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. + Get the current context or return null if none is found. - 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. + Clear the current context. This is provided to + prevent "leakage" of the CallContext containing + the current context back to any runners. + + + + + Gets or sets the current test - 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. + The time the current test started execution - 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. + The time the current test started in Ticks - 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. + Gets or sets the current test result - 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. + Gets a TextWriter that will send output to the current test result. - 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. + The current test object - that is the user fixture + object on which tests are being executed. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Get or set the working directory - 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. + Get or set indicator that run should stop on the first error - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets an enum indicating whether a stop has been requested. - 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. + The current test event listener - 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. + The current WorkItemDispatcher. Made public for + use by nunitlite.tests - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. - 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. + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. - 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. + Gets the RandomGenerator specific to this Test - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets the assert count. - The first value, expected to be greater - The second value, expected to be less + The assert count. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets or sets the test case timeout 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 the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets a list of ITestActions set by upstream tests - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Saves or restores the CurrentCulture - 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. + Saves or restores the CurrentUICulture - 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. + Gets or sets the current for the Thread. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter - 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. + If true, all tests must run on the same thread. No new thread may be spawned. - 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. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + 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. - 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. + Increments the assert count by one. - 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. + Increments the assert count by a specified amount. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Adds a new ValueFormatterFactory to the chain of formatters - The first value, expected to be greater - The second value, expected to be less + The new factory - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Obtain lifetime service object - 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. + Enumeration indicating whether the tests are + running normally or being cancelled. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Running normally with no stop requested - 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. + A graceful stop has been requested - 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. + A forced stop has been requested - 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. + 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 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. + Unique Empty filter. - 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. + Indicates whether this is the EmptyFilter - 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. + Indicates whether this is a top-level filter, + not contained in any other filter. - 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. + 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 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 test to which the filter is applied + True if the test passes the filter, otherwise false - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Determine if a test matches the filter expicitly. That is, it must + be a direct match of the test itself or one of it's children. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The test to which the filter is applied + True if the test matches the filter explicityly, otherwise false - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + 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 first value, expected to be less - The second value, expected to be greater + The test to which the filter is applied + True if the filter matches the any parent of the test - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Determine whether any ancestor of the test matches the filter criteria - 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 test to which the filter is applied + True if the filter matches the an ancestor of the test - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Determine whether any descendant of the test matches the filter criteria. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The test to be matched + True if at least one descendant matches the filter criteria - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Create a TestFilter instance from an xml representation. - 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. + Create a TestFilter from it's TNode representation - 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. + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. - 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. + Adds an XML node - The first value, expected to be less - The second value, expected to be greater + True if recursive + The added XML node - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Adds an XML node - 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 + Parent node + True if recursive + The added XML node - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - 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. + Default Constructor creates an empty parameter set - 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. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - 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 a parameter set with a list of arguments - 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. + Construct a ParameterSet from an object implementing ITestCaseData - 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. + Type arguments used to create a generic fixture instance - 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. + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL 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. + Called when a test has just started - The first value, expected to be less - The second value, expected to be greater + The test that is starting - + - Asserts that an object is contained in a list. + Called when a test case has finished - 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 + The result of the test - + - Asserts that an object is contained in a list. + Called when a test produces output for immediate display - The expected object - The list to be examined - The message to display in case of failure + A TestOutput object containing the text to display - + - Asserts that an object is contained in a list. + Construct a new TestListener - private so it may not be used. - The expected object - The list to be examined - + - Gets the number of assertions executed so far and - resets the counter to zero. + Get a listener that does nothing - + - 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. + TestNameGenerator is able to create test names according to + a coded pattern. - + - 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 + Default pattern used to generate names - 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. Works - identically to Assert.That. + Construct a TestNameGenerator - A Constraint to be applied - The actual value to test - 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. Works - identically to Assert.That + Construct a TestNameGenerator - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message + The pattern used by this generator. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Get the display name for a TestMethod and it's arguments - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + A TestMethod + The display name - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Get the display name for a TestMethod and it's arguments - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + A TestMethod + Arguments to be used + The display name - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. - 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. + Default Constructor creates an empty parameter set - A Constraint to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a parameter set with a list of arguments - A Constraint 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 assertion exception on failure. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - A Constraint 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 . Works Identically to Assert.That. - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Construct a ParameterSet from an object implementing ITestData + + - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to Assert.That. + The RunState for this set of parameters. - 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 Assert.That. + The arguments to be used in running the test, + which must match the method signature. - The evaluated condition - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - Returns a ListMapper based on a collection. + Gets the property dictionary for this test - 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. + Applies ParameterSet _values to the test itself. + A test. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + The original arguments provided by the user, + used for display purposes. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. - - - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Initializes a new instance of the class. - A Constraint expression to be applied - The actual value to test + The callback handler to be used for reporting progress. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Called when a test has just started - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure + 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. Sends a result summary to the callback. + to - 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 + 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 + 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. + Returns the parent test item for the targer test item if it exists - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + + parent test item - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. - 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 + The string to be used + A new string with the _values replaced - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. - A Constraint expression to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Initializes a new instance of the class. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure + The ITypeInfo for the type that represents the suite. - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Gets a string representing the type of 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 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 + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + - + - Asserts that a condition is true. If the condition is false the method throws - an . + Construct from a MethodInfo - 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 . + Gets a string representing the type of test - The evaluated condition + - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - A set of Assert methods operationg on one or more collections + Initializes a new instance of the class. + The type. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + The Test abstract class represents a test within the framework. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. - - - + - Asserts that all items contained in collection are of the type specified by expectedType. + The SetUp methods. - 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. + The teardown methods - 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. + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field - 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. + Constructs a test given its name - IEnumerable containing objects to be considered + The name of the test - + - Asserts that all items contained in collection are not equal to null. + Constructs a test given the path through the + test hierarchy to its parent and a name. - IEnumerable containing objects to be considered - The message that will be displayed on failure + The parent tests full name + The name of the test - + - Asserts that all items contained in collection are not equal to null. + TODO: Documentation needed for constructor - 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. + Construct a test from a MethodInfo - IEnumerable of objects to be considered + - + - Ensures that every object contained in collection exists within the collection - once and only once. + Gets or sets the id of the test - 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. + Gets or sets the name of the test - 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 or sets the fully qualified name of the test - 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 name of the class where this test was declared. + Returns null if the test is not associated with a class. - 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 the name of the method implementing this test. + Returns null if the test is not implemented as a method. - 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 the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. - 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. + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. - 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. + Whether or not the test should be run - 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 name used for the top-level element in the + XML representation of this test - 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. + 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. - 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 a count of test cases represented by + or contained under this test. - 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 properties for this test - 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. + Returns true if this is a TestSuite - 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 a bool indicating whether the current test + has any descendant tests. - 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 the parent as a Test object. + Used by the core to set the parent. - 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 this test's child tests - 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 + A list of child tests - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Gets or sets a fixture object for running this 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 - Arguments to be used in formatting the message - + - Asserts that expected and actual are not equivalent. + Static prefix used for ids in this AppDomain. + Set by FrameworkController. - 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 or Sets the Int value representing the seed for the RandomGenerator - 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. + Creates a TestResult for this test. - 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 + A TestResult suitable for this type of test. - + - Asserts that collection contains actual as an item. + 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. - IEnumerable of objects to be considered - Object to be found within collection + An object implementing ICustomAttributeProvider - + - Asserts that collection contains actual as an item. + Add standard attributes and members to a test node. - 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 the Xml representation of the test - 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 + If true, include child tests recursively + - + - Asserts that collection does not contain actual as an item. + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. - IEnumerable of objects to be considered - Object that cannot exist within collection + The parent node. + If true, descendant results are included + - + - Asserts that collection does not contain actual as an item. + Compares this test to another test for sorting purposes - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure + 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 - + - Asserts that collection does not contain actual as an item. + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. - 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 superset is not a subject of subset. + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The assembly this test represents. + The path used to load the assembly. - + - Asserts that superset is not a subject of subset. + Initializes a new instance of the class + for a path which could not be loaded. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure + The path used to load the assembly. - + - Asserts that superset is not a subject of subset. + Gets the Assembly represented by this instance. - 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 superset is a subset of subset. + Gets the name used for the top-level element in the + XML representation of this test - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that superset is a subset of subset. + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - + - Asserts that superset is a subset of subset. + Initializes a new instance of the class. - 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 + Type of the fixture. - + - Assert that an array, list or other collection is empty + The TestMethod class represents a Test implemented as a method. - 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 + The ParameterSet used to create this test method - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - + - 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 method to be used as a test. - + - 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 method to be used as a test. + The suite or fixture to which the new test will be added - + - Assert that an array, list or other collection is empty + Overridden to return a TestCaseResult. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + A TestResult for this test. - + - Assert that an array,list or other collection is empty + Gets a bool indicating whether the current test + has any descendant tests. - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The parent node. + If true, descendant results are included + - + - Assert that an array, list or other collection is ordered + Gets this test's child tests - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + A list of child tests - + - Assert that an array, list or other collection is ordered + Gets the name used for the top-level element in the + XML representation of this test - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + Returns the name of the method - 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 + TestSuite represents a composite test, which contains other tests. - 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 + Our collection of child tests - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - + - Static helper class used in the constraint-based syntax + Initializes a new instance of the class. + The name of the suite. - + - Creates a new SubstringConstraint + Initializes a new instance of the class. - The value of the substring - A SubstringConstraint + Name of the parent suite. + The name of the suite. - + - Creates a new CollectionContainsConstraint. + Initializes a new instance of the class. - The item that should be found. - A new CollectionContainsConstraint + Type of the fixture. - + - Summary description for DirectoryAssert + Initializes a new instance of the class. + Type of the fixture. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Sorts tests under this suite. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Adds a test to the suite. - - + The test. - + - 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 this test's child tests + The list of child tests - + - 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 a count of test cases represented by + or contained under this 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 + - + - 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. + The arguments to use in creating the fixture - 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. + Set to true to suppress sorting this suite's contents - 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. + Overridden to return a TestSuiteResult. - 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 + A TestResult for this test. - + - 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 a bool indicating whether the current test + has any descendant tests. - 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. + Gets the name used for the top-level element in the + XML representation of this test - A directory path string containing the value that is expected - A directory path string containing the actual value - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. - 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 parent node. + If true, descendant results are included + - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal + The attribute type to check for - + - Asserts that two directories are not equal. If they are equal - an is thrown. + ThreadUtility provides a set of static methods convenient + for working with threads. - 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. + Do our best to Kill a thread - 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 + The thread to kill - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Do our best to kill a thread, passing state info - 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 + The thread to kill + Info for the ThreadAbortException handler - + - Asserts that two directories are not equal. If they are equal - an is thrown. + TypeHelper provides static methods that operate on Types. - 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. + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. - 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. + Gets the display name for a Type as used by NUnit. - A directory to search - The message to display if directories are not equal + The Type for which a display name is needed. + The display name for the Type - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Gets the display name for a Type as used by NUnit. - A directory to search + The Type for which a display name is needed. + The arglist provided. + The display name for the Type - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message + The first type. + The second type. + Either type1 or type2, depending on which is more general. - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Determines whether the specified type is numeric. - A directory to search - The message to display if directories are not equal + The type to be examined. + + true if the specified type is numeric; otherwise, false. + - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. - A directory to search + An array of args to be converted + A ParameterInfo[] whose types will be used as targets - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Determines whether this instance can deduce type args for a generic type from the supplied arguments. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message + 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. + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. - 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. + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. - A directory to search + + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. - 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. + Construct a TypeWrapper for a specified Type. - 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. + Gets the underlying Type on which this TypeWrapper is based. - A directory to search - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Gets the base type of this type as an ITypeInfo - 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. + Gets the Name of the Type - 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. + Gets the FullName of the Type - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Gets the assembly in which the type is declared - 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. + Gets the namespace of the Type - 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. + Gets a value indicating whether the type is abstract. - 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. + Gets a value indicating whether the Type is a generic 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 does not contain actual as a subdirectory or - an is thrown. + Returns true if the Type wrapped is T - 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. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - 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. + Gets a value indicating whether the Type is a generic Type definition - 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. + Gets a value indicating whether the type is sealed. - 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. + Gets a value indicating whether this type represents a static class. - A directory to search - sub-directory asserted to exist under directory - + - Summary description for FileAssert. + Get the display name for this type - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Get the display name for an object of this type, constructed with the specified args. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - - - + - 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. + Returns a Type representing a generic type definition from which this Type can be constructed. - + - 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. + Returns an array of custom attributes of the specified type applied to this type - 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. + Returns a value indicating whether the type has an attribute of the specified type. - 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. + Returns a flag indicating whether this type has a method with an attribute of the specified type. - 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. + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - 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. + Gets the public constructor taking the specified argument Types - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - + - 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. + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - 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. + Construct an object of this Type, using the specified arguments. - 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. + Override ToString() so that error messages in NUnit's own tests make sense - 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 - + - 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. + Represents the result of running a single test case. - 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. + Construct a TestCaseResult based on a TestMethod - 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 + A TestMethod to which the result applies. - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Gets the number of test cases that failed + when running the test and all its children. - 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. + Gets the number of test cases that passed + when running the test and all its children. - The expected Stream - The actual Stream - + - Asserts that two files are not equal. If they are equal - an is thrown. + Gets the number of test cases that were skipped + when running the test and all its children. - 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. + Gets the number of test cases that were inconclusive + when running the test and all its children. - 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. + Indicates whether this result has any child results. - 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. + Gets the collection of child results. - 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. + Represents the result of running a test suite - 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 - + - Asserts that two files are not equal. If they are equal - an is thrown. + Construct a TestSuiteResult base on a TestSuite - The path to a file containing the value that is expected - The path to a file containing the actual value + The TestSuite to which the result applies - + - GlobalSettings is a place for setting default values used - by the framework in performing asserts. + Gets the number of test cases that failed + when running the test and all its children. - + - Default tolerance for floating point equality + Gets the number of test cases that passed + when running the test and all its children. - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Gets the number of test cases that were skipped + when running the test and all its children. - + - 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 number of test cases that were inconclusive + when running the test and all its children. - + - 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. + Indicates whether this result has any child results. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Gets the collection of child results. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + The result to be added - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + 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, 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 constraint that tests for null - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + 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 new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Returns a constraint that tests for a negative value - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Returns a constraint that tests for equality with zero - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Returns a constraint that tests for NaN - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Returns a constraint that tests for empty - + - 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. + Returns a constraint that tests whether a collection + contains all unique items. - + - Method to handle an expected exception + Returns a constraint that tests whether an object graph is serializable in binary format. - The exception to be handled - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Returns a constraint that tests whether an object graph is serializable in xml format. @@ -9562,37 +16928,37 @@ Returns a constraint that tests whether the - actual value is greater than the suppled argument + actual value is greater than the supplied argument Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + 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 suppled argument + actual value is greater than or equal to the supplied argument Returns a constraint that tests whether the - actual value is less than the suppled argument + actual value is less than the supplied argument Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + 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 suppled argument + actual value is less than or equal to the supplied argument @@ -9619,18 +16985,6 @@ 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 of the type supplied as an argument or a derived type. - - Returns a constraint that tests whether the actual value @@ -9646,13 +17000,13 @@ Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + is assignable to the type supplied as an argument. Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + is assignable to the type supplied as an argument. @@ -9668,6 +17022,17 @@ 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 constraint that succeeds if the actual @@ -9689,7 +17054,7 @@ Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + value matches the regular expression supplied as an argument. @@ -9698,10 +17063,10 @@ is the same as an expected path after canonicalization. - + Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + is a subpath of the expected path after canonicalization. @@ -9710,80 +17075,38 @@ 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 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 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 NaN - - - + - Returns a constraint that tests for empty + Returns a constraint that tests whether the actual value falls + inclusively within a specified range. + 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. + - + - Returns a constraint that tests whether a collection - contains all unique items. + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Executed before each test is run + The test that is going to be run. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Executed after each test is run + The test that has just been run. - + - Returns a constraint that tests whether a collection is ordered + Provides the target for the action attribute + The target for the action attribute @@ -9819,65 +17142,11 @@ - Produces a collection containing all the values of a property - - The collection of property values - - - - - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. - - - - - 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. - - - - - 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. - - - - - Construct a randomizer using a random seed - - - - - Construct a randomizer using a specified seed - - - - - Return an array of random doubles between 0.0 and 1.0. + Produces a collection containing all the _values of a property - + The collection of property _values - - - Return an array of random doubles with values in a specified range. - - - - - Return an array of random ints with values in a specified range. - - - - - Get a random seed for use in creating a randomizer. - - The SpecialValue enum is used to represent TestCase arguments @@ -9897,7 +17166,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -9905,7 +17174,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -9921,14 +17190,6 @@ The message to display in case of failure Arguments used in formatting the message - - - 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 - Asserts that a string is found within another string. @@ -9945,14 +17206,6 @@ The message to display in case of failure Arguments used in formatting the message - - - 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 - Asserts that a string is found within another string. @@ -9969,14 +17222,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - Asserts that a string starts with another string. @@ -9993,14 +17238,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string does not start with another 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. @@ -10017,14 +17254,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - Asserts that a string ends with another string. @@ -10041,14 +17270,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string does not end with another string. - - 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. @@ -10065,14 +17286,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Asserts that two strings are equal, without regard to case. @@ -10089,14 +17302,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that two strings are Notequal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Asserts that two strings are not equal, without regard to case. @@ -10113,14 +17318,6 @@ The message to display in case of failure Arguments used in formatting the message - - - 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 - Asserts that a string matches an expected regular expression pattern. @@ -10137,14 +17334,6 @@ 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 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. @@ -10155,92 +17344,33 @@ 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 argument list to be provided to the test - - - - - The expected result to be returned - - - - - Set to true if this has an expected result - - - - - The expected exception Type - - - - - The FullName of the expected exception - - - - - The name to be used for the test - - - - - The description of the test - - - - - A dictionary of properties, used to add information - to tests without requiring the class to change. - - - - - If true, indicates that the test case is to be ignored - - - - - If true, indicates that the test case is marked explicit - - - - - The reason for ignoring a test case + 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. - Initializes a new instance of the class. + Initializes a new instance of the class. The arguments. - Initializes a new instance of the class. + Initializes a new instance of the class. The argument. - Initializes a new instance of the class. + Initializes a new instance of the class. The first argument. The second argument. - Initializes a new instance of the class. + Initializes a new instance of the class. The first argument. The second argument. @@ -10253,20 +17383,6 @@ The expected result A modified TestCaseData - - - Sets the expected exception type for the test - - Type of the expected exception. - The modified TestCaseData instance - - - - Sets the expected exception type for the test - - FullName of the expected exception. - The modified TestCaseData instance - Sets the name of the test case @@ -10312,11 +17428,15 @@ - + - Ignores this TestCase. + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. - @@ -10325,567 +17445,625 @@ The reason. - + - Marks this TestCase as Explicit + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. - - + - Marks this TestCase as Explicit, specifying the reason. + Construct a TestContext for an ExecutionContext - The reason. - + The ExecutionContext to adapt - + - Gets the argument list to be provided to the test + 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. - + - Gets the expected result + Gets a TextWriter that will send output to the current test result. - + - Returns true if the result has been set + Gets a TextWriter that will send output directly to Console.Error - + - Gets the expected exception Type + Gets a TextWriter for use in displaying immediate progress messages - + - Gets the FullName of the expected exception + TestParameters object holds parameters for the test run, if any are specified - + - Gets the name to be used for the test + Get a representation of the current test. - + - Gets the description of the test + Gets a Representation of the TestResult for the current test. - + - Gets a value indicating whether this is ignored. + Gets the unique name of the Worker that is executing this test. - true if ignored; otherwise, false. - + - Gets a value indicating whether this is explicit. + Gets the directory containing the current test assembly. - true if explicit; otherwise, false. - + - Gets the ignore reason. + Gets the directory to be used for outputting files created + by this test run. - The ignore reason. - + - Gets a list of categories associated with this test. + Gets the random generator. + + The random generator. + - - - Gets the property dictionary for this test - + + Write the string representation of a boolean value to the current result - - - Provide the context information of the current test - + + Write a char to the current result - - - Constructs a TestContext using the provided context dictionary - - A context dictionary + + Write a char array to the current result - - - 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. - + + Write the string representation of a double to the current result - - - Gets a TestAdapter representing the currently executing test in this context. - + + Write the string representation of an Int32 value to the current result - - - Gets a ResultAdapter representing the current result for the test - executing in this context. - + + Write the string representation of an Int64 value to the current result - - - Gets the directory containing the current test assembly. - + + Write the string representation of a decimal value to the current result - - - Gets the directory to be used for outputing files created - by this test run. - + + Write the string representation of an object to the current result - - - TestAdapter adapts a Test for consumption by - the user test code. - + + 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 + + - Constructs a TestAdapter for this context + This method adds the a new ValueFormatterFactory to the + chain of responsibility used for fomatting values in messages. + The scope of the change is the current TestContext. - The context dictionary + The factory delegate - + - The name of the test. + 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 compould function. + The type supported by this formatter + The ValueFormatter delegate - + - The FullName of the test + TestAdapter adapts a Test for consumption by + the user test code. - + - The properties of the test. + Construct a TestAdapter for a Test + The Test to be adapted - + - ResultAdapter adapts a TestResult for consumption by - the user test code. + Gets the unique Id of a test - + - Construct a ResultAdapter for a context + The name of the test, which may or may not be + the same as the method name. - 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. + The name of the method representing the test. - + - 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. + The FullName of the test - + - Provides details about a test + The ClassName of the test - + - Creates an instance of TestDetails + The properties of the test. - 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. + ResultAdapter adapts a TestResult for consumption by + the user test code. - + - The method that implements the test, if available. + Construct a ResultAdapter for a TestResult + The TestResult to be adapted - + - The full name of the test. + Gets a ResultState representing the outcome of the test. - + - A string representing the type of test, e.g. "Test Case". + Gets the message associated with a test + failure or with not running the test - + - Indicates if the test represents a suite of tests. + Gets any stacktrace associated with an + error or failure. - + - The ResultState enum indicates the result of running a test + Gets the number of test cases that failed + when running the test and all its children. - + - The result is inconclusive + Gets the number of test cases that passed + when running the test and all its children. - + - The test was not runnable. + Gets the number of test cases that were skipped + when running the test and all its children. - + - The test has been skipped. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - The test has been ignored. + 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. - + - The test succeeded + Initializes a new instance of the class. + The arguments. - + - The test failed + Initializes a new instance of the class. + The argument. - + - The test encountered an unexpected exception + Initializes a new instance of the class. + The first argument. + The second argument. - + - The test was cancelled by the user + Initializes a new instance of the class. + The first argument. + The second argument. + The third argument. - + - The TestStatus enum indicates the result of running a test + Marks the test fixture as explicit. - + - The test was inconclusive + Marks the test fixture as explicit, specifying the reason. - + - The test has skipped + Ignores this TestFixture, specifying the reason. + The reason. + - + - The test succeeded + TestParameters class holds any named parameters supplied to the test run - + - The test failed + Gets the number of test parameters - + - Helper class with static methods used to supply constraints - that operate on strings. + Gets a collection of the test parameter names - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets a flag indicating whether a parameter with the specified name exists.N + Name of the parameter + True if it exists, otherwise false - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + Indexer provides access to the internal dictionary + Name of the parameter + Value of the parameter or null if not present - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Get method is a simple alternative to the indexer + Name of the paramter + Value of the parameter or null if not present - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + 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 - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Get the value of a parameter or return a default + The return Type + Name of the parameter + Default value of the parameter + Value of the parameter or default value if not present - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Adds a parameter to the list + Name of the parameter + Value of the parameter - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Helper class with properties and methods that supply + constraints that operate on exceptions. - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Creates a constraint specifying an expected exception - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Creates a constraint specifying an exception with a given InnerException - + - 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. + Creates a constraint specifying an expected TargetInvocationException - + - Prefix used for the expected value line of a message + Creates a constraint specifying an expected ArgumentException - + - Prefix used for the actual value line of a message + Creates a constraint specifying an expected ArgumentNUllException - + - Length of a message prefix + Creates a constraint specifying an expected InvalidOperationException - + - Construct a TextMessageWriter + Creates a constraint specifying that no exception is thrown - + - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. + Creates a constraint specifying the exact type of exception expected - - - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. + Creates a constraint specifying the exact type of exception expected - 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. + Creates a constraint specifying the type of exception expected - 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. + Creates a constraint specifying the type of exception expected - 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. + 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. - 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. + Flag (bool) indicating whether tests are being debugged. - 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 - + - Writes the text for a connector. + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. - The connector. - + - Writes the text for a predicate. + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. - The predicate. - + - Write the text for a modifier. + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. - The modifier. - + - Writes the text for an expected value. + 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. - The expected value. - + - Writes the text for an actual value. + A TextWriter to which the internal trace will be sent. - The actual value. - + - Writes the text for a generalized value. + A list of tests to be loaded. - The value. - + - Writes the text for a collection value, - starting at a particular point, to a max length + 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. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - + - Write the generic 'Expected' line for a constraint + 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. - The constraint that failed - + - Write the generic 'Expected' line for a given value + If true, execution stops after the first error or failure. - The expected value - + - Write the generic 'Expected' line for a given value - and tolerance. + If true, use of the event queue is suppressed and test events are synchronous. - The expected value - The tolerance within which the test was made - + - Write the generic 'Actual' line for a constraint + The default naming pattern used in generating test names - The constraint for which the actual value is to be written - + - Write the generic 'Actual' line for a given value + Parameters to be passed on to the test - The actual value causing a failure - + - Gets or sets the maximum line length for this writer + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. - + - Helper class with properties and methods that supply - constraints that operate on exceptions. + 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. - + - Creates a constraint specifying the exact type of exception expected + A MarshalByRefObject that lives forever - + - Creates a constraint specifying the exact type of exception expected + Obtains a lifetime service object to control the lifetime policy for this instance. - + - Creates a constraint specifying the type of exception expected + Type extensions that apply to all target frameworks - + - Creates a constraint specifying the type of exception expected + Determines if the given array is castable/matches the array. + + + - + - Creates a constraint specifying an expected exception + Determines if one type can be implicitly converted from another + + + - + - Creates a constraint specifying an exception with a given InnerException + 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. - + - Creates a constraint specifying an expected TargetInvocationException + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes - + - Creates a constraint specifying an expected TargetInvocationException + The newline sequence in the current environment. - + - Creates a constraint specifying an expected TargetInvocationException + Path to the 'My Documents' folder - + - Creates a constraint specifying that no exception is thrown + Directory used for file output if not specified on commandline. diff --git a/Tools/nunit/framework/nunit.mocks.dll b/Tools/nunit/framework/nunit.mocks.dll deleted file mode 100644 index 33479511f7a..00000000000 Binary files a/Tools/nunit/framework/nunit.mocks.dll and /dev/null differ diff --git a/Tools/nunit/framework/nunit.testdata.dll b/Tools/nunit/framework/nunit.testdata.dll new file mode 100644 index 00000000000..f79c437f0ff Binary files /dev/null and b/Tools/nunit/framework/nunit.testdata.dll differ diff --git a/Tools/nunit/framework/nunitlite-runner.exe b/Tools/nunit/framework/nunitlite-runner.exe new file mode 100644 index 00000000000..f5dc63cf7c4 Binary files /dev/null and b/Tools/nunit/framework/nunitlite-runner.exe differ diff --git a/Tools/nunit/framework/nunitlite.dll b/Tools/nunit/framework/nunitlite.dll new file mode 100644 index 00000000000..767e738804c Binary files /dev/null and b/Tools/nunit/framework/nunitlite.dll differ diff --git a/Tools/nunit/framework/nunitlite.tests.exe b/Tools/nunit/framework/nunitlite.tests.exe new file mode 100644 index 00000000000..9f12820da3a Binary files /dev/null and b/Tools/nunit/framework/nunitlite.tests.exe differ diff --git a/Tools/nunit/framework/pnunit.framework.dll b/Tools/nunit/framework/pnunit.framework.dll deleted file mode 100644 index f8cf2790d90..00000000000 Binary files a/Tools/nunit/framework/pnunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/framework/slow-nunit-tests.dll b/Tools/nunit/framework/slow-nunit-tests.dll new file mode 100644 index 00000000000..1cd7f330833 Binary files /dev/null and b/Tools/nunit/framework/slow-nunit-tests.dll differ diff --git a/Tools/nunit/launcher.log.conf b/Tools/nunit/launcher.log.conf deleted file mode 100644 index b5bcd9da484..00000000000 --- a/Tools/nunit/launcher.log.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/lib/Failure.png b/Tools/nunit/lib/Failure.png deleted file mode 100644 index 2e400b276fc..00000000000 Binary files a/Tools/nunit/lib/Failure.png and /dev/null differ diff --git a/Tools/nunit/lib/Ignored.png b/Tools/nunit/lib/Ignored.png deleted file mode 100644 index 478efbf00be..00000000000 Binary files a/Tools/nunit/lib/Ignored.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Ellipsis.gif b/Tools/nunit/lib/Images/Ellipsis.gif deleted file mode 100644 index e11f26b6ecf..00000000000 Binary files a/Tools/nunit/lib/Images/Ellipsis.gif and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Failure.jpg b/Tools/nunit/lib/Images/Tree/Circles/Failure.jpg deleted file mode 100644 index c245548b916..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Failure.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Ignored.jpg b/Tools/nunit/lib/Images/Tree/Circles/Ignored.jpg deleted file mode 100644 index 0549b70588b..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Ignored.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Inconclusive.jpg b/Tools/nunit/lib/Images/Tree/Circles/Inconclusive.jpg deleted file mode 100644 index 8d36153cdb9..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Inconclusive.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Skipped.jpg b/Tools/nunit/lib/Images/Tree/Circles/Skipped.jpg deleted file mode 100644 index 3d84255ccfe..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Skipped.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Success.jpg b/Tools/nunit/lib/Images/Tree/Circles/Success.jpg deleted file mode 100644 index 15ec1b7fbc9..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Success.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Failure.jpg b/Tools/nunit/lib/Images/Tree/Classic/Failure.jpg deleted file mode 100644 index 658905fd98d..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Failure.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Ignored.jpg b/Tools/nunit/lib/Images/Tree/Classic/Ignored.jpg deleted file mode 100644 index 95b7fdbd142..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Ignored.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Inconclusive.jpg b/Tools/nunit/lib/Images/Tree/Classic/Inconclusive.jpg deleted file mode 100644 index 32a0ff72f11..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Inconclusive.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Skipped.jpg b/Tools/nunit/lib/Images/Tree/Classic/Skipped.jpg deleted file mode 100644 index 3d84255ccfe..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Skipped.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Success.jpg b/Tools/nunit/lib/Images/Tree/Classic/Success.jpg deleted file mode 100644 index 3d8e76092fb..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Success.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Failure.png b/Tools/nunit/lib/Images/Tree/Default/Failure.png deleted file mode 100644 index 2e400b276fc..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Failure.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Ignored.png b/Tools/nunit/lib/Images/Tree/Default/Ignored.png deleted file mode 100644 index 05715cbbc2f..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Ignored.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Inconclusive.png b/Tools/nunit/lib/Images/Tree/Default/Inconclusive.png deleted file mode 100644 index 4807b7cedbc..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Inconclusive.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Skipped.png b/Tools/nunit/lib/Images/Tree/Default/Skipped.png deleted file mode 100644 index 7c9fc64e387..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Skipped.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Success.png b/Tools/nunit/lib/Images/Tree/Default/Success.png deleted file mode 100644 index 2a301508c65..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Success.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Failure.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Failure.png deleted file mode 100644 index ba03e848532..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Failure.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Ignored.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Ignored.png deleted file mode 100644 index 9271d6e7526..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Ignored.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Inconclusive.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Inconclusive.png deleted file mode 100644 index 76219b5c094..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Inconclusive.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/SeriousWarning.png b/Tools/nunit/lib/Images/Tree/Visual Studio/SeriousWarning.png deleted file mode 100644 index 6a578ccaa27..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/SeriousWarning.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Skipped.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Skipped.png deleted file mode 100644 index 7c9fc64e387..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Skipped.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Success.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Success.png deleted file mode 100644 index 346fe8f923d..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Success.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/pinned.gif b/Tools/nunit/lib/Images/pinned.gif deleted file mode 100644 index cb07448dd5a..00000000000 Binary files a/Tools/nunit/lib/Images/pinned.gif and /dev/null differ diff --git a/Tools/nunit/lib/Images/unpinned.gif b/Tools/nunit/lib/Images/unpinned.gif deleted file mode 100644 index f25fbb53329..00000000000 Binary files a/Tools/nunit/lib/Images/unpinned.gif and /dev/null differ diff --git a/Tools/nunit/lib/Inconclusive.png b/Tools/nunit/lib/Inconclusive.png deleted file mode 100644 index 4807b7cedbc..00000000000 Binary files a/Tools/nunit/lib/Inconclusive.png and /dev/null differ diff --git a/Tools/nunit/lib/NSubstitute.dll b/Tools/nunit/lib/NSubstitute.dll deleted file mode 100644 index 9adbdd12403..00000000000 Binary files a/Tools/nunit/lib/NSubstitute.dll and /dev/null differ diff --git a/Tools/nunit/lib/NSubstitute.xml b/Tools/nunit/lib/NSubstitute.xml deleted file mode 100644 index 4bd55c1c2d8..00000000000 --- a/Tools/nunit/lib/NSubstitute.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - NSubstitute - - - - - Argument matchers used for specifying calls to substitutes. - - - - - Match any argument value compatible with type . - - - - - - - Match argument that is equal to . - - - - - - - - Match argument that satisfies . - If the throws an exception for an argument it will be treated as non-matching. - - - - - - - - Invoke any argument as soon as a matching call is made to the substitute. - - - - - - Invoke any argument with specified argument as soon as a matching call is made to the substitute. - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - - - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - - - - - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - Arguments to pass to delegate. - - - - - Capture any argument compatible with type and use it to call the function - as soon as a matching call is made to the substitute. - - - - - - - - Provides a specification for arguments for use with . - Can additionally implement to give descriptions when arguments do not match. - - - - - Checks whether the satisfies the condition of the matcher. - If this throws an exception the argument will be treated as non-matching. - - - - - - - Describes how the does not match the condition specified by this class, or - if a detailed description can not be provided for the argument. - - - Description of the non-match, or if no description can be provided. - - - - Combines two enumerables into a new enumerable using the given selector. - - - - - - - - - - This implementation was sanity-checked against the - Edulinq implementation and - Eric Lippert's implementation. - - - - - Checks if the instance can be used when a is expected. - - - - - - - - Join the using . - - - - - - - - Delegates to ThreadLocal<T>, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions. - These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll - just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway). - - - - - - Provides a specification for arguments for use with . - Can additionally implement to give descriptions when arguments do not match. - - Matches arguments of type or compatible type. - - - - Checks whether the satisfies the condition of the matcher. - If this throws an exception the argument will be treated as non-matching. - - - - - - - Raise an event for an EventHandler<TEventArgs> event with the provided and . - - - - - Raise an event for an EventHandler<TEventArgs> event with the substitute as the sender and the provided . - - - - - Raise an event for an EventHandler<EventArgsT> event with the substitute as the sender - and with a default instance of . - - - - - Raise an event for an EventHandler or EventHandler<EventArgs> event with the substitute - as the sender and with empty EventArgs. - - - - - Raise an event of type with the provided arguments. If no arguments are provided - NSubstitute will try and provide reasonble defaults. - - - - - Create a substitute for one or more types. For example: Substitute.For<ISomeType>() - - - - - Substitute for an interface or class. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The type of interface or class to substitute. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute for the interface or class. - - - - Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The type of interface or class to substitute. - An additional interface or class (maximum of one class) the substitute should implement. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute of type T1, that also implements T2. - - - - Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified. - If additional interfaces are required use the overload. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The type of interface or class to substitute. - An additional interface or class (maximum of one class) the substitute should implement. - An additional interface or class (maximum of one class) the substitute should implement. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute of type T1, that also implements T2 and T3. - - - - Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The types of interfaces or a type of class and multiple interfaces the substitute should implement. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute implementing the specified types. - - - diff --git a/Tools/nunit/lib/Rhino.Mocks.dll b/Tools/nunit/lib/Rhino.Mocks.dll deleted file mode 100644 index 3fc4b2ae437..00000000000 Binary files a/Tools/nunit/lib/Rhino.Mocks.dll and /dev/null differ diff --git a/Tools/nunit/lib/Rhino.Mocks.xml b/Tools/nunit/lib/Rhino.Mocks.xml deleted file mode 100644 index f9b8912b023..00000000000 --- a/Tools/nunit/lib/Rhino.Mocks.xml +++ /dev/null @@ -1,5413 +0,0 @@ - - - - Rhino.Mocks - - - - - Defines constraints and return values for arguments of a mock. - Only use Arg inside a method call on a mock that is recording. - Example: - ExpectCall( - mock.foo( - Arg<int>.Is.GreaterThan(2), - Arg<string>.Is.Anything - )); - Use Arg.Text for string specific constraints - Use Arg<ListClass>.List for list specific constraints - - - - - - Register the predicate as a constraint for the current call. - - The predicate. - default(T) - - Allow you to use code to create constraints - - demo.AssertWasCalled(x => x.Bar(Arg{string}.Matches(a => a.StartsWith("b") && a.Contains("ba")))); - - - - - - Define a complex constraint for this argument by passing several constraints - combined with operators. (Use Is in simple cases.) - Example: Arg<string>.Matches(Is.Equal("Hello") || Text.EndsWith("u")); - - Constraints using Is, Text and List - Dummy to satisfy the compiler - - - - Define a Ref argument. - - Constraints for this argument - value returned by the mock - - - - - Define a out parameter. Use it together with the keyword out and use the - Dummy field available by the return value. - Example: mock.foo( out Arg<string>.Out("hello").Dummy ); - - - - - - - Define a simple constraint for this argument. (Use Matches in simple cases.) - Example: - Arg<int>.Is.Anthing - Arg<string>.Is.Equal("hello") - - - - - Define Constraints on list arguments. - - - - - Use the Arg class (without generic) to define Text constraints - - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Define constraints on text arguments. - - - - - Used to manage the static state of the Arg<T> class"/> - - - - - Resets the static state - - - - - Returns return values for the out and ref parameters - Note: the array returned has the size of the number of out and ref - argument definitions - - - - - - Returns the constraints for all arguments. - Out arguments have an Is.Anything constraint and are also in the list. - - - - - - What should BackToRecord clear - - - - - Retain all expectations and behaviors and return to mock - - - - - All expectations - - - - - Event subscribers for this instance - - - - - Methods that should be forwarded to the base class implementation - - - - - Properties that should behave like properties - - - - - Remove all the behavior of the object - - - - - Interface for constraints - - - - - Determines if the object pass the constraints - - - - - And operator for constraints - - - - - Not operator for constraints - - - - - Or operator for constraints - - - - - Allow overriding of || or && - - - - - - - Allow overriding of || or && - - - - - - - Gets the message for this constraint - - - - - - Constrain that the public field has a specified value - - - - - Constrain that the public field matches another constraint. - - - - - Creates a new instance. - - Name of the public field. - Constraint to place on the public field value. - - - - Creates a new instance, specifying a disambiguating - for the public field. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Constraint to place on the public field value. - - - - Determines if the object passes the constraint. - - - - - Gets the message for this constraint - - - - - - Creates a new instance. - - Name of the public field. - Expected value. - - - - Creates a new instance, specifying a disambiguating - for the public field. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Expected value. - - - - Constrain that the property has a specified value - - - - - Constrain that the property matches another constraint. - - - - - Creates a new instance. - - Name of the property. - Constraint to place on the property value. - - - - Creates a new instance, specifying a disambiguating - for the property. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Constraint to place on the property value. - - - - Determines if the object passes the constraint. - - - - - Gets the message for this constraint - - - - - - Creates a new instance. - - Name of the property. - Expected value. - - - - Creates a new instance, specifying a disambiguating - for the property. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Expected value. - - - - Constrain that the parameter must be of the specified type - - - - - Creates a new instance. - - Type. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that determines whether an object is the same object as another. - - - - - Creates a new instance. - - Obj. - - - - Determines if the object passes the constraints. - - - - - Gets the message for this constraint. - - - - - Evaluate a parameter using constraints - - - - - Create new instance - - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - A constraint based on lambda expression, we are using Expression{T} - because we want to be able to get good error reporting on that. - - - - - Initializes a new instance of the class. - - The expr. - - - - Determines if the object pass the constraints - - - - - - - Gets the message for this constraint - - - - - - Constrain that the list contains the same items as the parameter list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain that the parameter is one of the items in the list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain that the object is inside the parameter list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Applies another AbstractConstraint to the collection count. - - - - - Creates a new instance. - - The constraint that should be applied to the collection count. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint. - - - - - Applies another AbstractConstraint to a specific list element. - - - - - Creates a new instance. - - The zero-based index of the list element. - The constraint that should be applied to the list element. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint - - - - - - Applies another AbstractConstraint to a specific generic keyed list element. - - - - - Creates a new instance. - - The key of the list element. - The constraint that should be applied to the list element. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint - - - - - - Constrains that all elements are in the parameter list - - - - - Initializes a new instance of the class. - - The these. - - - - Determines if the object pass the constraints - - - - - - - Gets the message for this constraint - - - - - - Combines two constraints, constraint pass if either is fine. - - - - - Creates a new instance. - - C1. - C2. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Negate a constraint - - - - - Creates a new instance. - - C1. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Combines two constraints - - - - - - Creates a new instance. - - C1. - C2. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain the argument to validate according to regex pattern - - - - - Creates a new instance. - - Pattern. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument contains the specified string. - - - - - Creates a new instance. - - Inner string. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument ends with the specified string - - - - - Creates a new instance. - - End. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument start with the specified string - - - - - Creates a new instance. - - Start. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an object equals another - - - - - Creates a new instance. - - Obj. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that always returns true - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever a comparable is greater than another - - - - - Creates a new instance. - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Initializes a new constraint object. - - The expected object, The actual object is passed in as a parameter to the method - - - - Evaluate this constraint. - - The actual object that was passed in the method call to the mock. - True when the constraint is met, else false. - - - - Checks if the properties of the object - are the same as the properies of the object. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - - - - - - This is the real heart of the beast. - - - - Used by CheckReferenceType to check all properties of the reference type. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - Used by CheckReferenceType to check all fields of the reference type. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - Checks the items of both collections - - The expected collection - - True if both collections contain the same items in the same order. - - - - Builds a propertyname from the Stack _properties like 'Order.Product.Price' - to be used in the error message. - - A nested property name. - - - - Rhino.Mocks uses this property to generate an error message. - - - A message telling the tester why the constraint failed. - - - - - Provides access to the constraintes defined in the class to be used in context - with the syntax. - - The type of the argument - - - - Evaluate a greater than constraint for . - - The object the parameter should be greater than - - - - Evaluate a less than constraint for . - - The object the parameter should be less than - - - - Evaluate a less than or equal constraint for . - - The object the parameter should be less than or equal to - - - - Evaluate a greater than or equal constraint for . - - The object the parameter should be greater than or equal to - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Evaluate a not equal constraint for . - - The object the parameter should not equal to - - - - Evaluate a same as constraint. - - The object the parameter should the same as. - - - - Evaluate a not same as constraint. - - The object the parameter should not be the same as. - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - A constraints that accept anything - - - - - - A constraint that accept only nulls - - - - - - A constraint that accept only non null values - - - - - - A constraint that accept only value of the specified type. - The check is performed on the type that has been defined - as the argument type. - - - - - Provides access to the constraints defined in the class to be used in context - with the syntax. - - - - - Determines whether the specified object is in the parameter. - The parameter must be IEnumerable. - - Obj. - - - - - Determines whatever the parameter is in the collection. - - - - - Determines that the parameter collection is identical to the specified collection - - - - - Determines that the parameter collection has the specified number of elements. - - The constraint that should be applied to the collection count. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The zero-based index of the list element. - The constraint which should be applied to the list element. - - - - Determines that all elements of the specified collection are in the the parameter collection - - The collection to compare against - The constraint which should be applied to the list parameter. - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Provides a dummy field to pass as out or ref argument. - - - - - - Dummy field to satisfy the compiler. Used for out and ref arguments. - - - - - Central location for constraints for object's public fields - - - - - Constrains the parameter to have a public field with the specified value - - Name of the public field. - Expected value. - - - - - Constrains the parameter to have a public field with the specified value. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Expected value. - - - - - Constrains the parameter to have a public field satisfying a specified constraint. - - Name of the public field. - Constraint for the public field. - - - - Constrains the parameter to have a public field satisfying a specified constraint. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Constraint for the public field. - - - - Determines whether the parameter has the specified public field and that it is null. - - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is null. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is not null. - - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is not null. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - - - - - Central location for constraints - - - - - Evaluate a greater than constraint for . - - The object the parameter should be greater than - - - - Evaluate a less than constraint for . - - The object the parameter should be less than - - - - Evaluate a less than or equal constraint for . - - The object the parameter should be less than or equal to - - - - Evaluate a greater than or equal constraint for . - - The object the parameter should be greater than or equal to - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Evaluate a not equal constraint for . - - The object the parameter should not equal to - - - - Evaluate a same as constraint. - - The object the parameter should the same as. - - - - Evaluate a not same as constraint. - - The object the parameter should not be the same as. - - - - A constraints that accept anything - - - - - - A constraint that accept only nulls - - - - - - A constraint that accept only non null values - - - - - - A constraint that accept only value of the specified type - - - - - A constraint that accept only value of the specified type - - - - - Evaluate a parameter using a predicate - - The predicate to use - - - - Central location for constraints about lists and collections - - - - - Determines whether the specified obj is in the parameter. - The parameter must be IEnumerable. - - Obj. - - - - - Determines whatever the parameter is in the collection. - - - - - Determines that the parameter collection is identical to the specified collection - - - - - Determines that the parameter collection has the specified number of elements. - - The constraint that should be applied to the collection count. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The zero-based index of the list element. - The constraint which should be applied to the list element. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The key of the element. - The constraint which should be applied to the element. - - - - Determines that all elements of the specified collection are in the the parameter collection - - The collection to compare against - The constraint which should be applied to the list parameter. - - - - Central location for constraints for object's properties - - - - - Constrains the parameter to have property with the specified value - - Name of the property. - Expected value. - - - - - Constrains the parameter to have property with the specified value. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Expected value. - - - - - Constrains the parameter to have a property satisfying a specified constraint. - - Name of the property. - Constraint for the property. - - - - Constrains the parameter to have a property satisfying a specified constraint. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Constraint for the property. - - - - Determines whether the parameter has the specified property and that it is null. - - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is null. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is not null. - - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is not null. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - - - - - constraints the parameter to have the exact same property values as the expected object. - - An object, of the same type as the parameter, whose properties are set with the expected values. - An instance of the constraint that will do the actual check. - - The parameter's public property values and public field values will be matched against the expected object's - public property values and public field values. The first mismatch will be reported and no further matching is done. - The matching is recursive for any property or field that has properties or fields of it's own. - Collections are supported through IEnumerable, which means the constraint will check if the actual and expected - collection contain the same values in the same order, where the values contained by the collection can have properties - and fields of their own that will be checked as well because of the recursive nature of this constraint. - - - - - Central location for all text related constraints - - - - - Constrain the argument to starts with the specified string - - - - - Constrain the argument to end with the specified string - - - - - Constrain the argument to contain the specified string - - - - - Constrain the argument to validate according to regex pattern - - - - - Provides access to the constraintes defined in the class to be used in context - with the syntax. - - - - - Constrain the argument to starts with the specified string - - - - - - Constrain the argument to end with the specified string - - - - - Constrain the argument to contain the specified string - - - - - Constrain the argument to validate according to regex pattern - - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - This class defines a lot of method signatures, which we will use - to allow compatability on net-2.0 - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - Allows expectations to be set on methods that should never be called. - For methods with void return value, you need to use LastCall or - DoNotExpect.Call() with a delegate. - - - - - Sets LastCall.Repeat.Never() on /any/ proxy on /any/ repository on the current thread. - This method if not safe for multi threading scenarios. - - - - - Accepts a delegate that will execute inside the method which - LastCall.Repeat.Never() will be applied to. - It is expected to be used with anonymous delegates / lambda expressions and only one - method should be called. - - - IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; - DoNotExpect.Call(delegate{ mockSrv.Stop(); }); - ... - - - - - An expectaton violation was detected. - - - - - Creates a new instance. - - Message. - - - - Serialization constructor - - - - - Signals that an object was call on a mock repository which doesn't - belong to this mock repository or not a mock - - - - - Creates a new instance. - - Message. - - - - Serialization constructor - - - - - Allows to set expectation on methods that has return values. - For methods with void return value, you need to use LastCall - - - - - The method options for the last call on /any/ proxy on /any/ repository on the current thread. - This method if not safe for multi threading scenarios, use . - - - - - Accepts a delegate that will execute inside the method, and then return the resulting - instance. - It is expected to be used with anonymous delegates / lambda expressions and only one - method should be called. - - - IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; - Expect.Call(delegate{ mockSrv.Start(); }).Throw(new NetworkException()); - ... - - - - - Get the method options for the last method call on the mockInstance. - - - - - A delegate that can be used to get better syntax on Expect.Call(delegate { foo.DoSomething(); }); - - - - - Abstract class that holds common information for - expectations. - - - - - Interface to validate that a method call is correct. - - - - - Validate the arguments for the method. - This method can be called numerous times, so be careful about side effects - - The arguments with which the method was called - - - - Add an actual method call to this expectation - - - - - Returns the return value or throw the exception and setup any output / ref parameters - that has been set. - - - - - Builds the verification failure message. - - - - - - Gets the error message. - - - - - - Range of expected calls - - - - - Number of call actually made for this method - - - - - If this expectation is still waiting for calls. - - - - - The return value for a method matching this expectation - - - - - Gets or sets the exception to throw on a method matching this expectation. - - - - - Gets a value indicating whether this instance's action is staisfied. - A staisfied instance means that there are no more requirements from - this method. A method with non void return value must register either - a return value or an exception to throw. - - - - - Gets the method this expectation is for. - - - - - Gets or sets what special condtions there are for this method - repeating. - - - - - Gets a value indicating whether this expectation was satisfied - - - - - Specify whatever this expectation has a return value set - You can't check ReturnValue for this because a valid return value include null. - - - - - An action to execute when the method is matched. - - - - - Set the out / ref parameters for the method call. - The indexing is zero based and ignores any non out/ref parameter. - It is possible not to pass all the parameters. This method can be called only once. - - - - - Documentation Message - - - - - Gets the invocation for this expectation - - The invocation. - - - - Occurs when the exceptation is match on a method call - - - - - Allow to set the return value in the future, if it was already set. - - - - - Number of actuall calls made that passed this expectation - - - - - Range of expected calls that should pass this expectation. - - - - - The return value for a method matching this expectation - - - - - The exception to throw on a method matching this expectation. - - - - - The method this expectation is for. - - - - - The return value for this method was set - - - - - Whether this method will repeat - unlimited number of times. - - - - - A delegate that will be run when the - expectation is matched. - - - - - The arguments that matched this expectation. - - - - - Documentation message - - - - - The method originalInvocation - - - - - Get the hash code - - - - - Add an actual actualMethodCall call to this expectation - - - - - Builds the verification failure message. - - - - - - Returns the return value or throw the exception and setup output / ref parameters - - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Creates a new instance. - - The originalInvocation for this method, required because it contains the generic type infromation - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Determines if this object equal to obj - - - - - The error message for these arguments - - - - - Asserts that the delegate has the same parameters as the expectation's method call - - - - - Setter for the outpur / ref parameters for this expecataion. - Can only be set once. - - - - - Specify whether this expectation has a return value set - You can't check ReturnValue for this because a valid return value include null. - - - - - Gets the method this expectation is for. - - - - - Gets the originalInvocation for this expectation - - The originalInvocation. - - - - Gets or sets what special condtions there are for this method - - - - - Range of expected calls - - - - - Number of call actually made for this method - - - - - If this expectation is still waiting for calls. - - - - - Gets a value indicating whether this expectation was satisfied - - - - - The return value for a method matching this expectation - - - - - An action to execute when the method is matched. - - - - - Gets or sets the exception to throw on a method matching this expectation. - - - - - Gets a value indicating whether this instance's action is staisfied. - A staisfied instance means that there are no more requirements from - this method. A method with non void return value must register either - a return value or an exception to throw or an action to execute. - - - - - Documentation message - - - - - Occurs when the exceptation is match on a method call - - - - - Allow to set the return value in the future, if it was already set. - - - - - Gets the error message. - - - - - - Expectation that matches any arguments for the method. - - - - - Creates a new instance. - - Invocation for this expectation - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Summary description for ArgsEqualExpectation. - - - - - Creates a new instance. - - Expected args. - The invocation for this expectation - Number of method calls for this expectations - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Get the expected args. - - - - - Call a specified callback to verify the expectation - - - - - Creates a new instance. - - Expectation. - Callback. - - - - Creates a new instance. - - Invocation for this expectation - Callback. - Number of method calls for this expectations - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Expect the method's arguments to match the contraints - - - - - Creates a new instance. - - Invocation for this expectation - Constraints. - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - Constraints. - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Doesn't log anything, just makes happy noises - - - - - Log expectations - allows to see what is going on inside Rhino Mocks - - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Operation on a remoting proxy - - - It is not possible to directly communicate to a real proxy via transparent proxy. - Transparent proxy impersonates a user type and only methods of that user type are callable. - The only methods that are guaranteed to exist on any transparent proxy are methods defined - in Object: namely ToString(), GetHashCode(), and Equals()). - - These three methods are the only way to tell the real proxy to do something. - Equals() is the most suitable of all, since it accepts an arbitrary object parameter. - The RemotingProxy code is built so that if it is compared to an IRemotingProxyOperation, - transparentProxy.Equals(operation) will call operation.Process(realProxy). - This way we can retrieve a real proxy from transparent proxy and perform - arbitrary operation on it. - - - - - Generates remoting proxies and provides utility functions - - - - - Create the proxy using remoting - - - - - Check whether an object is a transparent proxy with a RemotingProxy behind it - - Object to check - true if the object is a transparent proxy with a RemotingProxy instance behind it, false otherwise - We use Equals() method to communicate with the real proxy behind the object. - See IRemotingProxyOperation for more details - - - - Retrieve a mocked object from a transparent proxy - - Transparent proxy with a RemotingProxy instance behind it - Mocked object associated with the proxy - We use Equals() method to communicate with the real proxy behind the object. - See IRemotingProxyOperation for more details - - - - Implementation of IInvocation based on remoting proxy - - Some methods are marked NotSupported since they either don't make sense - for remoting proxies, or they are never called by Rhino Mocks - - - - Rudimetry implementation that simply logs methods calls as text. - - - - - Initializes a new instance of the class. - - The writer. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Behave like a stub, all properties and events acts normally, methods calls - return default values by default (but can use expectations to set them up), etc. - - - - - Records all the expectations for a mock - - - - - Different actions on this mock - - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - This method is called to indicate that a property behavior call. - This is done so we generate good error message in the common case of people using - Stubbed properties with Return(). - - - - - Gets the matching verify state for this state - - - - - Get the options for the last method call - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - This method is called to indicate that a property behavior call. - This is done so we generate good error message in the common case of people using - Stubbed properties with Return(). - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Verify that this mock expectations have passed. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Asserts the previous method is closed (had an expectation set on it so we can replay it correctly) - - - - - Get the default call count range expectation - - - - - - Gets the last expectation. - - - - - Gets the total method calls count. - - - - - Get the options for the last method call - - - - - Gets the matching verify state for this state - - - - - Initializes a new instance of the class. - - The proxy that generates the method calls - Repository. - - - - We don't care much about expectations here, so we will remove the expectation if - it is not closed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - - Get the default call count range expectation - - - - - - Validate expectations on recorded methods, but in general completely ignoring them. - Similar to except that it would return a - when BackToRecord is called. - - - - - Validate all expectations on a mock - - - - - The repository for this state - - - - - The proxy object for this state - - - - - Get the options for the last method call - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Add a method call for this state' mock. - This allows derived method to cleanly get a the setupresult behavior while adding - their own. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - not relevant - - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Gets the matching verify state for this state - - - - - Initializes a new instance of the class. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that matches the original mock state of the object. - - - - - Write rhino mocks log info to the trace - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true [log recorded]. - if set to true [log replayed]. - if set to true [log unexpected]. - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Writes log information as stack traces about rhino mocks activity - - - - - Allows to redirect output to a different location. - - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Marker interface used to indicate that this is a partial mock. - - - - - Options for CallOriginalMethod - - - - - No expectation is created, the method will be called directly - - - - - Normal expectation is created, but when the method is later called, it will also call the original method - - - - - This is a data structure that is used by - to pass - the current method to the relevant delegate - - - - - Initializes a new instance of the class. - - The invocation. - - - - Gets the args for this method invocation - - - - - Get the method that was caused this invocation - - - - - Gets or sets the return value for this method invocation - - The return value. - - - - Adds optional new usage: - using(mockRepository.Record()) { - Expect.Call(mock.Method()).Return(retVal); - } - using(mockRepository.Playback()) { - // Execute code - } - N.B. mockRepository.ReplayAll() and mockRepository.VerifyAll() - calls are taken care of by Record/Playback - - - Creates proxied instances of types. - - - - Generates a stub without needing a - Arguments for 's constructor - The of stub to create. - The stub - - - - Generates a stub without needing a - The of stub. - Arguments for the 's constructor. - The stub - - - - Generate a mock object without needing a - type of mock object to create. - Arguments for 's constructor - the mock object - - - - Generate a multi-mock object without needing a - The typeof object to generate a mock for. - A second interface to generate a multi-mock for. - Arguments for 's constructor - the multi-mock object - - - - Generate a multi-mock object without without needing a - The typeof object to generate a mock for. - An interface to generate a multi-mock for. - A second interface to generate a multi-mock for. - Arguments for 's constructor - the multi-mock object - - - - Creates a multi-mock without without needing a - The type of mock to create, this can be a class - Any extra interfaces to add to the multi-mock, these can only be interfaces. - Arguments for 's constructor - the multi-mock object - - - - Creates a strict mock without without needing a - Any arguments required for the 's constructor - The type of mock object to create. - The mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - Any arguments required for the 's constructor - The type of mock object to create, this can be a class. - An interface to generate a multi-mock for, this must be an interface! - The multi-mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - Any arguments required for the 's constructor - The type of mock object to create, this can be a class. - An interface to generate a multi-mock for, this must be an interface! - A second interface to generate a multi-mock for, this must be an interface! - The multi-mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - The type of mock object to create, this can be a class - Any extra interfaces to generate a multi-mock for, these must be interaces! - Any arguments for the 's constructor - The strict multi-mock object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generate a mock object with dynamic replay semantics and remoting without needing the mock repository - - - - - Generate a mock object with strict replay semantics and remoting without needing the mock repository - - - - Helper method to create a mock object without a repository instance and put the object back into replay mode. - The type of mock object to create - A delegate that uses a mock repository instance to create the underlying mock - The mock object in the replay mode. - - - - - - - - - - - - - - This is a map of types to ProxyGenerators. - - - - - This is used to record the last repository that has a method called on it. - - - - - this is used to get to the last proxy on this repository. - - - - - For mock delegates, maps the proxy instance from intercepted invocations - back to the delegate that was originally returned to client code, if any. - - - - - All the proxies in the mock repositories - - - - - This is here because we can't put it in any of the recorders, since repeatable methods - have no orderring, and if we try to handle them using the usual manner, we would get into - wierd situations where repeatable method that was defined in an orderring block doesn't - exists until we enter this block. - - - - - Creates a new instance. - - - - - Move the repository to ordered mode - - - - - Move the repository to un-ordered mode - - - - - Creates a mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a strict mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a remoting mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a strict remoting mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a remoting mock for the specified type. - - - Arguments for the class' constructor, if mocking a concrete class - - - - - Creates a strict remoting mock for the specified type. - - - Arguments for the class' constructor, if mocking a concrete class - - - - - Creates a mock from several types, with strict semantics. - Only may be a class. - - - - - Creates a strict mock from several types, with strict semantics. - Only may be a class. - - - - - Creates a mock from several types, with strict semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - - Creates a strict mock from several types, with strict semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - - Creates a mock from several types, with dynamic semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - - - - Creates a mock from several types, with dynamic semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - Creates a dynamic mock for the specified type. - Type. - Arguments for the class' constructor, if mocking a concrete class - - - Creates a dynamic mock for the specified type. - Type. - Arguments for the class' constructor, if mocking a concrete class - - - Creates a dynamic mock for the specified type. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock object that defaults to calling the class methods if no expectation is set on the method. - Type. - Arguments for the class' constructor. - - - Creates a mock object that defaults to calling the class methods. - Type. - Extra interface types to mock. - - - Creates a mock object that defaults to calling the class methods. - Type. - Extra interface types to mock. - Arguments for the class' constructor. - - - Creates a mock object using remoting proxies - Type to mock - must be MarshalByRefObject - Mock object - Proxy mock can mock non-virtual methods, but not static methods - Creates the mock state for this proxy - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - This method *cannot* be called from inside an ordering. - the object to move to replay state - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - the object to move to replay state - - - - Move the mocked object back to record state.You can (and it's recommended) to run {Verify()} before you use this method. - Will delete all current expectations! - - - - Move the mocked object back to record state. - Optionally, can delete all current expectations, but allows more granularity about how - it would behave with regard to the object state. - - - - - Verify that all the expectations for this object were fulfilled. - - the object to verify the expectations for - - - - Get the method options for the last call on - mockedInstance. - - The mock object - Method options for the last call - - - - Maps an invocation proxy back to the mock object instance that was originally - returned to client code which might have been a delegate to this proxy. - - The mock object proxy from the intercepted invocation - The mock object - - - This is provided to allow advance extention functionality, where Rhino Mocks standard functionality is not enough. - The type to mock - Delegate that create the first state of the mocked object (usualy the record state). - Additional types to be implemented, this can be only interfaces - optional arguments for the constructor - - - - - Method: GetMockedObject - Get an IProxy from a mocked object instance, or throws if the - object is not a mock object. - - - - - Method: GetMockedObjectOrNull - Get an IProxy from a mocked object instance, or null if the - object is not a mock object. - - - - Pops the recorder. - - - Pushes the recorder. - New recorder. - - - - All the mock objects in this repository will be moved - to record state. - - - - - All the mock objects in this repository will be moved - to record state. - - - - - Replay all the mocks from this repository - - - - - Verify all the mocks from this repository - - - - - Gets the proxy generator for a specific type. Having a single ProxyGenerator - with multiple types linearly degrades the performance so this implementation - keeps one ProxyGenerator per type. - - - - Set the exception to be thrown when verified is called. - - - - Creates a mock for the spesified type with strict mocking semantics. - Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock for the spesified type with strict mocking semantics. - Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a dynamic mock for the specified type. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock object from several types. - - - - - Creates a strict mock object from several types. - - - - - Create a mock object from several types with dynamic semantics. - - - - - Create a mock object from several types with partial semantics. - - - - - Create a mock object from several types with strict semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a strict mock object from several types with strict semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object from several types with dynamic semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object from several types with partial semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object with from a class that defaults to calling the class methods - - Arguments for the class' constructor, if mocking a concrete class - - - - Create a stub object, one that has properties and events ready for use, and - can have methods called on it. It requires an explicit step in order to create - an expectation for a stub. - - The arguments for constructor. - - - - Create a stub object, one that has properties and events ready for use, and - can have methods called on it. It requires an explicit step in order to create - an expectation for a stub. - - The type. - The arguments for constructor. - The stub - - - - Returns true if the passed mock is currently in replay mode. - - The mock to test. - True if the mock is in replay mode, false otherwise. - - - - Determines whether the specified proxy is a stub. - - The proxy. - - - - Register a call on a prperty behavior - - - - - - Gets the recorder. - - - - - - Gets the replayer for this repository. - - - - - - Gets the last proxy which had a method call. - - - - - Delegate: CreateMockState - This is used internally to cleanly handle the creation of different - RecordMockStates. - - - - - A set of extension methods that adds Arrange Act Assert mode to Rhino Mocks - - - - - Create an expectation on this mock for this action to occur - - - The mock. - The action. - - - - - Reset all expectations on this mock object - - - The mock. - - - - Reset the selected expectation on this mock object - - - The mock. - The options to reset the expectations on this mock. - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - the mocked object to move to replay state - - - - Gets the mock repository for this specificied mock object - - - The mock. - - - - - Create an expectation on this mock for this action to occur - - - - The mock. - The action. - - - - - Tell the mock object to perform a certain action when a matching - method is called. - Does not create an expectation for this method. - - - The mock. - The action. - - - - - Tell the mock object to perform a certain action when a matching - method is called. - Does not create an expectation for this method. - - - - The mock. - The action. - - - - - Gets the arguments for calls made on this mock object and the method that was called - in the action. - - - The mock. - The action. - - - Here we will get all the arguments for all the calls made to DoSomething(int) - - var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) - - - - - - Gets the arguments for calls made on this mock object and the method that was called - in the action and matches the given constraints - - - The mock. - The action. - The setup constraints. - - - Here we will get all the arguments for all the calls made to DoSomething(int) - - var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) - - - - - - Asserts that a particular method was called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was NOT called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - The setup constraints. - - - - Finds the approprite implementation type of this item. - This is the class or an interface outside of the rhino mocks. - - The mocked obj. - - - - - Verifies all expectations on this mock object - - The mock object. - - - - Gets the event raiser for the event that was called in the action passed - - The type of the event source. - The mock object. - The event subscription. - - - - - Raise the specified event using the passed arguments. - The even is extracted from the passed labmda - - The type of the event source. - The mock object. - The event subscription. - The sender. - The instance containing the event data. - - - - Raise the specified event using the passed arguments. - The even is extracted from the passed labmda - - The type of the event source. - The mock object. - The event subscription. - The args. - - - TODO: Make this better! It currently breaks down when mocking classes or - ABC's that call other virtual methods which are getting intercepted too. I wish - we could just walk Expression{Action{Action{T}} to assert only a single - method is being made. - - The workaround is to not call foo.AssertWasCalled .. rather foo.VerifyAllExpectations() - The type of mock object - The mock repository - The actual mock object to assert expectations on. - - - - Fake type that disallow creating it. - Should have been System.Type, but we can't use it. - - - - - Utility class for dealing with messing generics scenarios. - - - - - There are issues with trying to get this to work correctly with open generic types, since this is an edge case, - I am letting the runtime handle it. - - - - - Gets the real type, including de-constructing and constructing the type of generic - methods parameters. - - The type. - The invocation. - - - - - Because we need to support complex types here (simple generics were handled above) we - need to be aware of the following scenarios: - List[T] and List[Foo[T]] - - - - - ExpectationsList - - - - - Dictionary - - - - - Dictionary class - - - - - Create a new instance of ProxyStateDictionary - - - - - Allows to call a method and immediately get it's options. - - - - - Interface to allow calling a method and immediately get it's options. - - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - Creates a new instance. - - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - Allows to call a method and immediately get it's options. - Set the expected number for the call to Any() - - - - - Creates a new instance. - - Proxy. - Mocked instance. - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - This class is reponsible for taking a delegate and creating a wrapper - interface around it, so it can be mocked. - - - - - The scope for all the delegate interfaces create by this mock repository. - - - - - Gets a type with an "Invoke" method suitable for use as a target of the - specified delegate type. - - - - - - - Raise events for all subscribers for an event - - - - - Raise events for all subscribers for an event - - - - - Raise the event - - - - - The most common form for the event handler signature - - - - - Create an event raiser for the specified event on this instance. - - - - - Creates a new instance of EventRaiser - - - - - Raise the event - - - - - The most common signature for events - Here to allow intellisense to make better guesses about how - it should suggest parameters. - - - - - Allows to define what would happen when a method - is called. - - - - - Allows to define what would happen when a method - is called. - - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Allow to override this return value in the future - - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched - and allow to optionally modify the invocation as needed - - - - - Call the original method on the class, bypassing the mocking layers. - - - - - - Call the original method on the class, optionally bypassing the mocking layers. - - - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Expect last (property) call as property setting, ignore the argument given - - - - - - Expect last (property) call as property setting with a given argument. - - - - - - - Get an event raiser for the last subscribed event. - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Documentation message for the expectation - - Message - - - - Better syntax to define repeats. - - - - - Allows to specify the number of time for method calls - - - - - Repeat the method twice. - - - - - Repeat the method once. - - - - - Repeat the method at least once, then repeat as many time as it would like. - - - - - Repeat the method any number of times. - This has special affects in that this method would now ignore orderring. - - - - - Set the range to repeat an action. - - Min. - Max. - - - - Set the amount of times to repeat an action. - - - - - This method must not appear in the replay state. - This has special affects in that this method would now ignore orderring. - - - - - Creates a new instance. - - the repository for this expectation - the recorder for this proxy - the proxy for this expectation - Expectation. - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Set the return value for the method, but allow to override this return value in the future - - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Call the original method on the class, bypassing the mocking layers. - - - - - - Call the original method on the class, optionally bypassing the mocking layers - - - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Expect last (property) call as property setting, ignore the argument given - - - - - - Expect last (property) call as property setting with a given argument. - - - - - - - Gets the event raiser for the last event - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Repeat the method twice. - - - - - Repeat the method once. - - - - - Repeat the method at least once, then repeat as many time as it would like. - - - - - This method must not appear in the replay state. - - - - - Documentation message for the expectation - - Message - - - - Repeat the method any number of times. - - - - - Set the range to repeat an action. - - Min. - Max. - - - - Set the amount of times to repeat an action. - - - - - Better syntax to define repeats. - - - - - This class will provide hash code for hashtables without needing - to call the GetHashCode() on the object, which may very well be mocked. - This class has no state so it is a singelton to avoid creating a lot of objects - that does the exact same thing. See flyweight patterns. - - - - - Get the hash code for a proxy object without calling GetHashCode() - on the object. - - - - - Compares two instances of mocked objects - - - - - Compare two mocked objects - - - - - The next hash code value for a mock object. - This is safe for multi threading. - - - - - The sole instance of - - - - - This is a dummy type that is used merely to give DynamicProxy the proxy instance that - it needs to create IProxy's types. - - - - - Interface to find the repository of a mocked object - - - - - Return true if it should call the original method on the object - instead of pass it to the message chain. - - The method to call - - - - Register a method to be called on the object directly - - - - - Register a property on the object that will behave as a simple property - - - - - Check if the method was registered as a property method. - - - - - Do get/set on the property, according to need. - - - - - Do add/remove on the event - - - - - Get the subscribers of a spesific event - - - - - Gets the declaring type of the method, taking into acccount the possible generic - parameters that it was created with. - - - - - Clears the state of the object, remove original calls, property behavior, subscribed events, etc. - - - - - Get all the method calls arguments that were made against this object with the specificed - method. - - - Only method calls in replay mode are counted - - - - - Records the method call - - - - - Mocks that are tied to this mock lifestyle - - - - - The unique hash code of this mock, which is not related - to the value of the GetHashCode() call on the object. - - - - - Gets the repository. - - - - - Gets the implemented types by this mocked object - - The implemented. - - - - Gets or sets the constructor arguments. - - The constructor arguments. - - - - The mocked instance that this is representing - - - - - Create a new instance of - - - - - Return true if it should call the original method on the object - instead of pass it to the message chain. - - The method to call - - - - Register a method to be called on the object directly - - - - - Register a property on the object that will behave as a simple property - Return true if there is already a value for the property - - - - - Check if the method was registered as a property method. - - - - - Do get/set on the property, according to need. - - - - - Do add/remove on the event - - - - - Get the subscribers of a spesific event - - - - - Gets the declaring type of the method, taking into acccount the possible generic - parameters that it was created with. - - - - - Get all the method calls arguments that were made against this object with the specificed - method. - - - - - Only method calls in replay mode are counted - - - - - Records the method call - - - - - - - Clears the state of the object, remove original calls, property behavior, subscribed events, etc. - - - - - Mocks that are tied to this mock lifestyle - - - - - The unique hash code of this proxy, which is not related - to the value of the GetHashCode() call on the object. - - - - - Gets the repository. - - - - - Gets or sets the constructor arguments. - - The constructor arguments. - - - - The mocked instance that this is representing - - - - - Gets the implemented types by this mocked object - - The implemented. - - - - Range for expected method calls - - - - - Creates a new instance. - - Min. - Max. - - - - Return the string representation of this range. - - - - - Gets or sets the min. - - - - - - Gets or sets the max. - - - - - - Records all the expectations for a mock and - return a ReplayDynamicMockState when Replay() - is called. - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Get the default call count range expectation - - - - - - Gets a mock state that match the original mock state of the object. - - - - - Records all the expectations for a mock and - return a ReplayPartialMockState when Replay() - is called. - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that matches the original mock state of the object. - - - - - Options for special repeat option - - - - - This method can be called only as many times as the IMethodOptions.Expect allows. - - - - - This method should never be called - - - - - This method can be call any number of times - - - - - This method will call the original method - - - - - This method will call the original method, bypassing the mocking layer - - - - - This method will simulate simple property behavior - - - - - Validate all expectations on a mock and ignores calls to - any method that was not setup properly. - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that match the original mock state of the object. - - - - - Validate all expectations on a mock and ignores calls to - any method that was not setup properly. - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that match the original mock state of the object. - - - - - Summary description for RhinoInterceptor. - - - - - Creates a new instance. - - - - - Intercept a method call and direct it to the repository. - - - - - Validate arguments for methods - - - - - Validate that the passed argument is not null. - - The object to validate - The name of the argument - - If the obj is null, an ArgumentNullException with the passed name - is thrown. - - - - - Validate that the arguments are equal. - - Expected args. - Actual Args. - - - - Validate that the two arguments are equals, including validation for - when the arguments are collections, in which case it will validate their values. - - - - - This method is safe for use even if any of the objects is a mocked object - that override equals. - - - - - Throw an object already verified when accessed - - - - - Create a new instance of VerifiedMockState - - The previous mock state, used to get the initial record state - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - not relevant - - - - - Gets the matching verify state for this state - - - - - Get the options for the last method call - - - - - Records the actions on all the mocks created by a repository. - - - - - Records the specified call with the specified args on the mocked object. - - - - - Get the expectation for this method on this object with this arguments - - - - - This check the methods that were setup using the SetupResult.For() - or LastCall.Repeat.Any() and that bypass the whole expectation model. - - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Removes all the repeatable expectations for proxy. - - Mocked object. - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Adds the recorder and turn it into the active recorder. - - Recorder. - - - - Moves to previous recorder. - - - - - Gets the recorded expectation or null. - - - - - Gets the next expected calls string. - - - - - Moves to parent recorder. - - - - - Set the expectation so it can repeat any number of times. - - - - - Removes the expectation from the recorder - - - - - Clear the replayer to call (and all its chain of replayers) - This also removes it from the list of expectations, so it will never be considered again - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Allows to set various options for the last method call on - a specified object. - If the method has a return value, it's recommended to use Expect - - - - - Allows to get an interface to work on the last call. - - The mocked object - Interface that allows to set options for the last method call on this object - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Set the return value for the method. This overload is needed for LastCall.Return(null) - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Call the original method on the class, bypassing the mocking layers, for the last call. - - - - - Call the original method on the class, optionally bypassing the mocking layers, for the last call. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Gets an interface that will raise the last event when called. - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Documentation message for the expectation - - Message - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Better syntax to define repeats. - - - - - Base class for method recorders, handle delegating to inner recorder if needed. - - - - - List of the expected actions on for this recorder - The legal values are: - * Expectations - * Method Recorders - - - - - The current recorder. - - - - - The current replayer; - - - - - The parent recorder of this one, may be null. - - - - - This contains a list of all the replayers that should be ignored - for a spesific method call. A replayer gets into this list by calling - ClearReplayerToCall() on its parent. This list is Clear()ed on each new invocation. - - - - - All the repeatable methods calls. - - - - - Counts the recursion depth of the current expectation search stack - - - - - Creates a new instance. - - - - - Creates a new instance. - - Parent recorder. - Repeatable methods - - - - Records the specified call with the specified args on the mocked object. - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Remove the all repeatable expectations for proxy. - - Mocked object. - - - - Set the expectation so it can repeat any number of times. - - - - - Removes the expectation from the recorder - - - - - Adds the recorder and turn it into the active recorder. - - Recorder. - - - - Moves to previous recorder. - - - - - Moves to parent recorder. - - - - - Gets the recorded expectation or null. - - - - - Clear the replayer to call (and all its chain of replayers). - This also removes it from the list of expectations, so it will never be considered again - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the next expected calls string. - - - - - Handles the real getting of the recorded expectation or null. - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Should this replayer be considered valid for this call? - - - - - This check the methods that were setup using the SetupResult.For() - or LastCall.Repeat.Any() and that bypass the whole expectation model. - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Handle the real execution of this method for the derived class - - - - - Ordered collection of methods, methods must arrive in specified order - in order to pass. - - - - - Unordered collection of method records, any expectation that exist - will be matched. - - - - - The parent recorder we have redirected to. - Useful for certain edge cases in orderring. - See: FieldProblem_Entropy for the details. - - - - - Creates a new instance. - - Parent recorder. - Repeatable methods - - - - Creates a new instance. - - - - - Records the specified call with the specified args on the mocked object. - - Mocked object. - Method. - Expectation. - - - - Get the expectation for this method on this object with this arguments - - Invocation for this method - Mocked object. - Method. - Args. - True is the call was recorded, false otherwise - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Handle the real execution of this method for the derived class - - - - - Handles the real getting of the recorded expectation or null. - - - - - Handle the real execution of this method for the derived class - - - - - Gets the next expected calls string. - - - - - Create an exception for an unexpected method call. - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Creates a new instance. - - Parent recorder. - Repetable methods - - - - Creates a new instance. - - - - - Handles the real getting of the recorded expectation or null. - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the next expected calls string. - - - - - Hold an expectation for a method call on an object - - - - - Creates a new instance. - - Proxy. - Method. - Expectation. - - - - Determines if the object equal to this instance - - Obj. - - - - - Gets the hash code. - - - - - - Gets the proxy. - - - - - - Gets the method. - - - - - - Gets the expectation. - - - - - - Holds a pair of mocked object and a method - and allows to compare them against each other. - This allows us to have a distinction between mockOne.MyMethod() and - mockTwo.MyMethod()... - - - - - Creates a new instance. - - Proxy. - Method. - - - - Determines whatever obj equals to this instance. - ProxyMethodPairs are equal when they point to the same /instance/ of - an object, and to the same method. - - Obj. - - - - - Gets the hash code. - - - - - - Gets the proxy. - - - - - - Gets the method. - - - - - - Change the recorder from ordered to unordered and vice versa - - - - - Creates a new instance. - - - - - Disposes this instance. - - - - - Accessor for the current mocker - - - - - The current mocker - - - - - Used for [assembly: InternalsVisibleTo(RhinoMocks.StrongName)] - Used for [assembly: InternalsVisibleTo(RhinoMocks.NormalName)] - - - - - Strong name for the Dynamic Proxy assemblies. Used for InternalsVisibleTo specification. - - - - - Normal name for dynamic proxy assemblies. Used for InternalsVisibleTo specification. - - - - - Logs all method calls for methods - - - - - Setup method calls to repeat any number of times. - - - - - Get the method options and set the last method call to repeat - any number of times. - This also means that the method would transcend ordering - - - - - Get the method options for the last method call on the mockInstance and set it - to repeat any number of times. - This also means that the method would transcend ordering - - - - - Utility class for working with method calls. - - - - - Return the string representation of a method call and its arguments. - - The method - The method arguments - Invocation of the method, used to get the generics arguments - Delegate to format the parameter - The string representation of this method call - - - - Return the string representation of a method call and its arguments. - - The invocation of the method, used to get the generic parameters - The method - The method arguments - The string representation of this method call - - - - Delegate to format the argument for the string representation of - the method call. - - - - - Utility to get the default value for a type - - - - - The default value for a type. - Null for reference types and void - 0 for value types. - First element for enums - Note that we need to get the value even for opened generic types, such as those from - generic methods. - - Type. - The invocation. - the default value - - - - Allows easier access to MockRepository, works closely with Mocker.Current to - allow access to a context where the mock repository is automatially verified at - the end of the code block. - - - - - Initialize a code block where Mocker.Current is initialized. - At the end of the code block, all the expectation will be verified. - This overload will create a new MockRepository. - - The code that will be executed under the mock context - - - - Initialize a code block where Mocker.Current is initialized. - At the end of the code block, all the expectation will be verified. - This overload will create a new MockRepository. - - The mock repository to use, at the end of the code block, VerifyAll() will be called on the repository. - The code that will be executed under the mock context - - - - Create a FluentMocker - - The mock repository to use. - - - - A method with no arguments and no return value that will be called under the mock context. - - - - - FluentMocker implements some kind of fluent interface attempt - for saying "With the Mocks [mocks], Expecting (in same order) [things] verify [that]." - - - - - Interface to verify previously defined expectations - - - - - Verifies if a piece of code - - - - - Defines unordered expectations - - A delegate describing the expectations - an IMockVerifier - - - - Defines ordered expectations - - A delegate describing the expectations - an IMockVerifier - - - - Verifies previously defined expectations - - - - - This delegate is compatible with the System.Func{T,R} signature - We have to define our own to get compatability with 2.0 - - - - - This attribute is here so we can get better Pex integration - Using this means that Pex will not try to inspect the work of - the actual proxies being generated by Rhino Mocks - - - - diff --git a/Tools/nunit/lib/Skipped.png b/Tools/nunit/lib/Skipped.png deleted file mode 100644 index 7c9fc64e387..00000000000 Binary files a/Tools/nunit/lib/Skipped.png and /dev/null differ diff --git a/Tools/nunit/lib/Success.png b/Tools/nunit/lib/Success.png deleted file mode 100644 index 2a301508c65..00000000000 Binary files a/Tools/nunit/lib/Success.png and /dev/null differ diff --git a/Tools/nunit/lib/fit.dll b/Tools/nunit/lib/fit.dll deleted file mode 100644 index 40bbef0e292..00000000000 Binary files a/Tools/nunit/lib/fit.dll and /dev/null differ diff --git a/Tools/nunit/lib/log4net.dll b/Tools/nunit/lib/log4net.dll deleted file mode 100644 index 20a2e1c47de..00000000000 Binary files a/Tools/nunit/lib/log4net.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit-console-runner.dll b/Tools/nunit/lib/nunit-console-runner.dll deleted file mode 100644 index e637d6523b6..00000000000 Binary files a/Tools/nunit/lib/nunit-console-runner.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit-gui-runner.dll b/Tools/nunit/lib/nunit-gui-runner.dll deleted file mode 100644 index 820069dc050..00000000000 Binary files a/Tools/nunit/lib/nunit-gui-runner.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.core.dll b/Tools/nunit/lib/nunit.core.dll deleted file mode 100644 index 1c57782550d..00000000000 Binary files a/Tools/nunit/lib/nunit.core.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.core.interfaces.dll b/Tools/nunit/lib/nunit.core.interfaces.dll deleted file mode 100644 index 941d4931d98..00000000000 Binary files a/Tools/nunit/lib/nunit.core.interfaces.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.fixtures.dll b/Tools/nunit/lib/nunit.fixtures.dll deleted file mode 100644 index 47c746ef36c..00000000000 Binary files a/Tools/nunit/lib/nunit.fixtures.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.uiexception.dll b/Tools/nunit/lib/nunit.uiexception.dll deleted file mode 100644 index f5f712b1582..00000000000 Binary files a/Tools/nunit/lib/nunit.uiexception.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.uikit.dll b/Tools/nunit/lib/nunit.uikit.dll deleted file mode 100644 index 398d052f1b1..00000000000 Binary files a/Tools/nunit/lib/nunit.uikit.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.util.dll b/Tools/nunit/lib/nunit.util.dll deleted file mode 100644 index c837e9ecf06..00000000000 Binary files a/Tools/nunit/lib/nunit.util.dll and /dev/null differ diff --git a/Tools/nunit/nunit-agent-x86.exe b/Tools/nunit/nunit-agent-x86.exe index 8800632f9f6..73f6261d978 100644 Binary files a/Tools/nunit/nunit-agent-x86.exe and b/Tools/nunit/nunit-agent-x86.exe differ diff --git a/Tools/nunit/nunit-agent-x86.exe.config b/Tools/nunit/nunit-agent-x86.exe.config index de2caf60fde..f2b6c6192d7 100644 --- a/Tools/nunit/nunit-agent-x86.exe.config +++ b/Tools/nunit/nunit-agent-x86.exe.config @@ -1,12 +1,10 @@ - - - - - - \ No newline at end of file + diff --git a/Tools/nunit/nunit-agent.exe b/Tools/nunit/nunit-agent.exe index 4cb626fa810..269b26abf5c 100644 Binary files a/Tools/nunit/nunit-agent.exe and b/Tools/nunit/nunit-agent.exe differ diff --git a/Tools/nunit/nunit-agent.exe.config b/Tools/nunit/nunit-agent.exe.config index de2caf60fde..f2b6c6192d7 100644 --- a/Tools/nunit/nunit-agent.exe.config +++ b/Tools/nunit/nunit-agent.exe.config @@ -1,12 +1,10 @@ - - - - - - \ No newline at end of file + diff --git a/Tools/nunit/nunit-console-x86.exe b/Tools/nunit/nunit-console-x86.exe deleted file mode 100644 index 0f9a832d3be..00000000000 Binary files a/Tools/nunit/nunit-console-x86.exe and /dev/null differ diff --git a/Tools/nunit/nunit-console-x86.exe.config b/Tools/nunit/nunit-console-x86.exe.config deleted file mode 100644 index 8a6a2a6a669..00000000000 --- a/Tools/nunit/nunit-console-x86.exe.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit-console.exe b/Tools/nunit/nunit-console.exe deleted file mode 100644 index db1700badd1..00000000000 Binary files a/Tools/nunit/nunit-console.exe and /dev/null differ diff --git a/Tools/nunit/nunit-console.exe.config b/Tools/nunit/nunit-console.exe.config deleted file mode 100644 index 8a6a2a6a669..00000000000 --- a/Tools/nunit/nunit-console.exe.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit-editor.exe b/Tools/nunit/nunit-editor.exe deleted file mode 100644 index 9c16269c1a7..00000000000 Binary files a/Tools/nunit/nunit-editor.exe and /dev/null differ diff --git a/Tools/nunit/nunit-x86.exe b/Tools/nunit/nunit-x86.exe deleted file mode 100644 index dd6483721db..00000000000 Binary files a/Tools/nunit/nunit-x86.exe and /dev/null differ diff --git a/Tools/nunit/nunit-x86.exe.config b/Tools/nunit/nunit-x86.exe.config deleted file mode 100644 index c501464f07e..00000000000 --- a/Tools/nunit/nunit-x86.exe.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit.engine.addins b/Tools/nunit/nunit.engine.addins new file mode 100644 index 00000000000..be4c6fa291d --- /dev/null +++ b/Tools/nunit/nunit.engine.addins @@ -0,0 +1,5 @@ +addins/nunit.v2.driver.dll +addins/nunit-v2-result-writer.dll +addins/nunit-project-loader.dll +addins/vs-project-loader.dll +addins/teamcity-event-listener.dll diff --git a/Tools/nunit/nunit.engine.api.dll b/Tools/nunit/nunit.engine.api.dll new file mode 100644 index 00000000000..6a1a45a36a2 Binary files /dev/null and b/Tools/nunit/nunit.engine.api.dll differ diff --git a/Tools/nunit/nunit.engine.api.xml b/Tools/nunit/nunit.engine.api.xml new file mode 100644 index 00000000000..56a20210794 --- /dev/null +++ b/Tools/nunit/nunit.engine.api.xml @@ -0,0 +1,1119 @@ + + + + nunit.engine.api + + + + + TypeExtensionPointAttribute is used to bind an extension point + to a class or interface. + + + + + Construct a TypeExtensionPointAttribute, specifying the path. + + A unique string identifying the extension point. + + + + Construct an TypeExtensionPointAttribute, without specifying the path. + The extension point will use a path constructed based on the interface + or class to which the attribute is applied. + + + + + The unique string identifying this ExtensionPoint. This identifier + is typically formatted as a path using '/' and the set of extension + points is sometimes viewed as forming a tree. + + + + + An optional description of the purpose of the ExtensionPoint + + + + + The ExtensionPropertyAttribute is used to specify named properties for an extension. + + + + + Construct an ExtensionPropertyAttribute + + The name of the property + The property value + + + + The name of the property. + + + + + The property value + + + + + The ExtensionAttribute is used to identify a class that is intended + to serve as an extension. + + + + + Initializes a new instance of the class. + + + + + A unique string identifying the ExtensionPoint for which this Extension is + intended. This is an optional field provided NUnit is able to deduce the + ExtensionPoint from the Type of the extension class. + + + + + An optional description of what the extension does. + + + + + Flag indicating whether the extension is enabled. + + true if enabled; otherwise, false. + + + + The minimum Engine version for which this extension is designed + + + + + ExtensionPointAttribute is used at the assembly level to identify and + document any ExtensionPoints supported by the assembly. + + + + + Construct an ExtensionPointAttribute + + A unique string identifying the extension point. + The required Type of any extension that is installed at this extension point. + + + + The unique string identifying this ExtensionPoint. This identifier + is typically formatted as a path using '/' and the set of extension + points is sometimes viewed as forming a tree. + + + + + The required Type (usually an interface) of any extension that is + installed at this ExtensionPoint. + + + + + An optional description of the purpose of the ExtensionPoint + + + + + Interface implemented by a Type that knows how to create a driver for a test assembly. + + + + + Gets a flag indicating whether a given AssemblyName + represents a test framework supported by this factory. + + An AssemblyName referring to the possible test framework. + + + + Gets a driver for a given test assembly and a framework + which the assembly is already known to reference. + + The domain in which the assembly will be loaded + An AssemblyName referring to the test framework. + + + + + Interface for the various project types that the engine can load. + + + + + Gets the path to the file storing this project, if any. + If the project has not been saved, this is null. + + + + + Gets the active configuration, as defined + by the particular project. + + + + + Gets a list of the configs for this project + + + + + Gets a test package for the primary or active + configuration within the project. The package + includes all the assemblies and any settings + specified in the project format. + + A TestPackage + + + + Gets a TestPackage for a specific configuration + within the project. The package includes all the + assemblies and any settings specified in the + project format. + + The name of the config to use + A TestPackage for the named configuration. + + + + The IProjectLoader interface is implemented by any class + that knows how to load projects in a specific format. + + + + + Returns true if the file indicated is one that this + loader knows how to load. + + The path of the project file + True if the loader knows how to load this file, otherwise false + + + + Loads a project of a known format. + + The path of the project file + An IProject interface to the loaded project or null if the project cannot be loaded + + + + Common interface for objects that process and write out test results + + + + + Checks if the output path is writable. If the output is not + writable, this method should throw an exception. + + + + + + Writes result to the specified output path. + + XmlNode for the result + Path to which it should be written + + + + Writes result to a TextWriter. + + XmlNode for the result + TextWriter to which it should be written + + + + The IFrameworkDriver interface is implemented by a class that + is able to use an external framework to explore or run tests + under the engine. + + + + + Gets and sets the unique identifier for this driver, + used to ensure that test ids are unique across drivers. + + + + + Loads the tests in an assembly. + + An Xml string representing the loaded test + + + + Count the test cases that would be executed. + + An XML string representing the TestFilter to use in counting the tests + The number of test cases counted + + + + Executes the tests in an assembly. + + An ITestEventHandler that receives progress notices + A XML string representing the filter that controls which tests are executed + An Xml string representing the result + + + + Returns information about the tests in an assembly. + + An XML string representing the filter that controls which tests are included + An Xml string representing the tests + + + + Cancel the ongoing test run. If no test is running, the call is ignored. + + If true, cancel any ongoing test threads, otherwise wait for them to complete. + + + + An ExtensionPoint represents a single point in the TestEngine + that may be extended by user addins and extensions. + + + + + Gets the unique path identifying this extension point. + + + + + Gets the description of this extension point. May be null. + + + + + Gets the FullName of the Type required for any extension to be installed at this extension point. + + + + + Gets an enumeration of IExtensionNodes for extensions installed on this extension point. + + + + + The IExtensionNode interface is implemented by a class that represents a + single extension being installed on a particular extension point. + + + + + Gets the full name of the Type of the extension object. + + + + + Gets a value indicating whether this is enabled. + + true if enabled; otherwise, false. + + + + Gets the unique string identifying the ExtensionPoint for which + this Extension is intended. This identifier may be supplied by the attribute + marking the extension or deduced by NUnit from the Type of the extension class. + + + + + Gets an optional description of what the extension does. + + + + + Gets a collection of the names of all this extension's properties + + + + + Gets a collection of the values of a particular named property + If none are present, returns an empty enumerator. + + The property name + A collection of values + + + + Interface for logging within the engine + + + + + Logs the specified message at the error level. + + The message. + + + + Logs the specified message at the error level. + + The message. + The arguments. + + + + Logs the specified message at the warning level. + + The message. + + + + Logs the specified message at the warning level. + + The message. + The arguments. + + + + Logs the specified message at the info level. + + The message. + + + + Logs the specified message at the info level. + + The message. + The arguments. + + + + Logs the specified message at the debug level. + + The message. + + + + Logs the specified message at the debug level. + + The message. + The arguments. + + + + InternalTraceLevel is an enumeration controlling the + level of detailed presented in the internal log. + + + + + Use the default settings as specified by the user. + + + + + Do not display any trace messages + + + + + Display Error messages only + + + + + Display Warning level and higher messages + + + + + Display informational and higher messages + + + + + Display debug messages and higher - i.e. all messages + + + + + Display debug messages and higher - i.e. all messages + + + + + Interface implemented by objects representing a runtime framework. + + + + + Gets the inique Id for this runtime, such as "net-4.5" + + + + + Gets the display name of the framework, such as ".NET 4.5" + + + + + Gets the framework version: usually contains two components, Major + and Minor, which match the corresponding CLR components, but not always. + + + + + Gets the Version of the CLR for this framework + + + + + Gets a string representing the particular profile installed, + or null if there is no profile. Currently. the only defined + values are Full and Client. + + + + + Interface that returns a list of available runtime frameworks. + + + + + Gets a list of available runtime frameworks. + + + + + IResultWriterService provides result writers for a specified + well-known format. + + + + + Gets an array of the available formats + + + + + Gets a ResultWriter for a given format and set of arguments. + + The name of the format to be used + A set of arguments to be used in constructing the writer or null if non arguments are needed + An IResultWriter + + + + Implemented by a type that provides information about the + current and other available runtimes. + + + + + Returns true if the runtime framework represented by + the string passed as an argument is available. + + A string representing a framework, like 'net-4.0' + True if the framework is available, false if unavailable or nonexistent + + + + Selects a target runtime framework for a TestPackage based on + the settings in the package and the assemblies themselves. + The package RuntimeFramework setting may be updated as a + result and the selected runtime is returned. + + A TestPackage + The selected RuntimeFramework + + + + Enumeration representing the status of a service + + + + Service was never started or has been stopped + + + Started successfully + + + Service failed to start and is unavailable + + + + The IService interface is implemented by all Services. Although it + is extensible, it does not reside in the Extensibility namespace + because it is so widely used by the engine. + + + + + The ServiceContext + + + + + Gets the ServiceStatus of this service + + + + + Initialize the Service + + + + + Do any cleanup needed before terminating the service + + + + + Interface to a TestFilterBuilder, which is used to create TestFilters + + + + + Add a test to be selected + + The full name of the test, as created by NUnit + + + + Specify what is to be included by the filter using a where clause. + + A where clause that will be parsed by NUnit to create the filter. + + + + Get a TestFilter constructed according to the criteria specified by the other calls. + + A TestFilter. + + + + The TestFilterService provides builders that can create TestFilters + + + + + Get an uninitialized TestFilterBuilder + + + + + The exception that is thrown if a valid test engine is not found + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The minimum version. + + + + Interface to abstract getting loggers + + + + + Gets the logger. + + The name of the logger to get. + + + + + IServiceLocator allows clients to locate any NUnit services + for which the interface is referenced. In normal use, this + linits it to those services using interfaces defined in the + nunit.engine.api assembly. + + + + + Return a specified type of service + + + + + Return a specified type of service + + + + + Event handler for settings changes + + The sender. + The instance containing the event data. + + + + Event argument for settings changes + + + + + Initializes a new instance of the class. + + Name of the setting that has changed. + + + + Gets the name of the setting that has changed + + + + + The ISettings interface is used to access all user + settings and options. + + + + + Occurs when the settings are changed. + + + + + Load a setting from the storage. + + Name of the setting to load + Value of the setting or null + + + + Load a setting from the storage or return a default value + + Name of the setting to load + Value to return if the setting is missing + Value of the setting or the default value + + + + Remove a setting from the storage + + Name of the setting to remove + + + + Remove an entire group of settings from the storage + + Name of the group to remove + + + + Save a setting in the storage + + Name of the setting to save + Value to be saved + + + + ITestEngine represents an instance of the test engine. + Clients wanting to discover, explore or run tests start + require an instance of the engine, which is generally + acquired from the TestEngineActivator class. + + + + + Gets the IServiceLocator interface, which gives access to + certain services provided by the engine. + + + + + Gets and sets the directory path used by the engine for saving files. + Some services may ignore changes to this path made after initialization. + The default value is the current directory. + + + + + Gets and sets the InternalTraceLevel used by the engine. Changing this + setting after initialization will have no effect. The default value + is the value saved in the NUnit settings. + + + + + Initialize the engine. This includes initializing mono addins, + setting the trace level and creating the standard set of services + used in the Engine. + + This interface is not normally called by user code. Programs linking + only to the nunit.engine.api assembly are given a + pre-initialized instance of TestEngine. Programs + that link directly to nunit.engine usually do so + in order to perform custom initialization. + + + + + Returns a test runner instance for use by clients in discovering, + exploring and executing tests. + + The TestPackage for which the runner is intended. + An ITestRunner. + + + + The ITestListener interface is used to receive notices of significant + events while a test is running. It's single method accepts an Xml string, + which may represent any event generated by the test framework, the driver + or any of the runners internal to the engine. Use of Xml means that + any driver and framework may add additional events and the engine will + simply pass them on through this interface. + + + + + Handle a progress report or other event. + + An XML progress report. + + + + Interface implemented by all test runners. + + + + + Get a flag indicating whether a test is running + + + + + Load a TestPackage for possible execution + + An XmlNode representing the loaded package. + + This method is normally optional, since Explore and Run call + it automatically when necessary. The method is kept in order + to make it easier to convert older programs that use it. + + + + + Unload any loaded TestPackage. If none is loaded, + the call is ignored. + + + + + Reload the current TestPackage + + An XmlNode representing the loaded package. + + + + Count the test cases that would be run under + the specified filter. + + A TestFilter + The count of test cases + + + + Run the tests in the loaded TestPackage and return a test result. The tests + are run synchronously and the listener interface is notified as it progresses. + + The listener that is notified as the run progresses + A TestFilter used to select tests + An XmlNode giving the result of the test execution + + + + Start a run of the tests in the loaded TestPackage. The tests are run + asynchronously and the listener interface is notified as it progresses. + + The listener that is notified as the run progresses + A TestFilter used to select tests + + + + + Cancel the ongoing test run. If no test is running, the call is ignored. + + If true, cancel any ongoing test threads, otherwise wait for them to complete. + + + + Explore a loaded TestPackage and return information about the tests found. + + The TestFilter to be used in selecting tests to explore. + An XmlNode representing the tests found. + + + + NUnitEngineException is thrown when the engine has been + called with improper values or when a particular facility + is not available. + + + + + Construct with a message + + + + + Construct with a message and inner exception + + + + + + + Serialization constructor + + + + + The IRecentFiles interface is used to isolate the app + from various implementations of recent files. + + + + + The max number of files saved + + + + + Get a list of all the file entries + + The most recent file list + + + + Set the most recent file name, reordering + the saved names as needed and removing the oldest + if the max number of files would be exceeded. + The current CLR version is used to create the entry. + + + + + Remove a file from the list + + The name of the file to remove + + + + TestEngineActivator creates an instance of the test engine and returns an ITestEngine interface. + + + + + Create an instance of the test engine. + + If private copy is false, the search order is the NUnit install directory for the current user, then + the install directory for the local machine and finally the current AppDomain's ApplicationBase. + if set to true loads the engine found in the application base directory, + otherwise searches for the test engine with the highest version installed. Defaults to true. + Thrown when a test engine of the required minimum version is not found + An + + + + Create an instance of the test engine with a minimum version. + + If private copy is false, the search order is the NUnit install directory for the current user, then + the install directory for the local machine and finally the current AppDomain's ApplicationBase. + The minimum version of the engine to return inclusive. + if set to true loads the engine found in the application base directory, + otherwise searches for the test engine with the highest version installed. Defaults to true. + Thrown when a test engine of the given minimum version is not found + An + + + + Abstract base for all test filters. A filter is represented + by an XmlNode with <filter> as it's topmost element. + In the console runner, filters serve only to carry this + XML representation, as all filtering is done by the engine. + + + + + Initializes a new instance of the class. + + The XML text that specifies the filter. + + + + The empty filter - one that always passes. + + + + + Gets the XML representation of this filter as a string. + + + + + TestPackage holds information about a set of test files to + be loaded by a TestRunner. Each TestPackage represents + tests for one or more test files. TestPackages may be named + or anonymous, depending on how they are constructed. + + + + + Construct a named TestPackage, specifying a file path for + the assembly or project to be used. + + The file path. + + + + Construct an anonymous TestPackage that wraps test files. + + + + + + Every test package gets a unique ID used to prefix test IDs within that package. + + + The generated ID is only unique for packages created within the same AppDomain. + For that reason, NUnit pre-creates all test packages that will be needed. + + + + + Gets the name of the package + + + + + Gets the path to the file containing tests. It may be + an assembly or a recognized project type. + + + + + Gets the list of SubPackages contained in this package + + + + + Gets the settings dictionary for this package. + + + + + Add a subproject to the package. + + The subpackage to be added + + + + Add a setting to a package and all of its subpackages. + + The name of the setting + The value of the setting + + Once a package is created, subpackages may have been created + as well. If you add a setting directly to the Settings dictionary + of the package, the subpackages are not updated. This method is + used when the settings are intended to be reflected to all the + subpackages under the package. + + + + + Return the value of a setting or a default. + + The name of the setting + The default value + + + + + The ITestRun class represents an ongoing test run. + + + + + Get the result of the test. + + An XmlNode representing the test run result + + + + Blocks the current thread until the current test run completes + or the timeout is reached + + A that represents the number of milliseconds to wait or -1 milliseconds to wait indefinitely. + True if the run completed + + + + The IExtensionService interface allows a runner to manage extensions. + + + + + Gets an enumeration of all ExtensionPoints in the engine. + + + + + Gets an enumeration of all installed Extensions. + + + + + Get an ExtensionPoint based on it's unique identifying path. + + + + + Get an enumeration of ExtensionNodes based on their identifying path. + + + + + Enable or disable an extension + + + + + + + TestSelectionParserException is thrown when an error + is found while parsing the selection expression. + + + + + Construct with a message + + + + + Construct with a message and inner exception + + + + + + + Serialization constructor + + + + diff --git a/Tools/nunit/nunit.engine.dll b/Tools/nunit/nunit.engine.dll new file mode 100644 index 00000000000..f9eec7d40db Binary files /dev/null and b/Tools/nunit/nunit.engine.dll differ diff --git a/Tools/nunit/nunit.exe b/Tools/nunit/nunit.exe deleted file mode 100644 index b7e0ce12f91..00000000000 Binary files a/Tools/nunit/nunit.exe and /dev/null differ diff --git a/Tools/nunit/nunit.exe.config b/Tools/nunit/nunit.exe.config deleted file mode 100644 index c501464f07e..00000000000 --- a/Tools/nunit/nunit.exe.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit.framework.dll b/Tools/nunit/nunit.framework.dll deleted file mode 100644 index 215767d2fb3..00000000000 Binary files a/Tools/nunit/nunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/nunit.ico b/Tools/nunit/nunit.ico new file mode 100644 index 00000000000..7073c24875b Binary files /dev/null and b/Tools/nunit/nunit.ico differ diff --git a/Tools/nunit/nunit.nuget.addins b/Tools/nunit/nunit.nuget.addins new file mode 100644 index 00000000000..6dee52be686 --- /dev/null +++ b/Tools/nunit/nunit.nuget.addins @@ -0,0 +1,2 @@ +../../NUnit.Extension.*/**/tools/ # nuget v2 layout +../../../NUnit.Extension.*/**/tools/ # nuget v3 layout diff --git a/Tools/nunit/nunit3-console.exe b/Tools/nunit/nunit3-console.exe new file mode 100644 index 00000000000..5492955279d Binary files /dev/null and b/Tools/nunit/nunit3-console.exe differ diff --git a/Tools/nunit/nunit3-console.exe.config b/Tools/nunit/nunit3-console.exe.config new file mode 100644 index 00000000000..64c6f93a11c --- /dev/null +++ b/Tools/nunit/nunit3-console.exe.config @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Tools/nunit/pnunit-agent.exe b/Tools/nunit/pnunit-agent.exe deleted file mode 100644 index 68e87cc13f7..00000000000 Binary files a/Tools/nunit/pnunit-agent.exe and /dev/null differ diff --git a/Tools/nunit/pnunit-agent.exe.config b/Tools/nunit/pnunit-agent.exe.config deleted file mode 100644 index c1516ef4189..00000000000 --- a/Tools/nunit/pnunit-agent.exe.config +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/pnunit-launcher.exe b/Tools/nunit/pnunit-launcher.exe deleted file mode 100644 index e03271dc43e..00000000000 Binary files a/Tools/nunit/pnunit-launcher.exe and /dev/null differ diff --git a/Tools/nunit/pnunit-launcher.exe.config b/Tools/nunit/pnunit-launcher.exe.config deleted file mode 100644 index c1516ef4189..00000000000 --- a/Tools/nunit/pnunit-launcher.exe.config +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/pnunit.framework.dll b/Tools/nunit/pnunit.framework.dll deleted file mode 100644 index f8cf2790d90..00000000000 Binary files a/Tools/nunit/pnunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/pnunit.tests.dll b/Tools/nunit/pnunit.tests.dll deleted file mode 100644 index 6e577c9efc0..00000000000 Binary files a/Tools/nunit/pnunit.tests.dll and /dev/null differ diff --git a/Tools/nunit/runFile.exe b/Tools/nunit/runFile.exe deleted file mode 100644 index a7944586696..00000000000 Binary files a/Tools/nunit/runFile.exe and /dev/null differ diff --git a/Tools/nunit/runFile.exe.config b/Tools/nunit/runFile.exe.config deleted file mode 100644 index f58f099b6a2..00000000000 --- a/Tools/nunit/runFile.exe.config +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/runpnunit.bat b/Tools/nunit/runpnunit.bat deleted file mode 100644 index 43b3a69f84c..00000000000 --- a/Tools/nunit/runpnunit.bat +++ /dev/null @@ -1,3 +0,0 @@ -start pnunit-agent 8080 . -start pnunit-agent 8081 . -pnunit-launcher test.conf diff --git a/Tools/nunit/test.conf b/Tools/nunit/test.conf deleted file mode 100644 index ce825ebe30a..00000000000 --- a/Tools/nunit/test.conf +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - Testing - - - Testing - pnunit.tests.dll - TestLibraries.Testing.EqualTo19 - $agent_host:8080 - - - - - - - Parallel_Tests - - - ParallelTest_A_Test - pnunit.tests.dll - TestLibraries.ParallelExample.ParallelTest_A - $agent_host:8080 - - - 2 - - - - ParallelTest_B_Test - pnunit.tests.dll - TestLibraries.ParallelExample.ParallelTest_B - $agent_host:8080 - - 1 - - - - - - - - - Parallel_Barriers - - - Parallel_Barriers_TestA - pnunit.tests.dll - TestLibraries.ParallelExampleWithBarriers.ParallelTestWithBarriersA - $agent_host:8080 - - - - START_BARRIER - WAIT_BARRIER - - - - Parallel_Barriers_TestB - pnunit.tests.dll - TestLibraries.ParallelExampleWithBarriers.ParallelTestWithBarriersB - $agent_host:8081 - - - - START_BARRIER - WAIT_BARRIER - - - - - - - - \ No newline at end of file diff --git a/build-common/common-project.xml b/build-common/common-project.xml index d43c984138f..c5e87ace395 100644 --- a/build-common/common-project.xml +++ b/build-common/common-project.xml @@ -100,22 +100,14 @@ description="Run NUnit tests"> + + + + - + - - - + diff --git a/default.build b/default.build index a53b256ac88..e427b17685f 100644 --- a/default.build +++ b/default.build @@ -44,7 +44,7 @@ - + diff --git a/lib/net/nunit.framework.dll b/lib/net/nunit.framework.dll index 215767d2fb3..f08e57564d2 100644 Binary files a/lib/net/nunit.framework.dll and b/lib/net/nunit.framework.dll differ diff --git a/lib/net/nunit.framework.xml b/lib/net/nunit.framework.xml index 7b0e798cada..47332e24fe5 100644 --- a/lib/net/nunit.framework.xml +++ b/lib/net/nunit.framework.xml @@ -4,9549 +4,16915 @@ nunit.framework - + - Attribute used to apply a category to a test + The different targets a test action attribute can be applied to - + - The name of the category + Default target, which is determined by where the action attribute is attached - + - 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. + Target a individual test case - The name of the category - + - Protected constructor uses the Type name as the name - of the category. + Target a suite of test cases - + - The name of the category + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. - + - 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. + The default suite builder used by the test assembly builder. - + - 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. + Initializes a new instance of the class. - + - Attribute used to provide descriptive text about a - test case or fixture. + 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 + - + - Construct the attribute + Build a suite of tests given the filename of an assembly - Text describing the test + 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 + - + - Gets the test description + 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. - + - Enumeration indicating how the expected message parameter is to be used + Construct a FrameworkController using the default builder and runner. + 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 - - Expect an exact match - - - Expect a message containing the parameter string - - - Match the regular expression provided as a parameter - - - Expect a message that starts with the parameter string - - + - ExpectedExceptionAttribute + 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 - + - Constructor for a non-specific exception + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + 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 - + - Constructor for a given type of exception + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - The type of the expected exception + 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 - + - Constructor for a given exception name + Gets the ITestAssemblyBuilder used by this controller instance. - The full name of the expected exception + The builder. - + - Gets or sets the expected exception type + Gets the ITestAssemblyRunner used by this controller instance. + The runner. - + - Gets or sets the full Type name of the expected exception + Gets the AssemblyName or the path for which this FrameworkController was created - + - Gets or sets the expected message text + Gets the Assembly for which this - + - Gets or sets the user message displayed in case of failure + Gets a dictionary of settings for the FrameworkController - + - Gets or sets the type of match to be performed on the expected message + Loads the tests in the assembly + - + - Gets the name of a method to be used as an exception handler + 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 - + - 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. + Runs the tests in an assembly + A string containing the XML representation of the filter to use + The XML result of the test run - + - Default constructor + Runs the tests in an assembly syncronously reporting back the test results through the callback + or through the return value + 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 - + - Constructor with a reason + Runs the tests in an assembly asyncronously reporting back the test results through the callback - The reason test is marked explicit + The callback that receives the test results + A string containing the XML representation of the filter to use - + - The reason test is marked explicit + Stops the test run + True to force the stop, false for a cooperative stop - + - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. + Counts the number of test cases in the loaded TestSuite + A string containing the XML representation of the filter to use + The number of tests - + - Constructs the attribute without giving a reason - for ignoring the test. + Inserts environment element + Target node + The new node - + - Constructs the attribute giving a reason for ignoring the test + Inserts settings element - The reason for ignoring the test + Target node + Settings dictionary + The new node - + - The reason for ignoring a test + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. - + - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. + LoadTestsAction loads a test into the FrameworkController - + - Constructor with no included items specified, for use - with named property syntax. + LoadTestsAction loads the tests in an assembly. + The controller. + The callback handler. - + - Constructor taking one or more included items + ExploreTestsAction returns info about the tests in an assembly - Comma-delimited list of included items - + - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. + Initializes a new instance of the class. + The controller for which this action is being performed. + Filter used to control which tests are included (NYI) + The callback handler. - + - Name of the item to be excluded. Multiple items - may be given, separated by a comma. + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. - + - The reason for including or excluding the test + Construct a CountsTestAction and perform the count of test cases. + 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 - + - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. + RunTestsAction runs the loaded TestSuite held by the FrameworkController. - + - Constructor with no platforms specified, for use - with named property syntax. + Construct a RunTestsAction and run all tests in the loaded TestSuite. + 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 - + - Constructor taking one or more platforms + RunAsyncAction initiates an asynchronous test run, returning immediately - Comma-deliminted list of platforms - + - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. + Construct a RunAsyncAction and run all tests in the loaded TestSuite. + 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 - + - Constructor with no cultures specified, for use - with named property syntax. + StopRunAction stops an ongoing run. - + - Constructor taking one or more cultures + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. - Comma-deliminted list of cultures + 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. - + - 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. + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. - + - PropertyAttribute is used to attach information to a test as a name/value pair.. + 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 - + - Construct a PropertyAttribute with a name and string value + Build a suite of tests given the filename of an assembly - The name of the property - The property value + 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 - + - Construct a PropertyAttribute with a name and int value + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. - The name of the property - The property value - + - Construct a PropertyAttribute with a name and double value + Gets the tree of loaded tests, or null if + no tests have been loaded. - The name of the property - The property value - + - Constructor for derived classes that set the - property dictionary directly. + Gets the tree of test results, if the test + run is completed, otherwise null. - + - 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. + Indicates whether a test has been loaded - + - Gets the property dictionary for this attribute + Indicates whether a test is currently running - + - Default constructor + Indicates whether a test run is complete - + - 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. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. + File name of the assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Default constructor + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. + The assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - 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. + Count Test Cases using a filter + The filter to apply + The number of test cases found - + - Default constructor + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. + Interface to receive ITestListener notifications. + A test filter used to select tests to be run - + - Summary description for MaxTimeAttribute. + Run selected tests asynchronously, notifying the listener interface as it progresses. + Interface to receive EventListener notifications. + A test filter used to select tests to be run - + - Construct a MaxTimeAttribute, given a time in milliseconds. + Wait for the ongoing run to complete. - The maximum elapsed time in milliseconds + Time to wait in milliseconds + True if the run completed, otherwise false - + - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. + Signal any test run that is in process to stop. Return without error if no test is running. + If true, kill any test-running threads - + - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. + Implementation of ITestAssemblyRunner - + - Abstract base class for attributes that apply to parameters - and supply data for the parameter. + Initializes a new instance of the class. + The builder. - + - Gets the data to be provided to the specified parameter + Gets the default level of parallel execution (worker threads) - + - 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. + The tree of tests that was loaded by the builder - + - Construct with one argument + The test result, if a run has completed - - + - Construct with two arguments + Indicates whether a test is loaded - - - + - Construct with three arguments + Indicates whether a test is running - - - - + - Construct with an array of arguments + Indicates whether a test run is complete - - + - Get the collection of values to be used as arguments + Our settings, specified when loading the assembly - + - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. + The top level WorkItem created for the assembly as a whole - - + - Construct a set of doubles from min to max + The TestExecutionContext for the top level WorkItem - - - - + - Construct a set of ints from min to max + 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 - + - Get the collection of values to be used as arguments + 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 - + - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. + Count Test Cases using a filter + The filter to apply + The number of test cases found - + - Construct a range of ints using default step of 1 + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. - - + Interface to receive EventListener notifications. + A test filter used to select tests to be run + - + - Construct a range of ints specifying the step size + Run selected tests asynchronously, notifying the listener interface as it progresses. - - - + 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. + - + - Construct a range of longs + Wait for the ongoing run to complete. - - - + Time to wait in milliseconds + True if the run completed, otherwise false - + - Construct a range of doubles + Signal any test run that is in process to stop. Return without error if no test is running. - - - + If true, kill any tests that are currently running - + - Construct a range of floats + Initiate the test run. - - - - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + Create the initial TestExecutionContext used to run tests + The ITestListener specified in the RunAsync call - + - Construct a RepeatAttribute + Handle the the Completed event for the top level work item - The number of times to run the test - + - 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. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - - - Initializes a new instance of the class. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - The required addin. - + - Gets the name of required addin. + Verifies that the first int is greater than the second + int. If it is not, then an + is thrown. - The required addin name. + 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 - + - Summary description for SetCultureAttribute. + Verifies that the first int is greater than the second + int. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Construct given the name of a culture + Verifies that the first value is greater than the second + value. If it is not, then 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 - + - Summary description for SetUICultureAttribute. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Construct given the name of a culture + Verifies that the first value is greater than the second + value. If it is not, then 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 - + - 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. - - + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is less than 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 first value is less than 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then 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 + + + + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. + + 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. + + 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + Asserts that a condition is true. If the condition is false 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 a condition is true. If the condition is false 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 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 + + + + Asserts that a condition is true. If the condition is false 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 a condition is true. If the condition is false 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 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 + + + + 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 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 a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + 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 + + + + 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 a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + 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 not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + 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 not equal to null + If the object is null then an + is thrown. + + 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 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. + + 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 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. + + The object that is to be tested + + + + 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 + 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. + + The value that is to be tested + + + + 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 + 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. + + The value that is to be tested + + + + 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 + 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 + + + + Assert that an array, list or other collection is empty + + 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 + + + + Assert that a string is not empty - that is not equal to string.Empty + + The string to be tested + 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 + + The string to be tested + + + + Assert that an array, list or other collection is not empty + + 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 not empty + + An array, list or other collection implementing ICollection + + + + Asserts that an int is zero. + + The number to be examined + + + + Asserts that an 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 unsigned int is zero. + + 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 a Long is zero. + + The number to be examined + + + + Asserts that a 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 unsigned Long is zero. + + 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 a decimal is zero. + + 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 + + + + Asserts that a double is zero. + + 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 + + + + Asserts that a float is zero. + + 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 + + + + Asserts that an int is not zero. + + 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 + + + + Asserts that an unsigned int is not zero. + + The number to be examined + + + + Asserts that an unsigned 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 + + + + Asserts that a Long is not zero. + + 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 + + + + Asserts that an unsigned Long is not zero. + + The number to be examined + + + + Asserts that an unsigned 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 + + + + Asserts that a decimal is zero. + + 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 + + + + Asserts that a double is zero. + + 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 + + + + Asserts that a float is zero. + + 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 + + + + Asserts that an int is negative. + + The number to be examined + + + + Asserts that an 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 + + + + Asserts that an unsigned int is negative. + + 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 + + + + Asserts that a Long is negative. + + The number to be examined + + + + Asserts that a 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 + + + + Asserts that an unsigned Long is negative. + + 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 + + + + Asserts that a decimal is negative. + + The number to be examined + + + + Asserts that a decimal 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 + + + + Asserts that a double is negative. + + The number to be examined + + + + Asserts that a double 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 + + + + Asserts that a float is negative. + + The number to be examined + + + + Asserts that a float 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 + + + + Asserts that an int is negative. + + The number to be examined + + + + Asserts that an 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 + + + + Asserts that an unsigned int is negative. + + 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 + + + + Asserts that a Long is negative. + + The number to be examined + + + + Asserts that a 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 + + + + Asserts that an unsigned Long is negative. + + 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 + + + + Asserts that a decimal is negative. + + The number to be examined + + + + Asserts that a decimal 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 + + + + Asserts that a double is negative. + + The number to be examined + + + + Asserts that a double 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 + + + + Asserts that a float is negative. + + The number to be examined + + + + Asserts that a float 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 + + + + 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 Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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 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. + + The message to initialize the with. + + + + 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. + + + + + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. + + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws an with the message that is + passed in. This is used by the other Assert functions. + + The message to initialize the with. + + + + Throws an . + This is used by the other Assert functions. + + + + + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. + + 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 ignored. + + The message to initialize the with. + + + + Throws an . + This causes the test to be reported as ignored. + + + + + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. + + 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 list. + + 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. + + The expected object + The list to be examined + + + + 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 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 + + + + 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 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 + + + + 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 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 + + + + 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 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 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 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 + + + + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + + The expected object + The actual object + + + + 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 + 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 + + + + + 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. + + + + + 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 + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + 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 IParamterDataProvider. + + 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. + + - 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 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 fixures 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 + + + + + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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 with the specified delay time. + + The delay in 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 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. + + + + + 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. + + + + The IResolveConstraint interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + 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 givel + 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 depthy. + + + + + 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. + + + + + 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. - + - Attribute used to mark a static (shared in VB) property - that returns a list of tests. + RegexConstraint can test whether a string matches + the pattern provided. - + - 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. + Initializes a new instance of the class. + The pattern. - + - Provide actions to execute before and after tests. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + 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. - + - Executed before each test is run + Create a new instance of ResolvableConstraintExpression - Provides details about the test that is going to be run. - + - Executed after each test is run + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. - Provides details about the test that has just been run. - + - Provides the target for the action attribute + Appends an And Operator to the expression - 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. + 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. - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - + - Descriptive text for this test + Constructs a StringConstraint without an expected value - + - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. + Constructs a StringConstraint given an expected value + The expected value - + - 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. + Modify the constraint to ignore case in matching. - + - Gets the argument list to be provided to the test + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Gets the expected result + Test whether the constraint is satisfied by a given string + The string to be tested + True for success, false for failure - + - Indicates whether a result has been specified. - This is necessary because the result may be - null, so it's value cannot be checked. + SubPathConstraint tests that the actual path is under the expected path - + - Gets the expected exception Type + Initializes a new instance of the class. + The expected path - + - Gets the FullName of the expected exception + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Gets the name to be used for the test + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Gets the description of the test + SubstringConstraint can test whether a string contains + the expected substring. - + - Gets a value indicating whether this is ignored. + Initializes a new instance of the class. - true if ignored; otherwise, false. + The expected. - + - Gets a value indicating whether this is explicit. + Test whether the constraint is satisfied by a given value - true if explicit; otherwise, false. + The value to be tested + True for success, false for failure - + - Gets the ignore reason. + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. - The ignore reason. - + - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant + Initializes a new instance of the class, + using a constraint to be applied to the exception. - + A constraint to apply to the caught exception. - + - Construct a TestCaseAttribute with a single argument + Get the actual exception thrown - used by Assert.Throws. - - + - Construct a TestCaseAttribute with a two arguments + Gets text describing a constraint - - - + - Construct a TestCaseAttribute with a three arguments + 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 - + - Gets the list of arguments to a test case + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + - + - Gets or sets the expected result. + 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 result. + The writer on which the actual value is displayed - + - Gets the expected result. + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. - The result. - + - Gets a flag indicating whether an expected - result has been set. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Gets a list of categories associated with this test; + 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 - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Returns the ActualValueDelegate itself as the value to be tested. + A delegate representing the code to be tested + The delegate itself - + - Gets or sets the expected exception. + ThrowsNothingConstraint tests that a delegate does not + throw an exception. - The expected exception. - + - Gets or sets the name the expected exception. + Gets text describing a constraint - The expected name of the exception. - + - Gets or sets the expected message of the expected exception + Test whether the constraint is satisfied by a given value - The expected message of the exception. + The value to be tested + True if no exception is thrown, otherwise false - + - Gets or sets the type of match to be performed on the expected message + 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 - + - Gets or sets the description. + 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. - The description. - + - Gets or sets the name of the test. + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. - The name of the test. - + - Gets or sets the ignored status of the test + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. - + - Gets or sets the ignored status of the test + Constructs a linear tolerance of a specified amount - + - Gets or sets the explicit status of the test + Constructs a tolerance given an amount and - + - Gets or sets the reason for not running the test + Gets the for the current Tolerance - + - Gets or sets the reason for not running the test. - Set has the side effect of marking the test as ignored. + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. - The ignore reason. - + - FactoryAttribute indicates the source to be used to - provide test cases for a test method. + Gets the value of the current Tolerance instance. - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Returns a new tolerance, using the current amount as a percentage. - An array of the names of the factories that will provide data - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Returns a new tolerance, using the current amount in Ulps - 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 + Returns a new tolerance with a as the amount, using + the current amount as a number of days. - + - A Type to be used as a source + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. - - - [TestFixture] - public class ExampleClass - {} - + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + - + - Default constructor + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. - + - 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. + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. - - + - Descriptive text for this fixture + Returns true if the current tolerance has not been set or is using the . - + - Gets and sets the category for this fixture. - May be a comma-separated list of categories. + Modes in which the tolerance value for a comparison can be interpreted. - + - Gets a list of categories for this fixture + 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 arguments originally provided to the attribute + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. - + - Gets or sets a value indicating whether this should be ignored. + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. - true if ignore; otherwise, false. - + - Gets or sets the ignore reason. May set Ignored as a side effect. + Compares two _values based in their distance in + representable numbers. - The ignore reason. - + - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. + TrueConstraint tests that the actual value is true - + - Attribute used to identify a method that is - called before any tests in a fixture are run. + Initializes a new instance of the class. - + - 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. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - 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. + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - + - 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. + The expected Type used by the constraint - + - Construct a TimeoutAttribute given a time in milliseconds + The type of the actual argument to which the constraint was applied - 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. + Construct a TypeConstraint for a given Type + The expected type for the constraint + Prefix used in forming the constraint description - + - Construct a RequiresSTAAttribute + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - 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. + Apply the constraint to an actual value, returning true if it succeeds + The actual argument + True if the constraint succeeds, otherwise false. - + - Construct a RequiresMTAAttribute + UniqueItemsConstraint tests whether all the items in a + collection are unique. - + - Marks a test that must run on a separate thread. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Construct a RequiresThreadAttribute + Check that all items are unique. + + - + - Construct a RequiresThreadAttribute, specifying the apartment + XmlSerializableConstraint tests whether + an object is serializable in xml format. - + - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. + Gets text describing a constraint - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Test whether the constraint is satisfied by a given value - The name of the data source to be used + The value to be tested + True for success, false for failure - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Returns the string representation of this constraint - 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 + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. - + - A Type to be used as a source + Construct an ExactCountConstraint on top of an existing constraint + + - + - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + - + - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. - + - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. + Construct an ExactCountOperator for a specified count + The expected count - + - Return the top-level constraint for this expression + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. - - + - Static UnsetObject used to detect derived constraints - failing to set the actual value. + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. - + - The actual value being tested against a constraint + Constructs an ExceptionTypeConstraint - + - The display name of this Constraint for use by ToString() + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - Argument fields used by ToString(); + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - The builder holding this constraint + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Construct a constraint with no arguments + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. - + - Construct a constraint with one argument + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. - + - Construct a constraint with two arguments + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Sets the ConstraintBuilder holding this constraint + Asserts on Directories - + - 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. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - The MessageWriter on which to display the message + + - + - Test whether the constraint is satisfied by a given value + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - 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. + 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. - An ActualValueDelegate - True for success, false for failure + 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 - + - 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. + 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 reference to the value to be tested - True for success, false for failure + A directory containing the value that is expected + A directory containing the actual value - + - Write the constraint description to a MessageWriter + Asserts that two directories are not equal. If they are equal + an is thrown. - The writer on which the description is displayed + 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 - + - 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 two directories are not equal. If they are equal + an is thrown. - The writer on which the actual value is displayed + A directory containing the value that is expected + A directory containing the actual value - + - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. + 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 - + - Returns the string representation of this constraint + Asserts that the directory exists. If it does not exist + an is thrown. + A directory containing the actual value - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + 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 - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Asserts that the directory exists. If it does not exist + an is thrown. + The path to a directory containing the actual value - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + 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 - + - Returns a DelayedConstraint with the specified delay time. + Asserts that the directory does not exist. If it does exist + an is thrown. - The delay in milliseconds. - + A directory containing the actual value - + - Returns a DelayedConstraint with the specified delay time - and polling interval. + Asserts that the directory does not exist. If it does exist + an is thrown. - The delay in milliseconds. - The interval at which to test the constraint. - + 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 - + - 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. + Asserts that the directory does not exist. If it does exist + an is thrown. + The path to a directory containing the actual value - + - Returns a ConstraintExpression by appending And - to the current constraint. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Returns a ConstraintExpression by appending And - to the current constraint. + Returns a ConstraintExpression that negates any + following constraint. - + - Returns a ConstraintExpression by appending Or - to the current constraint. + Returns a constraint that succeeds if the value + is a file or directory and it exists. - + - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Constructs an AttributeExistsConstraint for a specific attribute Type + 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. - - + - Tests whether the object provides the expected attribute. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - 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 + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - 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. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Abstract base class used for prefixes + 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 + + - The base constraint + Serialization Constructor - + - Construct given a base constraint + Gets the ResultState provided by this exception - - + - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. + Thrown when an assertion failed. - - - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. + Serialization Constructor - + - Writes a description of the attribute to the specified writer. + Gets the ResultState provided by this exception - + - Writes the actual value supplied to the specified writer. + 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 + + - Returns a string representation of the constraint. + Serialization Constructor - + - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. + Gets the ResultState provided by this exception - + - Initializes a new instance of the class. + Abstract base for Exceptions that terminate a test and provide a ResultState. - The expected. - The description. - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure + + The error message that explains + the reason for the exception - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed + + The error message that explains + the reason for the exception + The exception that caused the + current exception - + - NullConstraint tests that the actual value is null + Serialization Constructor - + - Initializes a new instance of the class. + Gets the ResultState provided by this exception - + - TrueConstraint tests that the actual value is true + Thrown when an assertion failed. - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Initializes a new instance of the class. + Serialization Constructor - + - FalseConstraint tests that the actual value is false + Gets the ResultState provided by this exception - + - Initializes a new instance of the class. + Asserts on Files - + - NaNConstraint tests that the actual value is a double or float NaN + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + - + - Test that the actual value is an NaN + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - - + + - + - Write the constraint description to a specified writer + 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 - + - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. + 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 first constraint being combined + 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 - + - The second constraint being combined + 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 - + - Construct a BinaryConstraint from two other constraints + 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 first constraint - The second constraint + 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 - + - AndConstraint succeeds only if both members succeed. + 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 - + - Create an AndConstraint from two other constraints + Asserts that two Streams are not equal. If they are equal + an is thrown. - The first constraint - The second constraint + 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 - + - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. + Asserts that two Streams are not equal. If they are equal + an is thrown. - The actual value - True if the constraints both succeeded + The expected Stream + The actual Stream - + - Write a description for this contraint to a MessageWriter + Asserts that two files are not equal. If they are equal + an is thrown. - The MessageWriter to receive the description + 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 - + - 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 two files are not equal. If they are equal + an is thrown. - The writer on which the actual value is displayed + A file containing the value that is expected + A file containing the actual value - + - OrConstraint succeeds if either member succeeds + 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 - + - Create an OrConstraint from two other constraints + Asserts that two files are not equal. If they are equal + an is thrown. - The first constraint - The second constraint + The path to a file containing the value that is expected + The path to a file containing the actual value - + - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. + Asserts that the file exists. If it does not exist + an is thrown. - The actual value - True if either constraint succeeded + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Write a description for this contraint to a MessageWriter + Asserts that the file exists. If it does not exist + an is thrown. - The MessageWriter to receive the description + A file containing the actual value - + - CollectionConstraint is the abstract base class for - constraints that operate on collections. + Asserts that the file exists. If it does not exist + an is thrown. + 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 - + - Construct an empty CollectionConstraint + Asserts that the file exists. If it does not exist + an is thrown. + The path to a file containing the actual value - + - Construct a CollectionConstraint + Asserts that the file does not exist. If it does 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 - + - Determines whether the specified enumerable is empty. + Asserts that the file does not exist. If it does exist + an is thrown. - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - + A file containing the actual value - + - Test whether the constraint is satisfied by a given value + Asserts that the file does not exist. If it does exist + an is thrown. - The value to be tested - True for success, false for failure + 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 - + - Protected method to be implemented by derived classes + Asserts that the file does not exist. If it does exist + an is thrown. - - + The path to a file containing the actual value - + - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. + 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. - + - Construct an empty CollectionConstraint + Default tolerance for floating point equality - + - Construct a CollectionConstraint + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. - - + - Flag the constraint to use the supplied IComparer object. + Throws an exception if an argument is null - The IComparer object to use. - Self. + The value to be tested + The name of the argument - + - Flag the constraint to use the supplied IComparer object. + Throws an exception if a string argument is null or empty - The IComparer object to use. - Self. + The value to be tested + The name of the argument - + - Flag the constraint to use the supplied Comparison object. + Throws an ArgumentOutOfRangeException if the specified condition is not met. - The IComparer object to use. - Self. + The condition that must be met + The exception message to be used + The name of the argument - + - Flag the constraint to use the supplied IEqualityComparer object. + Throws an ArgumentException if the specified condition is not met. - The IComparer object to use. - Self. + The condition that must be met + The exception message to be used + The name of the argument - + - Flag the constraint to use the supplied IEqualityComparer object. + Throws an InvalidOperationException if the specified condition is not met. - The IComparer object to use. - Self. + The condition that must be met + The exception message to be used - + - Compares two collection members for equality + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Return a new CollectionTally for use in making tests + Returns a ConstraintExpression that negates any + following constraint. - The collection to be included in the tally - + - Flag the constraint to ignore case and return self. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - + - EmptyCollectionConstraint tests whether a collection is empty. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - + - Check that the collection is empty + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - - - + - Write the constraint description to a MessageWriter + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - - + - UniqueItemsConstraint tests whether all the items in a - collection are unique. + 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. - + - Check that all items are unique. + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - - - + - Write a description of this constraint to a MessageWriter + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - - + - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - + - Construct a CollectionContainsConstraint + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - - + - Test whether the expected item is contained in the collection + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - - - + - Write a descripton of the constraint to a MessageWriter + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - - + - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Construct a CollectionEquivalentConstraint + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. - - + - Test whether two collections are equivalent + Apply changes to the execution context - - + The execution context - + - Write a description of this constraint to a MessageWriter + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. - - + - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another + Modifies a test as defined for the specific attribute. + The test to modify - + - Construct a CollectionSubsetConstraint + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. - The collection that the actual value is expected to be a subset of + + 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. + - + - Test whether the actual collection is a subset of - the expected collection provided. + Wrap a command and return the result. - - + The command to be wrapped + The wrapped command - + - Write a description of this constraint to a MessageWriter + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. - - + - CollectionOrderedConstraint is used to test whether a collection is ordered. + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. - + - Construct a CollectionOrderedConstraint + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run - + - Modifies the constraint to use an IComparer and returns self. + 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. - + - Modifies the constraint to use an IComparer<T> and returns self. + 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. - + - Modifies the constraint to use a Comparison<T> and returns self. + 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. - + - Modifies the constraint to test ordering by the value of - a specified property and returns self. + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. - + - Test whether the collection is ordered + Gets the Type from which this method was reflected. - - - + - Write a description of the constraint to a MessageWriter + Gets the MethodInfo for this method. - - + - Returns the string representation of the constraint. + Gets the name of the method. - - + - If used performs a reverse comparison + Gets a value indicating whether the method is abstract. - + - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. + Gets a value indicating whether the method is public. - + - Construct a CollectionTally object from a comparer and a collection + Gets a value indicating whether the method contains unassigned generic type parameters. - + - Try to remove an object from the tally + Gets a value indicating whether the method is a generic method. - The object to remove - True if successful, false if the object was not found - + - Try to remove a set of objects from the tally + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - The objects to remove - True if successful, false if any object was not found - + - The number of objects remaining in the tally + Gets the return Type of the method. - + - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> + Gets the parameters of the method. + - + - Returns a ComparisonAdapter that wraps an IComparer + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - Returns a ComparisonAdapter that wraps an IComparer<T> + 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 ComparisonAdapter that wraps a Comparison<T> + 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 - + - Compares two objects + The IDataPointProvider interface is used by extensions + that provide data for a single test parameter. - + - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. + 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. - + - Construct a ComparisonAdapter for an IComparer + 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 - + - Compares two objects + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. - - - - + - Construct a default ComparisonAdapter + 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 - + - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. + The IParameterInfo interface is an abstraction of a .NET parameter. - + - Construct a ComparisonAdapter for an IComparer<T> + Gets a value indicating whether the parameter is optional - + - Compare a Type T to an object + Gets an IMethodInfo representing the method for which this is a parameter - + - Construct a ComparisonAdapter for a Comparison<T> + Gets the underlying .NET ParameterInfo - + - Compare a Type T to an object + Gets the Type of the parameter - + - 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. + 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 propeties, 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")); - + - ComparisonAdapter to be used in making the comparison + Adds a key/value pair to the property bag + The key + The value - + - Initializes a new instance of the class. + Sets the value for a key, removing any other + _values that are already in the property set. + + - + - Initializes a new instance of the class. + 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. - + - Modifies the constraint to use an IComparer and returns self + 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 - + - Modifies the constraint to use an IComparer<T> and returns self + Gets or sets the list of _values for a particular key + The key for which the _values are to be retrieved or set - + - Modifies the constraint to use a Comparison<T> and returns self + Gets a collection containing all the keys in the property set - + - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. - + - 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. + Returns an array of custom attributes of the specified type applied to this object - + - Initializes a new instance of the class. + Returns a value indicating whether an attribute of the specified type is defined on this object. - + - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. + 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. - The operator to push. - + - Appends the specified constraint to the expresson by pushing - it on the constraint stack. + Build a TestMethod from the provided MethodInfo. - The constraint to push. + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object - + - Sets the top operator right context. + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. - The right context. - + - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. + 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 target precedence. + The type of the fixture to be used + True if the type can be used to build a TestSuite - + - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. + Build a TestSuite from type provided. - The resolved constraint + The type of the fixture to be used + A TestSuite - + - Gets a value indicating whether this instance is resolvable. + 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. - - true if this instance is resolvable; otherwise, false. - - + - OperatorStack is a type-safe stack for holding ConstraintOperators + Gets the id of the test - + - Initializes a new instance of the class. + Gets the name of the test - The builder. - + - Pushes the specified operator onto the stack. + Gets the fully qualified name of the test - The op. - + - Pops the topmost operator from the stack. + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. - - + - Gets a value indicating whether this is empty. + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. - true if empty; otherwise, false. - + - Gets the topmost operator without modifying the stack. + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. - The top. - + - ConstraintStack is a type-safe stack for holding Constraints + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. - + - Initializes a new instance of the class. + Gets the RunState of the test, indicating whether it can be run. - The builder. - + - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. + Count of the test cases ( 1 if this is a test case ) - The constraint. - + - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. + Gets the properties of the test - - + - Gets a value indicating whether this is empty. + Gets the parent test, if any. - true if empty; otherwise, false. + The parent test or null if none exists. - + - Gets the topmost constraint without modifying the stack. + Returns true if this is a test suite - 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 a bool indicating whether the current test + has any descendant tests. - + - 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 this test's child tests + A list of child tests - + - The ConstraintBuilder holding the elements recognized so far + Gets a fixture object for running this test. - + - Initializes a new instance of the class. + The ITestCaseBuilder interface is exposed by a class that knows how to + build a test case from certain methods. + + 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. + - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + 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. - The builder. + The test method to examine + The suite being populated + True is the builder can use this method - + - 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. + Build a TestCase from the provided MethodInfo for + inclusion in the suite being constructed. - + The method to be used as a test case + The test suite being populated, or null + A TestCase or null - + - Appends an operator to the expression and returns the - resulting expression itself. + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. - + - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. + Gets the expected result of the test case - + - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. + Returns true if an expected result has been set - + - Initializes a new instance of the class. + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + Gets the name to be used for the test - 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. + Gets the RunState for this test case. - + - 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. + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + 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. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + 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 + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Determine if a test matches the filter expicitly. 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 explicityly, otherwise false - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + 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. - + - Returns a constraint that tests two items for equality + Get the TypeArgs if separately set - + - Returns a constraint that tests that two references are the same object + 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. - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Called when a test has just started + The test that is starting - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Called when a test has finished + The result of the test - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Called when a test produces output for immediate display + A TestOutput object containing the text to display - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + 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. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Build one or more TestMethods 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 constraint that tests whether the - actual value is less than or equal to the suppled argument + The ITestResult interface represents the result of a test. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the ResultState of the test result, which + indicates the success or failure of the test. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the name of the test result - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the full name of the test result - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the elapsed time for running the test in seconds - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets or sets the time the test started running. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets or sets the time the test finished running. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets the message associated with a test + failure or with not running the test - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets the number of asserts executed + when running the test and all its children. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Gets the number of test cases that failed + when running the test and all its children. - + - 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 number of test cases that passed + when running the test and all its children. - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Gets the number of test cases that were skipped + when running the test and all its children. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. - + - 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. + Gets the the collection of child results. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets the Test to which this result applies. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets any text output written to this result. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + The ITypeInfo interface is an abstraction of a .NET Type - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Gets the underlying Type on which this ITypeInfo is based - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets the base type of this type as an ITypeInfo - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Returns true if the Type wrapped is equal to the argument - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Gets the Name of the Type - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Gets the FullName of the Type - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Gets the assembly in which the type is declared - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Gets the Namespace of the Type - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Gets a value indicating whether the type is abstract. - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Gets a value indicating whether the Type is a generic Type - + - Returns a ConstraintExpression that negates any - following constraint. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - + - Returns a ConstraintExpression that negates any - following constraint. + Gets a value indicating whether the Type is a generic Type definition - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Gets a value indicating whether the type is sealed. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Gets a value indicating whether this type is a static class. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Get the display name for this typeInfo. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Get the display name for an oject of this type, constructed with specific arguments - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Returns a Type representing a generic type definition from which this Type can be constructed. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Returns a value indicating whether this type has a method with a specified public attribute - + - With is currently a NOP - reserved for future use. + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - + - Returns a constraint that tests for null + Gets the public constructor taking the specified argument Types - + - Returns a constraint that tests for True + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - + - Returns a constraint that tests for False + Construct an object of this Type, using the specified arguments. - + - Returns a constraint that tests for a positive value + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. - + - Returns a constraint that tests for a negative value + Returns a TNode representing the current object. + If true, children are included where applicable + A TNode representing the result - + - Returns a constraint that tests for NaN + Returns a TNode representing the current object after + adding it as a child of the supplied parent node. + The parent node. + If true, children are included, where applicable + - + - Returns a constraint that tests for 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. - + - Returns a constraint that tests whether a collection - contains all unique items. + Initializes a new instance of the class. + The TestStatus. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Initializes a new instance of the class. + The TestStatus. + The label. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Initializes a new instance of the class. + The TestStatus. + The stage at which the result was produced - + - Returns a constraint that tests whether a collection is ordered + Initializes a new instance of the class. + The TestStatus. + The label. + The stage at which the result was produced - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + The result is inconclusive - + - 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 test has been skipped. - + - 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 test has been ignored. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + The test was skipped because it is explicit - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + The test succeeded - + - Returns a constraint that tests two items for equality + The test failed - + - Returns a constraint that tests that two references are the same object + The test encountered an unexpected exception - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + The test was cancelled by the user - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + The test was not runnable. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + A suite failed because one or more child tests failed or had errors - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + A suite failed in its OneTimeSetUp - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + A suite had an unexpected exception in its OneTimeSetUp - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + A suite had an unexpected exception in its OneTimeDown - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the TestStatus for the test. + The status. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Gets the label under which this test result is + categorized, if any. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Gets the stage of test execution in which + the failure or other result took place. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Get a new ResultState, which is the same as the current + one but with the FailureSite set to the specified value. + The FailureSite to use + A new ResultState - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Determines whether the specified , is equal to this instance. + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns a that represents this instance. + + A that represents this instance. + - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Failure in the test itself - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Failure in the SetUp method - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Failure in the TearDown method - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Failure of a parent test - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Failure of a child test - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. - + - 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. + The test is runnable. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The test can only be run explicitly - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + The TestOutput class holds a unit of output from + a test to a specific output stream - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Construct with text, ouput destination type and + the name of the test that produced the output. + Text to be output + Name of the stream or channel to which the text should be written + FullName of test that produced the output - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + Return string representation of the object for debugging + - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Get the text - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Get the output type - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Get the name of the test that created the output - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Convert the TestOutput object to an XML string - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + The TestStatus enum indicates the result of running a test - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + The test was inconclusive - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + The test has skipped - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + The test succeeded - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + The test failed - + - Returns a constraint that tests whether the actual value falls - within a specified range. + 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. - + - Returns a ConstraintExpression that negates any - following constraint. + Constructs a new instance of TNode + The name of the node - + - Returns a ConstraintExpression that negates any - following constraint. + Constructs a new instance of TNode with a value + The name of the node + The text content of the node - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + 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 - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Gets the name of the node - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Gets the value of the node - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Gets a flag indicating whether the value should be output using CDATA. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Gets the dictionary of attributes - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Gets a list of child nodes - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Gets the first ChildNode - + - Returns a constraint that tests for null + Gets the XML representation of this node. - + - Returns a constraint that tests for True + Create a TNode from it's XML text representation + The XML text to be parsed + A TNode - + - Returns a constraint that tests for False + Adds a new element as a child of the current node and returns it. + The element name. + The newly created child element - + - Returns a constraint that tests for a positive value + Adds a new element with a value as a child of the current node and returns it. + The element name + The text content of the new element + The newly created child element - + - Returns a constraint that tests for a negative value + 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 element name + The text content of the new element + The newly created child element - + - Returns a constraint that tests for NaN + Adds an attribute with a specified name and value to the XmlNode. + The name of the attribute. + The value of the attribute. - + - Returns a constraint that tests for empty + 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. + + - + - Returns a constraint that tests whether a collection - contains all unique items. + 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. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Writes the XML representation of the node to an XmlWriter + - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Class used to represent a list of XmlResults - + - Returns a constraint that tests whether a collection is ordered + Class used to represent the attributes of a node - + - 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 or sets the value associated with the specified key. + Overridden to return null if attribute is not found. + The key. + Value of the attribute or null - + - The precedence value used when the operator - is about to be pushed to the stack. + 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 precedence value used when the operator - is on the top of the stack. + Gets the test cases generated by the CombiningStrategy. + The test cases. - + - 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. + AssemblyHelper provides static methods for working + with assemblies. - - + - The syntax element preceding this operator + 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. - + - The syntax element folowing this operator + Gets the path to the directory from which an assembly was loaded. + The assembly. + The path. - + - The precedence value used when the operator - is about to be pushed to the stack. + Gets the AssemblyName of an assembly. + The assembly + An AssemblyName - + - The precedence value used when the operator - is on the top of the stack. + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + - + - PrefixOperator takes a single constraint and modifies - it's action in some way. + Gets the assembly path from code base. + Public for testing purposes + The code base. + - + - 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. + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. - - + - Returns the constraint created by applying this - prefix to another constraint. + Gets the test cases generated by the CombiningStrategy. - - + The test cases. - + - Negates the test of the constraint it wraps. + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. - + - Constructs a new NotOperator + 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 NotConstraint applied to its argument. + 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 + - + - Abstract base for operators that indicate how to - apply a constraint to items in a collection. + Built-in SuiteBuilder for all types of test classes. - + - Constructs a CollectionOperator + 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 - + - Represents a constraint that succeeds if all the - members of a collection match a base constraint. + Build a TestSuite from TypeInfo provided. + The fixture type to build + A TestSuite built from that type - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. + 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. - + - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. + 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 constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. + 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 - + - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. + 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 constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + 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 - + - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. + 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 - + - Construct an ExactCountOperator for a specified count + Builds a ParameterizedMethodSuite containing individual test cases. - The expected count + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Build a simple, non-parameterized TestMethod for this method. + The MethodInfo for which a test is to be built + The test suite for which the method is being built + A TestMethod. - + - 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. + Class that can build a tree of automatic namespace + suites from a group of fixtures. - + - Constructor for the WithOperator + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. - + - Returns a constraint that wraps its argument + The root of the test suite being created by this builder. - + - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. + Initializes a new instance of the class. + The root suite. - + - 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 root entry in the tree created by the NamespaceTreeBuilder. + The root suite. - + - Constructs a PropOperator for a particular named property + Adds the specified fixtures to the tree. + The fixtures to be added. - + - 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 the specified fixture to the tree. - + The fixture to be added. - + - Gets the name of the property to which the operator applies + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. - + - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. + Constructs an - + - Construct an AttributeOperator for a particular Type + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. - The Type of attribute tested + 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. + + + - 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. + Method to add test cases to the newly constructed fixture. + The fixture to which cases should be added - + - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. + 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 - + - Construct a ThrowsOperator + 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 + + - + - 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. + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea - + - Abstract base class for all binary operators + Initializes a new instance of the FleaRand class. + The seed. - + - 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. + 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. - - + - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. + Initializes a new instance of FeatureInfo class. + Index of a dimension. + Index of a feature. - + - Gets the left precedence of the operator + 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. - + - Gets the right precedence of the operator + Initializes a new instance of FeatureTuple class for a single feature. + Single feature. - + - Operator that requires both it's arguments to succeed + Initializes a new instance of FeatureTuple class for a pair of features. + First feature. + Second feature. - + - Construct an AndOperator + TestCase represents a single test case covering a list of features. - + - Apply the operator to produce an AndConstraint + Initializes a new instance of TestCaseInfo class. + A number of features in the test case. - + - Operator that requires at least one of it's arguments to succeed + 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. + + - + - Construct an OrOperator + 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. + - + - Apply the operator to produce an OrConstraint + Gets the test cases generated by this strategy instance. + A set of test cases. - + - 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. + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. - + - Initializes a new instance of the class. + Construct with a collection of individual providers - The expected. - + - Test whether the constraint is satisfied by a given value + Determine whether any data is available for a parameter. - The value to be tested - True for success, false for failure + An IParameterInfo representing one + argument to a parameterized test + True if any data is available, otherwise false. - + - Write the constraint description to a MessageWriter + Return an IEnumerable providing data for use with the + supplied parameter. - The writer on which the description is displayed + An IParameterInfo representing one + argument to a parameterized test + An IEnumerable providing the required data - + - Flag the constraint to use the supplied IComparer object. + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Determine whether any data is available for a parameter. - The IComparer object to use. - Self. + A ParameterInfo representing one + argument to a parameterized test + + True if any data is available, otherwise false. + - + - Flag the constraint to use the supplied Comparison object. + Return an IEnumerable providing data for use with the + supplied parameter. - The IComparer object to use. - Self. + An IParameterInfo representing one + argument to a parameterized test + + An IEnumerable providing the required data + - + - Flag the constraint to use the supplied IEqualityComparer object. + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Gets the test cases generated by the CombiningStrategy. - The IComparer object to use. - Self. + The test cases. - + - Flag the constraint to ignore case and return self. + 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 - + - Applies a delay to the match so that a match can be evaluated in the future. + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. - + - Creates a new DelayedConstraint + Constructs a OneTimeSetUpCommand for a suite - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup - + - Creates a new DelayedConstraint + Overridden to run the one-time setup for a suite. - 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 + The TestExecutionContext to be used. + A TestResult - + - Test whether the constraint is satisfied by a given value + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. - 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 + Construct a OneTimeTearDownCommand - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. - + - 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. + Overridden to run the teardown methods specified on the test. - A reference to the value to be tested - True for success, false for failure + The TestExecutionContext to be used. + A TestResult - + - Write the constraint description to a MessageWriter + 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 writer on which the description is displayed - + - Write the actual value for a failing constraint test to a MessageWriter. + 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. - The writer on which the actual value is displayed + + 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. + - + - Returns the string representation of the constraint. + Use an application-defined default value. - + - EmptyDirectoryConstraint is used to test that a directory is empty + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. - + - Test whether the constraint is satisfied by a given value + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. - 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. + TODO: Documentation needed for class - The writer on which the actual value is displayed - + + TODO: Documentation needed for field + + - 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. + TODO: Documentation needed for constructor + - + - Test whether the constraint is satisfied by a given value + TODO: Documentation needed for class - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Initializes a new instance of the class. - The writer on which the description is displayed + The inner command. + The max time allowed in milliseconds - + - 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. + Runs the test, saving a TestResult in the supplied TestExecutionContext + The context in which the test should run. + A TestResult - + - If true, strings in error messages will be clipped + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. - + - NUnitEqualityComparer used to test equality. + Initializes a new instance of the class. + The inner command. - + - Initializes a new instance of the class. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The expected value. + The context in which the test should run. + A TestResult - + - Flag the constraint to use a tolerance when determining equality. + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. - Tolerance value to be used - Self. - + - Flag the constraint to use the supplied IComparer object. + Construct a SetUpTearDownNode - The IComparer object to use. - Self. + A list of setup methods for this level + A list teardown methods for this level - + - Flag the constraint to use the supplied IComparer object. + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Run SetUp on this level. - The IComparer object to use. - Self. + The execution context to use for running. - + - Flag the constraint to use the supplied Comparison object. + Run TearDown for this level. - The IComparer object to use. - Self. + - + - Flag the constraint to use the supplied IEqualityComparer object. + TODO: Documentation needed for class - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Initializes a new instance of the class. - The IComparer object to use. - Self. + The test being skipped. - + - Test whether the constraint is satisfied by a given value + Overridden to simply set the CurrentResult to the + appropriate Skipped state. - The value to be tested - True for success, false for failure + The execution context for the test + A TestResult - + - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. - The MessageWriter to write to - + - Write description of this constraint + Initializes a new instance of the class. - The MessageWriter to write to + The inner command. - + - Display the failure information for two collections that did not match. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections + The context in which the test should run. + A TestResult - + - 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. + 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. - 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 TestActionItem - 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 ITestAction to be included - + - Display the failure information for two IEnumerables that did not match. + Run the BeforeTest method of the action and remember that it has been run. - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections + The test to which the action applies - + - Flag the constraint to ignore case and return self. + Run the AfterTest action, but only if the BeforeTest + action was actually run. + The test to which the action applies - + - Flag the constraint to suppress string clipping - and return self. + 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. - + - Flag the constraint to compare arrays as collections - and return self. + Construct a TestCommand for a test. + The test to be executed - + - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). + Gets the test associated with this command. - 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. + Runs the test in a specified context, returning a TestResult. - Self + The TestExecutionContext to be used for running the test. + A TestResult - + - Causes the tolerance to be interpreted as a TimeSpan in days. + TestMethodCommand is the lowest level concrete command + used to run actual test cases. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in hours. + Initializes a new instance of the class. - Self + The test. - + - Causes the tolerance to be interpreted as a TimeSpan in minutes. + 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. - Self + The execution context - + - Causes the tolerance to be interpreted as a TimeSpan in seconds. + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + Constructs a TheoryResultCommand - Self + The command to be wrapped by this one - + - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. - Self + + - + - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. + 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. - + - Compares two objects, returning true if they are equal + Construct an EventListenerTextWriter + The name of the stream to use for events + The default writer to use if no listener is available - + - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. + Write a single char - + - Returns an EqualityAdapter that wraps an IComparer. + Write a string - + - Returns an EqualityAdapter that wraps an IEqualityComparer. + Write a string followed by a newline - + - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + Get the Encoding for this TextWriter - + - Returns an EqualityAdapter that wraps an IComparer<T>. + A utility class to create TestCommands - + - Returns an EqualityAdapter that wraps a Comparison<T>. + Gets the command to be executed before any of + the child tests are run. + A TestCommand - + - EqualityAdapter that wraps an IComparer. + Gets the command to be executed after all of the + child tests are run. + A TestCommand - + - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. + Creates a test command for use in running this test. + - + - EqualityAdapter that wraps an IComparer. + Creates a command for skipping a test. The result returned will + depend on the test RunState. - - 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. - - - - - 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/ - - + + + Builds the set up tear down list. + + Type of the fixture. + Type of the set up attribute. + Type of the tear down attribute. + A list of SetUpTearDownItems - + - Reinterprets the memory contents of a floating point value as an integer value + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. - - 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 + List of Child WorkItems - - 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 + A count of how many tests in the work item have a value for the Order Property - 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 + Construct a CompositeWorkItem for executing a test suite + using a filter to select child tests. + + The TestSuite to be executed + A filter used to select child tests + + + + Method that actually performs the work. Overridden + in CompositeWorkItem to do setup, run all child + items and then do teardown. + + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. - Integer whose memory contents to reinterpret - The memory contents of the integer interpreted as a double precision - floating point value + 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. - - Union of a floating point variable and an integer - - - The union's value as a floating point variable + + + Sorts tests under this suite. + - - The union's value as an integer + + + Cancel (abort or stop) a CompositeWorkItem and all of its children + + true if the CompositeWorkItem and all of its children should be aborted, false if it should allow all currently running tests to complete - - The union's value as an unsigned integer + + + The EventPumpState enum represents the state of an + EventPump. + - - Union of a double precision floating point variable and a long + + + The pump is stopped + - - The union's value as a double precision floating point variable + + + The pump is pumping events with no stop requested + - - The union's value as a long + + + The pump is pumping events but a stop has been requested + - - The union's value as an unsigned long + + + 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. + - + - Tests whether a value is greater than the value supplied to its constructor + The downstream listener to which we send events - + - The value against which a comparison is to be made + The queue that holds our events - + - Initializes a new instance of the class. + Thread to do the pumping - The expected value. - + - Write the constraint description to a MessageWriter + The current state of the eventpump - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Constructor - The value to be tested - True for success, false for failure + The EventListener to receive events + The event queue to pull events from - + - Tests whether a value is greater than or equal to the value supplied to its constructor + Gets or sets the current state of the pump - + - The value against which a comparison is to be made + Gets or sets the name of this EventPump + (used only internally and for testing). - + - Initializes a new instance of the class. + Dispose stops the pump + Disposes the used WaitHandle, too. - The expected value. - + - Write the constraint description to a MessageWriter + Start the pump - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Tell the pump to stop after emptying the queue. - The value to be tested - True for success, false for failure - + - Tests whether a value is less than the value supplied to its constructor + 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 value against which a comparison is to be made + 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. - + - Initializes a new instance of the class. + The Send method is implemented by derived classes to send the event to the specified listener. - The expected value. + The listener. - + - Write the constraint description to a MessageWriter + TestStartedEvent holds information needed to call the TestStarted method. - 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 + The test. - + - Tests whether a value is less than or equal to the value supplied to its constructor + Calls TestStarted on the specified listener. + The listener. - + - The value against which a comparison is to be made + TestFinishedEvent holds information needed to call the TestFinished method. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The expected value. + The result. - + - Write the constraint description to a MessageWriter + Calls TestFinished on the specified listener. - The writer on which the description is displayed + The listener. - + - Test whether the constraint is satisfied by a given value + TestOutputEvent holds information needed to call the TestOutput method. - The value to be tested - True for success, false for failure - + - 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. + Initializes a new instance of the class. + The output object. - + - Construct a MessageWriter given a culture + Calls TestOutput on the specified listener. + The listener. - + - Method to write single line message with optional args, usually - written to precede the general failure message. + Implements a queue of work items each of which + is queued as a WaitCallback. - 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 givel - indentation level. + Gets the count of items in 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. + Enqueues the specified event - The constraint that failed + The event to enqueue. - + - 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. + Removes the first element from the queue and returns it (or null). - The expected value - The actual value causing the failure + + 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. + + + - + - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. + Stop processing of the queue - 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. + An IWorkItemDispatcher handles execution of work items. - 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. + 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 connector. + The item to dispatch - + - Writes the text for a predicate. + Cancel the ongoing run completely. + If no run is in process, the call has no effect. - The predicate. + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete - + - Writes the text for an expected value. + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. - The expected value. - + - Writes the text for a modifier + Construct a ParallelWorkItemDispatcher - The modifier. + Number of workers to use - + - Writes the text for an actual value. + Enumerates all the shifts supported by the dispatcher - The actual value. - + - Writes the text for a generalized value. + 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 value. + The item to dispatch - + - Writes the text for a collection value, - starting at a particular point, to a max length + Cancel the ongoing run completely. + If no run is in process, the call has no effect. - 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 + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. - + - Static methods used in creating messages + The EventQueue created and filled by this listener - + - Static string used when strings are clipped + Construct a QueuingEventListener - + - 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. + A test has started - - + The test that is starting - + - Converts any control characters in a string - to their escaped representation. + A test case finished - The string to be converted - The converted string + Result of the test case - + - Return the a string representation for a set of indices into an array + Called when a test produces output for immediate display - Array of indices for which a string is needed + A TestOutput object containing the text to display - + - Get an array of indices representing the point in a enumerable, - collection or array corresponding to a single int index into the - collection. + 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. - 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 + Construct a simple work item for a test. - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string + The test to be executed + The filter used to select this test - + - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. + Method that performs actually performs the work. - - - - - + - Shows the position two strings start to differ. Comparison - starts at the start index. + 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. - 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 - + - The Numerics class contains common operations on numeric values. + 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 - + - Checks the type of the object, returning true if - the object is a numeric type. + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. - The object to check - true if the object is a numeric type + true if the run should be aborted, false if it should allow its currently running test to complete - + - Checks the type of the object, returning true if - the object is a floating point numeric type. + A TestWorker pulls work items from a queue + and executes them. - 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. + Event signaled immediately before executing a WorkItem - 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. + Event signaled immediately after executing a WorkItem - 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. + Construct a new TestWorker. - The expected value - The actual value - The relationship of the values to each other + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests - + - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. + The name of this worker - also used for the thread - + - Compares two objects + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop - - - - + - Returns the default NUnitComparer. + Start processing work items. - + - Generic version of NUnitComparer + 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 - + - Compare two objects of the same type + 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. - + - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. + Construct a TextCapture object + The default destination for non-intercepted output - + - + Gets the Encoding in use by this TextWriter - + - Compares two objects for equality within a tolerance + Writes a single character - The first object to compare - The second object to compare - The tolerance to use in the comparison - + The char to write - + - If true, all string comparisons will ignore case + Writes a string + The string to write - + - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared + 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. + + + - Comparison objects used in comparisons for some constraints. + Creates a work item. + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + - + - Compares two objects for equality within a tolerance. + Construct a WorkItem for a particular test. + The test that the WorkItem will run - + - Helper method to compare two arrays + 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 - + - Method to compare two DirectoryInfo objects + Event triggered when the item is complete - first directory to compare - second directory to compare - true if equivalent, false if not - + - Returns the default NUnitEqualityComparer + Gets the current state of the WorkItem - + - Gets and sets a flag indicating whether case should - be ignored in determining equality. + The test being executed by the work item - + - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. + The execution context - + - Gets and sets an external comparer to be used to - test for equality. It is applied to members of - collections, in place of NUnit's own logic. + The unique id of the worker executing this item. - + - Gets the list of failure points for the last Match performed. + The test actions to be performed before and after this test - + - FailurePoint class represents one point of failure - in an equality test. + Indicates whether this WorkItem may be run in parallel - + - The location of the failure + The test result - + - The expected value + Execute the current work item, including any + child work items. - + - The actual value + Cancel (abort or stop) a WorkItem + true if the WorkItem should be aborted, false if it should run to completion - + - Indicates whether the expected value is valid + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. - + - Indicates whether the actual value is valid + Method called by the derived class when all work is complete - + - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. + WorkItemQueueState indicates the current state of a WorkItemQueue - + - The expected path used in the constraint + The queue is paused - + - The actual path being tested + The queue is running - + - Flag indicating whether a caseInsensitive comparison should be made + The queue is stopped - + - Construct a PathConstraint for a give expected path + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. - The expected path - + - 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 + The name of the queue. - + - Returns true if the expected path and actual path match + Gets the name of the work item queue. - + - Returns the string representation of this constraint + Gets the total number of items processed so far - + - Canonicalize the provided path + Gets the maximum number of work items. - - The path in standardized form - + - Test whether two paths are the same + Gets the current state of the queue - The first path - The second path - Indicates whether case should be ignored - - + - Test whether one path is under another path + Get a bool indicating whether the queue is empty. - The first path - supposed to be the parent path - The second path - supposed to be the child path - Indicates whether case should be ignored - - + - Test whether one path is the same as or under another path + Enqueue a WorkItem to be processed - The first path - supposed to be the parent path - The second path - supposed to be the child path - + The WorkItem to process - + - Modifies the current instance to be case-insensitve - and returns it. + Dequeue a WorkItem for processing + A WorkItem or null if the queue has stopped - + - Modifies the current instance to be case-sensitve - and returns it. + Start or restart processing of items from the queue - + - Summary description for SamePathConstraint. + Signal the queue to stop - + - Initializes a new instance of the class. + Pause the queue for restarting later - The expected path - + - Test whether the constraint is satisfied by a given value + The current state of a work item - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Ready to run or continue - The writer on which the description is displayed - + - SubPathConstraint tests that the actual path is under the expected path + Work Item is executing - + - Initializes a new instance of the class. + Complete - The expected path - + + + 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. + + + - Test whether the constraint is satisfied by a given value + Construct a WorkShift - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Event that fires when the shift has ended - The writer on which the description is displayed - + - SamePathOrUnderConstraint tests that one path is under another + Gets a flag indicating whether the shift is currently active - + - Initializes a new instance of the class. + Gets a list of the queues associated with this shift. - The expected path + Used for testing - + - Test whether the constraint is satisfied by a given value + Gets the list of workers associated with this shift. - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Gets a bool indicating whether this shift has any work to do - The writer on which the description is displayed - + - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. - + - Construct a PredicateConstraint from a predicate + Assign a worker to the shift. + - + - Determines whether the predicate succeeds when applied - to the actual value. + Start or restart processing for the shift - + - Writes the description to a MessageWriter + End the shift, pausing all queues and raising + the EndOfShift event. - + - NotConstraint negates the effect of some other constraint + Shut down the shift. - + - Initializes a new instance of the class. + Cancel (abort or stop) the shift without completing all work - The base constraint to be negated. + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete - + - Test whether the constraint is satisfied by a given value + ClassName filter selects tests based on the class FullName - The value to be tested - True for if the base constraint fails, false if it succeeds - + - Write the constraint description to a MessageWriter + Construct a FullNameFilter for a single name - The writer on which the description is displayed + The name the filter will recognize. - + - Write the actual value for a failing constraint test to a MessageWriter. + Match a test against a single value. - The writer on which the actual value is displayed - + - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. + Gets the element name + Element name - + - Construct an AllItemsConstraint on top of an existing constraint + A base class for multi-part filters - - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Constructs an empty CompositeFilter - - - + - Write a description of this constraint to a MessageWriter + Constructs a CompositeFilter from an array of filters - + - + - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. + Adds a filter to the list of filters + The filter to be added - + - Construct a SomeItemsConstraint on top of an existing constraint + Return a list of the composing filters. - - + - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. + Checks whether the CompositeFilter is matched by a test. - - + The test to be matched - + - Write a description of this constraint to a MessageWriter + Checks whether the CompositeFilter is matched by a test. - + The test to be matched - + - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. + Checks whether the CompositeFilter is explicit matched by a test. + The test to be matched - + - Construct a NoItemConstraint on top of an existing constraint + Adds an XML node - + Parent node + True if recursive + The added XML node - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Gets the element name - - + Element name - + - Write a description of this constraint to a MessageWriter + FullName filter selects tests based on their FullName - - + - ExactCoutConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. + Construct a FullNameFilter for a single name + The name the filter will recognize. - + - Construct an ExactCountConstraint on top of an existing constraint + Match a test against a single value. - - - + - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. + Gets the element name - - + Element name - + - Write a description of this constraint to a MessageWriter + FullName filter selects tests based on their FullName - - + - 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. + Construct a MethodNameFilter for a single name + The name the filter will recognize. - + - Initializes a new instance of the class. + Match a test against a single value. - The name of the property. - + - Test whether the property exists for a given object + Gets the element name - The object to be tested - True for success, false for failure + Element name - + - Write the constraint description to a MessageWriter + PropertyFilter is able to select or exclude tests + based on their properties. - The writer on which the description is displayed + - + - Write the actual value for a failing constraint test to a - MessageWriter. + Construct a PropertyFilter using a property name and expected value - The writer on which the actual value is displayed + A property name + The expected value of the property - + - Returns the string representation of the constraint. + Check whether the filter matches a test + The test to be matched - + - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. + Adds an XML node + Parent node + True if recursive + The added XML node - + - Initializes a new instance of the class. + Gets the element name - The name. - The constraint to apply to the property. + Element name - + - Test whether the constraint is satisfied by a given value + TestName filter selects tests based on their Name - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Construct a TestNameFilter for a single name - The writer on which the description is displayed + The name the filter will recognize. - + - 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. + Match a test against a single value. - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Gets the element name - + Element name - + - RangeConstraint tests whethe two values are within a - specified range. + Combines multiple filters so that a test must pass all + of them in order to pass this filter. - + - Initializes a new instance of the class. + Constructs an empty AndFilter - From. - To. - + - Test whether the constraint is satisfied by a given value + Constructs an AndFilter from an array of filters - The value to be tested - True for success, false for failure + - + - Write the constraint description to a MessageWriter + Checks whether the AndFilter is matched by a test - The writer on which the description is displayed + The test to be matched + True if all the component filters pass, otherwise false - + - 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. + Checks whether the AndFilter is matched by a test + The test to be matched + True if all the component filters match, otherwise false - + - Create a new instance of ResolvableConstraintExpression + 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 - + - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. + Gets the element name + Element name - + - Resolve the current expression to a Constraint + CategoryFilter is able to select or exclude tests + based on their categories. + - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Construct a CategoryFilter using a single category name + A category name - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Check whether the filter matches a test + The test to be matched + - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Gets the element name + Element name - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + IdFilter selects tests based on their id - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Construct an IdFilter for a single value + The id the filter will recognize. - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Match a test against a single value. - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + Gets the element name + Element name - + - Appends an And Operator to the expression + NotFilter negates the operation of another filter - + - Appends an Or operator to the expression. + Construct a not filter on another filter + The filter to be negated - + - ReusableConstraint wraps a resolved constraint so that it - may be saved and reused as needed. + Gets the base filter - + - Construct a ReusableConstraint + 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 constraint or expression to be reused + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Conversion operator from a normal constraint to a ReusableConstraint. + Check whether the filter matches a test - The original constraint to be wrapped as a ReusableConstraint - + The test to be matched + True if it matches, otherwise false - + - Returns the string representation of the constraint. + Determine if a test matches the filter expicitly. That is, it must + be a direct match of the test itself or one of it's children. - A string representing the constraint + The test to which the filter is applied + True if the test matches the filter explicityly, otherwise false - + - Resolves the ReusableConstraint by returning the constraint - that it originally wrapped. + Adds an XML node - A resolved constraint + Parent node + True if recursive + The added XML node - + - SameAsConstraint tests whether an object is identical to - the object passed to its constructor + Combines multiple filters so that a test must pass one + of them in order to pass this filter. - + - Initializes a new instance of the class. + Constructs an empty OrFilter - The expected object. - + - Test whether the constraint is satisfied by a given value + Constructs an AndFilter from an array of filters - The value to be tested - True for success, false for failure + - + - Write the constraint description to a MessageWriter + Checks whether the OrFilter is matched by a test - The writer on which the description is displayed + The test to be matched + True if any of the component filters pass, otherwise false - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Checks whether the OrFilter is matched by a test + The test to be matched + True if any of the component filters match, otherwise false - + - Test whether the constraint is satisfied by a given value + Checks whether the OrFilter is explicit matched by a test - The value to be tested - True for success, false for failure + The test to be matched + True if any of the component filters explicit match, otherwise false - + - Write the constraint description to a MessageWriter + Gets the element name - The writer on which the description is displayed + Element name - + - 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. + ValueMatchFilter selects tests based on some value, which + is expected to be contained in the test. + + + + + Returns the value matched by the filter - used for testing - The writer on which the actual value is displayed - + - Returns the string representation + Indicates whether the value is a regular expression - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Construct a ValueMatchFilter for a single value. + The value to be included. - + - Test whether the constraint is satisfied by a given value + Match the input provided by the derived class - The value to be tested - True for success, false for failure + The value to be matchedT + True for a match, false otherwise. - + - Write the constraint description to a MessageWriter + Adds an XML node - The writer on which the description is displayed + Parent node + True if recursive + The added XML node - + - 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 the element name - The writer on which the actual value is displayed + Element name - + - Returns the string representation of this constraint + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. - + - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. + Construct a GenericMethodHelper for a method + MethodInfo for the method to examine - + - The expected value + Return the type argments for the method, deducing them + from the arguments actually provided. + The arguments to the method + An array of type arguments. - + - Indicates whether tests should be case-insensitive + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - + - Constructs a StringConstraint given an expected value + Initializes a new instance of the class. - The expected value - + - Modify the constraint to ignore case in matching. + Initializes a new instance of the class. + The message. - + - EmptyStringConstraint tests whether a string is empty. + Initializes a new instance of the class. + The message. + The inner. - + - Test whether the constraint is satisfied by a given value + Serialization Constructor - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. - The writer on which the description is displayed - + - NullEmptyStringConstraint tests whether a string is either null or empty. + Default constructor uses the current culture. - + - Constructs a new NullOrEmptyStringConstraint + Construct a CultureDetector for a particular culture for testing. + The culture to be used - + - Test whether the constraint is satisfied by a given value + Test to determine if one of a collection of cultures + is being used currently. - The value to be tested - True for success, false for failure + + - + - Write the constraint description to a MessageWriter + Tests to determine if the current culture is supported + based on a culture attribute. - The writer on which the description is displayed + The attribute to examine + - + - SubstringConstraint can test whether a string contains - the expected substring. + 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 - + - Initializes a new instance of the class. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - The expected. - + - Test whether the constraint is satisfied by a given value + ExceptionHelper provides static methods for working with exceptions - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Rethrows an exception, preserving its stack trace - The writer on which the description is displayed + The exception to rethrow - + - StartsWithConstraint can test whether a string starts - with an expected substring. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + The exception. + A combined message string. - + - Initializes a new instance of the class. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. - The expected string + The exception. + A combined stack trace. - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + Gets the stack trace of the exception. - - + The exception. + A string representation of the stack trace. - + - Write the constraint description to a MessageWriter + 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. - The writer on which the description is displayed - + - EndsWithConstraint can test whether a string ends - with an expected substring. + Prefix used for the expected value line of a message - + - Initializes a new instance of the class. + Prefix used for the actual value line of a message - 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. + Length of a message prefix - - - + - Write the constraint description to a MessageWriter + Construct a TextMessageWriter - The writer on which the description is displayed - + - RegexConstraint can test whether a string matches - the pattern provided. + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + - + - Initializes a new instance of the class. + Gets or sets the maximum line length for this writer - The pattern. - + - Test whether the constraint is satisfied by a given value + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. - The value to be tested - True for success, false for failure + The indentation level of the message + The message to be written + Any arguments used in formatting the message - + - Write the constraint description to a MessageWriter + 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 writer on which the description is displayed + The result of the constraint that failed - + - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. + 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 - + - Initializes a new instance of the class, - using a constraint to be applied to the exception. + Display Expected and Actual lines for given _values, including + a tolerance value on the expected line. - A constraint to apply to the caught exception. + The expected value + The actual value causing the failure + The tolerance within which the test was made - + - 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. + 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. - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false + 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 - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Writes the text for an actual value. - - + The actual value. - + - Write the constraint description to a MessageWriter + Writes the text for a generalized value. - The writer on which the description is displayed + The value. - + - 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. + Writes the text for a collection value, + starting at a particular point, to a max length - The writer on which the actual value is displayed + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write - + - Returns the string representation of this constraint + Write the generic 'Expected' line for a constraint + The constraint that failed - + - Get the actual exception thrown - used by Assert.Throws. + Write the generic 'Expected' line for a given value + The expected value - + - ThrowsNothingConstraint tests that a delegate does not - throw an exception. + Write the generic 'Expected' line for a given value + and tolerance. + The expected value + The tolerance within which the test was made - + - Test whether the constraint is satisfied by a given value + Write the generic 'Actual' line for a constraint - The value to be tested - True if no exception is thrown, otherwise false + The ConstraintResult for which the actual value is to be written - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Write the generic 'Actual' line for a given value - - + The actual value causing a failure - + - Write the constraint description to a MessageWriter + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - 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. + Initializes a new instance of the class. - The writer on which the actual value is displayed - + - Modes in which the tolerance value for a comparison can - be interpreted. + Initializes a new instance of the class. + The message. - + - 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. + Initializes a new instance of the class. + The message. + The inner. - + - The tolerance is used as a numeric range within which - two compared values are considered to be equal. + Serialization Constructor - + - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. + Interface for logging within the engine - + - Compares two values based in their distance in - representable numbers. + Logs the specified message at the error level. + The message. - + - 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. + Logs the specified message at the error level. + The message. + The arguments. - + - Constructs a linear tolerance of a specdified amount + Logs the specified message at the warning level. + The message. - + - Constructs a tolerance given an amount and ToleranceMode + Logs the specified message at the warning level. + The message. + The arguments. - + - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. + Logs the specified message at the info level. + The message. - + - 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. + Logs the specified message at the info level. + The message. + The arguments. - + - Returns a zero Tolerance object, equivalent to - specifying an exact match. + Logs the specified message at the debug level. + The message. - + - Gets the ToleranceMode for the current Tolerance + Logs the specified message at the debug level. + The message. + The arguments. - + - Gets the value of the current Tolerance instance. + 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. - + - Returns a new tolerance, using the current amount as a percentage. + Gets a flag indicating whether the InternalTrace is initialized - + - Returns a new tolerance, using the current amount in Ulps. + Initialize the internal trace facility using the name of the log + to be written to and the trace level. + The log name + The trace level - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. + Initialize the internal trace using a provided TextWriter and level + A TextWriter + The InternalTraceLevel - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. + Get a named Logger + - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. + Get a logger named for a particular Type. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. + InternalTraceLevel is an enumeration controlling the + level of detailed presented in the internal log. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. + Use the default settings as specified by the user. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. + Do not display any trace messages - + - Returns true if the current tolerance is empty. + Display Error messages only - + - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. + Display Warning level and higher messages - + - The expected Type used by the constraint + Display informational and higher messages - + - Construct a TypeConstraint for a given Type + Display debug messages and higher - i.e. all messages - - + - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. + Display debug messages and higher - i.e. all messages - The writer on which the actual value is displayed - + - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor + A trace listener that writes to a separate file per domain + and process using it. - + - Construct an ExactTypeConstraint for a given Type + Construct an InternalTraceWriter that writes to a file. - The expected Type. + Path to the file to use - + - Test that an object is of the exact type specified + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. - 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 + Returns the character encoding in which the output is written. - The MessageWriter to use + The character encoding in which the output is written. - + - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. + Writes a character to the text string or stream. + The character to write to the text stream. - + - Constructs an ExceptionTypeConstraint + Writes a string to the text string or stream. + The string to write. - + - Write the actual value for a failing constraint test to a - MessageWriter. Overriden to write additional information - in the case of an Exception. + Writes a string followed by a line terminator to the text string or stream. - The MessageWriter to use + The string to write. If is null, only the line terminator is written. - + - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. + Releases the unmanaged resources used by the and optionally releases the managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. - + - Construct an InstanceOfTypeConstraint for the type provided + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. - The expected Type - + - Test whether an object is of the specified type or a derived type + Provides internal logging to the NUnit framework - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. - + - Write a description of this constraint to a MessageWriter + Initializes a new instance of the class. - The MessageWriter to use + The name. + The log level. + The writer where logs are sent. - + - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. + Logs the message at error level. + The message. - + - Construct an AssignableFromConstraint for the type provided + Logs the message at error level. - + The message. + The message arguments. - + - Test whether an object can be assigned from the specified type + Logs the message at warm level. - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. + The message. - + - Write a description of this constraint to a MessageWriter + Logs the message at warning level. - The MessageWriter to use + The message. + The message arguments. - + - AssignableToConstraint is used to test that an object - can be assigned to a given Type. + Logs the message at info level. + The message. - + - Construct an AssignableToConstraint for the type provided + Logs the message at info level. - + The message. + The message arguments. - + - Test whether an object can be assigned to the specified type + Logs the message at debug level. - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. + The message. - + - Write a description of this constraint to a MessageWriter + Logs the message at debug level. - The MessageWriter to use + The message. + The message arguments. - + - Thrown when an assertion failed. + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. - - - - 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 + Construct a MethodWrapper for a Type and a MethodInfo. - + - Thrown when an assertion failed. + Construct a MethodInfo for a given Type and method name. - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + Gets the Type from which this method was reflected. - + - Thrown when a test executes inconclusively. + Gets the MethodInfo for this method. - - - 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 + + + Gets the name of the method. + - + - Serialization Constructor + Gets a value indicating whether the method is abstract. - + - Thrown when an assertion failed. + Gets a value indicating whether the method is public. - - + + + Gets a value indicating whether the method contains unassigned generic type parameters. + - - The error message that explains - the reason for the exception - The exception that caused the - current exception + + + Gets a value indicating whether the method is a generic method. + - + - Serialization Constructor + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - + - + Gets the return Type of the method. - - + - Compares two objects of a given Type for equality within a tolerance + Gets the parameters of the method. - The first object to compare - The second object to compare - The tolerance to use in the comparison - + - The different targets a test action attribute can be applied to + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - Default target, which is determined by where the action attribute is attached + 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 - + - Target a individual test case + Returns an array of custom attributes of the specified type applied to this method - + - Target a suite of test cases + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. - + - Delegate used by tests that execute code and - capture any thrown exception. + 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 - + - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. + Override ToString() so that error messages in NUnit's own tests make sense - + - 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. + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Initializes a new instance of the class. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Initializes a new instance of the class. - - + The error message that explains + the reason for the exception - + - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. + Initializes a new instance of the class. - 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 error message that explains + the reason for the exception + The exception that caused the + current exception - + - 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. + Serialization Constructor - 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. + OSPlatform represents a particular operating system platform - The message to initialize the with. - + - 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. + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater - + - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. + Platform ID for Unix as defined by Mono - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws an with the message that is - passed in. This is used by the other Assert functions. + Platform ID for XBox as defined by .NET and Mono, but not CF - The message to initialize the with. - + - Throws an . - This is used by the other Assert functions. + Platform ID for MacOSX as defined by .NET and Mono, but not CF - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. + Get the OSPlatform under which we are currently running - 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 ignored. + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 - The message to initialize the with. + + 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 - + - Throws an . - This causes the test to be reported as ignored. + Product Type Enumeration used for Windows - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. + Product type is unknown or unspecified - 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. + Product type is Workstation - The message to initialize the with. - + - Throws an . - This causes the test to be reported as Inconclusive. + Product type is Domain Controller - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Product type is Server - 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. + Construct from a platform ID and version - A Constraint to be applied - The actual value to test - 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. + Construct from a platform ID, version and product type - 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 - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Get the platform ID of this instance - 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. + Get the Version of this instance - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - 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. + Get the Product Type of this instance - 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. + Return true if this is a windows platform - A Constraint to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Return true if this is a Unix or Linux platform - A Constraint 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 assertion exception on failure. + Return true if the platform is Win32S - A Constraint 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 + Return true if the platform is Win32Windows + - + - Asserts that a condition is true. If the condition is false the method throws - an . + Return true if the platform is Win32NT - 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 . + Return true if the platform is Windows CE - The evaluated condition - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Return true if the platform is Xbox - 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. + Return true if the platform is MacOSX - 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. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Return true if the platform is Windows 95 - A Constraint to be applied - The actual value to test - 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. + Return true if the platform is Windows 98 - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - 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 - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is Windows ME - 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. + Return true if the platform is NT 3 - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is NT 4 - A constraint to be satisfied by the exception - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is NT 5 - The exception Type expected - 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. + Return true if the platform is Windows 2000 - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is Windows XP - The exception Type expected - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is Windows 2003 Server - Type of the expected 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. + Return true if the platform is NT 6 - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Return true if the platform is NT 6.0 - Type of the expected exception - A TestSnippet delegate - + - Verifies that a delegate throws an exception when called - and returns it. + Return true if the platform is NT 6.1 - 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. + Return true if the platform is NT 6.2 - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception when called - and returns it. + Return true if the platform is NT 6.3 - A TestDelegate - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Return true if the platform is Vista - 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. + Return true if the platform is Windows 2008 Server (original or R2) - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Return true if the platform is Windows 2008 Server (original) - 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. + Return true if the platform is Windows 2008 Server R2 - 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. + Return true if the platform is Windows 2012 Server (original or R2) - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Return true if the platform is Windows 2012 Server (original) - The expected Exception Type - A TestDelegate - + - Verifies that a delegate does not throw an exception + Return true if the platform is Windows 2012 Server R2 - A TestSnippet delegate - 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. + Return true if the platform is Windows 7 - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate does not throw an exception. + Return true if the platform is Windows 8 - A TestSnippet delegate - + - Asserts that a condition is true. If the condition is false the method throws - an . + Return true if the platform is Windows 8.1 - 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 . + Return true if the platform is Windows 10 - 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 . + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. - The evaluated condition - + - Asserts that a condition is true. If the condition is false the method throws - an . + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. - 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 . + Construct a ParameterWrapper for a given method and parameter - 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 . + Gets a value indicating whether the parameter is optional - 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 + Gets an IMethodInfo representing the method for which this is a parameter. + - + - 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 + Gets the underlying ParameterInfo + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Gets the Type of the parameter + - + - 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 + Returns an array of custom attributes of the specified type applied to this method + - + - 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 + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Comma-delimited list of all supported OS platform constants - 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 not equal to null - If the object is null then an - is thrown. + Comma-delimited list of all supported Runtime platform constants - The object that is to be tested - The message to display in case of failure - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Default constructor uses the operating system and + common language runtime of the system. - The object that is to be tested - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. - 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 + OperatingSystem to be used + RuntimeFramework to be used - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Test to determine if one of a collection of platforms + is being used currently. - The object that is to be tested - The message to display in case of failure + + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Tests to determine if the current platform is supported + based on a platform attribute. - The object that is to be tested + The attribute to examine + - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Tests to determine if the current platform is supported + based on a platform attribute. - 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 attribute to examine + - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. - The object that is to be tested - The message to display in case of failure + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - 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. + 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 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. + Adds a key/value pair to the property set - The object that is to be tested - The message to display in case of failure + The key + The value - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Sets the value for a key, removing any other + _values that are already in the property set. - The object that is to be tested + + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + 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. - 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 + + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Gets a flag indicating whether the specified key has + any entries in the property set. - The value that is to be tested - The message to display in case of failure + The key to be checked + + True if their are _values present, otherwise false + - + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Returns an XmlNode representating the current PropertyBag. - The value that is to be tested + Not used + An XmlNode representing the PropertyBag - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. - 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 + The parent node. + Not used + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. - The value that is to be tested - The message to display in case of failure - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The FriendlyName of the AppDomain in which the assembly is running - The value that is to be tested - + - Assert that a string is empty - that is equal to string.Empty + The selected strategy for joining parameter data into test cases - The string to be tested - 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 process ID of the executing assembly - 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 + The stack trace from any data provider that threw + an exception. - The string to be tested - + - Assert that an array, list or other collection is empty + The reason a test was not run - 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 + The author of the tests - An array, list or other collection implementing ICollection - The message to display in case of failure - + - Assert that an array, list or other collection is empty + The ApartmentState required for running the test - An array, list or other collection implementing ICollection - + - Assert that a string is not empty - that is not equal to string.Empty + The categories applying to a test - The string to be tested - 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 + The Description of a test - The string to be tested - The message to display in case of failure - + - Assert that a string is not empty - that is not equal to string.Empty + The number of threads to be used in running tests - The string to be tested - + - Assert that an array, list or other collection is not empty + The maximum time in ms, above which the test is considered to have failed - 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 not empty + The ParallelScope associated with a test - An array, list or other collection implementing ICollection - The message to display in case of failure - + - Assert that an array, list or other collection is not empty + The number of times the test should be repeated - An array, list or other collection implementing ICollection - + - Assert that a string is either null or equal to string.Empty + Indicates that the test should be run on a separate thread - The string to be tested - 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 culture to be set for a test - The string to be tested - The message to display in case of failure - + - Assert that a string is either null or equal to string.Empty + The UI culture to be set for a test - The string to be tested - + - Assert that a string is not null or empty + The type that is under test - The string to be tested - 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 timeout value for the test - The string to be tested - The message to display in case of failure - + - Assert that a string is not null or empty + The test will be ignored until the given date - The string to be tested - + - Asserts that an object may be assigned a value of a given Type. + The optional Order the test will run in - 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. + 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 expected Type. - The object under examination - The message to display in case of failure + + 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. + - + - Asserts that an object may be assigned a value of a given Type. + Initial seed used to create randomizers for this run - The expected Type. - The object under examination - + - Asserts that an object may be assigned a value of a given Type. + 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. - 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. + 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 expected Type. - The object under examination - The message to display in case of failure - + - Asserts that an object may be assigned a value of a given Type. + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. - The expected Type. - The object under examination + - + - Asserts that an object may not be assigned a value of a given Type. + Default constructor - 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. + Construct based on seed value - The expected Type. - The object under examination - The message to display in case of failure + - + - Asserts that an object may not be assigned a value of a given Type. + Returns a random unsigned int. - The expected Type. - The object under examination - + - Asserts that an object may not be assigned a value of a given Type. + Returns a random unsigned int less than the specified maximum. - 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. + Returns a random unsigned int within a specified range. - The expected Type. - The object under examination - The message to display in case of failure - + - Asserts that an object may not be assigned a value of a given Type. + Returns a non-negative random short. - The expected Type. - The object under examination - + - Asserts that an object is an instance of a given type. + Returns a non-negative random short less than the specified maximum. - 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. + Returns a non-negative random short within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Returns a random unsigned short. - The expected Type - The object being examined - + - Asserts that an object is an instance of a given type. + Returns a random unsigned short less than the specified maximum. - 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. + Returns a random unsigned short within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Returns a random long. - The expected Type - The object being examined - + - Asserts that an object is an instance of a given type. + Returns a random long less than the specified maximum. - 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. + Returns a non-negative random long within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Returns a random ulong. - The expected Type - The object being examined - + - Asserts that an object is not an instance of a given type. + Returns a random ulong less than the specified maximum. - 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. + Returns a non-negative random long within a specified range. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Returns a random Byte - The expected Type - The object being examined - + - Asserts that an object is not an instance of a given type. + Returns a random Byte less than the specified maximum. - 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. + Returns a random Byte within a specified range - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Returns a random SByte - The expected Type - The object being examined - + - Asserts that an object is not an instance of a given type. + Returns a random sbyte less than the specified maximum. - 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. + Returns a random sbyte within a specified range - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Returns a random bool - The expected Type - The object being examined - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random bool based on the probablility a true result - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random double between 0.0 and the specified maximum. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random double within a specified range. - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random float. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random float between 0.0 and the specified maximum. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random float within a specified range. - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random enum value of the specified Type as an object. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random enum value of the specified Type. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Default characters for random functions. - The expected value - The actual value + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore - + - Verifies that two values are equal. If they are not, then an - is thrown. + Generate a random string based on the characters from the input string. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length - + - Verifies that two values are equal. If they are not, then an - is thrown. + Generate a random string based on the characters from the input string. - The expected value - The actual value - The message to display in case of failure + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set - + - Verifies that two values are equal. If they are not, then an - is thrown. + Generate a random string based on the characters from the input string. - The expected value - The actual value + A random string of the default length + Uses DefaultStringChars as the input character set - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random decimal. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random decimal between positive zero and the specified maximum. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. - The expected value - The actual value + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + - + - 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. + 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. - 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 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. + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. - 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 type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found - + - 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. + Examine a fixture type and return true if it has a method with + a particular attribute. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The type to examine + The attribute Type to look for + True if found, otherwise false - + - 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. + Invoke the default constructor on a Type - 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 Type to be constructed + An instance of the Type - + - 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. + Invoke a constructor on a Type with arguments - 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 Type to be constructed + Arguments to the constructor + An instance of the Type - + - 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. + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + An array of objects + An array of Types - + - 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. + Invoke a parameterless method returning void on an object. - 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 + A MethodInfo for the method to be invoked + The object on which to invoke the method - + - 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. + Invoke a method, converting any TargetInvocationException to an NUnitException. - The value that is expected - The actual value - The message to display in case of failure + 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 - + - 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 TestResult class represents the result of a test. - The value that is expected - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Error message for when child tests have errors - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Error message for when child tests are ignored - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + The minimum duration for tests - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Aggregate assertion count - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + ReaderWriterLock - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Construct a test result given a Test - The expected value - The actual value + The test to be used - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the test with which this result is associated. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the ResultState of the test result, which + indicates the success or failure of the test. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the name of the test result - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the full name of the test result - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the elapsed time for running the test in seconds - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the time the test started running. - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the time the test finished running. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the message associated with a test + failure or with not running the test - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets any stacktrace associated with an + error or failure. - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets or sets the count of asserts executed + when running the test. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that failed + when running the test and all its children. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that passed + when running the test and all its children. - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that were skipped + when running the test and all its children. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Gets the number of test cases that were inconclusive + when running the test and all its children. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Indicates whether this result has any child results. - The expected value - The actual value - + - 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. + Gets the collection of child results. - 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 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. + Gets a TextWriter, which will write output to be included in the result. - The value that is expected - The actual value - The message to display in case of failure - + - 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. + Gets any text output written to this result. - 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. + Returns the Xml representation of the result. - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message + If true, descendant results are included + An XmlNode representing the result - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Adds the XML representation of the result as a child of the + supplied parent node.. - The expected object - The actual object - The message to display in case of failure + The parent node. + If true, descendant results are included + - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Set the result of the test - The expected object - The actual object + The ResultState to use in the result - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Set the result of the test - 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 ResultState to use in the result + A message associated with the result state - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Set the result of the test - The expected object - The actual object - The message to display in case of failure + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Set the test result based on the type of exception thrown - The expected object - The actual object + The exception that was thrown - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Set the test result based on the type of exception 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 exception that was thrown + THe FailureSite to use in the result - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The Exception to be recorded - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Adds a reason element to a node and returns it. - The first value, expected to be greater - The second value, expected to be less + The target node. + The new reason element. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Adds a failure element to a node and returns it. - 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 target node. + The new failure element. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Enumeration identifying a common language + runtime implementation. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less + RuntimeFramework represents a particular version + of a common language runtime implementation. + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. - 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 the second - value. If it is not, then an - is thrown. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The runtime type of the framework + The version of the framework - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Static method to return a RuntimeFramework object + for the framework that is currently in use. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The type of this runtime framework - 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 the second - value. If it is not, then an - is thrown. + The framework version for this runtime framework - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The CLR version for this runtime framework - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Return true if any CLR version may be used in + matching this RuntimeFramework object. - 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 the second - value. If it is not, then an - is thrown. + Returns the Display name for this framework - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + 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'. - The first value, expected to be greater - The second value, expected to be less + + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Overridden to return the short name of the framework - 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 the second - value. If it is not, then an - is thrown. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The RuntimeFramework to be matched. + True on match, otherwise false - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Filters a raw stack trace and returns the result. - 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 original stack trace + A filtered stack trace - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Provides methods to support legacy string comparison methods. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compares two strings for equality, ignoring case if requested. - The first value, expected to be greater - The second value, expected to be less + 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 - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compares two strings for equality, ignoring case if requested. - 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 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. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The expected result to be returned - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Default Constructor creates an empty parameter set - 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. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - 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. + Construct a parameter set with a list of arguments - 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. + Construct a ParameterSet from an object implementing ITestCaseData - 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. + The expected result of the test, which + must match the method return type. - 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. + Gets a value indicating whether an expected result was specified. - The first value, expected to be less - The second value, expected to be greater - + + + 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. + + + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Link to a prior saved context - 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. + Indicates that a stop has been requested - 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. + The event listener currently receiving notifications - 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. + The number of assertions for the current test - 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. + The current culture - 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. + The current UI culture - 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. + The current test result - 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. + The current Principal. - 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. + Initializes a new instance of the class. - 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. + Initializes a new instance of the class. - 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 + An existing instance of TestExecutionContext. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets and sets the current context. - 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. + Get the current context or return null if none is found. - 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. + Clear the current context. This is provided to + prevent "leakage" of the CallContext containing + the current context back to any runners. + + + + + Gets or sets the current test - 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. + The time the current test started execution - 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. + The time the current test started in Ticks - 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. + Gets or sets the current test result - 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. + Gets a TextWriter that will send output to the current test result. - 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. + The current test object - that is the user fixture + object on which tests are being executed. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Get or set the working directory - 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. + Get or set indicator that run should stop on the first error - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets an enum indicating whether a stop has been requested. - 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. + The current test event listener - 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. + The current WorkItemDispatcher. Made public for + use by nunitlite.tests - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. - 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. + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. - 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. + Gets the RandomGenerator specific to this Test - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets the assert count. - The first value, expected to be greater - The second value, expected to be less + The assert count. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets or sets the test case timeout 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 the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets a list of ITestActions set by upstream tests - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Saves or restores the CurrentCulture - 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. + Saves or restores the CurrentUICulture - 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. + Gets or sets the current for the Thread. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter - 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. + If true, all tests must run on the same thread. No new thread may be spawned. - 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. + 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 first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + 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. - 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. + Increments the assert count by one. - 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. + Increments the assert count by a specified amount. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Adds a new ValueFormatterFactory to the chain of formatters - The first value, expected to be greater - The second value, expected to be less + The new factory - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Obtain lifetime service object - 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. + Enumeration indicating whether the tests are + running normally or being cancelled. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Running normally with no stop requested - 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. + A graceful stop has been requested - 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. + A forced stop has been requested - 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. + 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 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. + Unique Empty filter. - 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. + Indicates whether this is the EmptyFilter - 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. + Indicates whether this is a top-level filter, + not contained in any other filter. - 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. + 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 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 test to which the filter is applied + True if the test passes the filter, otherwise false - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Determine if a test matches the filter expicitly. That is, it must + be a direct match of the test itself or one of it's children. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The test to which the filter is applied + True if the test matches the filter explicityly, otherwise false - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + 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 first value, expected to be less - The second value, expected to be greater + The test to which the filter is applied + True if the filter matches the any parent of the test - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Determine whether any ancestor of the test matches the filter criteria - 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 test to which the filter is applied + True if the filter matches the an ancestor of the test - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Determine whether any descendant of the test matches the filter criteria. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The test to be matched + True if at least one descendant matches the filter criteria - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Create a TestFilter instance from an xml representation. - 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. + Create a TestFilter from it's TNode representation - 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. + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. - 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. + Adds an XML node - The first value, expected to be less - The second value, expected to be greater + True if recursive + The added XML node - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Adds an XML node - 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 + Parent node + True if recursive + The added XML node - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - 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. + Default Constructor creates an empty parameter set - 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. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - 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 a parameter set with a list of arguments - 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. + Construct a ParameterSet from an object implementing ITestCaseData - 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. + Type arguments used to create a generic fixture instance - 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. + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL 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. + Called when a test has just started - The first value, expected to be less - The second value, expected to be greater + The test that is starting - + - Asserts that an object is contained in a list. + Called when a test case has finished - 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 + The result of the test - + - Asserts that an object is contained in a list. + Called when a test produces output for immediate display - The expected object - The list to be examined - The message to display in case of failure + A TestOutput object containing the text to display - + - Asserts that an object is contained in a list. + Construct a new TestListener - private so it may not be used. - The expected object - The list to be examined - + - Gets the number of assertions executed so far and - resets the counter to zero. + Get a listener that does nothing - + - 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. + TestNameGenerator is able to create test names according to + a coded pattern. - + - 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 + Default pattern used to generate names - 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. Works - identically to Assert.That. + Construct a TestNameGenerator - A Constraint to be applied - The actual value to test - 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. Works - identically to Assert.That + Construct a TestNameGenerator - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message + The pattern used by this generator. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Get the display name for a TestMethod and it's arguments - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + A TestMethod + The display name - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Get the display name for a TestMethod and it's arguments - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + A TestMethod + Arguments to be used + The display name - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. - 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. + Default Constructor creates an empty parameter set - A Constraint to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a parameter set with a list of arguments - A Constraint 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 assertion exception on failure. + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - A Constraint 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 . Works Identically to Assert.That. - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Construct a ParameterSet from an object implementing ITestData + + - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to Assert.That. + The RunState for this set of parameters. - 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 Assert.That. + The arguments to be used in running the test, + which must match the method signature. - The evaluated condition - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - Returns a ListMapper based on a collection. + Gets the property dictionary for this test - 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. + Applies ParameterSet _values to the test itself. + A test. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + The original arguments provided by the user, + used for display purposes. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. - - - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Initializes a new instance of the class. - A Constraint expression to be applied - The actual value to test + The callback handler to be used for reporting progress. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Called when a test has just started - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure + 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. Sends a result summary to the callback. + to - 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 + 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 + 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. + Returns the parent test item for the targer test item if it exists - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + + parent test item - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. - 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 + The string to be used + A new string with the _values replaced - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. - A Constraint expression to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Initializes a new instance of the class. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure + The ITypeInfo for the type that represents the suite. - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Gets a string representing the type of 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 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 + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + - + - Asserts that a condition is true. If the condition is false the method throws - an . + Construct from a MethodInfo - 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 . + Gets a string representing the type of test - The evaluated condition + - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - A set of Assert methods operationg on one or more collections + Initializes a new instance of the class. + The type. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + The Test abstract class represents a test within the framework. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. - - - + - Asserts that all items contained in collection are of the type specified by expectedType. + The SetUp methods. - 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. + The teardown methods - 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. + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field - 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. + Constructs a test given its name - IEnumerable containing objects to be considered + The name of the test - + - Asserts that all items contained in collection are not equal to null. + Constructs a test given the path through the + test hierarchy to its parent and a name. - IEnumerable containing objects to be considered - The message that will be displayed on failure + The parent tests full name + The name of the test - + - Asserts that all items contained in collection are not equal to null. + TODO: Documentation needed for constructor - 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. + Construct a test from a MethodInfo - IEnumerable of objects to be considered + - + - Ensures that every object contained in collection exists within the collection - once and only once. + Gets or sets the id of the test - 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. + Gets or sets the name of the test - 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 or sets the fully qualified name of the test - 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 name of the class where this test was declared. + Returns null if the test is not associated with a class. - 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 the name of the method implementing this test. + Returns null if the test is not implemented as a method. - 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 the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. - 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. + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. - 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. + Whether or not the test should be run - 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 name used for the top-level element in the + XML representation of this test - 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. + 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. - 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 a count of test cases represented by + or contained under this test. - 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 properties for this test - 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. + Returns true if this is a TestSuite - 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 a bool indicating whether the current test + has any descendant tests. - 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 the parent as a Test object. + Used by the core to set the parent. - 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 this test's child tests - 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 + A list of child tests - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Gets or sets a fixture object for running this 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 - Arguments to be used in formatting the message - + - Asserts that expected and actual are not equivalent. + Static prefix used for ids in this AppDomain. + Set by FrameworkController. - 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 or Sets the Int value representing the seed for the RandomGenerator - 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. + Creates a TestResult for this test. - 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 + A TestResult suitable for this type of test. - + - Asserts that collection contains actual as an item. + 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. - IEnumerable of objects to be considered - Object to be found within collection + An object implementing ICustomAttributeProvider - + - Asserts that collection contains actual as an item. + Add standard attributes and members to a test node. - 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 the Xml representation of the test - 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 + If true, include child tests recursively + - + - Asserts that collection does not contain actual as an item. + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. - IEnumerable of objects to be considered - Object that cannot exist within collection + The parent node. + If true, descendant results are included + - + - Asserts that collection does not contain actual as an item. + Compares this test to another test for sorting purposes - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure + 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 - + - Asserts that collection does not contain actual as an item. + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. - 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 superset is not a subject of subset. + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The assembly this test represents. + The path used to load the assembly. - + - Asserts that superset is not a subject of subset. + Initializes a new instance of the class + for a path which could not be loaded. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure + The path used to load the assembly. - + - Asserts that superset is not a subject of subset. + Gets the Assembly represented by this instance. - 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 superset is a subset of subset. + Gets the name used for the top-level element in the + XML representation of this test - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that superset is a subset of subset. + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - + - Asserts that superset is a subset of subset. + Initializes a new instance of the class. - 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 + Type of the fixture. - + - Assert that an array, list or other collection is empty + The TestMethod class represents a Test implemented as a method. - 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 + The ParameterSet used to create this test method - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - + - 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 method to be used as a test. - + - 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 method to be used as a test. + The suite or fixture to which the new test will be added - + - Assert that an array, list or other collection is empty + Overridden to return a TestCaseResult. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + A TestResult for this test. - + - Assert that an array,list or other collection is empty + Gets a bool indicating whether the current test + has any descendant tests. - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The parent node. + If true, descendant results are included + - + - Assert that an array, list or other collection is ordered + Gets this test's child tests - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + A list of child tests - + - Assert that an array, list or other collection is ordered + Gets the name used for the top-level element in the + XML representation of this test - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + Returns the name of the method - 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 + TestSuite represents a composite test, which contains other tests. - 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 + Our collection of child tests - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - + - Static helper class used in the constraint-based syntax + Initializes a new instance of the class. + The name of the suite. - + - Creates a new SubstringConstraint + Initializes a new instance of the class. - The value of the substring - A SubstringConstraint + Name of the parent suite. + The name of the suite. - + - Creates a new CollectionContainsConstraint. + Initializes a new instance of the class. - The item that should be found. - A new CollectionContainsConstraint + Type of the fixture. - + - Summary description for DirectoryAssert + Initializes a new instance of the class. + Type of the fixture. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Sorts tests under this suite. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Adds a test to the suite. - - + The test. - + - 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 this test's child tests + The list of child tests - + - 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 a count of test cases represented by + or contained under this 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 + - + - 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. + The arguments to use in creating the fixture - 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. + Set to true to suppress sorting this suite's contents - 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. + Overridden to return a TestSuiteResult. - 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 + A TestResult for this test. - + - 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 a bool indicating whether the current test + has any descendant tests. - 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. + Gets the name used for the top-level element in the + XML representation of this test - A directory path string containing the value that is expected - A directory path string containing the actual value - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. - 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 parent node. + If true, descendant results are included + - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal + The attribute type to check for - + - Asserts that two directories are not equal. If they are equal - an is thrown. + ThreadUtility provides a set of static methods convenient + for working with threads. - 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. + Do our best to Kill a thread - 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 + The thread to kill - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Do our best to kill a thread, passing state info - 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 + The thread to kill + Info for the ThreadAbortException handler - + - Asserts that two directories are not equal. If they are equal - an is thrown. + TypeHelper provides static methods that operate on Types. - 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. + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. - 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. + Gets the display name for a Type as used by NUnit. - A directory to search - The message to display if directories are not equal + The Type for which a display name is needed. + The display name for the Type - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Gets the display name for a Type as used by NUnit. - A directory to search + The Type for which a display name is needed. + The arglist provided. + The display name for the Type - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message + The first type. + The second type. + Either type1 or type2, depending on which is more general. - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Determines whether the specified type is numeric. - A directory to search - The message to display if directories are not equal + The type to be examined. + + true if the specified type is numeric; otherwise, false. + - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. - A directory to search + An array of args to be converted + A ParameterInfo[] whose types will be used as targets - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Determines whether this instance can deduce type args for a generic type from the supplied arguments. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message + 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. + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. - 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. + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. - A directory to search + + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. - 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. + Construct a TypeWrapper for a specified Type. - 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. + Gets the underlying Type on which this TypeWrapper is based. - A directory to search - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Gets the base type of this type as an ITypeInfo - 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. + Gets the Name of the Type - 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. + Gets the FullName of the Type - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Gets the assembly in which the type is declared - 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. + Gets the namespace of the Type - 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. + Gets a value indicating whether the type is abstract. - 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. + Gets a value indicating whether the Type is a generic 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 does not contain actual as a subdirectory or - an is thrown. + Returns true if the Type wrapped is T - 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. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - 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. + Gets a value indicating whether the Type is a generic Type definition - 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. + Gets a value indicating whether the type is sealed. - 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. + Gets a value indicating whether this type represents a static class. - A directory to search - sub-directory asserted to exist under directory - + - Summary description for FileAssert. + Get the display name for this type - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Get the display name for an object of this type, constructed with the specified args. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - - - + - 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. + Returns a Type representing a generic type definition from which this Type can be constructed. - + - 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. + Returns an array of custom attributes of the specified type applied to this type - 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. + Returns a value indicating whether the type has an attribute of the specified type. - 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. + Returns a flag indicating whether this type has a method with an attribute of the specified type. - 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. + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - 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. + Gets the public constructor taking the specified argument Types - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - + - 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. + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - 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. + Construct an object of this Type, using the specified arguments. - 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. + Override ToString() so that error messages in NUnit's own tests make sense - 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 - + - 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. + Represents the result of running a single test case. - 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. + Construct a TestCaseResult based on a TestMethod - 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 + A TestMethod to which the result applies. - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Gets the number of test cases that failed + when running the test and all its children. - 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. + Gets the number of test cases that passed + when running the test and all its children. - The expected Stream - The actual Stream - + - Asserts that two files are not equal. If they are equal - an is thrown. + Gets the number of test cases that were skipped + when running the test and all its children. - 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. + Gets the number of test cases that were inconclusive + when running the test and all its children. - 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. + Indicates whether this result has any child results. - 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. + Gets the collection of child results. - 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. + Represents the result of running a test suite - 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 - + - Asserts that two files are not equal. If they are equal - an is thrown. + Construct a TestSuiteResult base on a TestSuite - The path to a file containing the value that is expected - The path to a file containing the actual value + The TestSuite to which the result applies - + - GlobalSettings is a place for setting default values used - by the framework in performing asserts. + Gets the number of test cases that failed + when running the test and all its children. - + - Default tolerance for floating point equality + Gets the number of test cases that passed + when running the test and all its children. - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Gets the number of test cases that were skipped + when running the test and all its children. - + - 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 number of test cases that were inconclusive + when running the test and all its children. - + - 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. + Indicates whether this result has any child results. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Gets the collection of child results. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + The result to be added - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + 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, 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 constraint that tests for null - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + 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 new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Returns a constraint that tests for a negative value - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Returns a constraint that tests for equality with zero - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Returns a constraint that tests for NaN - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Returns a constraint that tests for empty - + - 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. + Returns a constraint that tests whether a collection + contains all unique items. - + - Method to handle an expected exception + Returns a constraint that tests whether an object graph is serializable in binary format. - The exception to be handled - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Returns a constraint that tests whether an object graph is serializable in xml format. @@ -9562,37 +16928,37 @@ Returns a constraint that tests whether the - actual value is greater than the suppled argument + actual value is greater than the supplied argument Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + 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 suppled argument + actual value is greater than or equal to the supplied argument Returns a constraint that tests whether the - actual value is less than the suppled argument + actual value is less than the supplied argument Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + 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 suppled argument + actual value is less than or equal to the supplied argument @@ -9619,18 +16985,6 @@ 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 of the type supplied as an argument or a derived type. - - Returns a constraint that tests whether the actual value @@ -9646,13 +17000,13 @@ Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + is assignable to the type supplied as an argument. Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + is assignable to the type supplied as an argument. @@ -9668,6 +17022,17 @@ 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 constraint that succeeds if the actual @@ -9689,7 +17054,7 @@ Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + value matches the regular expression supplied as an argument. @@ -9698,10 +17063,10 @@ is the same as an expected path after canonicalization. - + Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + is a subpath of the expected path after canonicalization. @@ -9710,80 +17075,38 @@ 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 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 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 NaN - - - + - Returns a constraint that tests for empty + Returns a constraint that tests whether the actual value falls + inclusively within a specified range. + 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. + - + - Returns a constraint that tests whether a collection - contains all unique items. + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Executed before each test is run + The test that is going to be run. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Executed after each test is run + The test that has just been run. - + - Returns a constraint that tests whether a collection is ordered + Provides the target for the action attribute + The target for the action attribute @@ -9819,65 +17142,11 @@ - Produces a collection containing all the values of a property - - The collection of property values - - - - - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. - - - - - 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. - - - - - 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. - - - - - Construct a randomizer using a random seed - - - - - Construct a randomizer using a specified seed - - - - - Return an array of random doubles between 0.0 and 1.0. + Produces a collection containing all the _values of a property - + The collection of property _values - - - Return an array of random doubles with values in a specified range. - - - - - Return an array of random ints with values in a specified range. - - - - - Get a random seed for use in creating a randomizer. - - The SpecialValue enum is used to represent TestCase arguments @@ -9897,7 +17166,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -9905,7 +17174,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -9921,14 +17190,6 @@ The message to display in case of failure Arguments used in formatting the message - - - 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 - Asserts that a string is found within another string. @@ -9945,14 +17206,6 @@ The message to display in case of failure Arguments used in formatting the message - - - 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 - Asserts that a string is found within another string. @@ -9969,14 +17222,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - Asserts that a string starts with another string. @@ -9993,14 +17238,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string does not start with another 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. @@ -10017,14 +17254,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - Asserts that a string ends with another string. @@ -10041,14 +17270,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that a string does not end with another string. - - 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. @@ -10065,14 +17286,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Asserts that two strings are equal, without regard to case. @@ -10089,14 +17302,6 @@ The message to display in case of failure Arguments used in formatting the message - - - Asserts that two strings are Notequal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Asserts that two strings are not equal, without regard to case. @@ -10113,14 +17318,6 @@ The message to display in case of failure Arguments used in formatting the message - - - 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 - Asserts that a string matches an expected regular expression pattern. @@ -10137,14 +17334,6 @@ 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 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. @@ -10155,92 +17344,33 @@ 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 argument list to be provided to the test - - - - - The expected result to be returned - - - - - Set to true if this has an expected result - - - - - The expected exception Type - - - - - The FullName of the expected exception - - - - - The name to be used for the test - - - - - The description of the test - - - - - A dictionary of properties, used to add information - to tests without requiring the class to change. - - - - - If true, indicates that the test case is to be ignored - - - - - If true, indicates that the test case is marked explicit - - - - - The reason for ignoring a test case + 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. - Initializes a new instance of the class. + Initializes a new instance of the class. The arguments. - Initializes a new instance of the class. + Initializes a new instance of the class. The argument. - Initializes a new instance of the class. + Initializes a new instance of the class. The first argument. The second argument. - Initializes a new instance of the class. + Initializes a new instance of the class. The first argument. The second argument. @@ -10253,20 +17383,6 @@ The expected result A modified TestCaseData - - - Sets the expected exception type for the test - - Type of the expected exception. - The modified TestCaseData instance - - - - Sets the expected exception type for the test - - FullName of the expected exception. - The modified TestCaseData instance - Sets the name of the test case @@ -10312,11 +17428,15 @@ - + - Ignores this TestCase. + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. - @@ -10325,567 +17445,625 @@ The reason. - + - Marks this TestCase as Explicit + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. - - + - Marks this TestCase as Explicit, specifying the reason. + Construct a TestContext for an ExecutionContext - The reason. - + The ExecutionContext to adapt - + - Gets the argument list to be provided to the test + 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. - + - Gets the expected result + Gets a TextWriter that will send output to the current test result. - + - Returns true if the result has been set + Gets a TextWriter that will send output directly to Console.Error - + - Gets the expected exception Type + Gets a TextWriter for use in displaying immediate progress messages - + - Gets the FullName of the expected exception + TestParameters object holds parameters for the test run, if any are specified - + - Gets the name to be used for the test + Get a representation of the current test. - + - Gets the description of the test + Gets a Representation of the TestResult for the current test. - + - Gets a value indicating whether this is ignored. + Gets the unique name of the Worker that is executing this test. - true if ignored; otherwise, false. - + - Gets a value indicating whether this is explicit. + Gets the directory containing the current test assembly. - true if explicit; otherwise, false. - + - Gets the ignore reason. + Gets the directory to be used for outputting files created + by this test run. - The ignore reason. - + - Gets a list of categories associated with this test. + Gets the random generator. + + The random generator. + - - - Gets the property dictionary for this test - + + Write the string representation of a boolean value to the current result - - - Provide the context information of the current test - + + Write a char to the current result - - - Constructs a TestContext using the provided context dictionary - - A context dictionary + + Write a char array to the current result - - - 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. - + + Write the string representation of a double to the current result - - - Gets a TestAdapter representing the currently executing test in this context. - + + Write the string representation of an Int32 value to the current result - - - Gets a ResultAdapter representing the current result for the test - executing in this context. - + + Write the string representation of an Int64 value to the current result - - - Gets the directory containing the current test assembly. - + + Write the string representation of a decimal value to the current result - - - Gets the directory to be used for outputing files created - by this test run. - + + Write the string representation of an object to the current result - - - TestAdapter adapts a Test for consumption by - the user test code. - + + 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 + + - Constructs a TestAdapter for this context + This method adds the a new ValueFormatterFactory to the + chain of responsibility used for fomatting values in messages. + The scope of the change is the current TestContext. - The context dictionary + The factory delegate - + - The name of the test. + 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 compould function. + The type supported by this formatter + The ValueFormatter delegate - + - The FullName of the test + TestAdapter adapts a Test for consumption by + the user test code. - + - The properties of the test. + Construct a TestAdapter for a Test + The Test to be adapted - + - ResultAdapter adapts a TestResult for consumption by - the user test code. + Gets the unique Id of a test - + - Construct a ResultAdapter for a context + The name of the test, which may or may not be + the same as the method name. - 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. + The name of the method representing the test. - + - 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. + The FullName of the test - + - Provides details about a test + The ClassName of the test - + - Creates an instance of TestDetails + The properties of the test. - 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. + ResultAdapter adapts a TestResult for consumption by + the user test code. - + - The method that implements the test, if available. + Construct a ResultAdapter for a TestResult + The TestResult to be adapted - + - The full name of the test. + Gets a ResultState representing the outcome of the test. - + - A string representing the type of test, e.g. "Test Case". + Gets the message associated with a test + failure or with not running the test - + - Indicates if the test represents a suite of tests. + Gets any stacktrace associated with an + error or failure. - + - The ResultState enum indicates the result of running a test + Gets the number of test cases that failed + when running the test and all its children. - + - The result is inconclusive + Gets the number of test cases that passed + when running the test and all its children. - + - The test was not runnable. + Gets the number of test cases that were skipped + when running the test and all its children. - + - The test has been skipped. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - The test has been ignored. + 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. - + - The test succeeded + Initializes a new instance of the class. + The arguments. - + - The test failed + Initializes a new instance of the class. + The argument. - + - The test encountered an unexpected exception + Initializes a new instance of the class. + The first argument. + The second argument. - + - The test was cancelled by the user + Initializes a new instance of the class. + The first argument. + The second argument. + The third argument. - + - The TestStatus enum indicates the result of running a test + Marks the test fixture as explicit. - + - The test was inconclusive + Marks the test fixture as explicit, specifying the reason. - + - The test has skipped + Ignores this TestFixture, specifying the reason. + The reason. + - + - The test succeeded + TestParameters class holds any named parameters supplied to the test run - + - The test failed + Gets the number of test parameters - + - Helper class with static methods used to supply constraints - that operate on strings. + Gets a collection of the test parameter names - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets a flag indicating whether a parameter with the specified name exists.N + Name of the parameter + True if it exists, otherwise false - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + Indexer provides access to the internal dictionary + Name of the parameter + Value of the parameter or null if not present - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Get method is a simple alternative to the indexer + Name of the paramter + Value of the parameter or null if not present - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + 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 - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Get the value of a parameter or return a default + The return Type + Name of the parameter + Default value of the parameter + Value of the parameter or default value if not present - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Adds a parameter to the list + Name of the parameter + Value of the parameter - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Helper class with properties and methods that supply + constraints that operate on exceptions. - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Creates a constraint specifying an expected exception - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Creates a constraint specifying an exception with a given InnerException - + - 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. + Creates a constraint specifying an expected TargetInvocationException - + - Prefix used for the expected value line of a message + Creates a constraint specifying an expected ArgumentException - + - Prefix used for the actual value line of a message + Creates a constraint specifying an expected ArgumentNUllException - + - Length of a message prefix + Creates a constraint specifying an expected InvalidOperationException - + - Construct a TextMessageWriter + Creates a constraint specifying that no exception is thrown - + - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. + Creates a constraint specifying the exact type of exception expected - - - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. + Creates a constraint specifying the exact type of exception expected - 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. + Creates a constraint specifying the type of exception expected - 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. + Creates a constraint specifying the type of exception expected - 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. + 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. - 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. + Flag (bool) indicating whether tests are being debugged. - 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 - + - Writes the text for a connector. + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. - The connector. - + - Writes the text for a predicate. + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. - The predicate. - + - Write the text for a modifier. + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. - The modifier. - + - Writes the text for an expected value. + 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. - The expected value. - + - Writes the text for an actual value. + A TextWriter to which the internal trace will be sent. - The actual value. - + - Writes the text for a generalized value. + A list of tests to be loaded. - The value. - + - Writes the text for a collection value, - starting at a particular point, to a max length + 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. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - + - Write the generic 'Expected' line for a constraint + 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. - The constraint that failed - + - Write the generic 'Expected' line for a given value + If true, execution stops after the first error or failure. - The expected value - + - Write the generic 'Expected' line for a given value - and tolerance. + If true, use of the event queue is suppressed and test events are synchronous. - The expected value - The tolerance within which the test was made - + - Write the generic 'Actual' line for a constraint + The default naming pattern used in generating test names - The constraint for which the actual value is to be written - + - Write the generic 'Actual' line for a given value + Parameters to be passed on to the test - The actual value causing a failure - + - Gets or sets the maximum line length for this writer + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. - + - Helper class with properties and methods that supply - constraints that operate on exceptions. + 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. - + - Creates a constraint specifying the exact type of exception expected + A MarshalByRefObject that lives forever - + - Creates a constraint specifying the exact type of exception expected + Obtains a lifetime service object to control the lifetime policy for this instance. - + - Creates a constraint specifying the type of exception expected + Type extensions that apply to all target frameworks - + - Creates a constraint specifying the type of exception expected + Determines if the given array is castable/matches the array. + + + - + - Creates a constraint specifying an expected exception + Determines if one type can be implicitly converted from another + + + - + - Creates a constraint specifying an exception with a given InnerException + 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. - + - Creates a constraint specifying an expected TargetInvocationException + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes - + - Creates a constraint specifying an expected TargetInvocationException + The newline sequence in the current environment. - + - Creates a constraint specifying an expected TargetInvocationException + Path to the 'My Documents' folder - + - Creates a constraint specifying that no exception is thrown + Directory used for file output if not specified on commandline. diff --git a/src/NHibernate.Test.Linq/App.config b/src/NHibernate.Test.Linq/App.config new file mode 100644 index 00000000000..83a2785b7d4 --- /dev/null +++ b/src/NHibernate.Test.Linq/App.config @@ -0,0 +1,111 @@ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + NHibernate.Dialect.MsSql2008Dialect + + NHibernate.Driver.SqlClientDriver + TestConnectionString + NHibernate.Test.DebugConnectionProvider, NHibernate.Test + ReadCommitted + + + NHibernate.Cache.HashtableCacheProvider, NHibernate + true + + false + true 1, false 0, yes 'Y', no 'N' + + 10 + false + + none + true + false + 444 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/NHibernate.Test.Linq/AssemblyInfo.cs b/src/NHibernate.Test.Linq/AssemblyInfo.cs new file mode 100644 index 00000000000..2f7e909a6eb --- /dev/null +++ b/src/NHibernate.Test.Linq/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System; +using System.Reflection; + +[assembly: CLSCompliantAttribute(false)] +[assembly: AssemblyTitleAttribute("NHibernate.Test.Linq")] +[assembly: AssemblyDescriptionAttribute("The Unit Tests for NHibernate.")] +[assembly: AssemblyCompanyAttribute("NHibernate.info")] +[assembly: AssemblyProductAttribute("NHibernate.Test.Linq")] +[assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] +[assembly: AssemblyDelaySignAttribute(false)] + diff --git a/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql b/src/NHibernate.Test.Linq/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql similarity index 100% rename from src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql rename to src/NHibernate.Test.Linq/DbScripts/MsSql2008DialectLinqReadonlyCreateScript.sql diff --git a/src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql b/src/NHibernate.Test.Linq/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql similarity index 100% rename from src/NHibernate.Test/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql rename to src/NHibernate.Test.Linq/DbScripts/MsSql2008DialectLinqReadonlyDropScript.sql diff --git a/src/NHibernate.Test/DbScripts/MsSql2012DialectLinqReadonlyCreateScript.sql b/src/NHibernate.Test.Linq/DbScripts/MsSql2012DialectLinqReadonlyCreateScript.sql similarity index 100% rename from src/NHibernate.Test/DbScripts/MsSql2012DialectLinqReadonlyCreateScript.sql rename to src/NHibernate.Test.Linq/DbScripts/MsSql2012DialectLinqReadonlyCreateScript.sql diff --git a/src/NHibernate.Test/DbScripts/MsSql2012DialectLinqReadonlyDropScript.sql b/src/NHibernate.Test.Linq/DbScripts/MsSql2012DialectLinqReadonlyDropScript.sql similarity index 100% rename from src/NHibernate.Test/DbScripts/MsSql2012DialectLinqReadonlyDropScript.sql rename to src/NHibernate.Test.Linq/DbScripts/MsSql2012DialectLinqReadonlyDropScript.sql diff --git a/src/NHibernate.Test/DbScripts/PostgreSQL82DialectLinqReadonlyCreateScript.sql b/src/NHibernate.Test.Linq/DbScripts/PostgreSQL82DialectLinqReadonlyCreateScript.sql similarity index 100% rename from src/NHibernate.Test/DbScripts/PostgreSQL82DialectLinqReadonlyCreateScript.sql rename to src/NHibernate.Test.Linq/DbScripts/PostgreSQL82DialectLinqReadonlyCreateScript.sql diff --git a/src/NHibernate.Test/DbScripts/PostgreSQL82DialectLinqReadonlyDropScript.sql b/src/NHibernate.Test.Linq/DbScripts/PostgreSQL82DialectLinqReadonlyDropScript.sql similarity index 100% rename from src/NHibernate.Test/DbScripts/PostgreSQL82DialectLinqReadonlyDropScript.sql rename to src/NHibernate.Test.Linq/DbScripts/PostgreSQL82DialectLinqReadonlyDropScript.sql diff --git a/src/NHibernate.Test/Linq/AggregateTests.cs b/src/NHibernate.Test.Linq/Linq/AggregateTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/AggregateTests.cs rename to src/NHibernate.Test.Linq/Linq/AggregateTests.cs diff --git a/src/NHibernate.Test/Linq/BinaryBooleanExpressionTests.cs b/src/NHibernate.Test.Linq/Linq/BinaryBooleanExpressionTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/BinaryBooleanExpressionTests.cs rename to src/NHibernate.Test.Linq/Linq/BinaryBooleanExpressionTests.cs diff --git a/src/NHibernate.Test/Linq/BinaryExpressionOrdererTests.cs b/src/NHibernate.Test.Linq/Linq/BinaryExpressionOrdererTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/BinaryExpressionOrdererTests.cs rename to src/NHibernate.Test.Linq/Linq/BinaryExpressionOrdererTests.cs diff --git a/src/NHibernate.Test/Linq/BooleanMethodExtensionExample.cs b/src/NHibernate.Test.Linq/Linq/BooleanMethodExtensionExample.cs similarity index 100% rename from src/NHibernate.Test/Linq/BooleanMethodExtensionExample.cs rename to src/NHibernate.Test.Linq/Linq/BooleanMethodExtensionExample.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/AnyTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/AnyTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/AnyTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/AnyTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/AssertOrderedBy.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/AssertOrderedBy.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/AssertOrderedBy.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/AssertOrderedBy.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/AverageTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/AverageTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/AverageTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/AverageTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/CastTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/CastTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/CastTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/CastTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/CountTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/CountTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/CountTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/CountTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/DistinctTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/DistinctTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/DistinctTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/DistinctTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/GetValueOrDefaultTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/GetValueOrDefaultTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/GetValueOrDefaultTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/GetValueOrDefaultTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/GroupByHavingTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/GroupByHavingTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/GroupByHavingTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/GroupByHavingTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/GroupByTests.cs similarity index 99% rename from src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/GroupByTests.cs index e358edb3a6e..d4e5a061153 100644 --- a/src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs +++ b/src/NHibernate.Test.Linq/Linq/ByMethod/GroupByTests.cs @@ -63,7 +63,7 @@ into g select g.Key).ToList(); Assert.That(orders.Count, Is.EqualTo(481)); - Assert.That(Regex.Replace(spy.GetWholeLog(), @"\s+", " "), Is.StringContaining("group by order0_.OrderDate")); + Assert.That(Regex.Replace(spy.GetWholeLog(), @"\s+", " "), Does.Contain("group by order0_.OrderDate")); } } diff --git a/src/NHibernate.Test/Linq/ByMethod/OrderByTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/OrderByTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/OrderByTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/OrderByTests.cs diff --git a/src/NHibernate.Test/Linq/ByMethod/SumTests.cs b/src/NHibernate.Test.Linq/Linq/ByMethod/SumTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ByMethod/SumTests.cs rename to src/NHibernate.Test.Linq/Linq/ByMethod/SumTests.cs diff --git a/src/NHibernate.Test/Linq/CasingTest.cs b/src/NHibernate.Test.Linq/Linq/CasingTest.cs similarity index 100% rename from src/NHibernate.Test/Linq/CasingTest.cs rename to src/NHibernate.Test.Linq/Linq/CasingTest.cs diff --git a/src/NHibernate.Test/Linq/CharComparisonTests.cs b/src/NHibernate.Test.Linq/Linq/CharComparisonTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/CharComparisonTests.cs rename to src/NHibernate.Test.Linq/Linq/CharComparisonTests.cs diff --git a/src/NHibernate.Test/Linq/CustomExtensionsExample.cs b/src/NHibernate.Test.Linq/Linq/CustomExtensionsExample.cs similarity index 100% rename from src/NHibernate.Test/Linq/CustomExtensionsExample.cs rename to src/NHibernate.Test.Linq/Linq/CustomExtensionsExample.cs diff --git a/src/NHibernate.Test/Linq/CustomQueryModelRewriterTests.cs b/src/NHibernate.Test.Linq/Linq/CustomQueryModelRewriterTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/CustomQueryModelRewriterTests.cs rename to src/NHibernate.Test.Linq/Linq/CustomQueryModelRewriterTests.cs diff --git a/src/NHibernate.Test/Linq/DateTimeTests.cs b/src/NHibernate.Test.Linq/Linq/DateTimeTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/DateTimeTests.cs rename to src/NHibernate.Test.Linq/Linq/DateTimeTests.cs diff --git a/src/NHibernate.Test/Linq/DynamicQueryTests.cs b/src/NHibernate.Test.Linq/Linq/DynamicQueryTests.cs similarity index 92% rename from src/NHibernate.Test/Linq/DynamicQueryTests.cs rename to src/NHibernate.Test.Linq/Linq/DynamicQueryTests.cs index 46425ce216e..9943f23d23d 100644 --- a/src/NHibernate.Test/Linq/DynamicQueryTests.cs +++ b/src/NHibernate.Test.Linq/Linq/DynamicQueryTests.cs @@ -34,7 +34,7 @@ public void CanCahceDynamicLinq() using (var log = new SqlLogSpy()) { users.ToList(); - Assert.IsNullOrEmpty(log.GetWholeLog()); + Assert.That(log.GetWholeLog(), Is.Null.Or.Empty); } } } diff --git a/src/NHibernate.Test/Linq/EagerLoadTests.cs b/src/NHibernate.Test.Linq/Linq/EagerLoadTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/EagerLoadTests.cs rename to src/NHibernate.Test.Linq/Linq/EagerLoadTests.cs diff --git a/src/NHibernate.Test/Linq/EnumTests.cs b/src/NHibernate.Test.Linq/Linq/EnumTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/EnumTests.cs rename to src/NHibernate.Test.Linq/Linq/EnumTests.cs diff --git a/src/NHibernate.Test/Linq/ExpressionSessionLeakTest.cs b/src/NHibernate.Test.Linq/Linq/ExpressionSessionLeakTest.cs similarity index 100% rename from src/NHibernate.Test/Linq/ExpressionSessionLeakTest.cs rename to src/NHibernate.Test.Linq/Linq/ExpressionSessionLeakTest.cs diff --git a/src/NHibernate.Test/Linq/ExtensionMethods.cs b/src/NHibernate.Test.Linq/Linq/ExtensionMethods.cs similarity index 100% rename from src/NHibernate.Test/Linq/ExtensionMethods.cs rename to src/NHibernate.Test.Linq/Linq/ExtensionMethods.cs diff --git a/src/NHibernate.Test/Linq/FunctionTests.cs b/src/NHibernate.Test.Linq/Linq/FunctionTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/FunctionTests.cs rename to src/NHibernate.Test.Linq/Linq/FunctionTests.cs diff --git a/src/NHibernate.Test/Linq/JoinTests.cs b/src/NHibernate.Test.Linq/Linq/JoinTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/JoinTests.cs rename to src/NHibernate.Test.Linq/Linq/JoinTests.cs diff --git a/src/NHibernate.Test/Linq/LinqQuerySamples.cs b/src/NHibernate.Test.Linq/Linq/LinqQuerySamples.cs old mode 100755 new mode 100644 similarity index 100% rename from src/NHibernate.Test/Linq/LinqQuerySamples.cs rename to src/NHibernate.Test.Linq/Linq/LinqQuerySamples.cs diff --git a/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs b/src/NHibernate.Test.Linq/Linq/LinqReadonlyTestsContext.cs similarity index 96% rename from src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs rename to src/NHibernate.Test.Linq/Linq/LinqReadonlyTestsContext.cs index 9b501f16e02..a7416acea60 100644 --- a/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs +++ b/src/NHibernate.Test.Linq/Linq/LinqReadonlyTestsContext.cs @@ -48,7 +48,7 @@ private IEnumerable Mappings } } - [SetUp] + [OneTimeSetUp] public void CreateNorthwindDb() { Configuration configuration = Configure(); @@ -85,7 +85,7 @@ private void ExecuteScriptFile(Configuration configuration, string scripFileName } } - [TearDown] + [OneTimeTearDown] public void DestroyNorthwindDb() { Configuration configuration = Configure(); @@ -103,7 +103,7 @@ public void DestroyNorthwindDb() private string GetScripFileName(Configuration configuration,string postFix) { var dialect = Dialect.Dialect.GetDialect(configuration.Properties); - return Path.Combine("DbScripts", dialect.GetType().Name + postFix + ".sql"); + return Path.Combine(TestContext.CurrentContext.TestDirectory, "DbScripts", dialect.GetType().Name + postFix + ".sql"); } private Configuration Configure() @@ -143,4 +143,4 @@ private void CreateTestData(ISessionFactory sessionFactory) } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Linq/LinqTestCase.cs b/src/NHibernate.Test.Linq/Linq/LinqTestCase.cs old mode 100755 new mode 100644 similarity index 100% rename from src/NHibernate.Test/Linq/LinqTestCase.cs rename to src/NHibernate.Test.Linq/Linq/LinqTestCase.cs diff --git a/src/NHibernate.Test/Linq/LinqToHqlGeneratorsRegistryFactoryTest.cs b/src/NHibernate.Test.Linq/Linq/LinqToHqlGeneratorsRegistryFactoryTest.cs similarity index 100% rename from src/NHibernate.Test/Linq/LinqToHqlGeneratorsRegistryFactoryTest.cs rename to src/NHibernate.Test.Linq/Linq/LinqToHqlGeneratorsRegistryFactoryTest.cs diff --git a/src/NHibernate.Test/Linq/LoggingTests.cs b/src/NHibernate.Test.Linq/Linq/LoggingTests.cs similarity index 94% rename from src/NHibernate.Test/Linq/LoggingTests.cs rename to src/NHibernate.Test.Linq/Linq/LoggingTests.cs index a42e7aa5eef..b89ef0f49fd 100644 --- a/src/NHibernate.Test/Linq/LoggingTests.cs +++ b/src/NHibernate.Test.Linq/Linq/LoggingTests.cs @@ -23,7 +23,7 @@ public void PageBetweenProjections() const string expected = "Expression (partially evaluated): value(NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Product]).Where(p => value(NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Product]).Where(p => (p.ProductId > 5)).Contains(p)).Skip(5).Take(10)"; - Assert.That(logtext, Is.StringContaining(expected)); + Assert.That(logtext, Does.Contain(expected)); } } @@ -50,7 +50,7 @@ public void CanLogLinqExpressionWithoutInitializingContainedProxy() string expectedLog = "Expression (partially evaluated): value(NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Product])" + ".Where(product => (product == Product#" + productId + ")).Count()"; - Assert.That(actualLog, Is.StringContaining(expectedLog)); + Assert.That(actualLog, Does.Contain(expectedLog)); // And verify that the proxy in the expression wasn't initialized. Assert.That(NHibernateUtil.IsInitialized(productProxy), Is.False, diff --git a/src/NHibernate.Test/Linq/MathTests.cs b/src/NHibernate.Test.Linq/Linq/MathTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/MathTests.cs rename to src/NHibernate.Test.Linq/Linq/MathTests.cs diff --git a/src/NHibernate.Test/Linq/MethodCallTests.cs b/src/NHibernate.Test.Linq/Linq/MethodCallTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/MethodCallTests.cs rename to src/NHibernate.Test.Linq/Linq/MethodCallTests.cs diff --git a/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs b/src/NHibernate.Test.Linq/Linq/MiscellaneousTextFixture.cs similarity index 100% rename from src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs rename to src/NHibernate.Test.Linq/Linq/MiscellaneousTextFixture.cs diff --git a/src/NHibernate.Test/Linq/NestedSelectsTests.cs b/src/NHibernate.Test.Linq/Linq/NestedSelectsTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/NestedSelectsTests.cs rename to src/NHibernate.Test.Linq/Linq/NestedSelectsTests.cs diff --git a/src/NHibernate.Test/Linq/NorthwindDbCreator.cs b/src/NHibernate.Test.Linq/Linq/NorthwindDbCreator.cs similarity index 100% rename from src/NHibernate.Test/Linq/NorthwindDbCreator.cs rename to src/NHibernate.Test.Linq/Linq/NorthwindDbCreator.cs diff --git a/src/NHibernate.Test/Linq/NullComparisonTests.cs b/src/NHibernate.Test.Linq/Linq/NullComparisonTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/NullComparisonTests.cs rename to src/NHibernate.Test.Linq/Linq/NullComparisonTests.cs diff --git a/src/NHibernate.Test/Linq/ObjectDumper.cs b/src/NHibernate.Test.Linq/Linq/ObjectDumper.cs similarity index 100% rename from src/NHibernate.Test/Linq/ObjectDumper.cs rename to src/NHibernate.Test.Linq/Linq/ObjectDumper.cs diff --git a/src/NHibernate.Test/Linq/OperatorTests.cs b/src/NHibernate.Test.Linq/Linq/OperatorTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/OperatorTests.cs rename to src/NHibernate.Test.Linq/Linq/OperatorTests.cs diff --git a/src/NHibernate.Test/Linq/PagingTests.cs b/src/NHibernate.Test.Linq/Linq/PagingTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/PagingTests.cs rename to src/NHibernate.Test.Linq/Linq/PagingTests.cs diff --git a/src/NHibernate.Test/Linq/ParameterisedQueries.cs b/src/NHibernate.Test.Linq/Linq/ParameterisedQueries.cs similarity index 100% rename from src/NHibernate.Test/Linq/ParameterisedQueries.cs rename to src/NHibernate.Test.Linq/Linq/ParameterisedQueries.cs diff --git a/src/NHibernate.Test/Linq/PatientTests.cs b/src/NHibernate.Test.Linq/Linq/PatientTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/PatientTests.cs rename to src/NHibernate.Test.Linq/Linq/PatientTests.cs diff --git a/src/NHibernate.Test/Linq/ProjectionsTests.cs b/src/NHibernate.Test.Linq/Linq/ProjectionsTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/ProjectionsTests.cs rename to src/NHibernate.Test.Linq/Linq/ProjectionsTests.cs diff --git a/src/NHibernate.Test/Linq/PropertyMethodMappingTests.cs b/src/NHibernate.Test.Linq/Linq/PropertyMethodMappingTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/PropertyMethodMappingTests.cs rename to src/NHibernate.Test.Linq/Linq/PropertyMethodMappingTests.cs diff --git a/src/NHibernate.Test/Linq/QueryCacheableTests.cs b/src/NHibernate.Test.Linq/Linq/QueryCacheableTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/QueryCacheableTests.cs rename to src/NHibernate.Test.Linq/Linq/QueryCacheableTests.cs diff --git a/src/NHibernate.Test/Linq/QueryReuseTests.cs b/src/NHibernate.Test.Linq/Linq/QueryReuseTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/QueryReuseTests.cs rename to src/NHibernate.Test.Linq/Linq/QueryReuseTests.cs diff --git a/src/NHibernate.Test/Linq/QueryTimeoutTests.cs b/src/NHibernate.Test.Linq/Linq/QueryTimeoutTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/QueryTimeoutTests.cs rename to src/NHibernate.Test.Linq/Linq/QueryTimeoutTests.cs diff --git a/src/NHibernate.Test/Linq/ReadonlyTestCase.cs b/src/NHibernate.Test.Linq/Linq/ReadonlyTestCase.cs similarity index 100% rename from src/NHibernate.Test/Linq/ReadonlyTestCase.cs rename to src/NHibernate.Test.Linq/Linq/ReadonlyTestCase.cs diff --git a/src/NHibernate.Test/Linq/RegresstionTests.cs b/src/NHibernate.Test.Linq/Linq/RegresstionTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/RegresstionTests.cs rename to src/NHibernate.Test.Linq/Linq/RegresstionTests.cs diff --git a/src/NHibernate.Test/Linq/SelectionTests.cs b/src/NHibernate.Test.Linq/Linq/SelectionTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/SelectionTests.cs rename to src/NHibernate.Test.Linq/Linq/SelectionTests.cs diff --git a/src/NHibernate.Test/Linq/StatelessSessionQueringTest.cs b/src/NHibernate.Test.Linq/Linq/StatelessSessionQueringTest.cs similarity index 100% rename from src/NHibernate.Test/Linq/StatelessSessionQueringTest.cs rename to src/NHibernate.Test.Linq/Linq/StatelessSessionQueringTest.cs diff --git a/src/NHibernate.Test/Linq/WhereSubqueryTests.cs b/src/NHibernate.Test.Linq/Linq/WhereSubqueryTests.cs similarity index 100% rename from src/NHibernate.Test/Linq/WhereSubqueryTests.cs rename to src/NHibernate.Test.Linq/Linq/WhereSubqueryTests.cs diff --git a/src/NHibernate.Test/Linq/WhereTests.cs b/src/NHibernate.Test.Linq/Linq/WhereTests.cs similarity index 98% rename from src/NHibernate.Test/Linq/WhereTests.cs rename to src/NHibernate.Test.Linq/Linq/WhereTests.cs index d42246bc0d8..2f8f66e5c0a 100644 --- a/src/NHibernate.Test/Linq/WhereTests.cs +++ b/src/NHibernate.Test.Linq/Linq/WhereTests.cs @@ -753,13 +753,13 @@ public void CanUseCompareInQueryWithNonConstantZero() // This should generate SQL with some nested case expressions - it should not be // simplified. string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, Is.StringContaining("when lower(product0_.ProductName)=")); + Assert.That(wholeLog, Does.Contain("when lower(product0_.ProductName)=")); } } [Test(Description = "NH-3366")] - [TestCaseSource(typeof(WhereTests), "CanUseCompareInQueryDataSource")] + [TestCaseSource(typeof(WhereTests), nameof(CanUseCompareInQueryDataSource))] public void CanUseCompareInQuery(Expression> expression, int expectedCount, bool expectCase) { using (var ls = new SqlLogSpy()) @@ -769,12 +769,12 @@ public void CanUseCompareInQuery(Expression> expression, int Assert.That(result, Has.Count.EqualTo(expectedCount)); string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, expectCase ? Is.StringContaining("case") : Is.Not.StringContaining("case")); + Assert.That(wholeLog, expectCase ? Does.Contain("case") : Does.Not.Contain("case")); } } - private List CanUseCompareInQueryDataSource() + private static List CanUseCompareInQueryDataSource() { return new List { diff --git a/src/NHibernate.Test.Linq/NHibernate.Test.Linq.csproj b/src/NHibernate.Test.Linq/NHibernate.Test.Linq.csproj new file mode 100644 index 00000000000..860dea962d6 --- /dev/null +++ b/src/NHibernate.Test.Linq/NHibernate.Test.Linq.csproj @@ -0,0 +1,224 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2F02D2C6-38DA-48F5-A941-DC2A22CFC430} + Library + Properties + NHibernate.Test.Linq + NHibernate.Test.Linq + + + 3.5 + + + v4.6.1 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + Program + $(MSBuildProjectDirectory)\..\..\Tools\nunit\nunit-x86.exe + NHibernate.Test.dll + + + + true + full + false + bin\Debug-2.0\ + obj\ + obj\Debug-2.0\ + NET,NET_2_0 + prompt + 4 + false + 3001%3b3002%3b3003%3b3004%3b3005 + AllRules.ruleset + AnyCPU + false + + + pdbonly + true + bin\Release-2.0\ + obj\ + obj\Release-2.0\ + TRACE;NET,NET_2_0 + prompt + 4 + false + 3001%3b3002%3b3003%3b3004%3b3005 + AllRules.ruleset + false + + + + False + ..\..\lib\net\Antlr3.Runtime.dll + + + ..\..\lib\net\4.0\Iesi.Collections.dll + + + False + ..\..\lib\net\log4net.dll + + + False + ..\..\lib\net\nunit.framework.dll + + + False + ..\..\lib\net\Remotion.Linq.dll + + + + + 3.5 + + + + + + False + ..\..\lib\net\System.Linq.Dynamic.dll + + + + + 3.5 + + + + + SharedAssemblyInfo.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + Always + + + Always + + + + + {5C649B55-1B3F-4C38-9998-1B043E94A244} + NHibernate.DomainModel + + + {7aee5b37-c552-4e59-9b6f-88755bcb5070} + NHibernate.Test + + + {5909BFE7-93CF-4E5F-BE22-6293368AF01D} + NHibernate + + + + + + + + + Always + + + Always + + + Always + + + Always + + + + + + + + + + diff --git a/src/NHibernate.Test.Linq/NHibernate.Test.Linq.nunit b/src/NHibernate.Test.Linq/NHibernate.Test.Linq.nunit new file mode 100644 index 00000000000..3a114490f5b --- /dev/null +++ b/src/NHibernate.Test.Linq/NHibernate.Test.Linq.nunit @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/NHibernate.Test/Ado/BatcherFixture.cs b/src/NHibernate.Test/Ado/BatcherFixture.cs index 0c770744957..835ed5c3f5f 100644 --- a/src/NHibernate.Test/Ado/BatcherFixture.cs +++ b/src/NHibernate.Test/Ado/BatcherFixture.cs @@ -177,9 +177,9 @@ public void SqlLog() sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Is.Not.StringContaining("Adding to batch").IgnoreCase); - Assert.That(logs, Is.StringContaining("Batch command").IgnoreCase); - Assert.That(logs, Is.StringContaining("INSERT").IgnoreCase); + Assert.That(logs, Does.Not.Contain("Adding to batch").IgnoreCase); + Assert.That(logs, Does.Contain("Batch command").IgnoreCase); + Assert.That(logs, Does.Contain("INSERT").IgnoreCase); } } @@ -201,13 +201,13 @@ public void AbstractBatcherLog() sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Is.StringContaining("batch").IgnoreCase); + Assert.That(logs, Does.Contain("batch").IgnoreCase); foreach (var loggingEvent in sl.Appender.GetEvents()) { string message = loggingEvent.RenderedMessage; if(message.ToLowerInvariant().Contains("insert")) { - Assert.That(message, Is.StringContaining("batch").IgnoreCase); + Assert.That(message, Does.Contain("batch").IgnoreCase); } } } @@ -227,7 +227,7 @@ public void SqlLogShouldGetBatchCommandNotification() sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Is.StringContaining("Batch commands:").IgnoreCase); + Assert.That(logs, Does.Contain("Batch commands:").IgnoreCase); } } @@ -257,8 +257,8 @@ public void AbstractBatcherLogFormattedSql() { if(sqlLine.Contains("p0")) { - Assert.That(sqlLine, Is.StringContaining("p1")); - Assert.That(sqlLine, Is.StringContaining("p2")); + Assert.That(sqlLine, Does.Contain("p1")); + Assert.That(sqlLine, Does.Contain("p2")); } } } @@ -270,4 +270,4 @@ public void AbstractBatcherLogFormattedSql() Cleanup(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs b/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs index 17654928cb2..a721fc6f2e6 100644 --- a/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs +++ b/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs @@ -28,9 +28,9 @@ public void UnableToLoadProxyFactoryFactory() } catch (HibernateByteCodeException e) { - Assert.That(e.Message, Is.StringStarting("Unable to load type")); - Assert.That(e.Message, Is.StringContaining("Possible causes")); - Assert.That(e.Message, Is.StringContaining("Confirm that your deployment folder contains")); + Assert.That(e.Message, Does.StartWith("Unable to load type")); + Assert.That(e.Message, Does.Contain("Possible causes")); + Assert.That(e.Message, Does.Contain("Confirm that your deployment folder contains")); } } @@ -62,7 +62,7 @@ public void CantCreateProxyFactoryFactory() } catch (HibernateByteCodeException e) { - Assert.That(e.Message,Is.StringStarting("Failed to create an instance of")); + Assert.That(e.Message,Does.StartWith("Failed to create an instance of")); } } @@ -156,4 +156,4 @@ public void ShouldNotThrownAnExceptionWithTheSameTypeOfCollectionTypeFactory() Assert.DoesNotThrow(() => bcp.SetCollectionTypeFactoryClass(typeof (Type.DefaultCollectionTypeFactory))); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs b/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs index 2d56b6aaa6b..581031b0368 100644 --- a/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs +++ b/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs @@ -114,7 +114,7 @@ public void ToStringWithFilters() var fk = new FilterKey(filterName, f.Parameters, f.FilterDefinition.ParameterTypes, EntityMode.Poco); ISet fks = new HashSet { fk }; var qk = new QueryKey(sessions, SqlAll, new QueryParameters(), fks, null); - Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}']",fk))); + Assert.That(qk.ToString(), Does.Contain(string.Format("filters: ['{0}']",fk))); filterName = "DescriptionEqualAndValueGT"; f = new FilterImpl(sessions.GetFilterDefinition(filterName)); @@ -122,7 +122,7 @@ public void ToStringWithFilters() fk = new FilterKey(filterName, f.Parameters, f.FilterDefinition.ParameterTypes, EntityMode.Poco); fks = new HashSet { fk }; qk = new QueryKey(sessions, SqlAll, new QueryParameters(), fks, null); - Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}']", fk))); + Assert.That(qk.ToString(), Does.Contain(string.Format("filters: ['{0}']", fk))); } [Test] @@ -140,7 +140,7 @@ public void ToStringWithMoreFilters() ISet fks = new HashSet { fk, fvk }; var qk = new QueryKey(sessions, SqlAll, new QueryParameters(), fks, null); - Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}', '{1}']", fk, fvk))); + Assert.That(qk.ToString(), Does.Contain(string.Format("filters: ['{0}', '{1}']", fk, fvk))); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs b/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs index c0be0362d67..7c3c854f688 100644 --- a/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs +++ b/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs @@ -9,7 +9,7 @@ public class AccessorsSerializableTest { private static System.Type[] accessors = typeof (IPropertyAccessor).Assembly.GetTypes().Where(t => t.Namespace == typeof (IPropertyAccessor).Namespace && t.GetInterfaces().Contains(typeof (IPropertyAccessor))).ToArray(); - [Test, TestCaseSource("accessors")] + [Test, TestCaseSource(nameof(accessors))] public void AllAccessorsAreMarkedAsSerializable(System.Type concreteAccessor) { Assert.That(concreteAccessor, Has.Attribute()); @@ -17,7 +17,7 @@ public void AllAccessorsAreMarkedAsSerializable(System.Type concreteAccessor) private static System.Type[] setters = typeof(ISetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(ISetter).Namespace && t.GetInterfaces().Contains(typeof(ISetter))).ToArray(); - [Test, TestCaseSource("setters")] + [Test, TestCaseSource(nameof(setters))] public void AllSettersAreMarkedAsSerializable(System.Type concreteAccessor) { Assert.That(concreteAccessor, Has.Attribute()); @@ -25,10 +25,10 @@ public void AllSettersAreMarkedAsSerializable(System.Type concreteAccessor) private static System.Type[] getters = typeof(IGetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(IGetter).Namespace && t.GetInterfaces().Contains(typeof(IGetter))).ToArray(); - [Test, TestCaseSource("getters")] + [Test, TestCaseSource(nameof(getters))] public void AllGettersAreMarkedAsSerializable(System.Type concreteAccessor) { Assert.That(concreteAccessor, Has.Attribute()); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/ConfigurationFixture.cs b/src/NHibernate.Test/CfgTest/ConfigurationFixture.cs index f2bd934b860..a99c52838d4 100644 --- a/src/NHibernate.Test/CfgTest/ConfigurationFixture.cs +++ b/src/NHibernate.Test/CfgTest/ConfigurationFixture.cs @@ -27,7 +27,7 @@ public class ConfigurationFixture public void ReadCfgXmlFromDefaultFile() { Configuration cfg = new Configuration(); - cfg.Configure("TestEnbeddedConfig.cfg.xml"); + cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml")); Assert.IsTrue(cfg.Properties.ContainsKey(Environment.ShowSql)); Assert.IsTrue(cfg.Properties.ContainsKey(Environment.UseQueryCache)); @@ -91,7 +91,7 @@ public void ReadCfgXmlFromAssembly() public void InvalidXmlInCfgFile() { XmlDocument cfgXml = new XmlDocument(); - cfgXml.Load("TestEnbeddedConfig.cfg.xml"); + cfgXml.Load(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml")); // this should put us at the first element XmlElement propElement = cfgXml.DocumentElement.GetElementsByTagName("property")[0] as XmlElement; @@ -99,8 +99,8 @@ public void InvalidXmlInCfgFile() // removing this will cause it not to validate propElement.RemoveAttribute("name"); - const string FileNameForInvalidCfg = "hibernate.invalid.cfg.xml"; - cfgXml.Save(FileNameForInvalidCfg); + string FileNameForInvalidCfg = Path.Combine(TestContext.CurrentContext.TestDirectory, "hibernate.invalid.cfg.xml"); + cfgXml.Save(FileNameForInvalidCfg); Configuration cfg = new Configuration(); try @@ -222,7 +222,7 @@ public void CacheConfiguration() [Test] public void InvalidXmlInHbmFile() { - string filename = "invalid.hbm.xml"; + string filename = Path.Combine(TestContext.CurrentContext.TestDirectory, "invalid.hbm.xml"); // it's missing the class name - won't validate string hbm = @" @@ -432,7 +432,7 @@ public SampleQueryProvider(ISessionImplementor session) : base(session) public void NH2890Standard() { var cfg = new Configuration(); - cfg.Configure("TestEnbeddedConfig.cfg.xml") + cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml")) .LinqQueryProvider() .SetDefaultAssembly("NHibernate.DomainModel") .SetDefaultNamespace("NHibernate.DomainModel"); @@ -451,7 +451,7 @@ public void NH2890Standard() public void NH2890Xml() { var cfg = new Configuration(); - cfg.Configure("TestEnbeddedConfig.cfg.xml") + cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml")) .SetDefaultAssembly("NHibernate.DomainModel") .SetDefaultNamespace("NHibernate.DomainModel"); diff --git a/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs b/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs index c39cf629650..3f45f9079a1 100644 --- a/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs +++ b/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs @@ -55,7 +55,7 @@ public void WhenNoDefaultCtorThenThrow() { var properties = new Dictionary { { Environment.PropertyBytecodeProvider, typeof(InvalidNoCtorByteCodeProvider).AssemblyQualifiedName } }; Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.TypeOf() - .And.InnerException.Message.ContainsSubstring("constructor was not found")); + .And.InnerException.Message.Contains("constructor was not found")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs b/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs index 58eec973ed2..78dda495202 100644 --- a/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs +++ b/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs @@ -94,36 +94,36 @@ public class DefaultNsAssmFixture #region NUnit.Framework.TestFixture Members - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { - dir_ = Directory.GetCurrentDirectory(); + dir_ = TestContext.CurrentContext.TestDirectory; // Create hbm files (ideally, we could just embed them directly into the // assembly - same as VS does when 'Build Action' = 'Embedded Resource' - but // I could not find a way to do this, so we use files instead) - StreamWriter aw = new StreamWriter("A1.hbm.xml"); + StreamWriter aw = new StreamWriter(Path.Combine(dir_, "A1.hbm.xml")); aw.Write(aJoinedHbmXml); aw.Close(); - StreamWriter bw = new StreamWriter("B1.hbm.xml"); + StreamWriter bw = new StreamWriter(Path.Combine(dir_, "B1.hbm.xml")); bw.Write(bJoinedHbmXml); bw.Close(); - StreamWriter cw = new StreamWriter("C1.hbm.xml"); + StreamWriter cw = new StreamWriter(Path.Combine(dir_, "C1.hbm.xml")); cw.Write(cJoinedHbmXml); cw.Close(); - StreamWriter asw = new StreamWriter("A1.subclass.hbm.xml"); + StreamWriter asw = new StreamWriter(Path.Combine(dir_, "A1.subclass.hbm.xml")); asw.Write(aJoinedHbmXml); asw.Close(); - StreamWriter bsw = new StreamWriter("B1.subclass.hbm.xml"); + StreamWriter bsw = new StreamWriter(Path.Combine(dir_, "B1.subclass.hbm.xml")); bsw.Write(bJoinedHbmXml); bsw.Close(); - StreamWriter csw = new StreamWriter("C1.subclass.hbm.xml"); + StreamWriter csw = new StreamWriter(Path.Combine(dir_, "C1.subclass.hbm.xml")); csw.Write(cJoinedHbmXml); csw.Close(); } @@ -138,7 +138,7 @@ public virtual void TearDown() { } - [TestFixtureTearDown] + [OneTimeTearDown] public virtual void TestFixtureTearDown() { } @@ -151,7 +151,7 @@ public void TopDownJoined() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestA1.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("A.hbm.xml", "A1.hbm.xml"); assemblyBuilder.AddResourceFile("B.hbm.xml", "B1.hbm.xml"); @@ -159,7 +159,7 @@ public void TopDownJoined() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } @@ -169,7 +169,7 @@ public void BottomUpJoined() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestB1.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("C.hbm.xml", "C1.hbm.xml"); assemblyBuilder.AddResourceFile("B.hbm.xml", "B1.hbm.xml"); @@ -177,7 +177,7 @@ public void BottomUpJoined() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } @@ -187,7 +187,7 @@ public void MixedJoined() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestC1.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("B.hbm.xml", "B1.hbm.xml"); assemblyBuilder.AddResourceFile("A.hbm.xml", "A1.hbm.xml"); @@ -195,7 +195,7 @@ public void MixedJoined() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } @@ -205,7 +205,7 @@ public void MixedSubclass() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestCSubclass1.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("B.subclass.hbm.xml", "B1.hbm.xml"); assemblyBuilder.AddResourceFile("A.subclass.hbm.xml", "A1.hbm.xml"); @@ -213,8 +213,8 @@ public void MixedSubclass() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs b/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs index b7f4cc31d97..1708979ac92 100644 --- a/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs +++ b/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs @@ -132,36 +132,36 @@ public class HbmOrderingFixture #region NUnit.Framework.TestFixture Members - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { - dir_ = Directory.GetCurrentDirectory(); + dir_ = TestContext.CurrentContext.TestDirectory; // Create hbm files (ideally, we could just embed them directly into the // assembly - same as VS does when 'Build Action' = 'Embedded Resource' - but // I could not find a way to do this, so we use files instead) - StreamWriter aw = new StreamWriter("A.hbm.xml"); + StreamWriter aw = new StreamWriter(Path.Combine(dir_, "A.hbm.xml")); aw.Write(aJoinedHbmXml); aw.Close(); - StreamWriter bw = new StreamWriter("B.hbm.xml"); + StreamWriter bw = new StreamWriter(Path.Combine(dir_, "B.hbm.xml")); bw.Write(bJoinedHbmXml); bw.Close(); - StreamWriter cw = new StreamWriter("C.hbm.xml"); + StreamWriter cw = new StreamWriter(Path.Combine(dir_, "C.hbm.xml")); cw.Write(cJoinedHbmXml); cw.Close(); - StreamWriter asw = new StreamWriter("A.subclass.hbm.xml"); + StreamWriter asw = new StreamWriter(Path.Combine(dir_, "A.subclass.hbm.xml")); asw.Write(aJoinedHbmXml); asw.Close(); - StreamWriter bsw = new StreamWriter("B.subclass.hbm.xml"); + StreamWriter bsw = new StreamWriter(Path.Combine(dir_, "B.subclass.hbm.xml")); bsw.Write(bJoinedHbmXml); bsw.Close(); - StreamWriter csw = new StreamWriter("C.subclass.hbm.xml"); + StreamWriter csw = new StreamWriter(Path.Combine(dir_, "C.subclass.hbm.xml")); csw.Write(cJoinedHbmXml); csw.Close(); } @@ -176,7 +176,7 @@ public virtual void TearDown() { } - [TestFixtureTearDown] + [OneTimeTearDown] public virtual void TestFixtureTearDown() { } @@ -189,7 +189,7 @@ public void TopDownJoined() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestA.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("A.hbm.xml", "A.hbm.xml"); assemblyBuilder.AddResourceFile("B.hbm.xml", "B.hbm.xml"); @@ -197,7 +197,7 @@ public void TopDownJoined() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } @@ -207,7 +207,7 @@ public void BottomUpJoined() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestB.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("C.hbm.xml", "C.hbm.xml"); assemblyBuilder.AddResourceFile("B.hbm.xml", "B.hbm.xml"); @@ -215,7 +215,7 @@ public void BottomUpJoined() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } @@ -225,7 +225,7 @@ public void MixedJoined() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestC.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("B.hbm.xml", "B.hbm.xml"); assemblyBuilder.AddResourceFile("A.hbm.xml", "A.hbm.xml"); @@ -233,7 +233,7 @@ public void MixedJoined() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } @@ -243,7 +243,7 @@ public void MixedSubclass() AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "MyTestCSubclass.dll"; AssemblyBuilder assemblyBuilder = - AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave); + AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true); assemblyBuilder.AddResourceFile("B.subclass.hbm.xml", "B.hbm.xml"); assemblyBuilder.AddResourceFile("A.subclass.hbm.xml", "A.hbm.xml"); @@ -251,8 +251,8 @@ public void MixedSubclass() assemblyBuilder.Save(assemblyName.Name); Configuration cfg = new Configuration(); - cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name)); + cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name))); // if no exception, success } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/Loquacious/ConfigurationFixture.cs b/src/NHibernate.Test/CfgTest/Loquacious/ConfigurationFixture.cs index d2d13fa109d..06c608374ca 100644 --- a/src/NHibernate.Test/CfgTest/Loquacious/ConfigurationFixture.cs +++ b/src/NHibernate.Test/CfgTest/Loquacious/ConfigurationFixture.cs @@ -1,5 +1,6 @@ using System.Data; using System.Data.SqlClient; +using System.IO; using NHibernate.AdoNet; using NHibernate.Bytecode; using NHibernate.Cache; @@ -130,7 +131,7 @@ public void UseConnectionStringName() public void NH2890Loquacious() { var cfg = new Configuration(); - cfg.Configure("TestEnbeddedConfig.cfg.xml") + cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml")) .SetDefaultAssembly("NHibernate.DomainModel") .SetDefaultNamespace("NHibernate.DomainModel") .SessionFactory() @@ -147,4 +148,4 @@ public void NH2890Loquacious() } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs b/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs index b14dbe1217f..a1b0292da74 100644 --- a/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs +++ b/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs @@ -77,7 +77,7 @@ public void NotAllowRelatedCollections() var exception = Assert.Throws( () => configure.EntityCache(ce => ce.Collection(e => e.Relation.Elements, cc => { }))); - Assert.That(exception.Message, Is.StringContaining("Collection not owned by")); + Assert.That(exception.Message, Does.Contain("Collection not owned by")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/MappingDocumentAggregatorTests.cs b/src/NHibernate.Test/CfgTest/MappingDocumentAggregatorTests.cs index d7bb458eb4f..b10c75e31a5 100644 --- a/src/NHibernate.Test/CfgTest/MappingDocumentAggregatorTests.cs +++ b/src/NHibernate.Test/CfgTest/MappingDocumentAggregatorTests.cs @@ -65,7 +65,7 @@ public void CompareDeserializationTimes() for (int i = 0; i < 5; i++) { - FileInfo tempFile = new FileInfo(Guid.NewGuid() + ".hbm.binary"); + FileInfo tempFile = new FileInfo(Path.Combine(TestContext.CurrentContext.TestDirectory, Guid.NewGuid() + ".hbm.binary")); // Load the embedded xml mappings (and time it) Stopwatch stopwatch1 = Stopwatch.StartNew(); @@ -105,4 +105,4 @@ public void CompareDeserializationTimes() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs b/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs index da980283fe2..8400d67f786 100644 --- a/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs +++ b/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs @@ -84,9 +84,9 @@ public void CannotBePersistedWithNonUniqueValues() }); Assert.That(exception.InnerException, Is.AssignableTo()); Assert.That(exception.InnerException.Message, - Is.StringContaining("unique").IgnoreCase.And.StringContaining("constraint").IgnoreCase - .Or.StringContaining("duplicate entry").IgnoreCase); + Does.Contain("unique").IgnoreCase.And.Contains("constraint").IgnoreCase + .Or.Contains("duplicate entry").IgnoreCase); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/DialectTest/FunctionTests/SequenceSupportFixture.cs b/src/NHibernate.Test/DialectTest/FunctionTests/SequenceSupportFixture.cs index 0f735ff952b..d96f03f438f 100644 --- a/src/NHibernate.Test/DialectTest/FunctionTests/SequenceSupportFixture.cs +++ b/src/NHibernate.Test/DialectTest/FunctionTests/SequenceSupportFixture.cs @@ -16,7 +16,7 @@ public class SequenceSupportFixture /// /// Test case data source for DialectSupportingSequencesMustFullfillSequenceContract(). /// - private IEnumerable GetAllDialectTypes() + private static IEnumerable GetAllDialectTypes() { var dialectBaseType = typeof(NHibernate.Dialect.Dialect); @@ -26,7 +26,7 @@ public class SequenceSupportFixture } - [TestCaseSource("GetAllDialectTypes")] + [TestCaseSource(nameof(GetAllDialectTypes))] public void DialectSupportingSequencesMustFullfillSequenceContract(System.Type dialectType) { var dialect = (NHibernate.Dialect.Dialect)Activator.CreateInstance(dialectType); @@ -51,4 +51,4 @@ public void DialectSupportingSequencesMustFullfillSequenceContract(System.Type d } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/DialectTest/FunctionTests/SubstringSupportFixture.cs b/src/NHibernate.Test/DialectTest/FunctionTests/SubstringSupportFixture.cs index 92ad7fa25ba..a2361535c1f 100644 --- a/src/NHibernate.Test/DialectTest/FunctionTests/SubstringSupportFixture.cs +++ b/src/NHibernate.Test/DialectTest/FunctionTests/SubstringSupportFixture.cs @@ -14,7 +14,7 @@ public class SubstringSupportFixture /// /// Test case data source for DialectShouldUseCorrectSubstringImplementation(). /// - private IEnumerable GetAllDialectTypes() + private static IEnumerable GetAllDialectTypes() { var dialectBaseType = typeof(NHibernate.Dialect.Dialect); @@ -24,7 +24,7 @@ public class SubstringSupportFixture } - [TestCaseSource("GetAllDialectTypes")] + [TestCaseSource(nameof(GetAllDialectTypes))] public void DialectShouldUseCorrectSubstringImplementation(System.Type dialectType) { var dialect = (NHibernate.Dialect.Dialect)Activator.CreateInstance(dialectType); @@ -49,4 +49,4 @@ public void DialectShouldUseCorrectSubstringImplementation(System.Type dialectTy } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/DynamicProxyTests/PeVerifier.cs b/src/NHibernate.Test/DynamicProxyTests/PeVerifier.cs index 5966548e42a..eb323566b5b 100644 --- a/src/NHibernate.Test/DynamicProxyTests/PeVerifier.cs +++ b/src/NHibernate.Test/DynamicProxyTests/PeVerifier.cs @@ -14,7 +14,7 @@ public class PeVerifier public PeVerifier(string assemblyFileName) { - var assemblyLocation = Path.Combine(Environment.CurrentDirectory, assemblyFileName); + var assemblyLocation = Path.Combine(TestContext.CurrentContext.TestDirectory, assemblyFileName); if (!File.Exists(assemblyLocation)) throw new ArgumentException(string.Format("Could not locate assembly {0}", assemblyLocation), "assemblyLocation"); diff --git a/src/NHibernate.Test/DynamicProxyTests/PeVerifyFixture.cs b/src/NHibernate.Test/DynamicProxyTests/PeVerifyFixture.cs index 8d00ddbb585..d247f4ac75f 100644 --- a/src/NHibernate.Test/DynamicProxyTests/PeVerifyFixture.cs +++ b/src/NHibernate.Test/DynamicProxyTests/PeVerifyFixture.cs @@ -124,7 +124,7 @@ public SavingProxyAssemblyBuilder(string assemblyName) public AssemblyBuilder DefineDynamicAssembly(AppDomain appDomain, AssemblyName name) { AssemblyBuilderAccess access = AssemblyBuilderAccess.RunAndSave; - return appDomain.DefineDynamicAssembly(new AssemblyName(assemblyName), access); + return appDomain.DefineDynamicAssembly(new AssemblyName(assemblyName), access, TestContext.CurrentContext.TestDirectory); } public ModuleBuilder DefineDynamicModule(AssemblyBuilder assemblyBuilder, string moduleName) @@ -140,4 +140,4 @@ public void Save(AssemblyBuilder assemblyBuilder) #endregion } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs b/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs index 8be73a23607..75096a76847 100644 --- a/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs +++ b/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs @@ -40,7 +40,7 @@ public void ImplicitFlush() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -69,7 +69,7 @@ public void ExplicitUpdate() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -107,7 +107,7 @@ public void WithDetachedObject() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -147,7 +147,7 @@ public void UpdateDetachedObject() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -186,7 +186,7 @@ public void UpdateDetachedObjectWithLock() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -216,4 +216,4 @@ private void FillDb() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs b/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs index 7ff6a03db51..49e40985b37 100644 --- a/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs +++ b/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs @@ -60,8 +60,8 @@ public void InSqlFunctionTest() // Allow some dialectal differences in function name and parameter style. Assert.That(sql.ToString(), - Is.StringStarting("substring(sql_alias.Name").Or.StringStarting("substr(sql_alias.Name")); - Assert.That(sql.ToString(), Is.StringEnding(") in (?, ?)")); + Does.StartWith("substring(sql_alias.Name").Or.StartsWith("substr(sql_alias.Name")); + Assert.That(sql.ToString(), Does.EndWith(") in (?, ?)")); // Ensure no parameters are duplicated. var parameters = criteriaQuery.CollectedParameters.ToList(); @@ -73,4 +73,4 @@ public void InSqlFunctionTest() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/FilterTest/ConfigFixture.cs b/src/NHibernate.Test/FilterTest/ConfigFixture.cs index 61713bdde11..6e908cfd850 100644 --- a/src/NHibernate.Test/FilterTest/ConfigFixture.cs +++ b/src/NHibernate.Test/FilterTest/ConfigFixture.cs @@ -57,7 +57,7 @@ public void WrongFilterDefInClass() var cfg = GetConfiguration(); var e = Assert.Throws(() => cfg.AddResource("NHibernate.Test.FilterTest.WrongFilterDefInClass.hbm.xml", GetType().Assembly)); Assert.That(e.InnerException, Is.Not.Null); - Assert.That(e.InnerException.Message, Is.StringStarting("no filter condition").IgnoreCase); + Assert.That(e.InnerException.Message, Does.StartWith("no filter condition").IgnoreCase); } [Test] @@ -93,7 +93,7 @@ public void WrongFilterDefInClassSeconPass() cfg.AddXmlString(wrongClassMap); cfg.AddXmlString(wrongFilterDef); var e = Assert.Throws(cfg.BuildMappings); - Assert.That(e.Message, Is.StringStarting("no filter condition").IgnoreCase); + Assert.That(e.Message, Does.StartWith("no filter condition").IgnoreCase); } [Test] @@ -103,8 +103,8 @@ public void AddClassWithFiltersWithoutFilterDef() var cfg = GetConfiguration(); cfg.AddResource("NHibernate.Test.FilterTest.SimpleFiltered.hbm.xml", GetType().Assembly); var e = Assert.Throws(cfg.BuildMappings); - Assert.That(e.Message, Is.StringStarting("filter-def for filter named")); - Assert.That(e.Message, Is.StringContaining("was not found")); + Assert.That(e.Message, Does.StartWith("filter-def for filter named")); + Assert.That(e.Message, Does.Contain("was not found")); } [Test] @@ -197,7 +197,7 @@ public void DuplicatedFilterDef() var cfg = GetConfiguration(); var e = Assert.Throws(() => cfg.AddXmlString(filterDef)); Assert.That(e.InnerException, Is.Not.Null); - Assert.That(e.InnerException.Message, Is.StringContaining("Duplicated filter-def")); + Assert.That(e.InnerException.Message, Does.Contain("Duplicated filter-def")); } [Test] @@ -223,8 +223,8 @@ public void MissedFilterDef() var cfg = GetConfiguration(); cfg.AddXmlString(classMap); var e = Assert.Throws(()=>cfg.BuildSessionFactory()); - Assert.That(e.Message, Is.StringStarting("filter-def for filter named")); - Assert.That(e.Message, Is.StringContaining("was not found")); + Assert.That(e.Message, Does.StartWith("filter-def for filter named")); + Assert.That(e.Message, Does.Contain("was not found")); } [Test] @@ -248,8 +248,8 @@ public void FilterDefWithoutReference() cfg.BuildSessionFactory(); var wholeLog = String.Join("\r\n", memoryAppender.GetEvents().Select(x => x.RenderedMessage).ToArray()); - Assert.That(wholeLog, Is.StringContaining("filter-def for filter named")); - Assert.That(wholeLog, Is.StringContaining("was never used to filter classes nor collections.")); + Assert.That(wholeLog, Does.Contain("filter-def for filter named")); + Assert.That(wholeLog, Does.Contain("was never used to filter classes nor collections.")); } finally { diff --git a/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs b/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs index e9cd5847236..1422552c4db 100644 --- a/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs +++ b/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs @@ -127,7 +127,7 @@ public void WillLoadGhostAssociationOnAccess() { order = s.Get(1); var logMessage = ls.GetWholeLog(); - Assert.That(logMessage, Is.Not.StringContaining("FROM Payment")); + Assert.That(logMessage, Does.Not.Contain("FROM Payment")); } Assert.That(NHibernateUtil.IsPropertyInitialized(order, "Payment"), Is.False); @@ -147,8 +147,8 @@ public void WhenGetThenLoadOnlyNoLazyPlainProperties() { order = s.Get(1); var logMessage = ls.GetWholeLog(); - Assert.That(logMessage, Is.Not.StringContaining("ALazyProperty")); - Assert.That(logMessage, Is.StringContaining("NoLazyProperty")); + Assert.That(logMessage, Does.Not.Contain("ALazyProperty")); + Assert.That(logMessage, Does.Contain("NoLazyProperty")); } Assert.That(NHibernateUtil.IsPropertyInitialized(order, "NoLazyProperty"), Is.True); Assert.That(NHibernateUtil.IsPropertyInitialized(order, "ALazyProperty"), Is.False); @@ -157,10 +157,10 @@ public void WhenGetThenLoadOnlyNoLazyPlainProperties() { var x = order.ALazyProperty; var logMessage = ls.GetWholeLog(); - Assert.That(logMessage, Is.StringContaining("ALazyProperty")); + Assert.That(logMessage, Does.Contain("ALazyProperty")); } Assert.That(NHibernateUtil.IsPropertyInitialized(order, "ALazyProperty"), Is.True); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs b/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs index eb935df6cf6..fcdf0cbe2da 100644 --- a/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs +++ b/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs @@ -544,7 +544,7 @@ public void UpdateOnImplicitJoinFails() var e = Assert.Throws( () => s.CreateQuery("update Human set mother.name.initial = :initial").SetString("initial", "F").ExecuteUpdate()); - Assert.That(e.Message, Is.StringStarting("Implied join paths are not assignable in update")); + Assert.That(e.Message, Does.StartWith("Implied join paths are not assignable in update")); s.CreateQuery("delete Human where mother is not null").ExecuteUpdate(); s.CreateQuery("delete Human").ExecuteUpdate(); @@ -725,7 +725,7 @@ public void WrongPropertyNameThrowQueryException() using (ISession s = OpenSession()) { var e = Assert.Throws(() => s.CreateQuery("update Vehicle set owner = null where owner = 'Steve'").ExecuteUpdate()); - Assert.That(e.Message, Is.StringStarting("Left side of assigment should be a case sensitive property or a field")); + Assert.That(e.Message, Does.StartWith("Left side of assigment should be a case sensitive property or a field")); } } @@ -1120,4 +1120,4 @@ public void Cleanup() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs b/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs index 0b669217dd9..9d53642bfe1 100644 --- a/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs +++ b/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs @@ -18,7 +18,7 @@ public void WhenSubstitutionsConfiguredThenUseItInTranslation() { const string query = "from SimpleClass s where s.IntValue > pizza"; var sql = GetSql(query, new Dictionary{{"pizza","1"}}); - Assert.That(sql, Is.Not.StringContaining("pizza")); + Assert.That(sql, Does.Not.Contain("pizza")); } [Test] @@ -31,7 +31,7 @@ public void WhenExecutedThroughSessionThenUseSubstitutions() { s.CreateQuery(query).List(); string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage; - Assert.That(sql, Is.Not.StringContaining("pizza")); + Assert.That(sql, Does.Not.Contain("pizza")); } } } @@ -41,7 +41,7 @@ public void WhenSubstitutionsWithStringConfiguredThenUseItInTranslation() { const string query = "from SimpleClass s where s.Description > calda"; var sql = GetSql(query, new Dictionary { { "calda", "'bobrock'" } }); - Assert.That(sql, Is.Not.StringContaining("pizza").And.Contains("'bobrock'")); + Assert.That(sql, Does.Not.Contain("pizza").And.Contains("'bobrock'")); } [Test] @@ -54,9 +54,9 @@ public void WhenExecutedThroughSessionThenUseSubstitutionsWithString() { s.CreateQuery(query).List(); string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage; - Assert.That(sql, Is.Not.StringContaining("pizza").And.Contains("'bobrock'")); + Assert.That(sql, Does.Not.Contain("pizza").And.Contains("'bobrock'")); } } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs b/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs index 250fc9a6d98..2e2cd4cddff 100644 --- a/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs +++ b/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs @@ -10,7 +10,7 @@ public void ParseFloatConstant() { const string query = "select 123.5, s from SimpleClass s"; - Assert.That(GetSql(query), Is.StringStarting("select 123.5")); + Assert.That(GetSql(query), Does.StartWith("select 123.5")); } [Test] @@ -30,4 +30,4 @@ public void Union() Assert.DoesNotThrow(() => GetSql(queryForAntlr)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs b/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs index 038bdb81f5e..a3c0c6e8bb8 100644 --- a/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs +++ b/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs @@ -12,7 +12,7 @@ public class NativeGuidGeneratorFixture protected Configuration cfg; protected ISessionFactoryImplementor sessions; - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { cfg = new Configuration(); @@ -43,4 +43,4 @@ public void ReturnedValueIsGuid() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs b/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs index ee356826462..17dccd6508e 100644 --- a/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs +++ b/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs @@ -22,8 +22,8 @@ public void SelectAndUpdateStringContainCustomWhere() var dialect = new MsSql2005Dialect(); var tg = new TableGenerator(); tg.Configure(NHibernateUtil.Int64, new Dictionary {{"where", customWhere}}, dialect); - Assert.That(selectSql.GetValue(tg).ToString(), Is.StringContaining(customWhere)); - Assert.That(updateSql.GetValue(tg).ToString(), Is.StringContaining(customWhere)); + Assert.That(selectSql.GetValue(tg).ToString(), Does.Contain(customWhere)); + Assert.That(updateSql.GetValue(tg).ToString(), Does.Contain(customWhere)); } } } diff --git a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs index dd4c5d9c347..8c03c86b46b 100644 --- a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs +++ b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs @@ -44,7 +44,7 @@ public void WhenMapComoponetWithNestBidirectionalComponentThenMapParentAccessor( var hbmClass = mapping.RootClasses[0]; var hbmMyCompo = hbmClass.Properties.OfType().Single(); - Assert.That(hbmMyCompo.Access, Is.StringContaining("camelcase")); + Assert.That(hbmMyCompo.Access, Does.Contain("camelcase")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs index cc59597b991..6999d5ab43e 100644 --- a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs +++ b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs @@ -68,7 +68,7 @@ public void WhenMapComoponetWithNestBidirectionalComponentThenMapParentAccessor( var hbmMyCompo = hbmClass.Properties.OfType().Single(); var hbmMyNestedCompo = hbmMyCompo.Properties.OfType().Single(); - Assert.That(hbmMyNestedCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyNestedCompo.Parent.access, Does.Contain("camelcase")); } [Test] @@ -82,7 +82,7 @@ public void WhenCollectionOfComoponetsWithNestBidirectionalComponentThenMapParen var hbmMyCompo = (HbmCompositeElement)hbmBag.ElementRelationship; var hbmMyNestedCompo = hbmMyCompo.Properties.OfType().Single(); - Assert.That(hbmMyNestedCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyNestedCompo.Parent.access, Does.Contain("camelcase")); } [Test, Ignore("No fixed yet. When the parent is an entity it should be managed explicitly as explicitly is managed the relation (Parent instead many-to-one)")] @@ -92,7 +92,7 @@ public void WhenMapComoponetWithParentThenMapParentAccessor() var hbmClass = mapping.RootClasses[0]; var hbmMyCompo = hbmClass.Properties.OfType().Single(); - Assert.That(hbmMyCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyCompo.Parent.access, Does.Contain("camelcase")); } [Test, Ignore("No fixed yet. When the parent is an entity it should be managed explicitly as explicitly is managed the relation (Parent instead many-to-one)")] @@ -104,7 +104,7 @@ public void WhenCollectionOfComoponetsWithParentThenMapParentAccessor() var hbmBag = hbmClass.Properties.OfType().Single(); var hbmMyCompo = (HbmCompositeElement)hbmBag.ElementRelationship; - Assert.That(hbmMyCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyCompo.Parent.access, Does.Contain("camelcase")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs index 80c32c951a6..b98845f88a7 100644 --- a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs +++ b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs @@ -88,7 +88,7 @@ public void WhenReadOnlyPropertyWithSameBackFieldNoMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "ReadOnlyWithSameBackField"); - Assert.That(hbmProperty.Access, Is.Not.StringContaining("field")); + Assert.That(hbmProperty.Access, Does.Not.Contain("field")); } [Test] @@ -101,7 +101,7 @@ public void WhenPropertyWithoutFieldNoMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "PropertyWithoutField"); - Assert.That(hbmProperty.Access, Is.Not.StringContaining("field")); + Assert.That(hbmProperty.Access, Does.Not.Contain("field")); } [Test] @@ -112,7 +112,7 @@ public void WhenPropertyWithDifferentBackFieldMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "WithDifferentBackField"); - Assert.That(hbmProperty.Access, Is.StringContaining("field")); + Assert.That(hbmProperty.Access, Does.Contain("field")); } [Test] @@ -123,7 +123,7 @@ public void WhenSetOnlyPropertyNoMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "SetOnlyProperty"); - Assert.That(hbmProperty.Access, Is.Not.StringContaining("field")); + Assert.That(hbmProperty.Access, Is.Null.Or.Not.Contain("field")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs index 9cc8336e1d6..e8cd3adb92d 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs @@ -103,7 +103,7 @@ private void VerifyMapping(HbmMapping mapping, bool hasParent, params string[] p var collection = (HbmBag)relation; Assert.That(collection.ElementRelationship, Is.TypeOf()); var elementRelation = (HbmCompositeElement)collection.ElementRelationship; - Assert.That(elementRelation.Class, Is.StringContaining("Address")); + Assert.That(elementRelation.Class, Does.Contain("Address")); // This test was modified because when the "owner" is an entity it can be mapped as many-to-one or as parent and without an explicit // definition of the property representing the bidiretional-relation we can't know is the mapping element (many-to-one or parent) @@ -123,10 +123,10 @@ private void VerifyMapping(HbmMapping mapping, bool hasParent, params string[] p var propertyNestedRelation = elementRelation.Properties.FirstOrDefault(p => p.Name == "Number"); Assert.That(propertyNestedRelation, Is.Not.Null.And.TypeOf()); var nestedRelation = (HbmNestedCompositeElement) propertyNestedRelation; - Assert.That(nestedRelation.Class, Is.StringContaining("Number")); + Assert.That(nestedRelation.Class, Does.Contain("Number")); Assert.That(nestedRelation.Properties.Count(), Is.EqualTo(1)); Assert.That(nestedRelation.Parent, Is.Not.Null); Assert.That(nestedRelation.Parent.name, Is.EqualTo("OwnerAddress")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs index 44a7be27918..3a56f4de11e 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs @@ -87,8 +87,8 @@ public void WhenMapComponentAsIdAttributesThenMapAttributes() var hbmMapping = mapper.CompileMappingFor(new[] { typeof(MyClass) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmCompositId = hbmClass.CompositeId; - Assert.That(hbmCompositId.access, Is.StringContaining("field")); - Assert.That(hbmCompositId.@class, Is.StringContaining("MyComponent")); + Assert.That(hbmCompositId.access, Does.Contain("field")); + Assert.That(hbmCompositId.@class, Does.Contain("MyComponent")); } [Test] @@ -147,8 +147,8 @@ public void WhenMapAttributesOfCustomizedComponentUsedAsComponentAsIdWithCustomi var hbmMapping = mapper.CompileMappingFor(new[] { typeof(MyClass) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmCompositId = hbmClass.CompositeId; - Assert.That(hbmCompositId.access, Is.StringContaining("field")); - Assert.That(hbmCompositId.@class, Is.StringContaining("MyComponent")); + Assert.That(hbmCompositId.access, Does.Contain("field")); + Assert.That(hbmCompositId.@class, Does.Contain("MyComponent")); } [Test] @@ -165,8 +165,8 @@ public void WhenMapAttributesOfCustomizedComponentUsedAsComponentAsIdWithCustomi var hbmMapping = mapper.CompileMappingFor(new[] { typeof(MyClass) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmCompositId = hbmClass.CompositeId; - Assert.That(hbmCompositId.access, Is.StringContaining("nosetter")); - Assert.That(hbmCompositId.@class, Is.StringContaining("MyComponent")); + Assert.That(hbmCompositId.access, Does.Contain("nosetter")); + Assert.That(hbmCompositId.@class, Does.Contain("MyComponent")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs index 2f00a049c77..df894816269 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs @@ -64,10 +64,10 @@ private void ModelIsWellFormed(HbmMapping hbmMapping) { var hbmClass = hbmMapping.JoinedSubclasses.Single(); Assert.That(hbmClass, Is.Not.Null); - Assert.That(hbmClass.extends, Is.StringContaining("MyClass")); + Assert.That(hbmClass.extends, Does.Contain("MyClass")); var hbmProperty = hbmClass.Properties.OfType().Single(); Assert.That(hbmProperty.name, Is.EqualTo("SomethingElse")); Assert.That(hbmProperty.length, Is.EqualTo("15")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs index 1e556611708..6964f43eee3 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs @@ -17,7 +17,7 @@ public WithOutPublicParameterLessCtor(string something) public void WhenRegisterClassMappingThroughTypeThenCheckIConformistHoldersProvider() { var mapper = new ModelMapper(); - Assert.That(() => mapper.AddMapping(typeof (object)), Throws.TypeOf().And.Message.ContainsSubstring("IConformistHoldersProvider")); + Assert.That(() => mapper.AddMapping(typeof (object)), Throws.TypeOf().And.Message.Contains("IConformistHoldersProvider")); } [Test] @@ -27,4 +27,4 @@ public void WhenRegisterClassMappingThroughTypeThenCheckParameterLessCtor() Assert.That(() => mapper.AddMapping(typeof (WithOutPublicParameterLessCtor)), Throws.TypeOf()); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs index 3feb6e8a19c..ed6ce68c527 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs @@ -64,10 +64,10 @@ private void ModelIsWellFormed(HbmMapping hbmMapping) { var hbmClass = hbmMapping.SubClasses.Single(); Assert.That(hbmClass, Is.Not.Null); - Assert.That(hbmClass.extends, Is.StringContaining("MyClass")); + Assert.That(hbmClass.extends, Does.Contain("MyClass")); var hbmProperty = hbmClass.Properties.OfType().Single(); Assert.That(hbmProperty.name, Is.EqualTo("SomethingElse")); Assert.That(hbmProperty.length, Is.EqualTo("15")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs index 770924a5fc6..a6543c415a4 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs @@ -64,10 +64,10 @@ private void ModelIsWellFormed(HbmMapping hbmMapping) { var hbmClass = hbmMapping.UnionSubclasses.Single(); Assert.That(hbmClass, Is.Not.Null); - Assert.That(hbmClass.extends, Is.StringContaining("MyClass")); + Assert.That(hbmClass.extends, Does.Contain("MyClass")); var hbmProperty = hbmClass.Properties.OfType().Single(); Assert.That(hbmProperty.name, Is.EqualTo("SomethingElse")); Assert.That(hbmProperty.length, Is.EqualTo("15")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs index 6000a8e0eaf..6b2c1749171 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs @@ -73,11 +73,11 @@ public void WhenMapDynCompoAttributesThenMapAttributes() var hbmMapping = mapper.CompileMappingFor(new[] { typeof(Person) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmDynamicComponent = hbmClass.Properties.OfType().SingleOrDefault(); - Assert.That(hbmDynamicComponent.access, Is.StringContaining("field")); + Assert.That(hbmDynamicComponent.access, Does.Contain("field")); Assert.That(hbmDynamicComponent.insert, Is.False); Assert.That(hbmDynamicComponent.update, Is.False); Assert.That(hbmDynamicComponent.optimisticlock, Is.False); Assert.That(hbmDynamicComponent.unique, Is.True); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs index fd96224e10a..ecdb94721af 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs @@ -259,8 +259,8 @@ public void AtCreationSetColumnsUsingMemberName() var hbmMapping = new HbmMapping(); var hbmAny = new HbmAny(); new AnyMapper(member, typeof(int), hbmAny, hbmMapping); - Assert.That(hbmAny.Columns.ElementAt(0).name, Is.StringContaining("MyReferenceClass")); - Assert.That(hbmAny.Columns.ElementAt(1).name, Is.StringContaining("MyReferenceClass")); + Assert.That(hbmAny.Columns.ElementAt(0).name, Does.Contain("MyReferenceClass")); + Assert.That(hbmAny.Columns.ElementAt(1).name, Does.Contain("MyReferenceClass")); } [Test] @@ -298,4 +298,4 @@ public void CanSetInsert() Assert.That(hbmAny.insert, Is.False); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs index ded217fd333..b5836feec68 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs @@ -68,7 +68,7 @@ public void WhenComponentIdCustomizedMoreThanOnceThenMerge() Assert.That(hbmClass.Id, Is.Null); var hbmCompositeId = hbmClass.CompositeId; Assert.That(hbmCompositeId.Items, Has.Length.EqualTo(2)); - Assert.That(hbmCompositeId.access, Is.StringContaining("field")); + Assert.That(hbmCompositeId.access, Does.Contain("field")); } [Test] @@ -81,4 +81,4 @@ public void WhenMapExternalMemberAsComponentIdThenThrows() } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs index 12ec1cfc7c9..c29269b6928 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs @@ -18,7 +18,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new ClassMapper(typeof(EntitySimple), mapdoc, For.Property(x => x.Id)); rc.Persister(); - Assert.That(mapdoc.RootClasses[0].Persister, Is.StringContaining("SingleTableEntityPersister")); + Assert.That(mapdoc.RootClasses[0].Persister, Does.Contain("SingleTableEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs index 194e53d611a..ec3a5e96900 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs @@ -26,7 +26,7 @@ public void WhenSetGeneratorThenChangeType() new CollectionIdMapper(hbmId).Generator(Generators.HighLow); Assert.That(hbmId.generator.@class, Is.EqualTo("hilo")); - Assert.That(hbmId.type.ToLowerInvariant(), Is.StringContaining("int")); + Assert.That(hbmId.type.ToLowerInvariant(), Does.Contain("int")); } [Test] @@ -118,4 +118,4 @@ public void CanSetLength() Assert.That(hbmId.length, Is.EqualTo("10")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs index c1782cff411..727799fa2cd 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs @@ -32,7 +32,7 @@ public void WhenCreatedThenSetTheComponentClass() var component = new HbmCompositeId(); new ComponentAsIdMapper(typeof(PersonId), For.Property(x=> x.Id), component, mapdoc); - Assert.That(component.@class, Is.StringContaining("PersonId")); + Assert.That(component.@class, Does.Contain("PersonId")); } [Test] @@ -89,4 +89,4 @@ public void CallMapManyToOneMapper() Assert.That(called, Is.True); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs index ce2e90c324a..4809d0496dc 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs @@ -130,7 +130,7 @@ public void SetCollectionTypeByGenericType() var hbm = new HbmIdbag(); var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Type(); - Assert.That(hbm.CollectionType, Is.StringContaining("FakeUserCollectionType")); + Assert.That(hbm.CollectionType, Does.Contain("FakeUserCollectionType")); } [Test] @@ -139,7 +139,7 @@ public void SetCollectionTypeByType() var hbm = new HbmIdbag(); var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Type(typeof(FakeUserCollectionType)); - Assert.That(hbm.CollectionType, Is.StringContaining("FakeUserCollectionType")); + Assert.That(hbm.CollectionType, Does.Contain("FakeUserCollectionType")); } [Test] @@ -240,4 +240,4 @@ public void SetFetchMode() Assert.That(hbm.fetchSpecified, Is.False); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs index 344f5f13e48..69fadadc25b 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs @@ -22,7 +22,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc); rc.Persister(); - Assert.That(mapdoc.JoinedSubclasses[0].Persister, Is.StringContaining("JoinedSubclassEntityPersister")); + Assert.That(mapdoc.JoinedSubclasses[0].Persister, Does.Contain("JoinedSubclassEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs index e5e787dbbd5..bdd5248ed89 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs @@ -244,7 +244,7 @@ public void CanForceClassRelation() mapper.Class(typeof(Relation)); - Assert.That(mapping.Class, Is.StringContaining("Relation").And.Not.Contains("IRelation")); + Assert.That(mapping.Class, Does.Contain("Relation").And.Not.Contains("IRelation")); } [Test] @@ -346,4 +346,4 @@ public void CanSetNotFoundWithIgnoreMode() Assert.That(hbm.notfound, Is.EqualTo(HbmNotFoundMode.Ignore)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs index d22044b64b3..18245a3b351 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs @@ -81,7 +81,7 @@ public void WhenSetTypeByIUserTypeThenSetTypeName() var mapper = new PropertyMapper(member, mapping); mapper.Type(); - Assert.That(mapping.Type.name, Is.StringContaining("MyType")); + Assert.That(mapping.Type.name, Does.Contain("MyType")); Assert.That(mapping.type, Is.Null); } @@ -93,7 +93,7 @@ public void WhenSetTypeByICompositeUserTypeThenSetTypeName() var mapper = new PropertyMapper(member, mapping); mapper.Type(); - Assert.That(mapping.Type.name, Is.StringContaining("MyCompoType")); + Assert.That(mapping.Type.name, Does.Contain("MyCompoType")); Assert.That(mapping.type, Is.Null); } @@ -106,7 +106,7 @@ public void WhenSetTypeByIUserTypeWithParamsThenSetType() mapper.Type(new { Param1 = "a", Param2 = 12 }); Assert.That(mapping.type1, Is.Null); - Assert.That(mapping.Type.name, Is.StringContaining("MyType")); + Assert.That(mapping.Type.name, Does.Contain("MyType")); Assert.That(mapping.Type.param, Has.Length.EqualTo(2)); Assert.That(mapping.Type.param.Select(p => p.name), Is.EquivalentTo(new [] {"Param1", "Param2"})); Assert.That(mapping.Type.param.Select(p => p.GetText()), Is.EquivalentTo(new [] {"a", "12"})); @@ -120,7 +120,7 @@ public void WhenSetTypeByIUserTypeWithNullParamsThenSetTypeName() var mapper = new PropertyMapper(member, mapping); mapper.Type(null); - Assert.That(mapping.Type.name, Is.StringContaining("MyType")); + Assert.That(mapping.Type.name, Does.Contain("MyType")); Assert.That(mapping.type, Is.Null); } @@ -132,7 +132,7 @@ public void WhenSetTypeByITypeTypeThenSetType() var mapper = new PropertyMapper(member, mapping); mapper.Type>(); - Assert.That(mapping.Type.name, Is.StringContaining(typeof(EnumStringType).FullName)); + Assert.That(mapping.Type.name, Does.Contain(typeof(EnumStringType).FullName)); Assert.That(mapping.type, Is.Null); } @@ -454,4 +454,4 @@ public bool IsMutable get { throw new NotImplementedException(); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs index c8ae6f623ed..a2cb72fd254 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs @@ -22,7 +22,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new SubclassMapper(typeof(HineritedSimple), mapdoc); rc.Persister(); - Assert.That(mapdoc.SubClasses[0].Persister, Is.StringContaining("SingleTableEntityPersister")); + Assert.That(mapdoc.SubClasses[0].Persister, Does.Contain("SingleTableEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs index 3fb028a1921..cb08bd21cd0 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs @@ -22,7 +22,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new UnionSubclassMapper(typeof(InheritedSimple), mapdoc); rc.Persister(); - Assert.That(mapdoc.UnionSubclasses[0].Persister, Is.StringContaining("UnionSubclassEntityPersister")); + Assert.That(mapdoc.UnionSubclasses[0].Persister, Does.Contain("UnionSubclassEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs b/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs index bd516a10729..a4e3d85d20d 100644 --- a/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs +++ b/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs @@ -77,7 +77,7 @@ public void WhenMatchNamespaceButNotAssemblyThenOnlyNameAndAssembly() var mapDoc = new HbmMapping(); mapDoc.assembly = "whatever"; mapDoc.@namespace = typeof(MyEntity).Namespace; - Assert.That(typeof(MyEntity).GetShortClassName(mapDoc), Is.StringStarting(typeof(MyEntity).Name).And.EndsWith(", " + typeof(MyEntity).Assembly.GetName().Name)); + Assert.That(typeof(MyEntity).GetShortClassName(mapDoc), Does.StartWith(typeof(MyEntity).Name).And.EndsWith(", " + typeof(MyEntity).Assembly.GetName().Name)); } [Test] @@ -134,7 +134,7 @@ public void WithGenericWhenMatchNamespaceButNotAssemblyThenOnlyNameAndAssembly() var mapDoc = new HbmMapping(); mapDoc.assembly = "whatever"; mapDoc.@namespace = typeof(MyGenericEntity<>).Namespace; - Assert.That(typeof(MyGenericEntity).GetShortClassName(mapDoc), Is.StringStarting(typeof(MyGenericEntity).FullName).And.EndsWith(", " + typeof(MyGenericEntity).Assembly.GetName().Name)); + Assert.That(typeof(MyGenericEntity).GetShortClassName(mapDoc), Does.StartWith(typeof(MyGenericEntity).FullName).And.EndsWith(", " + typeof(MyGenericEntity).Assembly.GetName().Name)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs b/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs index 63f5698f3b3..fbe047c53c5 100644 --- a/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs +++ b/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs @@ -16,7 +16,7 @@ public class NonReflectiveBinderFixture private Configuration cfg; - [TestFixtureSetUp] + [OneTimeSetUp] public void SetUp() { cfg = new Configuration() @@ -24,7 +24,7 @@ public void SetUp() cfg.BuildMappings(); } - [TestFixtureTearDown] + [OneTimeTearDown] public void TearDown() { cfg = null; @@ -164,7 +164,7 @@ public void Comparator() Property property = cm.GetProperty("SortedEmployee"); var col = (Mapping.Collection)property.Value; - Assert.That(col.ComparerClassName, Is.StringStarting("NHibernate.Test.MappingTest.NonExistingComparator")); + Assert.That(col.ComparerClassName, Does.StartWith("NHibernate.Test.MappingTest.NonExistingComparator")); } [Test] @@ -195,4 +195,4 @@ public void XmlSerialization() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs b/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs index e1e9e335bcf..fae07d67097 100644 --- a/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs @@ -140,7 +140,7 @@ public void CanExecuteMultipleQueryWithSameParameterName() string paramPrefix = ((DriverBase) Sfi.ConnectionProvider.Driver).NamedPrefix; Assert.That( wholeLog, - Is.StringContaining(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); + Does.Contain(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); } } } diff --git a/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs b/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs index c349188ec28..665b43c42f9 100644 --- a/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs @@ -355,7 +355,7 @@ public void CanExecuteMultipleQueriesOnSameExpression() string paramPrefix = ((DriverBase)Sfi.ConnectionProvider.Driver).NamedPrefix; Assert.That( wholeLog, - Is.StringContaining(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); + Does.Contain(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); } } } diff --git a/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs index c732d0cf108..0c026206fde 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs @@ -26,8 +26,8 @@ public void LazyEntity() var ex = Assert.Throws(() => n= le.Name); Assert.That(ex.EntityName, Is.EqualTo(typeof (LazyE).FullName)); Assert.That(ex.EntityId, Is.EqualTo(1)); - Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName)); - Assert.That(ex.Message, Is.StringContaining("#1")); + Assert.That(ex.Message, Does.Contain(typeof(LazyE).FullName)); + Assert.That(ex.Message, Does.Contain("#1")); Console.WriteLine(ex.Message); using (ISession s = OpenSession()) @@ -57,9 +57,9 @@ public void LazyCollection() var ex = Assert.Throws(() => le.LazyC.GetEnumerator()); Assert.That(ex.EntityName, Is.EqualTo(typeof(LazyE).FullName)); Assert.That(ex.EntityId, Is.EqualTo(1)); - Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName)); - Assert.That(ex.Message, Is.StringContaining("#1")); - Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName + ".LazyC")); + Assert.That(ex.Message, Does.Contain(typeof(LazyE).FullName)); + Assert.That(ex.Message, Does.Contain("#1")); + Assert.That(ex.Message, Does.Contain(typeof(LazyE).FullName + ".LazyC")); using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -69,4 +69,4 @@ public void LazyCollection() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs index 1a1c1477d16..ab5cae9df6a 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs @@ -86,8 +86,8 @@ protected override void BuildSessionFactory() using (var ls = new LogSpy(LogManager.GetLogger("NHibernate"), Level.Warn)) { base.BuildSessionFactory(); - Assert.That(ls.GetWholeLog(), Is.StringContaining("Fake cache used")); + Assert.That(ls.GetWholeLog(), Does.Contain("Fake cache used")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs index 51a4a2cdc38..b164b2967eb 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs @@ -59,9 +59,9 @@ ORDER BY Name q.List(); } string message = ls.GetWholeLog(); - Assert.That(message, Is.StringContaining("-- Comment with ' number 1")); - Assert.That(message, Is.StringContaining("/* Comment with ' number 2 */")); + Assert.That(message, Does.Contain("-- Comment with ' number 1")); + Assert.That(message, Does.Contain("/* Comment with ' number 2 */")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs index 2ab67a9388c..4806ed12463 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs @@ -31,8 +31,8 @@ public void DeleteWithoutUpdateVersion() t.Commit(); } string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, Is.Not.StringContaining("UPDATE ObjectA")); - Assert.That(wholeLog, Is.StringContaining("UPDATE ObjectB"),"should create orphans"); + Assert.That(wholeLog, Does.Not.Contain("UPDATE ObjectA")); + Assert.That(wholeLog, Does.Contain("UPDATE ObjectB"),"should create orphans"); } using (ISession s = OpenSession()) @@ -44,4 +44,4 @@ public void DeleteWithoutUpdateVersion() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs index c292ee70316..764ef4510ce 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs @@ -54,8 +54,8 @@ public void WhenMapCustomFkNamesThenUseIt() var sb = new StringBuilder(); (new SchemaExport(conf)).Create(s => sb.AppendLine(s), true); - Assert.That(sb.ToString(), Is.StringContaining("FK_RoleInUser").And.StringContaining("FK_UserInRole")); + Assert.That(sb.ToString(), Does.Contain("FK_RoleInUser").And.Contains("FK_UserInRole")); (new SchemaExport(conf)).Drop(false, true); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs index 7075f041ef6..a22d8a88d33 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs @@ -17,11 +17,11 @@ private static void Bug(Configuration cfg) if (Dialect.Dialect.GetDialect(cfg.Properties).SupportsIfExistsBeforeTableName) - Assert.That(script, Is.StringMatching("drop table if exists nhibernate.dbo.Aclass")); + Assert.That(script, Does.Contain("drop table if exists nhibernate.dbo.Aclass")); else - Assert.That(script, Is.StringMatching("drop table nhibernate.dbo.Aclass")); + Assert.That(script, Does.Contain("drop table nhibernate.dbo.Aclass")); - Assert.That(script, Is.StringMatching("create table nhibernate.dbo.Aclass")); + Assert.That(script, Does.Contain("create table nhibernate.dbo.Aclass")); } @@ -66,4 +66,4 @@ public class Aclass { public int Id { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs index 05abb2bde14..a257419c3cf 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs @@ -24,9 +24,9 @@ public void Bug() .SetParameter("filterval", filter.HasValue ? filter.Value : 0).List(); var message = ls.GetWholeLog(); string paramPrefix = ((DriverBase) Sfi.ConnectionProvider.Driver).NamedPrefix; - Assert.That(message, Is.StringContaining("xchild0_.ParentId=xparent1_.Id and (" + paramPrefix + "p0=" + Dialect.ToBooleanValueString(true) + " or xparent1_.A<" + paramPrefix + "p1)")); + Assert.That(message, Does.Contain("xchild0_.ParentId=xparent1_.Id and (" + paramPrefix + "p0=" + Dialect.ToBooleanValueString(true) + " or xparent1_.A<" + paramPrefix + "p1)")); } } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs index 14278849219..a42b02aad54 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs @@ -59,9 +59,9 @@ public void GenerateSchemaMultipleUniqueKeys() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("unique (A, C)")); - Assert.That(script, Is.StringContaining("unique (B, C)")); - Assert.That(script, Is.Not.StringContaining("unique (C)")); + Assert.That(script, Does.Contain("unique (A, C)")); + Assert.That(script, Does.Contain("unique (B, C)")); + Assert.That(script, Does.Not.Contain("unique (C)")); new SchemaExport(cfg).Drop(false, true); } @@ -93,8 +93,8 @@ public void GenerateSchemaMultipleIndex() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("create index AC on Entity (A, C)")); - Assert.That(script, Is.StringContaining("create index BC on Entity (B, C)")); + Assert.That(script, Does.Contain("create index AC on Entity (A, C)")); + Assert.That(script, Does.Contain("create index BC on Entity (B, C)")); new SchemaExport(cfg).Drop(false, true); } @@ -132,8 +132,8 @@ public void GenerateSchemaMultipleIndexOnColumn() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("create index AC on Entity (A, C)")); - Assert.That(script, Is.StringContaining("create index BC on Entity (B, C)")); + Assert.That(script, Does.Contain("create index AC on Entity (A, C)")); + Assert.That(script, Does.Contain("create index BC on Entity (B, C)")); new SchemaExport(cfg).Drop(false, true); } @@ -165,8 +165,8 @@ public void GenerateSchemaIndexOnId() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("create index IdxId1 on Entity (Id)")); - Assert.That(script, Is.StringContaining("create index IdxId2 on Entity (Id)")); + Assert.That(script, Does.Contain("create index IdxId1 on Entity (Id)")); + Assert.That(script, Does.Contain("create index IdxId2 on Entity (Id)")); new SchemaExport(cfg).Drop(false, true); } @@ -211,4 +211,4 @@ public void GenerateSchemaUniqueOnId() } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs index 3bb437911a6..2dc7cd0f2f4 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs @@ -21,7 +21,7 @@ private static void AssertThatCheckOnTableExistenceIsCorrect(Configuration confi var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false, false); string script = sb.ToString(); - Assert.That(script, Is.StringContaining("if exists (select * from dbo.sysobjects where id = object_id(N'nhibernate.dbo.Aclass') and OBJECTPROPERTY(id, N'IsUserTable') = 1)")); + Assert.That(script, Does.Contain("if exists (select * from dbo.sysobjects where id = object_id(N'nhibernate.dbo.Aclass') and OBJECTPROPERTY(id, N'IsUserTable') = 1)")); } [Test] @@ -69,4 +69,4 @@ public class Aclass { public int Id { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs index ecf1078660e..daf6f8836be 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs @@ -17,7 +17,7 @@ public void SchemaUpdateAddsIndexesThatWerentPresentYet() var su = new SchemaUpdate(cfg); var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false); - Assert.That(sb.ToString(), Is.StringContaining("create index test_index_name on TestIndex (Name)")); + Assert.That(sb.ToString(), Does.Contain("create index test_index_name on TestIndex (Name)")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs index dfafc5df3b5..ca8c414acff 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs @@ -45,7 +45,7 @@ protected override void CreateSchema() { var script = new StringBuilder(); new SchemaExport(cfg).Create(sl=> script.Append(sl) , true); - Assert.That(script.ToString(), Is.Not.StringContaining("LatestMessage")); + Assert.That(script.ToString(), Does.Not.Contain("LatestMessage")); } [Test] @@ -64,4 +64,4 @@ public void Test() CleanUp(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs index e8db4477a2d..955164dbf98 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs @@ -18,7 +18,7 @@ public abstract class BaseFixture protected ISessionFactoryImplementor factory; private string expectedExportString; - [TestFixtureSetUp] + [OneTimeSetUp] public void Config() { cfg = new Configuration(); @@ -37,7 +37,7 @@ public void NotIgnorePrecisionScaleInSchemaExport() { var script = new StringBuilder(); new SchemaExport(cfg).Create(sl => script.AppendLine(sl), true); - Assert.That(script.ToString(), Is.StringContaining(expectedExportString)); + Assert.That(script.ToString(), Does.Contain(expectedExportString)); new SchemaExport(cfg).Drop(false, true); } @@ -89,4 +89,4 @@ protected override string GetResourceName() return "WithColumnNode.hbm.xml"; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs b/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs index ef6dc1cefbf..be74adb2858 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs @@ -71,7 +71,7 @@ public void TheJoinShouldBeOptional() { ICriteria c = session.CreateCriteria(typeof(TestClass)); IList retvalue = c.List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("join")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("join")); criteriaCount = retvalue.Count; } } @@ -80,4 +80,4 @@ public void TheJoinShouldBeOptional() Cleanup(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs index 6e6fdabbba3..2a8526b2c77 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs @@ -26,8 +26,8 @@ public void ContainSQLInInsert() { s.Save(new EntityWithUnique { Id = 2, Description = "algo" }); var exception = Assert.Throws(t.Commit); - Assert.That(exception.Message, Is.StringContaining("INSERT"), "should contain SQL"); - Assert.That(exception.Message, Is.StringContaining("#2"), "should contain id"); + Assert.That(exception.Message, Does.Contain("INSERT"), "should contain SQL"); + Assert.That(exception.Message, Does.Contain("#2"), "should contain id"); } using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -53,7 +53,7 @@ public void ContainSQLInUpdate() var e = s.Get(2); e.Description = "algo"; var exception = Assert.Throws(t.Commit); - Assert.That(exception.Message, Is.StringContaining("UPDATE"), "should contain SQL"); + Assert.That(exception.Message, Does.Contain("UPDATE"), "should contain SQL"); } using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -63,4 +63,4 @@ public void ContainSQLInUpdate() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs index eb856650138..afb31e0d624 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs @@ -24,7 +24,7 @@ public void ShouldCreateNotNullIdColumn() new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); string wholeScript = script.ToString(); - Assert.That(wholeScript, Is.StringContaining("not null").IgnoreCase); + Assert.That(wholeScript, Does.Contain("not null").IgnoreCase); } } } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs b/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs index a1503812f03..7f4839c4a04 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs @@ -21,7 +21,7 @@ public void TheModuleOperationShouldAddParenthesisToAvoidWrongSentence() { // The expected value should be "(5+1)%(1+1)" instead "5+ 1%1 +1" var sqlQuery = GetSql("select mod(5+1,1+1) from MyClass"); - Assert.That(sqlQuery, Is.StringContaining("(5+1)").And.StringContaining("(1+1)")); + Assert.That(sqlQuery, Does.Contain("(5+1)").And.Contains("(1+1)")); } public string GetSql(string query) @@ -31,4 +31,4 @@ public string GetSql(string query) return qt.SQLString; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs index b377311c180..0af3ce33250 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs @@ -100,7 +100,7 @@ public void WhenAccessLazyPropertiesOutsideOfSessionThenThrows() string lazyField; var lazyException = Assert.Throws(() => lazyField = person.LazyField); Assert.That(lazyException.EntityName, Is.Not.Null); - Assert.That(lazyException.Message, Is.StringContaining("LazyField")); + Assert.That(lazyException.Message, Does.Contain("LazyField")); } finally { diff --git a/src/NHibernate.Test/NHSpecificTest/NH2188/AppDomainWithMultipleSearchPath.cs b/src/NHibernate.Test/NHSpecificTest/NH2188/AppDomainWithMultipleSearchPath.cs index 484d609dd4d..854ad055ecb 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2188/AppDomainWithMultipleSearchPath.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2188/AppDomainWithMultipleSearchPath.cs @@ -14,14 +14,19 @@ public string DefaultConfigurationFilePath() return GetDefaultConfigurationFilePath(); } } + [Test] public void WhenSerchInMultiplePathsThenNotThrows() { + // NUnit 3 sets PrivateBinPath when using an NUnit project, so we need to reset back to the correct setting when done. + var privatePath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath; + string binPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin"); var expected = Path.Combine(binPath, Configuration.DefaultHibernateCfgFileName); try { + AppDomain.CurrentDomain.ClearPrivatePath(); AppDomain.CurrentDomain.AppendPrivatePath("bin"); AppDomain.CurrentDomain.AppendPrivatePath("DbScripts"); var configuration = new MyNhConfiguration(); @@ -30,7 +35,8 @@ public void WhenSerchInMultiplePathsThenNotThrows() finally { AppDomain.CurrentDomain.ClearPrivatePath(); + if (privatePath != null) AppDomain.CurrentDomain.AppendPrivatePath(privatePath); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs index 9867d070baa..44b78f0ec6c 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs @@ -20,7 +20,7 @@ public void ShouldCreateSchemaWithDefaultClause() cfg.AddInputStream(stream); new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); - Assert.That(script.ToString(), Is.StringContaining("MyNameForFK")); + Assert.That(script.ToString(), Does.Contain("MyNameForFK")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs index e3928fc8aa3..5ae7e156cd6 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs @@ -12,8 +12,8 @@ public void WhenBuildSessionFactoryThenThrows() Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); cfg.AddResource("NHibernate.Test.NHSpecificTest.NH2266.Mappings.hbm.xml", GetType().Assembly); Assert.That(() => cfg.BuildSessionFactory(), Throws.TypeOf() - .And.Message.ContainsSubstring("does not have mapped subclasses") - .And.Message.ContainsSubstring(typeof (TemporaryToken).FullName)); + .And.Message.Contains("does not have mapped subclasses") + .And.Message.Contains(typeof (TemporaryToken).FullName)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs index 112b195708c..60c974d5daf 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs @@ -33,15 +33,15 @@ public void CustomIdBag() s.Close(); Assert.That(a.Id, Is.Not.Null); - Assert.That(a.Items[0], Is.StringMatching("first string")); + Assert.That(a.Items[0], Is.EqualTo("first string")); s = OpenSession(); a = s.Load(a.Id); Assert.That(a.Items, Is.InstanceOf>()); - Assert.That(a.Items[0], Is.StringMatching("first string"), "first item should be 'first string'"); - Assert.That(a.Items[1], Is.StringMatching("second string"), "second item should be 'second string'"); + Assert.That(a.Items[0], Is.EqualTo("first string"), "first item should be 'first string'"); + Assert.That(a.Items[1], Is.EqualTo("second string"), "second item should be 'second string'"); // ensuring the correct generic type was constructed a.Items.Add("third string"); @@ -52,4 +52,4 @@ public void CustomIdBag() s.Close(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs index 7bb512a4203..67997f0ce74 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs @@ -21,7 +21,7 @@ private static void AssertThatCheckOnTableExistenceIsCorrect(Configuration confi var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false, false); string script = sb.ToString(); - Assert.That(script, Is.StringContaining("if exists (select 1 from sys.objects where object_id = OBJECT_ID(N'dbo.[Aclasses_Id_FK]') AND parent_object_id = OBJECT_ID('dbo.Aclass'))")); + Assert.That(script, Does.Contain("if exists (select 1 from sys.objects where object_id = OBJECT_ID(N'dbo.[Aclasses_Id_FK]') AND parent_object_id = OBJECT_ID('dbo.Aclass'))")); } [Test] @@ -79,4 +79,4 @@ public class Bclass public int Id { get; set; } public ICollection Aclasses { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs index 363ff898e67..ffc145ebb3a 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs @@ -11,7 +11,7 @@ public void WhenLoadWorngMappingThenMessageShouldContaingWrongClassName() Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); cfg.AddResource("NHibernate.Test.NHSpecificTest.NH2313.Mappings.hbm.xml", GetType().Assembly); Assert.That(() => cfg.BuildSessionFactory(), Throws.TypeOf() - .And.Message.ContainsSubstring("TheOther")); + .And.Message.Contains("TheOther")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs index f42ec01ce93..27d74fb40ec 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs @@ -31,7 +31,7 @@ private string FetchConnectionStringFromConfiguration() string connectionString; if (cfg.Properties.TryGetValue(Environment.ConnectionString, out connectionString)) { - Assert.IsNotNullOrEmpty(connectionString); + Assert.That(connectionString, Is.Not.Null.Or.Empty); return connectionString; } string connectionStringName; @@ -40,7 +40,7 @@ private string FetchConnectionStringFromConfiguration() var connectionStringSettings = ConfigurationManager.ConnectionStrings[connectionStringName]; Assert.IsNotNull(connectionStringSettings); connectionString = connectionStringSettings.ConnectionString; - Assert.IsNotNullOrEmpty(connectionString); + Assert.That(connectionString, Is.Not.Null.Or.Empty); return connectionString; } else @@ -104,4 +104,4 @@ protected override void OnTearDown() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs index 74e1b489144..dacbb114c4a 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs @@ -126,7 +126,7 @@ public void ShouldNotQueryLazyProperties_FetchJoin() using (var ls = new SqlLogSpy()) { items = s.CreateQuery("from Base2").List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("LongContent")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("LongContent")); } var item = (Derived2) items[0]; Assert.That(NHibernateUtil.IsPropertyInitialized(item, "LongContent"), Is.False); @@ -151,7 +151,7 @@ public void ShouldNotQueryLazyProperties_FetchSelect() using(var ls = new SqlLogSpy()) { items = s.CreateQuery("from Base1").List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("LongContent")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("LongContent")); } var item = (Derived1) items[0]; Assert.That(NHibernateUtil.IsPropertyInitialized(item, "LongContent"), Is.False); @@ -176,7 +176,7 @@ public void ShouldNotQueryLazyProperties_Joinedsubclass() using (var ls = new SqlLogSpy()) { items = s.CreateQuery("from Base3").List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("LongContent")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("LongContent")); } var item = (Derived3)items[0]; Assert.That(NHibernateUtil.IsPropertyInitialized(item, "LongContent"), Is.False); @@ -188,4 +188,4 @@ public void ShouldNotQueryLazyProperties_Joinedsubclass() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs index 28bb7f0d46d..70a8e4ce148 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs @@ -46,8 +46,8 @@ public void WhenTryToGetHighThenExceptionShouldContainWhereClause() using (var tx = session.BeginTransaction()) { var customer = new Customer { Name = "Mengano" }; - Assert.That(() => session.Persist(customer), Throws.Exception.Message.ContainsSubstring("Entity = 'Customer'")); + Assert.That(() => session.Persist(customer), Throws.Exception.Message.Contains("Entity = 'Customer'")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs index 79425010e41..ac6114feb78 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs @@ -49,7 +49,7 @@ public void TestMappedFormulasContainingSqlServerDataTypeKeywords() { var students = session.CreateQuery("from Student").List(); Assert.That(students.Count, Is.EqualTo(1)); - Assert.That(students[0].FullName, Is.StringMatching("Julian Maughan")); + Assert.That(students[0].FullName, Is.EqualTo("Julian Maughan")); Assert.That(students[0].FullNameAsVarBinary.Length, Is.EqualTo(28)); Assert.That(students[0].FullNameAsVarBinary512.Length, Is.EqualTo(28)); // Assert.That(students[0].FullNameAsBinary.Length, Is.EqualTo(28)); 30??? diff --git a/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs index cdd761ec201..b676002c9bc 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs @@ -15,8 +15,8 @@ public void WhenPersisterNotFoundShouldThrowAMoreExplicitException() using (var s = OpenSession()) { var exeption = Assert.Throws(() => s.Get(1)); - Assert.That(exeption.Message.ToLowerInvariant(), Is.StringContaining("possible cause")); + Assert.That(exeption.Message.ToLowerInvariant(), Does.Contain("possible cause")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs index b12d68dcf99..ca6bc21cab2 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs @@ -68,7 +68,7 @@ public void TestProjection() var sql = GetSql(criteria); - Assert.That(sql, Is.StringMatching("dateadd\\(day,(.*?)Value1,(.*?)Date1\\)")); + Assert.That(sql, Does.Match(@"dateadd\(day,(.*?)Value1,(.*?)Date1\)")); Console.WriteLine(sql.ToString()); } } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs index 32becb872dc..69aea993611 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs @@ -29,7 +29,7 @@ public void WhenPersistShouldNotFetchUninitializedCollection() } } var wholeMessage = sl.GetWholeLog(); - Assert.That(wholeMessage, Is.Not.StringContaining("BankAccount")); + Assert.That(wholeMessage, Does.Not.Contain("BankAccount")); } Cleanup(companyId); diff --git a/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs index d50514c42a3..688cc0565b6 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs @@ -44,7 +44,7 @@ public void SpecifiedForeignKeyNameInByCodeMappingIsUsedInGeneratedSchema() cfg.AddMapping(mapper.CompileMappingForAllExplicitlyAddedEntities()); new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); - Assert.That(script.ToString(), Is.StringContaining(string.Format("constraint {0}", ForeignKeyName))); + Assert.That(script.ToString(), Does.Contain(string.Format("constraint {0}", ForeignKeyName))); } } @@ -60,4 +60,4 @@ public class Employee public virtual int Id { get; set; } public virtual Person Person { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs index e0cf2920d22..16bb4da24f3 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs @@ -40,7 +40,7 @@ public void ShouldThrowWhenByteArrayTooLong() var ex = Assert.Throws(() => PersistReport(report)); - Assert.That(ex.Message, Is.StringContaining("Report.UnsizedArray")); + Assert.That(ex.Message, Does.Contain("Report.UnsizedArray")); Assert.That(ex.InnerException, Is.TypeOf()); Assert.That(ex.InnerException.Message, Is.EqualTo("The length of the byte[] value exceeds the length configured in the mapping/parameter.")); @@ -58,7 +58,7 @@ public void ShouldThrowWhenImageTooLarge() var ex = Assert.Throws(() => PersistReport(report)); - Assert.That(ex.Message, Is.StringContaining("Report.Image")); + Assert.That(ex.Message, Does.Contain("Report.Image")); Assert.That(ex.InnerException, Is.TypeOf()); Assert.That(ex.InnerException.Message, Is.EqualTo("The length of the byte[] value exceeds the length configured in the mapping/parameter.")); @@ -76,7 +76,7 @@ public void ShouldThrowWhenImageAsISerializableTooLarge() var ex = Assert.Throws(() => PersistReport(report)); - Assert.That(ex.Message, Is.StringContaining("Report.SerializableImage")); + Assert.That(ex.Message, Does.Contain("Report.SerializableImage")); Assert.That(ex.InnerException, Is.TypeOf()); Assert.That(ex.InnerException.Message, Is.EqualTo("The length of the byte[] value exceeds the length configured in the mapping/parameter.")); diff --git a/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs index 7fde5932687..4e33fd4c565 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs @@ -25,7 +25,7 @@ public class Fixture private CultureInfo currentCulture = null; private CultureInfo currentUICulture = null; - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { currentCulture = Thread.CurrentThread.CurrentCulture; @@ -36,7 +36,7 @@ public void TestFixtureSetUp() Thread.CurrentThread.CurrentUICulture = turkish; } - [TestFixtureTearDown] + [OneTimeTearDown] public void TestFixtureTearDown() { Thread.CurrentThread.CurrentCulture = currentCulture; @@ -58,4 +58,4 @@ public void CheckIII() Assert.AreEqual("iii_iii_iii", ImprovedNamingStrategy.Instance.ColumnName("IiiIiiIii")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHibernate.Test.csproj b/src/NHibernate.Test/NHibernate.Test.csproj index a78ed691ba9..80bbeb842af 100644 --- a/src/NHibernate.Test/NHibernate.Test.csproj +++ b/src/NHibernate.Test/NHibernate.Test.csproj @@ -529,54 +529,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -724,7 +676,6 @@ - @@ -1234,7 +1185,6 @@ - @@ -1405,10 +1355,6 @@ - - - - @@ -2689,12 +2635,6 @@ - - Always - - - Always - @@ -3425,18 +3365,6 @@ ABC.hbm.xml Always - - Always - - - Always - - - Always - - - Always - diff --git a/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs b/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs index 916806f58f5..45ed992beeb 100644 --- a/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs +++ b/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs @@ -204,10 +204,10 @@ public void WhenLoadClassUsingInterfaceOfMultippleHierarchyThenThrows() using (var s = OpenSession()) { Assert.That(() => s.Load(1), Throws.TypeOf() - .And.Message.ContainsSubstring("Ambiguous") - .And.Message.ContainsSubstring("GraphA") - .And.Message.ContainsSubstring("GraphB") - .And.Message.ContainsSubstring("IMultiGraphNamed")); + .And.Message.Contains("Ambiguous") + .And.Message.Contains("GraphA") + .And.Message.Contains("GraphB") + .And.Message.Contains("IMultiGraphNamed")); } } @@ -218,10 +218,10 @@ public void WhenGetClassUsingInterfaceOfMultippleHierarchyThenThrows() { Assert.That(() => s.Get(1), Throws.TypeOf() - .And.Message.StringContaining("Ambiguous") - .And.Message.StringContaining("GraphA") - .And.Message.StringContaining("GraphB") - .And.Message.StringContaining("IMultiGraphNamed")); + .And.Message.Contains("Ambiguous") + .And.Message.Contains("GraphA") + .And.Message.Contains("GraphB") + .And.Message.Contains("IMultiGraphNamed")); } } @@ -253,4 +253,4 @@ public void WhenGetInheritedClassUsingInterfaceFromSessionCacheThenNotThrows() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ProjectionFixtures/Fixture.cs b/src/NHibernate.Test/ProjectionFixtures/Fixture.cs index d172f732609..a46e880dfa6 100644 --- a/src/NHibernate.Test/ProjectionFixtures/Fixture.cs +++ b/src/NHibernate.Test/ProjectionFixtures/Fixture.cs @@ -102,7 +102,7 @@ public void ErrorFromDBWillGiveTheActualSQLExecuted() } }); - Assert.That(e.Message, Is.StringContaining(expectedMessagePart0).Or.StringContaining(expectedMessagePart1)); + Assert.That(e.Message, Does.Contain(expectedMessagePart0).Or.Contains(expectedMessagePart1)); } [Test] @@ -177,4 +177,4 @@ public void QueryingWithParemetersAndParaemtersInOrderBy() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs b/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs index c1ad9a651ec..ff7ee45a204 100644 --- a/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs +++ b/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs @@ -67,7 +67,7 @@ public void ReadOnlyOnProxies() Assert.That(NHibernateUtil.IsInitialized(dp), Is.False, "was initialized during isReadOnly"); dp.Description = "changed"; Assert.That(NHibernateUtil.IsInitialized(dp), Is.True, "was not initialized during mod"); - Assert.That(dp.Description, Is.StringMatching("changed"), "desc not changed in memory"); + Assert.That(dp.Description, Is.EqualTo("changed"), "desc not changed in memory"); s.Flush(); s.Transaction.Commit(); } diff --git a/src/NHibernate.Test/TestCase.cs b/src/NHibernate.Test/TestCase.cs index 96232442a57..0ade3c335c4 100644 --- a/src/NHibernate.Test/TestCase.cs +++ b/src/NHibernate.Test/TestCase.cs @@ -69,7 +69,7 @@ static TestCase() /// /// Creates the tables used in this TestCase /// - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { try @@ -112,7 +112,7 @@ public void TestFixtureSetUp() /// will occur if the TestCase does not have the same hbm.xml files /// included as a previous one. /// - [TestFixtureTearDown] + [OneTimeTearDown] public void TestFixtureTearDown() { // If TestFixtureSetup fails due to an IgnoreException, it will still run the teardown. diff --git a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs index 9df608f7346..4182d7f5c4e 100644 --- a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs +++ b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs @@ -28,7 +28,7 @@ public void WhenCalledExplicitlyThenTakeInAccountHbm2DdlKeyWordsSetting() var script = new StringBuilder(); new SchemaExport(configuration).Execute(s=> script.AppendLine(s), false, false); - Assert.That(script.ToString(), Is.StringContaining("[Order]").And.Contains("[Select]").And.Contains("[From]").And.Contains("[And]")); + Assert.That(script.ToString(), Does.Contain("[Order]").And.Contains("[Select]").And.Contains("[From]").And.Contains("[And]")); } [Test] @@ -58,4 +58,4 @@ public void WhenUpdateCalledExplicitlyThenTakeInAccountHbm2DdlKeyWordsSetting() Assert.That(culs.First(c => "Column" == c.Name).IsQuoted, Is.True); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs index c1944160c8a..01b0b279f52 100644 --- a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs +++ b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs @@ -22,8 +22,8 @@ public void ShouldCreateSchemaWithDefaultClause() new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); string wholeScript = script.ToString(); - Assert.That(wholeScript, Is.StringContaining("default SYSTEM_USER")); - Assert.That(wholeScript, Is.StringContaining("default 77")); + Assert.That(wholeScript, Does.Contain("default SYSTEM_USER")); + Assert.That(wholeScript, Does.Contain("default 77")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs b/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs index e0de73272c8..2d4dc5c92ef 100644 --- a/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs +++ b/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs @@ -62,7 +62,7 @@ public void ShouldNotVerifyModifiedTable() } catch (HibernateException e) { - Assert.That(e.Message, Is.StringStarting("Missing column: Name")); + Assert.That(e.Message, Does.StartWith("Missing column: Name")); } } @@ -74,4 +74,4 @@ private static Configuration BuildConfiguration(string resource) return cfg; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs b/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs index dded40b8183..21cfd8b68d8 100644 --- a/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs +++ b/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs @@ -118,7 +118,7 @@ private void AssertFailedInsertExceptionDetailsAndEmptyTable(Exception ex) Assert.That( ex.Message, - Is.StringStarting("Error dehydrating property value for NHibernate.Test.TypesTest.StringClass.")); + Does.StartWith("Error dehydrating property value for NHibernate.Test.TypesTest.StringClass.")); Assert.That(ex.InnerException, Is.TypeOf()); @@ -128,7 +128,7 @@ private void AssertFailedInsertExceptionDetailsAndEmptyTable(Exception ex) } else if (Dialect is MsSqlCeDialect && ex is InvalidOperationException) { - Assert.That(ex.Message, Is.StringContaining("max=4000, len=4001")); + Assert.That(ex.Message, Does.Contain("max=4000, len=4001")); } else { diff --git a/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs b/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs index 1d9a534eed1..caa01e36486 100644 --- a/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs @@ -25,7 +25,7 @@ public abstract class TypeSqlTypeFixture protected Configuration cfg; protected ISessionFactoryImplementor factory; - [TestFixtureSetUp] + [OneTimeSetUp] public void Config() { cfg = new Configuration(); @@ -141,4 +141,4 @@ protected override string GetResourceName() return "MultiTypeEntity_WithSqlType.hbm.xml"; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs b/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs index 7033df7f183..36bd03fd483 100644 --- a/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs @@ -35,7 +35,7 @@ public void ReadWrite() var docEntity = s.Get(1); var document = docEntity.Document; Assert.That(document, Is.Not.Null); - Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Is.StringContaining("my Text")); + Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Does.Contain("my Text")); var xmlElement = new XElement("Pizza", new XAttribute("temp", "calda")); document.Document.Root.Add(xmlElement); s.Save(docEntity); @@ -45,7 +45,7 @@ public void ReadWrite() { var docEntity = s.Get(1); var document = docEntity.Document; - Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Is.StringContaining("Pizza temp=\"calda\"")); + Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Does.Contain("Pizza temp=\"calda\"")); s.Delete(docEntity); s.Flush(); } diff --git a/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs b/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs index 552097b702e..aadce4b7bc2 100644 --- a/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs @@ -35,7 +35,7 @@ public void ReadWrite() var docEntity = s.Get(1); var document = docEntity.Document; Assert.That(document, Is.Not.Null); - Assert.That(document.OuterXml, Is.StringContaining("my Text")); + Assert.That(document.OuterXml, Does.Contain("my Text")); var xmlElement = document.CreateElement("Pizza"); xmlElement.SetAttribute("temp", "calda"); document.FirstChild.AppendChild(xmlElement); @@ -45,7 +45,7 @@ public void ReadWrite() using (var s = OpenSession()) { var docEntity = s.Get(1); - Assert.That(docEntity.Document.OuterXml, Is.StringContaining("Pizza temp=\"calda\"")); + Assert.That(docEntity.Document.OuterXml, Does.Contain("Pizza temp=\"calda\"")); s.Delete(docEntity); s.Flush(); } @@ -79,4 +79,4 @@ public void AutoDiscoverFromNetType() Assert.That(propertyType, Is.InstanceOf()); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs b/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs index 8afd8c7efc8..a5dac5f1c1b 100644 --- a/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs +++ b/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs @@ -13,11 +13,11 @@ public void StringWithNestedDelimiters() IFormatter formatter = new BasicFormatter(); string sql = @"INSERT INTO Table (Name, id) VALUES (@p0, @p1); @p0 = 'a'(b', @p1 = 1"; Assert.DoesNotThrow(() => formattedSql = formatter.Format(sql)); - Assert.That(formattedSql, Is.StringContaining("'a'(b'")); + Assert.That(formattedSql, Does.Contain("'a'(b'")); sql = @"UPDATE Table SET Column = @p0;@p0 = '(')'"; Assert.DoesNotThrow(() => formattedSql = formatter.Format(sql)); - Assert.That(formattedSql, Is.StringContaining("'(')'")); + Assert.That(formattedSql, Does.Contain("'(')'")); } } } diff --git a/src/NHibernate.sln b/src/NHibernate.sln index c2d1acce9dd..974acdf1b79 100644 --- a/src/NHibernate.sln +++ b/src/NHibernate.sln @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.TestDatabaseSetu EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NHibernate.Test.VisualBasic", "NHibernate.Test.VisualBasic\NHibernate.Test.VisualBasic.vbproj", "{7C2EF610-BCA0-4D1F-898A-DE9908E4970C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Test.Linq", "NHibernate.Test.Linq\NHibernate.Test.Linq.csproj", "{2F02D2C6-38DA-48F5-A941-DC2A22CFC430}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -45,6 +47,10 @@ Global {7C2EF610-BCA0-4D1F-898A-DE9908E4970C}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C2EF610-BCA0-4D1F-898A-DE9908E4970C}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C2EF610-BCA0-4D1F-898A-DE9908E4970C}.Release|Any CPU.Build.0 = Release|Any CPU + {2F02D2C6-38DA-48F5-A941-DC2A22CFC430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F02D2C6-38DA-48F5-A941-DC2A22CFC430}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F02D2C6-38DA-48F5-A941-DC2A22CFC430}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F02D2C6-38DA-48F5-A941-DC2A22CFC430}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/NHibernate.sln.DotSettings b/src/NHibernate.sln.DotSettings index 0bf3bfc0403..918ecb514b5 100644 --- a/src/NHibernate.sln.DotSettings +++ b/src/NHibernate.sln.DotSettings @@ -22,6 +22,7 @@ True True True + True True NUnit Assert.NotNull True diff --git a/teamcity.build b/teamcity.build index 42c321601b0..7d1c79552fa 100644 --- a/teamcity.build +++ b/teamcity.build @@ -12,17 +12,7 @@ - - - - - - - - - - - + @@ -81,6 +71,7 @@ + @@ -109,8 +100,7 @@ - - + @@ -136,6 +126,7 @@ + @@ -179,6 +170,7 @@ + @@ -210,6 +202,7 @@ +