diff --git a/.vs/Exercism/v14/.suo b/.vs/Exercism/v14/.suo new file mode 100644 index 0000000..14f82e3 Binary files /dev/null and b/.vs/Exercism/v14/.suo differ diff --git a/.vs/config/applicationhost.config b/.vs/config/applicationhost.config new file mode 100644 index 0000000..dcdeb07 --- /dev/null +++ b/.vs/config/applicationhost.config @@ -0,0 +1,1046 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Exercism.VC.db b/Exercism.VC.db new file mode 100644 index 0000000..3f43bd9 Binary files /dev/null and b/Exercism.VC.db differ diff --git a/Exercism.sln b/Exercism.sln new file mode 100644 index 0000000..ca19897 --- /dev/null +++ b/Exercism.sln @@ -0,0 +1,96 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercism.csharp", "csharp\Exercism.csharp.csproj", "{FEF69435-D885-45DD-A446-04FD3BD3F593}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49E23A58-0B98-4EA8-B09F-B0E0046858C6}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + LICENSE = LICENSE + README.md = README.md + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercism.coffeescript", "coffeescript\Exercism.coffeescript.csproj", "{E312906C-B57F-4D93-9A55-540D2D0ABBB1}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Exercism.fsharp", "fsharp\Exercism.fsharp.fsproj", "{F7E8E67C-3CFA-4B46-A2B6-956263649501}" +EndProject +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "Exercism.python", "python\Exercism.python.pyproj", "{1B5FBA75-26DD-4737-9104-5B485DB26457}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exercism.cpp", "cpp\Exercism.cpp.vcxproj", "{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercism.javascript", "javascript\Exercism.javascript.csproj", "{E312906C-B57F-4D93-9A55-540D2D0ABBB2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Win32.ActiveCfg = Debug|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Any CPU.Build.0 = Release|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Win32.ActiveCfg = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Win32.ActiveCfg = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Any CPU.Build.0 = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Win32.ActiveCfg = Release|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Win32.ActiveCfg = Debug|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Any CPU.Build.0 = Release|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Win32.ActiveCfg = Release|Any CPU + {1B5FBA75-26DD-4737-9104-5B485DB26457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B5FBA75-26DD-4737-9104-5B485DB26457}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {1B5FBA75-26DD-4737-9104-5B485DB26457}.Debug|Win32.ActiveCfg = Debug|Any CPU + {1B5FBA75-26DD-4737-9104-5B485DB26457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B5FBA75-26DD-4737-9104-5B485DB26457}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {1B5FBA75-26DD-4737-9104-5B485DB26457}.Release|Win32.ActiveCfg = Release|Any CPU + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Win32.ActiveCfg = Debug|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Win32.Build.0 = Debug|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Any CPU.ActiveCfg = Release|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Mixed Platforms.Build.0 = Release|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Win32.ActiveCfg = Release|Win32 + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Win32.Build.0 = Release|Win32 + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Win32.ActiveCfg = Debug|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Any CPU.Build.0 = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Win32.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UpgradeLog.htm b/UpgradeLog.htm new file mode 100644 index 0000000..e0e2889 Binary files /dev/null and b/UpgradeLog.htm differ diff --git a/coffeescript/Exercism.coffeescript.csproj b/coffeescript/Exercism.coffeescript.csproj new file mode 100644 index 0000000..da7e119 --- /dev/null +++ b/coffeescript/Exercism.coffeescript.csproj @@ -0,0 +1,138 @@ + + + + + Debug + AnyCPU + + + 2.0 + {E312906C-B57F-4D93-9A55-540D2D0ABBB1} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Exercism.coffeescript + Exercism.coffeescript + v4.5 + true + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + True + + + + + + + + + + + + + + + + + + + + + + example.coffee + + + example.js + + + + example_test.spec.coffee + + + example_test.spec.js + + + + example.js + + + example.min.js + + + example_test.spec.js + + + example_test.spec.min.js + + + + Web.config + + + Web.config + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 61433 + / + http://localhost:61433/ + False + False + + + False + + + + + + \ No newline at end of file diff --git a/coffeescript/Exercism.coffeescript.csproj.user b/coffeescript/Exercism.coffeescript.csproj.user new file mode 100644 index 0000000..98f8356 --- /dev/null +++ b/coffeescript/Exercism.coffeescript.csproj.user @@ -0,0 +1,31 @@ + + + + true + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + True + + + + + \ No newline at end of file diff --git a/coffeescript/Properties/AssemblyInfo.cs b/coffeescript/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f085c33 --- /dev/null +++ b/coffeescript/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Exercism.coffeescript")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Exercism.coffeescript")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/coffeescript/Web.Debug.config b/coffeescript/Web.Debug.config new file mode 100644 index 0000000..2e302f9 --- /dev/null +++ b/coffeescript/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/coffeescript/Web.Release.config b/coffeescript/Web.Release.config new file mode 100644 index 0000000..c358444 --- /dev/null +++ b/coffeescript/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/coffeescript/Web.config b/coffeescript/Web.config new file mode 100644 index 0000000..bfb640d --- /dev/null +++ b/coffeescript/Web.config @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/coffeescript/bin/Exercism.coffeescript.dll b/coffeescript/bin/Exercism.coffeescript.dll new file mode 100644 index 0000000..39981ed Binary files /dev/null and b/coffeescript/bin/Exercism.coffeescript.dll differ diff --git a/coffeescript/bin/Exercism.coffeescript.dll.config b/coffeescript/bin/Exercism.coffeescript.dll.config new file mode 100644 index 0000000..bfb640d --- /dev/null +++ b/coffeescript/bin/Exercism.coffeescript.dll.config @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/coffeescript/bin/Exercism.coffeescript.pdb b/coffeescript/bin/Exercism.coffeescript.pdb new file mode 100644 index 0000000..f1ac400 Binary files /dev/null and b/coffeescript/bin/Exercism.coffeescript.pdb differ diff --git a/coffeescript/bin/nunit.framework.dll b/coffeescript/bin/nunit.framework.dll new file mode 100644 index 0000000..780727f Binary files /dev/null and b/coffeescript/bin/nunit.framework.dll differ diff --git a/coffeescript/bin/nunit.framework.xml b/coffeescript/bin/nunit.framework.xml new file mode 100644 index 0000000..4c8c26e --- /dev/null +++ b/coffeescript/bin/nunit.framework.xml @@ -0,0 +1,10960 @@ + + + + nunit.framework + + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + Delegate used by tests that execute code and + capture any thrown exception. + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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. + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + 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 + + + + 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 + + + + 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + + 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 + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + 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. + + 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. + + 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 + 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. + + The expected Exception Type + 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 + The message that will be displayed on failure + + + + 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 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + + + + 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 + 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 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 + 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 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + + + + Assert that a string is either null or 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 either null or equal to string.Empty + + 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 string to be tested + + + + Assert that a string is not null or 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 null or empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is not null or empty + + The string to be tested + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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. + + 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + The first value, expected to be less + The second value, expected to be greater + + + + 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 + The message to display in case of failure + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + + + + 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 + + + + Gets the number of assertions executed so far and + resets the counter to zero. + + + + + 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. + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 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 the same path or under 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. + + + + + 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 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 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 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 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 whether a collection is ordered + + + + + 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. + + 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. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + Arguments to use in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + 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 + + + + 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. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression 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 InconclusiveException 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 + + + + 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the + method throws an . + + The evaluated condition + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException on failure. + + 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 InconclusiveException 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + 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. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Waits for pending asynchronous operations to complete, if appropriate, + and returns a proper result of the invocation by unwrapping task results + + The raw result of the method invocation + The unwrapped result, if necessary + + + + A set of Assert methods operationg on one or more collections + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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 + + + + 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 containing objects to be considered + The message that will be displayed on failure + + + + Asserts that all items contained in collection are not equal to null. + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + + + + Asserts that superset is not a subject of subset. + + 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. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is a subset of subset. + + 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. + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Summary description for DirectoryAssert + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + 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. + + 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. + + 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. + + 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. + + 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 + + + + 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. + + 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. + + 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. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + 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 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Summary description for FileAssert. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + 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. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + 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. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal + + + + 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 + + + + GlobalSettings is a place for setting default values used + by the framework in performing asserts. + + + + + Default tolerance for floating point equality + + + + + Class used to guard against unexpected argument values + by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + 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 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. + + + + + 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. + + + + + Method to handle an expected exception + + 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is under 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. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Indicates whether a result has been specified. + This is necessary because the result may be + null, so it's value cannot be checked. + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + 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. + + + + + + + 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 + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attribute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are 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. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are Notequal, without regard to case. + + 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. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The regex pattern to be matched + The actual string + + + + 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 + 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. + + The regex pattern to be used + The actual string + + + + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It provides a number of instance modifiers + for use in initializing the test case. + + Note: Instance modifiers are getters that return + the same instance after modifying it's state. + + + + + The 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 + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + 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 + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Ignores this TestCase. + + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Marks this TestCase as Explicit + + + + + + Marks this TestCase as Explicit, specifying the reason. + + The reason. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Returns true if the result has been set + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + Gets a list of categories associated with this test. + + + + + Gets the property dictionary for this test + + + + + Provide the context information of the current test + + + + + Constructs a TestContext using the provided context dictionary + + A context dictionary + + + + 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 a TestAdapter representing the currently executing test in this context. + + + + + Gets a ResultAdapter representing the current result for the test + executing in this context. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputing files created + by this test run. + + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Constructs a TestAdapter for this context + + The context dictionary + + + + The name of the test. + + + + + The FullName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a context + + 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 TestStatus of current test. This enum will be used + in future versions of NUnit and so is to be preferred + to the TestState value. + + + + + Provides details about a test + + + + + Creates an instance of TestDetails + + 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. + + + + + 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 ResultState enum indicates the result of running a test + + + + + The result is inconclusive + + + + + The test was not runnable. + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + Helper class with static methods used to supply constraints + that operate on strings. + + + + + 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 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 fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + 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. + + + + + 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 + + + + + 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 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. + + 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 a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Writes the text for an expected value. + + The expected value. + + + + Writes the text for a modifier + + The modifier. + + + + 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 + + + + Abstract method to get the max line length + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + 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 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + Writes the text for a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Write the text for a modifier. + + The modifier. + + + + Writes the text for an expected value. + + The expected value. + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The constraint for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Gets or sets the maximum line length for this writer + + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + 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 + + + + + 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 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. + + + + + Attribute used to provide descriptive text about a + test case or fixture. + + + + + Construct the attribute + + Text describing the test + + + + Gets the test description + + + + + Enumeration indicating how the expected message parameter is to be used + + + + 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 + + + + + + Constructor for a non-specific exception + + + + + Constructor for a given type of exception + + The type of the expected exception + + + + Constructor for a given exception name + + The full name of the expected exception + + + + Gets or sets the expected exception type + + + + + Gets or sets the full Type name of the expected exception + + + + + Gets or sets the expected message text + + + + + Gets or sets the user message displayed in case of failure + + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets the name of a method to be used as an exception handler + + + + + 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 + + + + The reason test is marked explicit + + + + + 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 without giving a reason + for ignoring the test. + + + + + Constructs the attribute giving a reason for ignoring the test + + The reason for ignoring the test + + + + The reason for ignoring a test + + + + + 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 itemss 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 + + + + + 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-deliminted list of platforms + + + + 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 + + + + 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. + + + + + 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 + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + Summary description for MaxTimeAttribute. + + + + + Construct a MaxTimeAttribute, given a time in milliseconds. + + The maximum elapsed time in milliseconds + + + + RandomAttribute is used to supply a set of random values + to a single parameter of a parameterized test. + + + + + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. + + + + + Abstract base class for attributes that apply to parameters + and supply data for the parameter. + + + + + Gets the data to be provided to the specified parameter + + + + + 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. + + + + + 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 + + + + + Construct a set of doubles from 0.0 to 1.0, + specifying only the count. + + + + + + Construct a set of doubles from min to max + + + + + + + + Construct a set of ints from min to max + + + + + + + + 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 longs + + + + + + + + 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 + + + + RequiredAddinAttribute may be used to indicate the names of any addins + that must be present in order to run some or all of the tests in an + assembly. If the addin is not loaded, the entire assembly is marked + as NotRunnable. + + + + + Initializes a new instance of the class. + + The required addin. + + + + Gets the name of required addin. + + The required addin name. + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + 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. + + + + + 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 static (shared in VB) property + that returns a list of tests. + + + + + 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. + + + + + Provide actions to execute before and after tests. + + + + + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + + + + + Executed before each test is run + + Provides details about the test that is going to be run. + + + + Executed after each test is run + + Provides details about the test that has just been run. + + + + Provides the target for the action attribute + + 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")] + publc void TestDescriptionMethod() + {} + } + + + + + + Descriptive text for this test + + + + + 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 the list of arguments to a test case + + + + + Gets or sets the expected result. Use + ExpectedResult by preference. + + The result. + + + + Gets or sets the expected result. + + The result. + + + + Gets a flag indicating whether an expected + result has been set. + + + + + Gets a list of categories associated with this test; + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + Gets or sets the expected exception. + + The expected exception. + + + + Gets or sets the name the expected exception. + + The expected name of the exception. + + + + Gets or sets the expected message of the expected exception + + The expected message of the exception. + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets or sets the description. + + The description. + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the explicit status of the test + + + + + Gets or sets the reason for not running the test + + + + + Gets or sets the reason for not running the test. + Set has the side effect of marking the test as ignored. + + The ignore reason. + + + + FactoryAttribute indicates the source to be used to + provide test cases for a test method. + + + + + Construct with the name of the data source, which must + be a property, field or method of the test class itself. + + An array of the names of the factories that will provide data + + + + Construct with a Type, which must implement IEnumerable + + The Type that will provide data + + + + Construct with a Type and name. + that don't support params arrays. + + 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 + + + + + A Type to be used as a source + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + [TestFixture] + public class ExampleClass + {} + + + + + 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. + + + + + + Descriptive text for this fixture + + + + + Gets and sets the category for this fixture. + May be a comma-separated list of categories. + + + + + Gets a list of categories for this fixture + + + + + The arguments originally provided to the attribute + + + + + Gets or sets a value indicating whether this should be ignored. + + true if ignore; otherwise, false. + + + + Gets or sets the ignore reason. May set Ignored as a side effect. + + The ignore reason. + + + + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. + + + + + Attribute used to identify a method that is + called before any tests in a fixture are run. + + + + + 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. + + + + + 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")] + 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. + + + + + Construct a TimeoutAttribute given a time in milliseconds + + 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 RequiresSTAAttribute + + + + + 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 on a separate thread. + + + + + Construct a RequiresThreadAttribute + + + + + Construct a RequiresThreadAttribute, specifying the apartment + + + + + 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 the data source to be used + + + + 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 the 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 + + + + + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + + + + + Abstract base class used for prefixes + + + + + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + + + + + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + Static UnsetObject used to detect derived constraints + failing to set the actual value. + + + + + The actual value being tested against a constraint + + + + + The display name of this Constraint for use by ToString() + + + + + Argument fields used by ToString(); + + + + + The builder holding this constraint + + + + + Construct a constraint with no arguments + + + + + Construct a constraint with one argument + + + + + Construct a constraint with two arguments + + + + + Sets the ConstraintBuilder holding this constraint + + + + + 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 MessageWriter on which to display the message + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by 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 + True for success, false for failure + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 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. + + + + + 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. + + + + + 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. + + + + + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + + + + + The base constraint + + + + + Construct given a base constraint + + + + + + Construct an AllItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + AndConstraint succeeds only if both members succeed. + + + + + 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 + + + + Create an AndConstraint from two other constraints + + The first constraint + The second 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 a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + Construct a TypeConstraint for a given Type + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. + + The writer on which the actual value is displayed + + + + Construct an AssignableFromConstraint for the type provided + + + + + + Test whether an object can be assigned from the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + + + + + Construct an AssignableToConstraint for the type provided + + + + + + Test whether an object can be assigned to the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + 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 attriute + Type and base constraint. + + + + + + + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. + + + + + Writes a description of the attribute to the specified writer. + + + + + Writes the actual value supplied to the specified writer. + + + + + 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 + + + + + + Tests whether the object provides the expected attribute. + + 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 + + + + + BasicConstraint is the abstract base for constraints that + perform a simple comparison to a constant value. + + + + + Initializes a new instance of the class. + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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. + + + + + 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 use the supplied EqualityAdapter. + NOTE: For internal use only. + + The EqualityAdapter 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 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 + + + + Flag the constraint to ignore case and return self. + + + + + Construct a CollectionContainsConstraint + + + + + + Test whether the expected item is contained in the collection + + + + + + + Write a descripton of the constraint to a MessageWriter + + + + + + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + + + + + Construct a CollectionEquivalentConstraint + + + + + + Test whether two collections are equivalent + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionOrderedConstraint is used to test whether a collection is ordered. + + + + + Construct a CollectionOrderedConstraint + + + + + Modifies the constraint to use an IComparer and returns self. + + + + + Modifies the constraint to use an IComparer<T> and returns self. + + + + + Modifies the constraint to use a Comparison<T> and returns self. + + + + + Modifies the constraint to test ordering by the value of + a specified property and returns self. + + + + + Test whether the collection is ordered + + + + + + + Write a description of the constraint to a MessageWriter + + + + + + Returns the string representation of the constraint. + + + + + + If used performs a reverse comparison + + + + + 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 + + + + Test whether the actual collection is a subset of + the expected collection provided. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. + + + + + Construct a CollectionTally object from a comparer and a collection + + + + + 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 + + + + The number of objects remaining in the tally + + + + + ComparisonAdapter class centralizes all comparisons of + values in NUnit, adapting to the use of any provided + IComparer, IComparer<T> or Comparison<T> + + + + + Returns a ComparisonAdapter that wraps an IComparer + + + + + Returns a ComparisonAdapter that wraps an IComparer<T> + + + + + Returns a ComparisonAdapter that wraps a Comparison<T> + + + + + Compares two objects + + + + + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. + + + + + Construct a ComparisonAdapter for an IComparer + + + + + Compares two objects + + + + + + + + Construct a default ComparisonAdapter + + + + + ComparisonAdapter<T> extends ComparisonAdapter and + allows use of an IComparer<T> or Comparison<T> + to actually perform the comparison. + + + + + Construct a ComparisonAdapter for an IComparer<T> + + + + + Compare a Type T to an object + + + + + Construct a ComparisonAdapter for a Comparison<T> + + + + + 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. This class supplies the Using modifiers. + + + + + ComparisonAdapter to be used in making the comparison + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Modifies the constraint to use an IComparer and returns self + + + + + Modifies the constraint to use an IComparer<T> and returns self + + + + + Modifies the constraint to use a Comparison<T> and returns self + + + + + Delegate used to delay evaluation of the actual value + to be used in evaluating a 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 reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + + + + + 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 expresson 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. + + + + + OperatorStack is a type-safe stack for holding ConstraintOperators + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified operator onto the stack. + + The op. + + + + Pops the topmost operator from the stack. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost operator without modifying the stack. + + The top. + + + + ConstraintStack is a type-safe stack for holding Constraints + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. + + The constraint. + + + + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost constraint without modifying the stack. + + 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. + + + + + 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. + + + + + 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. + + + + + 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 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 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 same path or under 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. + + + + + 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 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 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. + + + + + With is currently a NOP - reserved for future use. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + Flag the constraint to ignore case and return self. + + + + + Applies a delay to the match so that a match can be evaluated in the future. + + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + If the value of is less than 0 + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + The time interval used for polling + If the value of is less than 0 + + + + Test whether the constraint is satisfied by a given value + + 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 + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + EmptyCollectionConstraint tests whether a collection is empty. + + + + + Check that the collection is empty + + + + + + + Write the constraint description to a MessageWriter + + + + + + 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. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EmptyDirectoryConstraint is used to test that a directory is empty + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + EmptyStringConstraint tests whether a string is empty. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EndsWithConstraint can test whether a string ends + with an expected substring. + + + + + 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 + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + Modify the constraint to ignore case in matching. + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + If true, strings in error messages will be clipped + + + + + NUnitEqualityComparer used to test equality. + + + + + Initializes a new instance of the class. + + The expected value. + + + + Flag the constraint to use a tolerance when determining equality. + + Tolerance value to be used + 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 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 + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Write description of this constraint + + 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 enumerations, 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 + + + + 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. + + + + + 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 + + + + EqualityAdapter class handles all equality comparisons + that use an IEqualityComparer, IEqualityComparer<T> + or a ComparisonAdapter. + + + + + 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 EqualityAdapter that wraps an IComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + + + + + Returns an EqualityAdapter that wraps an IComparer<T>. + + + + + Returns an EqualityAdapter that wraps a Comparison<T>. + + + + + EqualityAdapter that wraps an IComparer. + + + + + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. + + + + + EqualityAdapter that wraps an IComparer. + + + + + EqualityAdapterList represents a list of EqualityAdapters + in a common class across platforms. + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + Test that an object is of the exact type specified + + 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 + + The MessageWriter to use + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overriden to write additional information + in the case of an Exception. + + The MessageWriter to use + + + + 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 + + + + + FailurePointList represents a set of FailurePoints + in a cross-platform way. + + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + 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/ + + + + + + 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 + + + + 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 + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is greater than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + 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 + + + + Test whether an object is of the specified type or a derived type + + 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 + + The MessageWriter to use + + + + Tests whether a value is less than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is less than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Static methods used in creating messages + + + + + Static string used when strings are clipped + + + + + 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 + + + + 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 enumerable, + 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 + + + + + Test that the actual value is an NaN + + + + + + + Write the constraint description to a specified writer + + + + + + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. + + + + + Construct a NoItemConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + NullConstraint tests that the actual value is null + + + + + Initializes a new instance of the class. + + + + + NullEmptyStringConstraint tests whether a string is either null or empty. + + + + + Constructs a new NullOrEmptyStringConstraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + Compares two objects + + + + + + + + Returns the default NUnitComparer. + + + + + Generic version of NUnitComparer + + + + + + Compare two objects of the same type + + + + + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. + + + + + + + + + + Compares two objects for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + + If true, all string comparisons will ignore case + + + + + 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 occured. + + + + + RecursionDetector used to check for recursion when + evaluating self-referencing enumerables. + + + + + Compares two objects for equality within a tolerance, setting + the tolerance to the actual tolerance used if an empty + tolerance is supplied. + + + + + 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 + + + + 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. + + + + + RecursionDetector detects when a comparison + between two enumerables has reached a point + where the same objects that were previously + compared are again being compared. This allows + the caller to stop the comparison if desired. + + + + + Check whether two objects have previously + been compared, returning true if they have. + The two objects are remembered, so that a + second call will always return true. + + + + + OrConstraint succeeds if either member succeeds + + + + + Create an OrConstraint from two other constraints + + The first constraint + The second 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 + + + + Write a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. + + + + + The expected path used in the constraint + + + + + Flag indicating whether a caseInsensitive comparison should be made + + + + + Construct a PathConstraint for a give expected path + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns true if the expected path and actual path match + + + + + Returns the string representation of this constraint + + + + + Transform the provided path to its canonical form so that it + may be more easily be compared with other paths. + + The original path + The path in canonical form + + + + Test whether one path in canonical form is under another. + + The first path - supposed to be the parent path + The second path - supposed to be the child path + Indicates whether case should be ignored + + + + + Modifies the current instance to be case-insensitve + and returns it. + + + + + Modifies the current instance to be case-sensitve + and returns it. + + + + + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. + + + + + Construct a PredicateConstraint from a predicate + + + + + Determines whether the predicate succeeds when applied + to the actual value. + + + + + Writes the description to a MessageWriter + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 vaue + of the property. The two constraints are now separate. + + + + + Initializes a new instance of the class. + + The name of the property. + + + + Test whether the property exists for a given object + + The object to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. + + The writer on which the actual value is displayed + + + + 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. + To. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Resolve the current expression to a Constraint + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + 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 either + of the argument constraints is 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. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + 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 the string representation of the constraint. + + A string representing the constraint + + + + Resolves the ReusableConstraint by returning the constraint + that it originally wrapped. + + A resolved constraint + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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 + + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overridden in ThrowsNothingConstraint to write + information about the exception that was actually caught. + + The writer on which the actual value is displayed + + + + 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. + + + + + Constructs a linear tolerance of a specdified amount + + + + + Constructs a tolerance given an amount and ToleranceMode + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + 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. + + + + + Returns a zero Tolerance object, equivalent to + specifying an exact match. + + + + + Gets the ToleranceMode for the current Tolerance + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance is empty. + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared values my deviate from each other. + + + + + Compares two values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + Check that all items are unique. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + XmlSerializableConstraint tests whether + an object is serializable in XML format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Represents a constraint that succeeds if all the + members of a collection match a base constraint. + + + + + Abstract base for operators that indicate how to + apply a constraint to items in a collection. + + + + + PrefixOperator takes a single constraint and modifies + it's action in some way. + + + + + 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. + + + + + 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. + + + + + + The syntax element preceding this operator + + + + + The syntax element folowing 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. + + + + + + Returns the constraint created by applying this + prefix to another constraint. + + + + + + + Constructs a CollectionOperator + + + + + 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 + + + + + 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. + + + + + + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. + + + + + Gets the left precedence of the operator + + + + + Gets the right precedence of the operator + + + + + 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. + + + + + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. + + + + + 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. + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + 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 + + + + + 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. + + + + + 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. + + + + + + Gets the name of the property to which the operator applies + + + + + 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 modifes the + order of evaluation because of its precedence. + + + + + Constructor for the WithOperator + + + + + Returns a constraint that wraps its argument + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + + + + + + + Compares two objects of a given Type for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + diff --git a/coffeescript/example/example.coffee b/coffeescript/example/example.coffee new file mode 100644 index 0000000..d8858c7 --- /dev/null +++ b/coffeescript/example/example.coffee @@ -0,0 +1,5 @@ +class Example + add: (x, y) -> x + y + +module.exports = Example + diff --git a/coffeescript/example/example_test.spec.coffee b/coffeescript/example/example_test.spec.coffee new file mode 100644 index 0000000..b03fc81 --- /dev/null +++ b/coffeescript/example/example_test.spec.coffee @@ -0,0 +1,18 @@ +Example = require "./example" +describe "Example", -> + example = new Example() + it "add 2 and 2", -> + result = example.add 2, 2 + expect(result).toEqual 4 + + it "add 12 and 24", -> + result = example.add 12, 24 + expect(result).toEqual 36 + + it "add 100 and 1", -> + result = example.add 100, 1 + expect(result).toEqual 101 + + it "add 2 and -2", -> + result = example.add 2, -2 + expect(result).toEqual 0 diff --git a/coffeescript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/coffeescript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..7308390 Binary files /dev/null and b/coffeescript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/coffeescript/obj/Debug/Exercism.coffeescript.csproj.FileListAbsolute.txt b/coffeescript/obj/Debug/Exercism.coffeescript.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f35ba61 --- /dev/null +++ b/coffeescript/obj/Debug/Exercism.coffeescript.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\brbuller\Development\exercism\coffeescript\bin\Exercism.coffeescript.dll.config +C:\Users\brbuller\Development\exercism\coffeescript\bin\Exercism.coffeescript.dll +C:\Users\brbuller\Development\exercism\coffeescript\bin\Exercism.coffeescript.pdb +C:\Users\brbuller\Development\exercism\coffeescript\obj\Debug\Exercism.coffeescript.csprojResolveAssemblyReference.cache +C:\Users\brbuller\Development\exercism\coffeescript\obj\Debug\Exercism.coffeescript.dll +C:\Users\brbuller\Development\exercism\coffeescript\obj\Debug\Exercism.coffeescript.pdb +C:\Users\brbuller\Development\exercism\coffeescript\bin\nunit.framework.dll +C:\Users\brbuller\Development\exercism\coffeescript\bin\nunit.framework.xml diff --git a/coffeescript/obj/Debug/Exercism.coffeescript.csprojResolveAssemblyReference.cache b/coffeescript/obj/Debug/Exercism.coffeescript.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..cd3f623 Binary files /dev/null and b/coffeescript/obj/Debug/Exercism.coffeescript.csprojResolveAssemblyReference.cache differ diff --git a/coffeescript/obj/Debug/Exercism.coffeescript.dll b/coffeescript/obj/Debug/Exercism.coffeescript.dll new file mode 100644 index 0000000..39981ed Binary files /dev/null and b/coffeescript/obj/Debug/Exercism.coffeescript.dll differ diff --git a/coffeescript/obj/Debug/Exercism.coffeescript.pdb b/coffeescript/obj/Debug/Exercism.coffeescript.pdb new file mode 100644 index 0000000..f1ac400 Binary files /dev/null and b/coffeescript/obj/Debug/Exercism.coffeescript.pdb differ diff --git a/coffeescript/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/coffeescript/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/coffeescript/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/coffeescript/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/coffeescript/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/coffeescript/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/coffeescript/packages.config b/coffeescript/packages.config new file mode 100644 index 0000000..d4e241a --- /dev/null +++ b/coffeescript/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/coffeescript/test.bat b/coffeescript/test.bat new file mode 100644 index 0000000..b156be8 --- /dev/null +++ b/coffeescript/test.bat @@ -0,0 +1,3 @@ +@echo off + +jasmine-node --coffee %1 \ No newline at end of file diff --git a/cpp/Debug/Exercism.cpp.log b/cpp/Debug/Exercism.cpp.log new file mode 100644 index 0000000..069195c --- /dev/null +++ b/cpp/Debug/Exercism.cpp.log @@ -0,0 +1 @@ +C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". diff --git a/cpp/Exercism.cpp b/cpp/Exercism.cpp new file mode 100644 index 0000000..85adc44 --- /dev/null +++ b/cpp/Exercism.cpp @@ -0,0 +1,5 @@ +// Exercism.cpp : Defines the entry point for the console application. + +#include "targetver.h" +#define BOOST_TEST_MAIN +#include \ No newline at end of file diff --git a/cpp/Exercism.cpp.vcxproj b/cpp/Exercism.cpp.vcxproj new file mode 100644 index 0000000..d9d93d7 --- /dev/null +++ b/cpp/Exercism.cpp.vcxproj @@ -0,0 +1,96 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B} + Win32Proj + Exercismcpp + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + $(BOOST_ROOT);%(AdditionalIncludeDirectories) + + + Console + true + $(BOOST_ROOT)\stage\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + $(BOOST_ROOT);%(AdditionalIncludeDirectories) + + + Console + true + true + true + $(BOOST_ROOT)\stage\lib;%(AdditionalLibraryDirectories) + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cpp/Exercism.cpp.vcxproj.filters b/cpp/Exercism.cpp.vcxproj.filters new file mode 100644 index 0000000..a788a34 --- /dev/null +++ b/cpp/Exercism.cpp.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + + + + \ No newline at end of file diff --git a/cpp/example/example.h b/cpp/example/example.h new file mode 100644 index 0000000..8ad3fb3 --- /dev/null +++ b/cpp/example/example.h @@ -0,0 +1,10 @@ +#pragma once + +class example +{ +public: + static int add( int x, int y ) + { + return x + y; + } +}; \ No newline at end of file diff --git a/cpp/example/example_test.cpp b/cpp/example/example_test.cpp new file mode 100644 index 0000000..2120929 --- /dev/null +++ b/cpp/example/example_test.cpp @@ -0,0 +1,22 @@ +#include "example.h" +#include + +BOOST_AUTO_TEST_CASE(add_2_and_2) +{ + BOOST_REQUIRE_EQUAL(4, example::add(2, 2)); +} + +BOOST_AUTO_TEST_CASE( add_12_and_24 ) +{ + BOOST_REQUIRE_EQUAL( 36, example::add( 12, 24 ) ); +} + +BOOST_AUTO_TEST_CASE( add_100_and_1 ) +{ + BOOST_REQUIRE_EQUAL( 101, example::add( 100, 1 ) ); +} + +BOOST_AUTO_TEST_CASE( add_2_and_minus_2 ) +{ + BOOST_REQUIRE_EQUAL( 0, example::add( 2, -2 ) ); +} \ No newline at end of file diff --git a/cpp/packages.config b/cpp/packages.config new file mode 100644 index 0000000..1bdd6ac --- /dev/null +++ b/cpp/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cpp/targetver.h b/cpp/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/cpp/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/csharp/Exercism.csharp.csproj b/csharp/Exercism.csharp.csproj new file mode 100644 index 0000000..f4fab28 --- /dev/null +++ b/csharp/Exercism.csharp.csproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + {FEF69435-D885-45DD-A446-04FD3BD3F593} + Library + Properties + Exercism + Exercism.csharp + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/csharp/Exercism.csharp.csproj.user b/csharp/Exercism.csharp.csproj.user new file mode 100644 index 0000000..e482657 --- /dev/null +++ b/csharp/Exercism.csharp.csproj.user @@ -0,0 +1,6 @@ + + + + ShowAllFiles + + \ No newline at end of file diff --git a/csharp/Properties/AssemblyInfo.cs b/csharp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5e51bef --- /dev/null +++ b/csharp/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Exercism")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Exercism")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6ffaaf65-a0b4-4ff5-b2eb-e275df05cc6e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/csharp/anagram/Anagram.cs b/csharp/anagram/Anagram.cs new file mode 100644 index 0000000..4fe63bf --- /dev/null +++ b/csharp/anagram/Anagram.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; + +internal class Anagram { + private string v; + + // Anagram is initialized with a string to test other strings against + public Anagram(string v) { + this.v = v.ToLower(); + } + + // Match takes an array of strings and returns an array that contains + // All anagrams of this.v + public string[] Match(string[] inp) { + List ret = new List(); + foreach(string val in inp) { + if(this.v.Length != val.Length) { + continue; + } + string valTest = val.ToLower(); + bool isAnagram = true; + if(this.v == valTest) { + continue; + } + for(int i = 0; i < this.v.Length; i++) { + int idx = valTest.IndexOf(this.v[i]); + if(idx == -1) { + isAnagram = false; + } + if(!isAnagram) { + break; + } + valTest = valTest.Substring(0, idx)+valTest.Substring(idx+1); + } + if(isAnagram) { + ret.Add(val); + } + } + return ret.ToArray(); + } +} diff --git a/csharp/anagram/AnagramTest.cs b/csharp/anagram/AnagramTest.cs new file mode 100644 index 0000000..ec17a21 --- /dev/null +++ b/csharp/anagram/AnagramTest.cs @@ -0,0 +1,96 @@ +using NUnit.Framework; + +[TestFixture] +public class AnagramTest +{ + [Ignore] + [Test] + public void No_matches() + { + var detector = new Anagram("diaper"); + var words = new[] { "hello", "world", "zombies", "pants" }; + var results = new string[0]; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Detect_simple_anagram() + { + var detector = new Anagram("ant"); + var words = new[] { "tan", "stand", "at" }; + var results = new[] { "tan" }; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Detect_multiple_anagrams() + { + var detector = new Anagram("master"); + var words = new[] { "stream", "pigeon", "maters" }; + var results = new[] { "maters", "stream" }; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Does_not_confuse_different_duplicates() + { + var detector = new Anagram("galea"); + var words = new[] { "eagle" }; + var results = new string[0]; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Identical_word_is_not_anagram() + { + var detector = new Anagram("corn"); + var words = new[] { "corn", "dark", "Corn", "rank", "CORN", "cron", "park" }; + var results = new[] { "cron" }; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Eliminate_anagrams_with_same_checksum() + { + var detector = new Anagram("mass"); + var words = new[] { "last" }; + var results = new string[0]; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Eliminate_anagram_subsets() + { + var detector = new Anagram("good"); + var words = new[] { "dog", "goody" }; + var results = new string[0]; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Detect_anagrams() + { + var detector = new Anagram("allergy"); + var words = new[] { "gallery", "ballerina", "regally", "clergy", "largely", "leading" }; + var results = new[] { "gallery", "largely", "regally" }; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + + [Ignore] + [Test] + public void Anagrams_are_case_insensitive() + { + var detector = new Anagram("Orchestra"); + var words = new[] { "cashregister", "Carthorse", "radishes" }; + var results = new[] { "Carthorse" }; + Assert.That(detector.Match(words), Is.EquivalentTo(results)); + } + +} diff --git a/csharp/anagram/README.md b/csharp/anagram/README.md new file mode 100644 index 0000000..a8aee52 --- /dev/null +++ b/csharp/anagram/README.md @@ -0,0 +1,21 @@ +# Anagram + +Write a program that, given a word and a list of possible anagrams, selects the correct sublist. + +Given `"listen"` and a list of candidates like `"enlists" "google" +"inlets" "banana"` the program should return a list containing +`"inlets"`. + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup) + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + diff --git a/csharp/bin/Debug/Exercism.csharp.dll b/csharp/bin/Debug/Exercism.csharp.dll new file mode 100644 index 0000000..4ed1c93 Binary files /dev/null and b/csharp/bin/Debug/Exercism.csharp.dll differ diff --git a/csharp/bin/Debug/Exercism.csharp.pdb b/csharp/bin/Debug/Exercism.csharp.pdb new file mode 100644 index 0000000..d0a6b65 Binary files /dev/null and b/csharp/bin/Debug/Exercism.csharp.pdb differ diff --git a/csharp/bin/Debug/nunit.framework.dll b/csharp/bin/Debug/nunit.framework.dll new file mode 100644 index 0000000..780727f Binary files /dev/null and b/csharp/bin/Debug/nunit.framework.dll differ diff --git a/csharp/bin/Debug/nunit.framework.xml b/csharp/bin/Debug/nunit.framework.xml new file mode 100644 index 0000000..4c8c26e --- /dev/null +++ b/csharp/bin/Debug/nunit.framework.xml @@ -0,0 +1,10960 @@ + + + + nunit.framework + + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + Delegate used by tests that execute code and + capture any thrown exception. + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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. + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + 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 + + + + 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 + + + + 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + + 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 + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + 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. + + 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. + + 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 + 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. + + The expected Exception Type + 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 + The message that will be displayed on failure + + + + 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 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + + + + 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 + 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 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 + 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 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + + + + Assert that a string is either null or 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 either null or equal to string.Empty + + 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 string to be tested + + + + Assert that a string is not null or 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 null or empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is not null or empty + + The string to be tested + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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. + + 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + The first value, expected to be less + The second value, expected to be greater + + + + 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 + The message to display in case of failure + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + + + + 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 + + + + Gets the number of assertions executed so far and + resets the counter to zero. + + + + + 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. + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 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 the same path or under 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. + + + + + 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 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 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 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 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 whether a collection is ordered + + + + + 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. + + 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. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + Arguments to use in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + 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 + + + + 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. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression 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 InconclusiveException 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 + + + + 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the + method throws an . + + The evaluated condition + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException on failure. + + 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 InconclusiveException 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + 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. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Waits for pending asynchronous operations to complete, if appropriate, + and returns a proper result of the invocation by unwrapping task results + + The raw result of the method invocation + The unwrapped result, if necessary + + + + A set of Assert methods operationg on one or more collections + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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 + + + + 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 containing objects to be considered + The message that will be displayed on failure + + + + Asserts that all items contained in collection are not equal to null. + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + + + + Asserts that superset is not a subject of subset. + + 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. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is a subset of subset. + + 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. + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Summary description for DirectoryAssert + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + 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. + + 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. + + 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. + + 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. + + 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 + + + + 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. + + 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. + + 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. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + 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 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Summary description for FileAssert. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + 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. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + 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. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal + + + + 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 + + + + GlobalSettings is a place for setting default values used + by the framework in performing asserts. + + + + + Default tolerance for floating point equality + + + + + Class used to guard against unexpected argument values + by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + 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 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. + + + + + 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. + + + + + Method to handle an expected exception + + 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is under 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. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Indicates whether a result has been specified. + This is necessary because the result may be + null, so it's value cannot be checked. + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + 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. + + + + + + + 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 + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attribute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are 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. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are Notequal, without regard to case. + + 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. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The regex pattern to be matched + The actual string + + + + 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 + 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. + + The regex pattern to be used + The actual string + + + + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It provides a number of instance modifiers + for use in initializing the test case. + + Note: Instance modifiers are getters that return + the same instance after modifying it's state. + + + + + The 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 + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + 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 + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Ignores this TestCase. + + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Marks this TestCase as Explicit + + + + + + Marks this TestCase as Explicit, specifying the reason. + + The reason. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Returns true if the result has been set + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + Gets a list of categories associated with this test. + + + + + Gets the property dictionary for this test + + + + + Provide the context information of the current test + + + + + Constructs a TestContext using the provided context dictionary + + A context dictionary + + + + 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 a TestAdapter representing the currently executing test in this context. + + + + + Gets a ResultAdapter representing the current result for the test + executing in this context. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputing files created + by this test run. + + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Constructs a TestAdapter for this context + + The context dictionary + + + + The name of the test. + + + + + The FullName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a context + + 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 TestStatus of current test. This enum will be used + in future versions of NUnit and so is to be preferred + to the TestState value. + + + + + Provides details about a test + + + + + Creates an instance of TestDetails + + 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. + + + + + 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 ResultState enum indicates the result of running a test + + + + + The result is inconclusive + + + + + The test was not runnable. + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + Helper class with static methods used to supply constraints + that operate on strings. + + + + + 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 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 fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + 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. + + + + + 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 + + + + + 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 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. + + 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 a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Writes the text for an expected value. + + The expected value. + + + + Writes the text for a modifier + + The modifier. + + + + 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 + + + + Abstract method to get the max line length + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + 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 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + Writes the text for a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Write the text for a modifier. + + The modifier. + + + + Writes the text for an expected value. + + The expected value. + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The constraint for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Gets or sets the maximum line length for this writer + + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + 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 + + + + + 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 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. + + + + + Attribute used to provide descriptive text about a + test case or fixture. + + + + + Construct the attribute + + Text describing the test + + + + Gets the test description + + + + + Enumeration indicating how the expected message parameter is to be used + + + + 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 + + + + + + Constructor for a non-specific exception + + + + + Constructor for a given type of exception + + The type of the expected exception + + + + Constructor for a given exception name + + The full name of the expected exception + + + + Gets or sets the expected exception type + + + + + Gets or sets the full Type name of the expected exception + + + + + Gets or sets the expected message text + + + + + Gets or sets the user message displayed in case of failure + + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets the name of a method to be used as an exception handler + + + + + 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 + + + + The reason test is marked explicit + + + + + 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 without giving a reason + for ignoring the test. + + + + + Constructs the attribute giving a reason for ignoring the test + + The reason for ignoring the test + + + + The reason for ignoring a test + + + + + 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 itemss 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 + + + + + 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-deliminted list of platforms + + + + 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 + + + + 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. + + + + + 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 + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + Summary description for MaxTimeAttribute. + + + + + Construct a MaxTimeAttribute, given a time in milliseconds. + + The maximum elapsed time in milliseconds + + + + RandomAttribute is used to supply a set of random values + to a single parameter of a parameterized test. + + + + + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. + + + + + Abstract base class for attributes that apply to parameters + and supply data for the parameter. + + + + + Gets the data to be provided to the specified parameter + + + + + 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. + + + + + 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 + + + + + Construct a set of doubles from 0.0 to 1.0, + specifying only the count. + + + + + + Construct a set of doubles from min to max + + + + + + + + Construct a set of ints from min to max + + + + + + + + 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 longs + + + + + + + + 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 + + + + RequiredAddinAttribute may be used to indicate the names of any addins + that must be present in order to run some or all of the tests in an + assembly. If the addin is not loaded, the entire assembly is marked + as NotRunnable. + + + + + Initializes a new instance of the class. + + The required addin. + + + + Gets the name of required addin. + + The required addin name. + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + 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. + + + + + 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 static (shared in VB) property + that returns a list of tests. + + + + + 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. + + + + + Provide actions to execute before and after tests. + + + + + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + + + + + Executed before each test is run + + Provides details about the test that is going to be run. + + + + Executed after each test is run + + Provides details about the test that has just been run. + + + + Provides the target for the action attribute + + 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")] + publc void TestDescriptionMethod() + {} + } + + + + + + Descriptive text for this test + + + + + 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 the list of arguments to a test case + + + + + Gets or sets the expected result. Use + ExpectedResult by preference. + + The result. + + + + Gets or sets the expected result. + + The result. + + + + Gets a flag indicating whether an expected + result has been set. + + + + + Gets a list of categories associated with this test; + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + Gets or sets the expected exception. + + The expected exception. + + + + Gets or sets the name the expected exception. + + The expected name of the exception. + + + + Gets or sets the expected message of the expected exception + + The expected message of the exception. + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets or sets the description. + + The description. + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the explicit status of the test + + + + + Gets or sets the reason for not running the test + + + + + Gets or sets the reason for not running the test. + Set has the side effect of marking the test as ignored. + + The ignore reason. + + + + FactoryAttribute indicates the source to be used to + provide test cases for a test method. + + + + + Construct with the name of the data source, which must + be a property, field or method of the test class itself. + + An array of the names of the factories that will provide data + + + + Construct with a Type, which must implement IEnumerable + + The Type that will provide data + + + + Construct with a Type and name. + that don't support params arrays. + + 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 + + + + + A Type to be used as a source + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + [TestFixture] + public class ExampleClass + {} + + + + + 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. + + + + + + Descriptive text for this fixture + + + + + Gets and sets the category for this fixture. + May be a comma-separated list of categories. + + + + + Gets a list of categories for this fixture + + + + + The arguments originally provided to the attribute + + + + + Gets or sets a value indicating whether this should be ignored. + + true if ignore; otherwise, false. + + + + Gets or sets the ignore reason. May set Ignored as a side effect. + + The ignore reason. + + + + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. + + + + + Attribute used to identify a method that is + called before any tests in a fixture are run. + + + + + 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. + + + + + 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")] + 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. + + + + + Construct a TimeoutAttribute given a time in milliseconds + + 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 RequiresSTAAttribute + + + + + 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 on a separate thread. + + + + + Construct a RequiresThreadAttribute + + + + + Construct a RequiresThreadAttribute, specifying the apartment + + + + + 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 the data source to be used + + + + 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 the 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 + + + + + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + + + + + Abstract base class used for prefixes + + + + + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + + + + + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + Static UnsetObject used to detect derived constraints + failing to set the actual value. + + + + + The actual value being tested against a constraint + + + + + The display name of this Constraint for use by ToString() + + + + + Argument fields used by ToString(); + + + + + The builder holding this constraint + + + + + Construct a constraint with no arguments + + + + + Construct a constraint with one argument + + + + + Construct a constraint with two arguments + + + + + Sets the ConstraintBuilder holding this constraint + + + + + 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 MessageWriter on which to display the message + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by 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 + True for success, false for failure + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 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. + + + + + 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. + + + + + 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. + + + + + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + + + + + The base constraint + + + + + Construct given a base constraint + + + + + + Construct an AllItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + AndConstraint succeeds only if both members succeed. + + + + + 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 + + + + Create an AndConstraint from two other constraints + + The first constraint + The second 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 a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + Construct a TypeConstraint for a given Type + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. + + The writer on which the actual value is displayed + + + + Construct an AssignableFromConstraint for the type provided + + + + + + Test whether an object can be assigned from the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + + + + + Construct an AssignableToConstraint for the type provided + + + + + + Test whether an object can be assigned to the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + 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 attriute + Type and base constraint. + + + + + + + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. + + + + + Writes a description of the attribute to the specified writer. + + + + + Writes the actual value supplied to the specified writer. + + + + + 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 + + + + + + Tests whether the object provides the expected attribute. + + 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 + + + + + BasicConstraint is the abstract base for constraints that + perform a simple comparison to a constant value. + + + + + Initializes a new instance of the class. + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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. + + + + + 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 use the supplied EqualityAdapter. + NOTE: For internal use only. + + The EqualityAdapter 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 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 + + + + Flag the constraint to ignore case and return self. + + + + + Construct a CollectionContainsConstraint + + + + + + Test whether the expected item is contained in the collection + + + + + + + Write a descripton of the constraint to a MessageWriter + + + + + + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + + + + + Construct a CollectionEquivalentConstraint + + + + + + Test whether two collections are equivalent + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionOrderedConstraint is used to test whether a collection is ordered. + + + + + Construct a CollectionOrderedConstraint + + + + + Modifies the constraint to use an IComparer and returns self. + + + + + Modifies the constraint to use an IComparer<T> and returns self. + + + + + Modifies the constraint to use a Comparison<T> and returns self. + + + + + Modifies the constraint to test ordering by the value of + a specified property and returns self. + + + + + Test whether the collection is ordered + + + + + + + Write a description of the constraint to a MessageWriter + + + + + + Returns the string representation of the constraint. + + + + + + If used performs a reverse comparison + + + + + 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 + + + + Test whether the actual collection is a subset of + the expected collection provided. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. + + + + + Construct a CollectionTally object from a comparer and a collection + + + + + 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 + + + + The number of objects remaining in the tally + + + + + ComparisonAdapter class centralizes all comparisons of + values in NUnit, adapting to the use of any provided + IComparer, IComparer<T> or Comparison<T> + + + + + Returns a ComparisonAdapter that wraps an IComparer + + + + + Returns a ComparisonAdapter that wraps an IComparer<T> + + + + + Returns a ComparisonAdapter that wraps a Comparison<T> + + + + + Compares two objects + + + + + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. + + + + + Construct a ComparisonAdapter for an IComparer + + + + + Compares two objects + + + + + + + + Construct a default ComparisonAdapter + + + + + ComparisonAdapter<T> extends ComparisonAdapter and + allows use of an IComparer<T> or Comparison<T> + to actually perform the comparison. + + + + + Construct a ComparisonAdapter for an IComparer<T> + + + + + Compare a Type T to an object + + + + + Construct a ComparisonAdapter for a Comparison<T> + + + + + 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. This class supplies the Using modifiers. + + + + + ComparisonAdapter to be used in making the comparison + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Modifies the constraint to use an IComparer and returns self + + + + + Modifies the constraint to use an IComparer<T> and returns self + + + + + Modifies the constraint to use a Comparison<T> and returns self + + + + + Delegate used to delay evaluation of the actual value + to be used in evaluating a 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 reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + + + + + 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 expresson 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. + + + + + OperatorStack is a type-safe stack for holding ConstraintOperators + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified operator onto the stack. + + The op. + + + + Pops the topmost operator from the stack. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost operator without modifying the stack. + + The top. + + + + ConstraintStack is a type-safe stack for holding Constraints + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. + + The constraint. + + + + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost constraint without modifying the stack. + + 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. + + + + + 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. + + + + + 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. + + + + + 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 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 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 same path or under 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. + + + + + 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 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 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. + + + + + With is currently a NOP - reserved for future use. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + Flag the constraint to ignore case and return self. + + + + + Applies a delay to the match so that a match can be evaluated in the future. + + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + If the value of is less than 0 + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + The time interval used for polling + If the value of is less than 0 + + + + Test whether the constraint is satisfied by a given value + + 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 + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + EmptyCollectionConstraint tests whether a collection is empty. + + + + + Check that the collection is empty + + + + + + + Write the constraint description to a MessageWriter + + + + + + 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. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EmptyDirectoryConstraint is used to test that a directory is empty + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + EmptyStringConstraint tests whether a string is empty. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EndsWithConstraint can test whether a string ends + with an expected substring. + + + + + 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 + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + Modify the constraint to ignore case in matching. + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + If true, strings in error messages will be clipped + + + + + NUnitEqualityComparer used to test equality. + + + + + Initializes a new instance of the class. + + The expected value. + + + + Flag the constraint to use a tolerance when determining equality. + + Tolerance value to be used + 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 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 + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Write description of this constraint + + 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 enumerations, 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 + + + + 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. + + + + + 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 + + + + EqualityAdapter class handles all equality comparisons + that use an IEqualityComparer, IEqualityComparer<T> + or a ComparisonAdapter. + + + + + 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 EqualityAdapter that wraps an IComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + + + + + Returns an EqualityAdapter that wraps an IComparer<T>. + + + + + Returns an EqualityAdapter that wraps a Comparison<T>. + + + + + EqualityAdapter that wraps an IComparer. + + + + + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. + + + + + EqualityAdapter that wraps an IComparer. + + + + + EqualityAdapterList represents a list of EqualityAdapters + in a common class across platforms. + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + Test that an object is of the exact type specified + + 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 + + The MessageWriter to use + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overriden to write additional information + in the case of an Exception. + + The MessageWriter to use + + + + 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 + + + + + FailurePointList represents a set of FailurePoints + in a cross-platform way. + + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + 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/ + + + + + + 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 + + + + 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 + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is greater than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + 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 + + + + Test whether an object is of the specified type or a derived type + + 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 + + The MessageWriter to use + + + + Tests whether a value is less than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is less than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Static methods used in creating messages + + + + + Static string used when strings are clipped + + + + + 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 + + + + 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 enumerable, + 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 + + + + + Test that the actual value is an NaN + + + + + + + Write the constraint description to a specified writer + + + + + + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. + + + + + Construct a NoItemConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + NullConstraint tests that the actual value is null + + + + + Initializes a new instance of the class. + + + + + NullEmptyStringConstraint tests whether a string is either null or empty. + + + + + Constructs a new NullOrEmptyStringConstraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + Compares two objects + + + + + + + + Returns the default NUnitComparer. + + + + + Generic version of NUnitComparer + + + + + + Compare two objects of the same type + + + + + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. + + + + + + + + + + Compares two objects for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + + If true, all string comparisons will ignore case + + + + + 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 occured. + + + + + RecursionDetector used to check for recursion when + evaluating self-referencing enumerables. + + + + + Compares two objects for equality within a tolerance, setting + the tolerance to the actual tolerance used if an empty + tolerance is supplied. + + + + + 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 + + + + 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. + + + + + RecursionDetector detects when a comparison + between two enumerables has reached a point + where the same objects that were previously + compared are again being compared. This allows + the caller to stop the comparison if desired. + + + + + Check whether two objects have previously + been compared, returning true if they have. + The two objects are remembered, so that a + second call will always return true. + + + + + OrConstraint succeeds if either member succeeds + + + + + Create an OrConstraint from two other constraints + + The first constraint + The second 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 + + + + Write a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. + + + + + The expected path used in the constraint + + + + + Flag indicating whether a caseInsensitive comparison should be made + + + + + Construct a PathConstraint for a give expected path + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns true if the expected path and actual path match + + + + + Returns the string representation of this constraint + + + + + Transform the provided path to its canonical form so that it + may be more easily be compared with other paths. + + The original path + The path in canonical form + + + + Test whether one path in canonical form is under another. + + The first path - supposed to be the parent path + The second path - supposed to be the child path + Indicates whether case should be ignored + + + + + Modifies the current instance to be case-insensitve + and returns it. + + + + + Modifies the current instance to be case-sensitve + and returns it. + + + + + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. + + + + + Construct a PredicateConstraint from a predicate + + + + + Determines whether the predicate succeeds when applied + to the actual value. + + + + + Writes the description to a MessageWriter + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 vaue + of the property. The two constraints are now separate. + + + + + Initializes a new instance of the class. + + The name of the property. + + + + Test whether the property exists for a given object + + The object to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. + + The writer on which the actual value is displayed + + + + 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. + To. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Resolve the current expression to a Constraint + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + 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 either + of the argument constraints is 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. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + 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 the string representation of the constraint. + + A string representing the constraint + + + + Resolves the ReusableConstraint by returning the constraint + that it originally wrapped. + + A resolved constraint + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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 + + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overridden in ThrowsNothingConstraint to write + information about the exception that was actually caught. + + The writer on which the actual value is displayed + + + + 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. + + + + + Constructs a linear tolerance of a specdified amount + + + + + Constructs a tolerance given an amount and ToleranceMode + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + 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. + + + + + Returns a zero Tolerance object, equivalent to + specifying an exact match. + + + + + Gets the ToleranceMode for the current Tolerance + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance is empty. + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared values my deviate from each other. + + + + + Compares two values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + Check that all items are unique. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + XmlSerializableConstraint tests whether + an object is serializable in XML format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Represents a constraint that succeeds if all the + members of a collection match a base constraint. + + + + + Abstract base for operators that indicate how to + apply a constraint to items in a collection. + + + + + PrefixOperator takes a single constraint and modifies + it's action in some way. + + + + + 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. + + + + + 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. + + + + + + The syntax element preceding this operator + + + + + The syntax element folowing 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. + + + + + + Returns the constraint created by applying this + prefix to another constraint. + + + + + + + Constructs a CollectionOperator + + + + + 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 + + + + + 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. + + + + + + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. + + + + + Gets the left precedence of the operator + + + + + Gets the right precedence of the operator + + + + + 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. + + + + + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. + + + + + 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. + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + 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 + + + + + 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. + + + + + 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. + + + + + + Gets the name of the property to which the operator applies + + + + + 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 modifes the + order of evaluation because of its precedence. + + + + + Constructor for the WithOperator + + + + + Returns a constraint that wraps its argument + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + + + + + + + Compares two objects of a given Type for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + diff --git a/csharp/bob/Bob.cs b/csharp/bob/Bob.cs new file mode 100644 index 0000000..fcde98a --- /dev/null +++ b/csharp/bob/Bob.cs @@ -0,0 +1,15 @@ +internal class Bob { + public static string Hey(string inp) { + inp = inp.Trim(); + if(inp == "") { + return "Fine. Be that way!"; + } + if(inp == inp.ToUpper() && inp != inp.ToLower()) { + return "Whoa, chill out!"; + } + if(inp[inp.Length-1] == '?') { + return "Sure."; + } + return "Whatever."; + } +} diff --git a/csharp/bob/BobTest.cs b/csharp/bob/BobTest.cs new file mode 100644 index 0000000..9e3e644 --- /dev/null +++ b/csharp/bob/BobTest.cs @@ -0,0 +1,131 @@ +using NUnit.Framework; + +[TestFixture] +public class BobTest +{ + [Ignore] + [Test] + public void Stating_something () + { + Assert.That(Bob.Hey("Tom-ay-to, tom-aaaah-to."), Is.EqualTo("Whatever.")); + } + + [Ignore] + [Test] + public void Shouting () + { + Assert.That(Bob.Hey("WATCH OUT!"), Is.EqualTo("Whoa, chill out!")); + } + + [Ignore] + [Test] + public void Asking_a_question () + { + Assert.That(Bob.Hey("Does this cryogenic chamber make me look fat?"), Is.EqualTo("Sure.")); + } + + [Ignore] + [Test] + public void Asking_a_question_with_a_trailing_space() + { + Assert.That(Bob.Hey("Do I like my spacebar too much? "), Is.EqualTo("Sure.")); + } + + [Ignore] + [Test] + public void Asking_a_numeric_question () + { + Assert.That(Bob.Hey("You are, what, like 15?"), Is.EqualTo("Sure.")); + } + + [Ignore] + [Test] + public void Talking_forcefully () + { + Assert.That(Bob.Hey("Let's go make out behind the gym!"), Is.EqualTo("Whatever.")); + } + + [Ignore] + [Test] + public void Using_acronyms_in_regular_search () + { + Assert.That(Bob.Hey("It's OK if you don't want to go to the DMV."), Is.EqualTo("Whatever.")); + } + + [Ignore] + [Test] + public void Forceful_questions () + { + Assert.That(Bob.Hey("WHAT THE HELL WERE YOU THINKING?"), Is.EqualTo("Whoa, chill out!")); + } + + [Ignore] + [Test] + public void Shouting_numbers () + { + Assert.That(Bob.Hey("1, 2, 3 GO!"), Is.EqualTo("Whoa, chill out!")); + } + + [Ignore] + [Test] + public void Only_numbers () + { + Assert.That(Bob.Hey("1, 2, 3"), Is.EqualTo("Whatever.")); + } + + [Ignore] + [Test] + public void Question_with_only_numbers () + { + Assert.That(Bob.Hey("4?"), Is.EqualTo("Sure.")); + } + + [Ignore] + [Test] + public void Shouting_with_special_characters () + { + Assert.That(Bob.Hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"), Is.EqualTo("Whoa, chill out!")); + } + + [Ignore] + [Test] + public void Shouting_with_no_exclamation_mark () + { + Assert.That(Bob.Hey("I HATE YOU"), Is.EqualTo("Whoa, chill out!")); + } + + [Ignore] + [Test] + public void Statement_containing_question_mark () + { + Assert.That(Bob.Hey("Ending with ? means a question."), Is.EqualTo("Whatever.")); + } + + [Ignore] + [Test] + public void Prattling_on () + { + Assert.That(Bob.Hey("Wait! Hang on. Are you going to be OK?"), Is.EqualTo("Sure.")); + } + + [Ignore] + [Test] + public void Silence () + { + Assert.That(Bob.Hey(""), Is.EqualTo("Fine. Be that way!")); + } + + [Ignore] + [Test] + public void Prolonged_silence () + { + Assert.That(Bob.Hey(" "), Is.EqualTo("Fine. Be that way!")); + } + + [Ignore] + [Test] + public void Multiple_line_question () + { + Assert.That(Bob.Hey("Does this cryogenic chamber make me look fat?\nno"), Is.EqualTo("Whatever.")); + } +} diff --git a/csharp/bob/README.md b/csharp/bob/README.md new file mode 100644 index 0000000..637c459 --- /dev/null +++ b/csharp/bob/README.md @@ -0,0 +1,44 @@ +# Bob + +Bob is a lackadaisical teenager. In conversation, his responses are very limited. + +Bob answers 'Sure.' if you ask him a question. + +He answers 'Whoa, chill out!' if you yell at him. + +He says 'Fine. Be that way!' if you address him without actually saying +anything. + +He answers 'Whatever.' to anything else. + +## Instructions + +Run the test file, and fix each of the errors in turn. When you get the +first test to pass, go to the first pending or skipped test, and make +that pass as well. When all of the tests are passing, feel free to +submit. + +Remember that passing code is just the first step. The goal is to work +towards a solution that is as readable and expressive as you can make +it. + +Please make your solution as general as possible. Good code doesn't just +pass the test suite, it works with any input that fits the +specification. + +Have fun! + + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06) + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + diff --git a/csharp/current b/csharp/current deleted file mode 120000 index b905e3b..0000000 --- a/csharp/current +++ /dev/null @@ -1 +0,0 @@ -leap \ No newline at end of file diff --git a/csharp/etl/ETL.cs b/csharp/etl/ETL.cs new file mode 100644 index 0000000..a282b9f --- /dev/null +++ b/csharp/etl/ETL.cs @@ -0,0 +1,18 @@ +using System.IO; +using System; +using System.Collections.Generic; + +class ETL { + public static Dictionary Transform(Dictionary> inp) { + Dictionary ret = new Dictionary(); + foreach(KeyValuePair> entry in inp) { + foreach(string val in entry.Value) { + string v = val.ToLower(); + if(!ret.ContainsKey(v)) { + ret.Add(v, entry.Key); + } + } + } + return ret; + } +} diff --git a/csharp/etl/ETLTest.cs b/csharp/etl/ETLTest.cs new file mode 100644 index 0000000..bd77226 --- /dev/null +++ b/csharp/etl/ETLTest.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using NUnit.Framework; + +[TestFixture] +public class ETLTest +{ + [Ignore] + [Test] + public void Transforms_one_value() + { + var old = new Dictionary> { { 1, new List { "A" } } }; + var expected = new Dictionary { { "a", 1 } }; + Assert.That(ETL.Transform(old), Is.EqualTo(expected)); + } + + [Ignore] + [Test] + public void Transforms_multiple_values() + { + var old = new Dictionary> { { 1, new List { "A", "E", "I", "O", "U" } } }; + var expected = new Dictionary { { "a", 1 }, { "e", 1 }, { "i", 1 }, { "o", 1 }, { "u", 1 } }; + Assert.That(ETL.Transform(old), Is.EqualTo(expected)); + } + + [Ignore] + [Test] + public void Transforms_multiple_keys() + { + var old = new Dictionary> { { 1, new List { "A", "E" } }, { 2, new List { "D", "G" } } }; + var expected = new Dictionary { { "a", 1 }, { "e", 1 }, { "d", 2 }, { "g", 2 } }; + Assert.That(ETL.Transform(old), Is.EqualTo(expected)); + } + + [Ignore] + [Test] + public void Transforms_a_full_dataset() + { + var old = new Dictionary> + { + { 1, new List { "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" } }, + { 2, new List { "D", "G" } }, + { 3, new List { "B", "C", "M", "P" } }, + { 4, new List { "F", "H", "V", "W", "Y" } }, + { 5, new List { "K" } }, + { 8, new List { "J", "X" } }, + { 10, new List { "Q", "Z" } }, + }; + var expected = new Dictionary + { + { "a", 1 }, { "b", 3 }, { "c", 3 }, { "d", 2 }, { "e", 1 }, { "f", 4 }, { "g", 2 }, { "h", 4 }, { "i", 1 }, + { "j", 8 }, { "k", 5 }, { "l", 1 }, { "m", 3 }, { "n", 1 }, { "o", 1 }, { "p", 3 }, { "q", 10 }, { "r", 1 }, + { "s", 1 }, { "t", 1 }, { "u", 1 }, { "v", 4 }, { "w", 4 }, { "x", 8 }, { "y", 4 }, { "z", 10 } + }; + Assert.That(ETL.Transform(old), Is.EqualTo(expected)); + } +} diff --git a/csharp/etl/README.md b/csharp/etl/README.md new file mode 100644 index 0000000..cd9f590 --- /dev/null +++ b/csharp/etl/README.md @@ -0,0 +1,59 @@ +# Etl + +We are going to do the `Transform` step of an Extract-Transform-Load. + +### ETL +Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so +we're going to migrate this." + +(Typically, this is followed by, "We're only going to need to run this +once." That's then typically followed by much forehead slapping and +moaning about how stupid we could possibly be.) + +### The goal +We're going to extract some scrabble scores from a legacy system. + +The old system stored a list of letters per score: + +- 1 point: "A", "E", "I", "O", "U", "L", "N", "R", "S", "T", +- 2 points: "D", "G", +- 3 points: "B", "C", "M", "P", +- 4 points: "F", "H", "V", "W", "Y", +- 5 points: "K", +- 8 points: "J", "X", +- 10 points: "Q", "Z", + +The shiny new scrabble system instead stores the score per letter, which +makes it much faster and easier to calculate the score for a word. It +also stores the letters in lower-case regardless of the case of the +input letters: + +- "a" is worth 1 point. +- "b" is worth 3 points. +- "c" is worth 3 points. +- "d" is worth 2 points. +- Etc. + +Your mission, should you choose to accept it, is to write a program that +transforms the legacy data format to the shiny new format. + +### Notes + +A final note about scoring, Scrabble is played around the world in a +variety of languages, each with its own unique scoring table. For +example, an "E" is scored at 2 in the Māori-language version of the +game while being scored at 4 in the Hawaiian-language version. + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +The Jumpstart Lab team [http://jumpstartlab.com](http://jumpstartlab.com) + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + diff --git a/csharp/grade-school/GradeSchoolTest.cs b/csharp/grade-school/GradeSchoolTest.cs new file mode 100644 index 0000000..699e035 --- /dev/null +++ b/csharp/grade-school/GradeSchoolTest.cs @@ -0,0 +1,81 @@ +using System.Collections.Generic; +using NUnit.Framework; + +[TestFixture] +public class GradeSchoolTest +{ + private School school; + + [SetUp] + public void Setup() + { + school = new School(); + } + + [Test] + public void New_school_has_an_empty_roster() + { + Assert.That(school.Roster, Has.Count.EqualTo(0)); + } + + [Ignore("Remove to run test")] + [Test] + public void Adding_a_student_adds_them_to_the_roster_for_the_given_grade() + { + school.Add("Aimee", 2); + var expected = new List { "Aimee" }; + Assert.That(school.Roster[2], Is.EqualTo(expected)); + } + + [Ignore("Remove to run test")] + [Test] + public void Adding_more_students_to_the_same_grade_adds_them_to_the_roster() + { + school.Add("Blair", 2); + school.Add("James", 2); + school.Add("Paul", 2); + var expected = new List { "Blair", "James", "Paul" }; + Assert.That(school.Roster[2], Is.EqualTo(expected)); + } + + [Ignore("Remove to run test")] + [Test] + public void Adding_students_to_different_grades_adds_them_to_the_roster() + { + school.Add("Chelsea", 3); + school.Add("Logan", 7); + Assert.That(school.Roster[3], Is.EqualTo(new List { "Chelsea" })); + Assert.That(school.Roster[7], Is.EqualTo(new List { "Logan" })); + } + + [Ignore("Remove to run test")] + [Test] + public void Grade_returns_the_students_in_that_grade_in_alphabetical_order() + { + school.Add("Franklin", 5); + school.Add("Bradley", 5); + school.Add("Jeff", 1); + var expected = new List { "Bradley", "Franklin" }; + Assert.That(school.Grade(5), Is.EqualTo(expected)); + } + + [Ignore("Remove to run test")] + [Test] + public void Grade_returns_an_empty_list_if_there_are_no_students_in_that_grade() + { + Assert.That(school.Grade(1), Is.EqualTo(new List())); + } + + [Ignore("Remove to run test")] + [Test] + public void Student_names_in_each_grade_in_roster_are_sorted() + { + school.Add("Jennifer", 4); + school.Add("Kareem", 6); + school.Add("Christopher", 4); + school.Add("Kyle", 3); + Assert.That(school.Roster[3], Is.EqualTo(new List { "Kyle" })); + Assert.That(school.Roster[4], Is.EqualTo(new List { "Christopher", "Jennifer" })); + Assert.That(school.Roster[6], Is.EqualTo(new List { "Kareem" })); + } +} \ No newline at end of file diff --git a/csharp/grade-school/README.md b/csharp/grade-school/README.md new file mode 100644 index 0000000..0f5ccb3 --- /dev/null +++ b/csharp/grade-school/README.md @@ -0,0 +1,49 @@ +# Grade School + +Write a small archiving program that stores students' names along with the grade that they are in. + +In the end, you should be able to: + +- Add a student's name to the roster for a grade + - "Add Jim to grade 2." + - "OK." +- Get a list of all students enrolled in a grade + - "Which students are in grade 2?" + - "We've only got Jim just now." +- Get a sorted list of all students in all grades. Grades should sort + as 1, 2, 3, etc., and students within a grade should be sorted + alphabetically by name. + - "Who all is enrolled in school right now?" + - "Grade 1: Anna, Barb, and Charlie. Grade 2: Alex, Peter, and Zoe. + Grade 3…" + +Note that all our students only have one name. (It's a small town, what +do you want?) + + +## For bonus points + +Did you get the tests passing and the code clean? If you want to, these +are some additional things you could try: + +- If you're working in a language with mutable data structures and your + implementation allows outside code to mutate the school's internal DB + directly, see if you can prevent this. Feel free to introduce additional + tests. + +Then please share your thoughts in a comment on the submission. Did this +experiment make the code better? Worse? Did you learn anything from it? + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +A pairing session with Phil Battos at gSchool [http://gschool.it](http://gschool.it) + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + diff --git a/csharp/hamming/Hamming.cs b/csharp/hamming/Hamming.cs new file mode 100644 index 0000000..bdf6ad8 --- /dev/null +++ b/csharp/hamming/Hamming.cs @@ -0,0 +1,14 @@ +internal class Hamming { + public static int Compute(string strand1, string strand2) { + int ret = 0; + if(strand1.Length != strand2.Length) { + throw new System.ArgumentException("Strands must be same length"); + } + for(int i = 0; i < strand1.Length; i++) { + if(strand1[i] != strand2[i]) { + ret++; + } + } + return ret; + } +} diff --git a/csharp/hamming/HammingTest.cs b/csharp/hamming/HammingTest.cs new file mode 100644 index 0000000..3e89280 --- /dev/null +++ b/csharp/hamming/HammingTest.cs @@ -0,0 +1,47 @@ +using NUnit.Framework; + +[TestFixture] +public class HammingTest +{ + [Ignore] + [Test] + public void No_difference_between_empty_strands() + { + Assert.That(Hamming.Compute("",""), Is.EqualTo(0)); + } + + [Ignore] + [Test] + public void No_difference_between_identical_strands() + { + Assert.That(Hamming.Compute("GGACTGA","GGACTGA"), Is.EqualTo(0)); + } + + [Ignore] + [Test] + public void Complete_hamming_distance_in_small_strand() + { + Assert.That(Hamming.Compute("ACT","GGA"), Is.EqualTo(3)); + } + + [Ignore] + [Test] + public void Hamming_distance_is_off_by_one_strand() + { + Assert.That(Hamming.Compute("GGACGGATTCTG","AGGACGGATTCT"), Is.EqualTo(9)); + } + + [Ignore] + [Test] + public void Smalling_hamming_distance_in_middle_somewhere() + { + Assert.That(Hamming.Compute("GGACG","GGTCG"), Is.EqualTo(1)); + } + + [Ignore] + [Test] + public void Larger_distance() + { + Assert.That(Hamming.Compute("ACCAGGG","ACTATGG"), Is.EqualTo(2)); + } +} diff --git a/csharp/hamming/README.md b/csharp/hamming/README.md new file mode 100644 index 0000000..4ef5f6b --- /dev/null +++ b/csharp/hamming/README.md @@ -0,0 +1,50 @@ +# Hamming + +Write a program that can calculate the Hamming difference between two DNA strands. + +A mutation is simply a mistake that occurs during the creation or +copying of a nucleic acid, in particular DNA. Because nucleic acids are +vital to cellular functions, mutations tend to cause a ripple effect +throughout the cell. Although mutations are technically mistakes, a very +rare mutation may equip the cell with a beneficial attribute. In fact, +the macro effects of evolution are attributable by the accumulated +result of beneficial microscopic mutations over many generations. + +The simplest and most common type of nucleic acid mutation is a point +mutation, which replaces one base with another at a single nucleotide. + +By counting the number of differences between two homologous DNA strands +taken from different genomes with a common ancestor, we get a measure of +the minimum number of point mutations that could have occurred on the +evolutionary path between the two strands. + +This is called the 'Hamming distance'. + +It is found by comparing two DNA strands and counting how many of the +nucleotides are different from their equivalent in the other string. + + GAGCCTACTAACGGGAT + CATCGTAATGACGGCCT + ^ ^ ^ ^ ^ ^^ + +The Hamming distance between these two DNA strands is 7. + +# Implementation notes + +The Hamming distance is only defined for sequences of equal length. This means +that based on the definition, each language could deal with getting sequences +of equal length differently. + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/) + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + diff --git a/csharp/leap/LeapTest.cs b/csharp/leap/LeapTest.cs index 3356310..0bcda88 100644 --- a/csharp/leap/LeapTest.cs +++ b/csharp/leap/LeapTest.cs @@ -1,32 +1,31 @@ -using NUnit.Framework; - -[TestFixture] -public class LeapTest -{ - [Test] - public void Valid_leap_year() - { - Assert.That(Year.IsLeap(1996), Is.True); - } - - [Ignore] - [Test] - public void Invalid_leap_year() - { - Assert.That(Year.IsLeap(1997), Is.False); - } - - [Ignore] - [Test] - public void Turn_of_the_20th_century_is_not_a_leap_year() - { - Assert.That(Year.IsLeap(1900), Is.False); - } - - [Ignore] - [Test] - public void Turn_of_the_25th_century_is_a_leap_year() - { - Assert.That(Year.IsLeap(2400), Is.True); - } -} \ No newline at end of file +using NUnit.Framework; + +[TestFixture] +public class LeapTest +{ + [Ignore] + [Test] + public void Valid_leap_year() + { + Assert.That(Year.IsLeap(1996), Is.True); + } + + [Ignore] + [Test] + public void Invalid_leap_year() + { + Assert.That(Year.IsLeap(1997), Is.False); + } + + [Ignore("Remove to run test")] + public void Turn_of_the_20th_century_is_not_a_leap_year() + { + Assert.That(Year.IsLeap(1900), Is.False); + } + + [Ignore("Remove to run test")] + public void Turn_of_the_25th_century_is_a_leap_year() + { + Assert.That(Year.IsLeap(2400), Is.True); + } +} diff --git a/csharp/leap/README.md b/csharp/leap/README.md index ec08d7c..94d94a0 100644 --- a/csharp/leap/README.md +++ b/csharp/leap/README.md @@ -1,33 +1,37 @@ -# Leap - -Write a program that will take a year and report if it is a leap year. - -The tricky thing here is that a leap year occurs: - -```plain -on every year that is evenly divisible by 4 - except every year that is evenly divisible by 100 - unless the year is also evenly divisible by 400 -``` - -For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap -year, but 2000 is. - -If your language provides a method in the standard library that does -this look-up, pretend it doesn't exist and implement it yourself. - -## Notes - -For a delightful, four minute explanation of the whole leap year -phenomenon, go watch [this youtube video][video]. - -[video]: http://www.youtube.com/watch?v=xX96xng7sAE - -### Submitting Exercises - -Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. -## Source - -JavaRanch Cattle Drive, exercise 3 [view source](http://www.javaranch.com/leap.jsp) +# Leap + +Write a program that will take a year and report if it is a leap year. + +The tricky thing here is that a leap year in the Gregorian calendar occurs: + +```plain +on every year that is evenly divisible by 4 + except every year that is evenly divisible by 100 + unless the year is also evenly divisible by 400 +``` + +For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap +year, but 2000 is. + +If your language provides a method in the standard library that does +this look-up, pretend it doesn't exist and implement it yourself. + +## Notes + +Though our exercise adopts some very simple rules, there is more to +learn! + +For a delightful, four minute explanation of the whole leap year +phenomenon, go watch [this youtube video][video]. + +[video]: http://www.youtube.com/watch?v=xX96xng7sAE + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp) diff --git a/csharp/leap/leap.cs b/csharp/leap/leap.cs new file mode 100644 index 0000000..1a038b0 --- /dev/null +++ b/csharp/leap/leap.cs @@ -0,0 +1,13 @@ +class Year { + public static bool IsLeap(int i) { + if(i % 4 == 0) { + if(i % 100 == 0) { + if (i % 400 != 0) { + return false; + } + } + return true; + } + return false; + } +} diff --git a/csharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/csharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..a0a81a8 Binary files /dev/null and b/csharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/csharp/obj/Debug/Exercism.csharp.csproj.FileListAbsolute.txt b/csharp/obj/Debug/Exercism.csharp.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d4ba4fa --- /dev/null +++ b/csharp/obj/Debug/Exercism.csharp.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\brbuller\Development\exercism\csharp\obj\Debug\Exercism.csharp.csprojResolveAssemblyReference.cache +C:\Users\brbuller\Development\exercism\csharp\bin\Debug\Exercism.csharp.dll +C:\Users\brbuller\Development\exercism\csharp\bin\Debug\Exercism.csharp.pdb +C:\Users\brbuller\Development\exercism\csharp\bin\Debug\nunit.framework.dll +C:\Users\brbuller\Development\exercism\csharp\bin\Debug\nunit.framework.xml +C:\Users\brbuller\Development\exercism\csharp\obj\Debug\Exercism.csharp.dll +C:\Users\brbuller\Development\exercism\csharp\obj\Debug\Exercism.csharp.pdb diff --git a/csharp/obj/Debug/Exercism.csharp.csprojResolveAssemblyReference.cache b/csharp/obj/Debug/Exercism.csharp.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..cc4b577 Binary files /dev/null and b/csharp/obj/Debug/Exercism.csharp.csprojResolveAssemblyReference.cache differ diff --git a/csharp/obj/Debug/Exercism.csharp.dll b/csharp/obj/Debug/Exercism.csharp.dll new file mode 100644 index 0000000..4ed1c93 Binary files /dev/null and b/csharp/obj/Debug/Exercism.csharp.dll differ diff --git a/csharp/obj/Debug/Exercism.csharp.pdb b/csharp/obj/Debug/Exercism.csharp.pdb new file mode 100644 index 0000000..d0a6b65 Binary files /dev/null and b/csharp/obj/Debug/Exercism.csharp.pdb differ diff --git a/csharp/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/csharp/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/csharp/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/csharp/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/csharp/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/csharp/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/csharp/packages.config b/csharp/packages.config new file mode 100644 index 0000000..ad37a52 --- /dev/null +++ b/csharp/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/csharp/word-count/Phrase.cs b/csharp/word-count/Phrase.cs new file mode 100644 index 0000000..789cf6c --- /dev/null +++ b/csharp/word-count/Phrase.cs @@ -0,0 +1,27 @@ +using System.Text.RegularExpressions; +using System.Collections.Generic; + +class Phrase { + public static Dictionary WordCount(string phrase) { + Dictionary ret = new Dictionary(); + Regex rgx = new Regex("[^a-zA-Z0-9 ,']"); + phrase = rgx.Replace(phrase, ""); + string[] words = Regex.Split(phrase, @"[\s,]"); + char[] trimChars = new char[2]; + trimChars[0] = ' '; + trimChars[1] = '\''; + foreach(string wrd in words) { + string normWrd = wrd.ToLower().Trim(trimChars); + if(normWrd != "") { + int num = 0; + if(ret.ContainsKey(normWrd)) { + ret.TryGetValue(normWrd, out num); + ret.Remove(normWrd); + } + num++; + ret.Add(normWrd, num); + } + } + return ret; + } +} diff --git a/csharp/word-count/README.md b/csharp/word-count/README.md new file mode 100644 index 0000000..8d35b7d --- /dev/null +++ b/csharp/word-count/README.md @@ -0,0 +1,27 @@ +# Word Count + +Write a program that given a phrase can count the occurrences of each word in that phrase. + +For example for the input `"olly olly in come free"` + +```plain +olly: 2 +in: 1 +come: 1 +free: 1 +``` + + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/` directory. + +For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. + +## Source + +This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour. + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + diff --git a/csharp/word-count/WordCountTest.cs b/csharp/word-count/WordCountTest.cs new file mode 100644 index 0000000..987f3dc --- /dev/null +++ b/csharp/word-count/WordCountTest.cs @@ -0,0 +1,157 @@ +using System.Collections.Generic; +using NUnit.Framework; + +[TestFixture] +public class WordCountTest +{ + [Ignore] + [Test] + public void Count_one_word() + { + var counts = new Dictionary { + { "word", 1 } + }; + + Assert.That(Phrase.WordCount("word"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Count_one_of_each() + { + var counts = new Dictionary { + { "one", 1 }, + { "of", 1 }, + { "each", 1 } + }; + + Assert.That(Phrase.WordCount("one of each"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Count_multiple_occurrences() + { + var counts = new Dictionary { + { "one", 1 }, + { "fish", 4 }, + { "two", 1 }, + { "red", 1 }, + { "blue", 1 }, + }; + + Assert.That(Phrase.WordCount("one fish two fish red fish blue fish"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Count_everything_just_once() + { + var counts = new Dictionary { + { "all", 2 }, + { "the", 2 }, + { "kings", 2 }, + { "horses", 1 }, + { "and", 1 }, + { "men", 1 }, + }; + + Assert.That(Phrase.WordCount("all the kings horses and all the kings men"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Ignore_punctuation() + { + var counts = new Dictionary { + { "car", 1 }, + { "carpet", 1 }, + { "as", 1 }, + { "java", 1 }, + { "javascript", 1 }, + }; + + Assert.That(Phrase.WordCount("car : carpet as java : javascript!!&@$%^&"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Handles_cramped_list() + { + var counts = new Dictionary { + { "one", 1 }, + { "two", 1 }, + { "three", 1 }, + }; + + Assert.That(Phrase.WordCount("one,two,three"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Include_numbers() + { + var counts = new Dictionary { + { "testing", 2 }, + { "1", 1 }, + { "2", 1 }, + }; + + Assert.That(Phrase.WordCount("testing, 1, 2 testing"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void Normalize_case() + { + var counts = new Dictionary { + { "go", 3 }, + }; + + Assert.That(Phrase.WordCount("go Go GO"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void With_apostrophes() + { + var counts = new Dictionary { + { "first", 1 }, + { "don't", 2 }, + { "laugh", 1 }, + { "then", 1 }, + { "cry", 1 }, + }; + + Assert.That(Phrase.WordCount("First: don't laugh. Then: don't cry."), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void With_free_standing_apostrophes() + { + var counts = new Dictionary { + { "go", 3 }, + }; + + Assert.That(Phrase.WordCount("go ' Go '' GO"), Is.EqualTo(counts)); + } + + [Ignore] + [Test] + public void With_apostrophes_as_quotes() + { + var counts = new Dictionary { + { "she", 1 }, + { "said", 1 }, + { "let's", 1 }, + { "meet", 1 }, + { "at", 1 }, + { "twelve", 1 }, + { "o'clock", 1 }, + }; + + Assert.That(Phrase.WordCount("She said, 'let's meet at twelve o'clock'"), Is.EqualTo(counts)); + } + +} diff --git a/fsharp/Exercism.fsharp.fsproj b/fsharp/Exercism.fsharp.fsproj new file mode 100644 index 0000000..6cc02d2 --- /dev/null +++ b/fsharp/Exercism.fsharp.fsproj @@ -0,0 +1,78 @@ + + + + + Debug + AnyCPU + 2.0 + f7e8e67c-3cfa-4b46-a2b6-956263649501 + Library + fsharp + Exercism.fsharp + v4.5 + 4.3.1.0 + Exercism.fsharp + + + true + full + false + false + bin\Debug\ + DEBUG;TRACE + 3 + bin\Debug\fsharp.XML + + + pdbonly + true + true + bin\Release\ + TRACE + 3 + bin\Release\fsharp.XML + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + True + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + True + + + + + + + + + + + \ No newline at end of file diff --git a/fsharp/bin/Debug/Exercism.fsharp.dll b/fsharp/bin/Debug/Exercism.fsharp.dll new file mode 100644 index 0000000..a2a4754 Binary files /dev/null and b/fsharp/bin/Debug/Exercism.fsharp.dll differ diff --git a/fsharp/bin/Debug/Exercism.fsharp.pdb b/fsharp/bin/Debug/Exercism.fsharp.pdb new file mode 100644 index 0000000..b57cbd2 Binary files /dev/null and b/fsharp/bin/Debug/Exercism.fsharp.pdb differ diff --git a/fsharp/bin/Debug/FSharp.Core.dll b/fsharp/bin/Debug/FSharp.Core.dll new file mode 100644 index 0000000..86b505d Binary files /dev/null and b/fsharp/bin/Debug/FSharp.Core.dll differ diff --git a/fsharp/bin/Debug/FSharp.Core.xml b/fsharp/bin/Debug/FSharp.Core.xml new file mode 100644 index 0000000..a3a1ebf --- /dev/null +++ b/fsharp/bin/Debug/FSharp.Core.xml @@ -0,0 +1,10715 @@ + + +FSharp.Core + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the tail of the list, which is a list containing all the elements of the list, excluding the first element + + + Gets the number of items contained in the list + + + Gets the element of the list at the given position. + Lists are represented as linked lists so this is an O(n) operation. + The index. + The value at the given index. + + + Gets a value indicating if the list contains no entries + + + Gets the first element of the list + + + Returns an empty list of a particular type + + + Returns a list with head as its first element and tail as its subsequent elements + A new head value for the list. + The existing list. + The list with head appended to the front of tail. + + + The type of immutable singly-linked lists. + + Use the constructors [] and :: (infix) to create values of this type, or + the notation [1;2;3]. Use the values in the List module to manipulate + values of this type, or pattern match against the values directly. + + + Lookup an element in the map. Raise KeyNotFoundException if no binding + exists in the map. + The input key. + Thrown when the key is not found. + The value mapped to the key. + + + Returns true if there are no bindings in the map. + + + The number of bindings in the map. + + + Lookup an element in the map, returning a Some value if the element is in the domain + of the map and None if not. + The input key. + The mapped value, or None if the key is not in the map. + + + Removes an element from the domain of the map. No exception is raised if the element is not present. + The input key. + The resulting map. + + + + + + Tests if an element is in the domain of the map. + The input key. + True if the map contains the given key. + + + Returns a new map with the binding added to the given map. + The input key. + The resulting map. + + + Builds a map that contains the bindings of the given IEnumerable. + The input sequence of key/value pairs. + The resulting map. + + + Immutable maps. Keys are ordered by F# generic comparison. + + Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures + or if keys require bespoke comparison semantics. + + All members of this class are thread-safe and may be used concurrently from multiple threads. + + + An abbreviation for the CLI type System.Collections.Generic.List<_> + + + Returns a new set with the elements of the second set removed from the first. + The first input set. + The second input set. + A set containing elements of the first set that are not contained in the second set. + + + Compute the union of the two sets. + The first input set. + The second input set. + The union of the two input sets. + + + Returns the lowest element in the set according to the ordering being used for the set. + + + Returns the highest element in the set according to the ordering being used for the set. + + + A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. + + + The number of elements in the set + + + A useful shortcut for Set.remove. Note this operation produces a new set + and does not mutate the original set. The new set will share many storage + nodes with the original. See the Set module for further operations on sets. + The value to remove from the set. + The result set. + + + Evaluates to "true" if all elements of the second set are in the first. + The set to test against. + True if this set is a superset of otherSet. + + + Evaluates to "true" if all elements of the first set are in the second. + The set to test against. + True if this set is a subset of otherSet. + + + Evaluates to "true" if all elements of the second set are in the first, and at least + one element of the first is not in the second. + The set to test against. + True if this set is a proper superset of otherSet. + + + Evaluates to "true" if all elements of the first set are in the second, and at least + one element of the second is not in the first. + The set to test against. + True if this set is a proper subset of otherSet. + + + + + + A useful shortcut for Set.contains. See the Set module for further operations on sets. + The value to check. + True if the set contains value. + + + A useful shortcut for Set.add. Note this operation produces a new set + and does not mutate the original set. The new set will share many storage + nodes with the original. See the Set module for further operations on sets. + The value to add to the set. + The result set. + + + Create a set containing elements drawn from the given sequence. + The input sequence. + The result set. + + + Immutable sets based on binary trees, where comparison is the + F# structural comparison function, potentially using implementations + of the IComparable interface on key values. + + See the Set module for further operations on sets. + + All members of this class are thread-safe and may be used concurrently from multiple threads. + + + An abbreviation for the type of immutable singly-linked lists. + + Use the constructors [] and :: (infix) to create values of this type, or + the notation [1;2;3]. Use the values in the List module to manipulate + values of this type, or pattern match against the values directly. + + + An abbreviation for the CLI type System.Collections.Generic.IEnumerable<_> + + + Fetches an element from a 2D array. You can also use the syntax array.[index1,index2]. + + The input array. + The index along the first dimension. + The index along the second dimension. + + The value of the array at the given index. + Thrown when the indices are negative or exceed the bounds of the array. + + + Sets the value of an element in an array. You can also use the syntax array.[index1,index2] <- value. + + The input array. + The index along the first dimension. + The index along the second dimension. + The value to set in the array. + Thrown when the indices are negative or exceed the bounds of the array. + + + Builds a new array whose elements are the same as the input array but + where a non-zero-based input array generates a corresponding zero-based + output array. + + The input array. + + The zero-based output array. + + + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer indices passed to the + function indicates the element being transformed. + + For non-zero-based arrays the basing on an input array will be propagated to the output + array. + + A function that is applied to transform each element of the array. The two integers + provide the index of the element. + The input array. + + An array whose elements have been transformed by the given mapping. + + + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. + + For non-zero-based arrays the basing on an input array will be propogated to the output + array. + + A function that is applied to transform each item of the input array. + The input array. + + An array whose elements have been transformed by the given mapping. + + + Returns the length of an array in the second dimension. + + The input array. + + The length of the array in the second dimension. + + + Returns the length of an array in the first dimension. + + The input array. + + The length of the array in the first dimension. + + + Applies the given function to each element of the array. The integer indices passed to the + function indicates the index of element. + + A function to apply to each element of the array with the indices available as an argument. + The input array. + + + Applies the given function to each element of the array. + + A function to apply to each element of the array. + The input array. + + + Creates a based array where the entries are initially Unchecked.defaultof<'T>. + + The base for the first dimension of the array. + The base for the second dimension of the array. + The length of the first dimension of the array. + The length of the second dimension of the array. + + The created array. + Thrown when base1, base2, length1, or length2 is negative. + + + Creates a based array whose elements are all initially the given value. + + The base for the first dimension of the array. + The base for the second dimension of the array. + The length of the first dimension of the array. + The length of the second dimension of the array. + The value to populate the new array. + + The created array. + Thrown when base1, base2, length1, or length2 is negative. + + + Creates a based array given the dimensions and a generator function to compute the elements. + + The base for the first dimension of the array. + The base for the second dimension of the array. + The length of the first dimension of the array. + The length of the second dimension of the array. + A function to produce elements of the array given the two indices. + + The created array. + Thrown when base1, base2, length1, or length2 is negative. + + + Creates an array where the entries are initially Unchecked.defaultof<'T>. + + The length of the first dimension of the array. + The length of the second dimension of the array. + + The created array. + Thrown when length1 or length2 is negative. + + + Creates an array whose elements are all initially the given value. + + The length of the first dimension of the array. + The length of the second dimension of the array. + The value to populate the new array. + + The created array. + Thrown when length1 or length2 is negative. + + + Creates an array given the dimensions and a generator function to compute the elements. + + The length of the first dimension of the array. + The length of the second dimension of the array. + A function to produce elements of the array given the two indices. + + The generated array. + Thrown when either of the lengths is negative. + + + Reads a range of elements from the first array and write them into the second. + + The source array. + The first-dimension index to begin copying from in the source array. + The second-dimension index to begin copying from in the source array. + The target array. + The first-dimension index to begin copying into in the target array. + The second-dimension index to begin copying into in the target array. + The number of elements to copy across the first dimension of the arrays. + The number of elements to copy across the second dimension of the arrays. + Thrown when any of the indices are negative or if either of + the counts are larger than the dimensions of the array allow. + + + Builds a new array whose elements are the same as the input array. + + For non-zero-based arrays the basing on an input array will be propogated to the output + array. + + The input array. + + A copy of the input array. + + + Fetches the base-index for the second dimension of the array. + + The input array. + + The base-index of the second dimension of the array. + + + Fetches the base-index for the first dimension of the array. + + The input array. + + The base-index of the first dimension of the array. + + + Basic operations on 2-dimensional arrays. + + F# and CLI multi-dimensional arrays are typically zero-based. + However, CLI multi-dimensional arrays used in conjunction with external + libraries (e.g. libraries associated with Visual Basic) be + non-zero based, using a potentially different base for each dimension. + The operations in this module will accept such arrays, and + the basing on an input array will be propagated to a matching output + array on the Array2D.map and Array2D.mapi operations. + Non-zero-based arrays can also be created using Array2D.zeroCreateBased, + Array2D.createBased and Array2D.initBased. + + + Creates an array where the entries are initially the "default" value. + The length of the first dimension. + The length of the second dimension. + The length of the third dimension. + The created array. + + + Sets the value of an element in an array. You can also + use the syntax 'array.[index1,index2,index3] <- value'. + The input array. + The index along the first dimension. + The index along the second dimension. + The index along the third dimension. + The value to set at the given index. + + + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer indices passed to the + function indicates the element being transformed. + + For non-zero-based arrays the basing on an input array will be propogated to the output + array. + The function to transform the elements at each index in the array. + The input array. + The array created from the transformed elements. + + + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. + + For non-zero-based arrays the basing on an input array will be propogated to the output + array. + The function to transform each element of the array. + The input array. + The array created from the transformed elements. + + + Returns the length of an array in the third dimension. + The input array. + The length of the array in the third dimension. + + + Returns the length of an array in the second dimension. + The input array. + The length of the array in the second dimension. + + + Returns the length of an array in the first dimension + The input array. + The length of the array in the first dimension. + + + Applies the given function to each element of the array. The integer indicies passed to the + function indicates the index of element. + The function to apply to each element of the array. + The input array. + + + Applies the given function to each element of the array. + The function to apply to each element of the array. + The input array. + + + Fetches an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' + The input array. + The index along the first dimension. + The index along the second dimension. + The index along the third dimension. + The value at the given index. + + + Creates an array given the dimensions and a generator function to compute the elements. + The length of the first dimension. + The length of the second dimension. + The length of the third dimension. + The function to create an initial value at each index into the array. + The created array. + + + Creates an array whose elements are all initially the given value. + The length of the first dimension. + The length of the second dimension. + The length of the third dimension. + The value of the array elements. + The created array. + + + Basic operations on rank 3 arrays. + + + Sets the value of an element in an array. You can also + use the syntax 'array.[index1,index2,index3,index4] <- value'. + The input array. + The index along the first dimension. + The index along the second dimension. + The index along the third dimension. + The index along the fourth dimension. + The value to set. + + + Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' + The input array. + The index along the first dimension. + The index along the second dimension. + The index along the third dimension. + The index along the fourth dimension. + The value at the given index. + + + Creates an array where the entries are initially the "default" value. + The length of the first dimension. + The length of the second dimension. + The length of the third dimension. + The length of the fourth dimension. + The created array. + + + Returns the length of an array in the fourth dimension. + The input array. + The length of the array in the fourth dimension. + + + Returns the length of an array in the third dimension. + The input array. + The length of the array in the third dimension. + + + Returns the length of an array in the second dimension. + The input array. + The length of the array in the second dimension. + + + Returns the length of an array in the first dimension + The input array. + The length of the array in the first dimension. + + + Creates an array given the dimensions and a generator function to compute the elements. + The length of the first dimension. + The length of the second dimension. + The length of the third dimension. + The length of the fourth dimension. + The function to create an initial value at each index in the array. + The created array. + + + Creates an array whose elements are all initially the given value + The length of the first dimension. + The length of the second dimension. + The length of the third dimension. + The length of the fourth dimension. + The initial value for each element of the array. + The created array. + + + Basic operations on rank 4 arrays. + + + Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is + raised. + The first input array. + The second input array. + The third input array. + Thrown when the input arrays differ in length. + The array of tupled elements. + + + Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is + raised. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + The array of tupled elements. + + + Splits an array of triples into three arrays. + The input array. + The tuple of three arrays. + + + Splits an array of pairs into two arrays. + The input array. + The two arrays. + + + Returns the index of the first element in the array + that satisfies the given predicate. + The function to test the input elements. + The input array. + The index of the first element that satisfies the predicate, or None. + + + Returns the first element for which the given function returns true. + Return None if no such element exists. + The function to test the input elements. + The input array. + The first element that satisfies the predicate, or None. + + + Views the given array as a sequence. + The input array. + The sequence of array elements. + + + Builds a list from the given array. + The input array. + The list of array elements. + + + Returns the sum of the results generated by applying the function to each element of the array. + The function to transform the array elements into the type to be summed. + The input array. + The resulting sum. + + + Returns the sum of the elements in the array. + The input array. + The resulting sum. + + + Sorts the elements of an array by mutating the array in-place, using the given comparison function. + Elements are compared using Operators.compare. + The input array. + + + Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order. + The function to compare pairs of array elements. + The input array. + + + Sorts the elements of an array by mutating the array in-place, using the given projection for the keys. + Elements are compared using Operators.compare. + + This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.sort. + The function to transform array elements into the type that is compared. + The input array. + + + Sorts the elements of an array, using the given comparison function as the order, returning a new array. + + This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.sort. + The function to compare pairs of array elements. + The input array. + The sorted array. + + + Sorts the elements of an array, using the given projection for the keys and returning a new array. + Elements are compared using Operators.compare. + + This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.sort. + The function to transform array elements into the type that is compared. + The input array. + The sorted array. + + + Sorts the elements of an array, returning a new array. Elements are compared using Operators.compare. + + This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.sort. + The input array. + The sorted array. + + + Builds a new array that contains the given subrange specified by + starting index and length. + The input array. + The index of the first element of the sub array. + The length of the sub array. + The created sub array. + + + Sets an element of an array. + The input array. + The input index. + The input value. + + + Like foldBack, but return both the intermediary and final results. + The function to update the state given the input elements. + The input array. + The initial state. + The array of state values. + + + Like fold, but return the intermediary and final results. + The function to update the state given the input elements. + The initial state. + The input array. + The array of state values. + + + Returns a new array with the elements in reverse order. + The input array. + The reversed array. + + + Applies a function to each element of the array, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN + then computes f i0 (...(f iN-1 iN)). + Raises ArgumentException if the array has size zero. + The function to reduce a pair of elements to a single element. + The input array. + Thrown when the input array is empty. + The final result of the reductions. + + + Applies a function to each element of the array, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN + then computes f (... (f i0 i1)...) iN. + Raises ArgumentException if the array has size zero. + The function to reduce a pair of elements to a single element. + The input array. + Thrown when the input array is empty. + The final result of the redcutions. + + + Returns an array with all elements permuted according to the + specified permutation. + The function that maps input indices to output indices. + The input array. + The output array. + + + Splits the collection into two collections, containing the + elements for which the given predicate returns "true" and "false" + respectively. + The function to test the input elements. + The input array. + A pair of arrays. The first containing the elements the predicate evaluated to true, + and the second containing those evaluated to false. + + + Builds a new array from the given enumerable object. + The input sequence. + The array of elements from the sequence. + + + Builds an array from the given list. + The input list. + The array of elements from the list. + + + Returns the lowest of all elements of the array, compared via Operators.min on the function result. + + Throws ArgumentException for empty arrays. + The function to transform the elements into a type supporting comparison. + The input array. + Thrown when the input array is empty. + The minimum element. + + + Returns the lowest of all elements of the array, compared via Operators.min. + + Throws ArgumentException for empty arrays + The input array. + Thrown when the input array is empty. + The minimum element. + + + Returns the greatest of all elements of the array, compared via Operators.max on the function result. + + Throws ArgumentException for empty arrays. + The function to transform the elements into a type supporting comparison. + The input array. + Thrown when the input array is empty. + The maximum element. + + + Returns the greatest of all elements of the array, compared via Operators.max on the function result. + + Throws ArgumentException for empty arrays. + The input array. + Thrown when the input array is empty. + The maximum element. + + + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer index passed to the + function indicates the index of element being transformed. + The function to transform elements and their indices. + The input array. + The array of transformed elements. + + + Builds a new collection whose elements are the results of applying the given function + to the corresponding elements of the two collections pairwise, also passing the index of + the elements. The two input arrays must have the same lengths, otherwise an ArgumentException is + raised. + The function to transform pairs of input elements and their indices. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + The array of transformed elements. + + + Builds a new collection whose elements are the results of applying the given function + to the corresponding elements of the two collections pairwise. The two input + arrays must have the same lengths, otherwise an ArgumentException is + raised. + The function to transform the pairs of the input elements. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + The array of transformed elements. + + + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. + The function to transform elements of the array. + The input array. + The array of transformed elements. + + + Returns the length of an array. You can also use property arr.Length. + The input array. + The length of the array. + + + Applies the given function to pair of elements drawn from matching indices in two arrays, + also passing the index of the elements. The two arrays must have the same lengths, + otherwise an ArgumentException is raised. + The function to apply to each index and pair of elements. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + + + Applies the given function to each element of the array. The integer passed to the + function indicates the index of element. + The function to apply to each index and element. + The input array. + + + Applies the given function to pair of elements drawn from matching indices in two arrays. The + two arrays must have the same lengths, otherwise an ArgumentException is + raised. + The function to apply. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + + + Applies the given function to each element of the array. + The function to apply. + The input array. + + + Returns true if the given array is empty, otherwise false. + The input array. + True if the array is empty. + + + Creates an array where the entries are initially the default value Unchecked.defaultof<'T>. + The length of the array to create. + The created array. + + + Creates an array given the dimension and a generator function to compute the elements. + The number of elements to initialize. + The function to generate the initial values for each index. + The created array. + + + Gets an element from an array. + The input array. + The input index. + The value of the array at the given index. + + + Apply a function to pairs of elements drawn from the two collections, right-to-left, + threading an accumulator argument through the computation. The two input + arrays must have the same lengths, otherwise an ArgumentException is + raised. + The function to update the state given the input elements. + The first input array. + The second input array. + The initial state. + Thrown when the input arrays differ in length. + The final state. + + + Applies a function to pairs of elements drawn from the two collections, + left-to-right, threading an accumulator argument + through the computation. The two input + arrays must have the same lengths, otherwise an ArgumentException is + raised. + The function to update the state given the input elements. + The initial state. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + The final state. + + + Applies a function to each element of the array, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN then computes + f i0 (...(f iN s)) + The function to update the state given the input elements. + The input array. + The initial state. + The final state. + + + Applies a function to each element of the collection, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN then computes + f (... (f s i0)...) iN + The function to update the state given the input elements. + The initial state. + The input array. + The final state. + + + Tests if all corresponding elements of the array satisfy the given predicate pairwise. + + The predicate is applied to matching elements in the two collections up to the lesser of the + two lengths of the collections. If any application returns false then the overall result is + false and no further elements are tested. Otherwise, if one collection is longer + than the other then the ArgumentException exception is raised. + Otherwise, true is returned. + The function to test the input elements. + The first input array. + The second input array. + Thrown when the input arrays differ in length. + True if all of the array elements satisfy the predicate. + + + Tests if all elements of the array satisfy the given predicate. + + The predicate is applied to the elements of the input collection. If any application + returns false then the overall result is false and no further elements are tested. + Otherwise, true is returned. + The function to test the input elements. + The input array. + True if all of the array elements satisfy the predicate. + + + Returns the index of the first element in the array + that satisfies the given predicate. Raise KeyNotFoundException if + none of the elements satisy the predicate. + The function to test the input elements. + The input array. + Thrown if predicate + never returns true. + The index of the first element in the array that satisfies the given predicate. + + + Returns the first element for which the given function returns 'true'. + Raise KeyNotFoundException if no such element exists. + The function to test the input elements. + The input array. + Thrown if predicate + never returns true. + The first element for which predicate returns true. + + + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true". + The function to test the input elements. + The input array. + An array containing the elements for which the given predicate returns true. + + + Tests if any pair of corresponding elements of the arrays satisfies the given predicate. + + The predicate is applied to matching elements in the two collections up to the lesser of the + two lengths of the collections. If any application returns true then the overall result is + true and no further elements are tested. Otherwise, if one collections is longer + than the other then the ArgumentException exception is raised. + Otherwise, false is returned. + The function to test the input elements. + The first input array. + The second input array. + True if any result from predicate is true. + + + Tests if any element of the array satisfies the given predicate. + + The predicate is applied to the elements of the input array. If any application + returns true then the overall result is true and no further elements are tested. + Otherwise, false is returned. + The function to test the input elements. + The input array. + True if any result from predicate is true. + + + Returns an empty array of the given type. + + + Applies the given function to each element of the array. Returns + the array comprised of the results "x" for each element where + the function returns Some(x) + The function to generate options from the elements. + The input array. + The array of results. + + + Applies the given function to successive elements, returning the first + result where function returns Some(x) for some x. If the function + never returns Some(x) then KeyNotFoundException is raised. + The function to generate options from the elements. + The input array. + Thrown if every result from + chooser is None. + The first result. + + + Fills a range of elements of the array with the given value. + The target array. + The index of the first element to set. + The number of elements to set. + The value to set. + + + Applies the given function to successive elements, returning the first + result where function returns Some(x) for some x. If the function + never returns Some(x) then None is returned. + The function to transform the array elements into options. + The input array. + The first transformed element that is Some(x). + + + Creates an array whose elements are all initially the given value. + The length of the array to create. + The value for the elements. + The created array. + + + Builds a new array that contains the elements of the given array. + The input array. + A copy of the input array. + + + Builds a new array that contains the elements of each of the given sequence of arrays. + The input sequence of arrays. + The concatenation of the sequence of input arrays. + + + For each element of the array, applies the given function. Concatenates all the results and return the combined array. + The function to create sub-arrays from the input array elements. + The input array. + The concatenation of the sub-arrays. + + + Reads a range of elements from the first array and write them into the second. + The source array. + The starting index of the source array. + The target array. + The starting index of the target array. + The number of elements to copy. + + + Returns the average of the elements generated by applying the function to each element of the array. + The function to transform the array elements before averaging. + The input array. + Thrown when array is empty. + The computed average. + + + Returns the average of the elements in the array. + The input array. + Thrown when array is empty. + The average of the elements in the array. + + + Builds a new array that contains the elements of the first array followed by the elements of the second array. + The first input array. + The second input array. + The resulting array. + + + Split the collection into two collections, containing the + elements for which the given predicate returns "true" and "false" + respectively + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to indicies is not specified. + The function to test the input elements. + The input array. + 'T[] * 'T[] + + + Create an array given the dimension and a generator function to compute the elements. + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to indicies is not specified. + + + 'T[] + + + Apply the given function to each element of the array. The integer passed to the + function indicates the index of element. + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + + The input array. + + + Apply the given function to each element of the array. + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + + The input array. + + + Build a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer index passed to the + function indicates the index of element being transformed. + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + + The input array. + 'U[] + + + Build a new array whose elements are the results of applying the given function + to each of the elements of the array. + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + + The input array. + 'U[] + + + For each element of the array, apply the given function. Concatenate all the results and return the combined array. + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + + The input array. + 'U[] + + + Apply the given function to each element of the array. Return + the array comprised of the results "x" for each element where + the function returns Some(x). + + Performs the operation in parallel using System.Threading.Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + The function to generate options from the elements. + The input array. + 'U[] + + + Provides parallel operations on arrays + + + Basic operations on arrays. + + + Compare using the given comparer function. + A function to compare two values. + An object implementing IComparer using the supplied comparer. + + + Structural comparison. Compare using Operators.compare. + + + Common notions of comparison identity used with sorted data structures. + + + Hash using the given hashing and equality functions. + A function to generate a hash code from a value. + A function to test equality of two values. + An object implementing IEqualityComparer using the supplied functions. + + + Physical hashing (hash on reference identity of objects, and the contents of value types). + Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, + That is, for value types use GetHashCode and Object.Equals (if no other optimization available), + and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and + reference equality. + + + + + + Structural hashing. Hash using Operators.(=) and Operators.hash. + + + Common notions of value identity used with hash tables. + + + Combines the three lists into a list of triples. The lists must have equal lengths. + The first input list. + The second input list. + The third input list. + A single list containing triples of matching elements from the input lists. + + + Combines the two lists into a list of pairs. The two lists must have equal lengths. + The first input list. + The second input list. + A single list containing pairs of matching elements from the input lists. + + + Splits a list of triples into three lists. + The input list. + Three lists of split elements. + + + Splits a list of pairs into two lists. + The input list. + Two lists of split elements. + + + Returns the index of the first element in the list + that satisfies the given predicate. + Return None if no such element exists. + The function to test the input elements. + The input list. + The index of the first element for which the predicate returns true, or None if + every element evaluates to false. + + + Returns the first element for which the given function returns true.. + Return None if no such element exists. + The function to test the input elements. + The input list. + The first element for which the predicate returns true, or None if + every element evaluates to false. + + + Applies the given function to successive elements, returning Some(x) the first + result where function returns Some(x) for some x. If no such element + exists then return None. + The function to generate options from the elements. + The input list. + The first resulting value or None. + + + Views the given list as a sequence. + The input list. + The sequence of elements in the list. + + + Builds an array from the given list. + The input list. + The array containing the elements of the list. + + + Returns the list after removing the first element. + + The input list. + Thrown when the list is empty. + The list after removing the first element. + + + Returns the sum of the results generated by applying the function to each element of the list. + The function to transform the list elements into the type to be summed. + The input list. + The resulting sum. + + + Returns the sum of the elements in the list. + The input list. + The resulting sum. + + + Sorts the given list using Operators.compare. + + This is a stable sort, i.e. the original order of equal elements is preserved. + The input list. + The sorted list. + + + Sorts the given list using keys given by the given projection. Keys are compared using Operators.compare. + + This is a stable sort, i.e. the original order of equal elements is preserved. + The function to transform the list elements into the type to be compared. + The input list. + The sorted list. + + + Sorts the given list using the given comparison function. + + This is a stable sort, i.e. the original order of equal elements is preserved. + The function to compare the list elements. + The input list. + The sorted list. + + + Like foldBack, but returns both the intermediary and final results + The function to update the state given the input elements. + The input list. + The initial state. + The list of states. + + + Applies a function to each element of the collection, threading an accumulator argument + through the computation. Take the second argument, and apply the function to it + and the first element of the list. Then feed this result into the function along + with the second element and so on. Returns the list of intermediate results and the final result. + The function to update the state given the input elements. + The initial state. + The input list. + The list of states. + + + Returns a new list with the elements in reverse order. + The input list. + The reversed list. + + + Creates a list by calling the given generator on each index. + The number of elements to replicate. + The value to replicate + The generated list. + + + Applies a function to each element of the collection, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN then computes + f i0 (...(f iN-1 iN)). + + Raises System.ArgumentException if list is empty + The function to reduce two list elements to a single element. + The input list. + Thrown when the list is empty. + The final reduced value. + + + Apply a function to each element of the collection, threading an accumulator argument + through the computation. Apply the function to the first two elements of the list. + Then feed this result into the function along with the third element and so on. + Return the final result. If the input function is f and the elements are i0...iN then computes + f (... (f i0 i1) i2 ...) iN. + + Raises System.ArgumentException if list is empty + The function to reduce two list elements to a single element. + The input list. + Thrown when the list is empty. + The final reduced value. + + + Returns a list with all elements permuted according to the + specified permutation. + The function to map input indices to output indices. + The input list. + The permutated list. + + + Applies the given function to successive elements, returning the first + result where function returns Some(x) for some x. If no such + element exists then raise System.Collections.Generic.KeyNotFoundException + The function to generate options from the elements. + The input list. + Thrown when the list is empty. + The first resulting value. + + + Splits the collection into two collections, containing the + elements for which the given predicate returns true and false + respectively. Element order is preserved in both of the created lists. + The function to test the input elements. + The input list. + A list containing the elements for which the predicate evaluated to false and a list + containing the elements for which the predicate evaluated to true. + + + Builds a new list from the given enumerable object. + The input sequence. + The list of elements from the sequence. + + + Builds a list from the given array. + The input array. + The list of elements from the array. + + + Indexes into the list. The first element has index 0. + The input list. + The index to retrieve. + The value at the given index. + + + Returns the lowest of all elements of the list, compared via Operators.min on the function result + + Raises System.ArgumentException if list is empty. + The function to transform list elements into the type to be compared. + The input list. + Thrown when the list is empty. + The minimum value. + + + Returns the lowest of all elements of the list, compared via Operators.min. + + Raises System.ArgumentException if list is empty + The input list. + Thrown when the list is empty. + The minimum value. + + + Returns the greatest of all elements of the list, compared via Operators.max on the function result. + + Raises System.ArgumentException if list is empty. + The function to transform the list elements into the type to be compared. + The input list. + Thrown when the list is empty. + The maximum element. + + + Return the greatest of all elements of the list, compared via Operators.max. + + Raises System.ArgumentException if list is empty + The input list. + Thrown when the list is empty. + The maximum element. + + + Like mapi, but mapping corresponding elements from two lists of equal length. + The function to transform pairs of elements from the two lists and their index. + The first input list. + The second input list. + The list of transformed elements. + + + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The integer index passed to the + function indicates the index (from 0) of element being transformed. + The function to transform elements and their indices. + The input list. + The list of transformed elements. + + + Builds a new collection whose elements are the results of applying the given function + to the corresponding elements of the three collections simultaneously. + The function to transform triples of elements from the input lists. + The first input list. + The second input list. + The third input list. + The list of transformed elements. + + + Builds a new collection whose elements are the results of applying the given function + to the corresponding elements of the two collections pairwise. + The function to transform pairs of elements from the input lists. + The first input list. + The second input list. + The list of transformed elements. + + + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. + The function to transform elements from the input list. + The input list. + The list of transformed elements. + + + Returns the length of the list. + The input list. + The length of the list. + + + Applies the given function to two collections simultaneously. The + collections must have identical size. The integer passed to the + function indicates the index of element. + The function to apply to a pair of elements from the input lists along with their index. + The first input list. + The second input list. + + + Applies the given function to each element of the collection. The integer passed to the + function indicates the index of element. + The function to apply to the elements of the list along with their index. + The input list. + + + Applies the given function to two collections simultaneously. The + collections must have identical size. + The function to apply to pairs of elements from the input lists. + The first input list. + The second input list. + + + Applies the given function to each element of the collection. + The function to apply to elements from the input list. + The input list. + + + Returns true if the list contains no elements, false otherwise. + The input list. + True if the list is empty. + + + Creates a list by calling the given generator on each index. + The length of the list to generate. + The function to generate an element from an index. + The list of generated elements. + + + Returns the first element of the list. + + The input list. + Thrown when the list is empty. + The first element of the list. + + + Tests if all corresponding elements of the collection satisfy the given predicate pairwise. + + The predicate is applied to matching elements in the two collections up to the lesser of the + two lengths of the collections. If any application returns false then the overall result is + false and no further elements are tested. Otherwise, if one collection is longer + than the other then the System.ArgumentException exception is raised. + Otherwise, true is returned. + The function to test the input elements. + The first input list. + The second input list. + Thrown when the input lists differ in length. + True if all of the pairs of elements satisfy the predicate. + + + Tests if all elements of the collection satisfy the given predicate. + + The predicate is applied to the elements of the input list. If any application + returns false then the overall result is false and no further elements are tested. + Otherwise, true is returned. + The function to test the input elements. + The input list. + True if all of the elements satisfy the predicate. + + + Applies a function to corresponding elements of two collections, threading an accumulator argument + through the computation. The collections must have identical sizes. + If the input function is f and the elements are i0...iN and j0...jN + then computes f i0 j0 (...(f iN jN s)). + The function to update the state given the input elements. + The first input list. + The second input list. + The initial state. + The final state value. + + + Applies a function to each element of the collection, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN then + computes f i0 (...(f iN s)). + The function to update the state given the input elements. + The input list. + The initial state. + The final state value. + + + Applies a function to corresponding elements of two collections, threading an accumulator argument + through the computation. The collections must have identical sizes. + If the input function is f and the elements are i0...iN and j0...jN + then computes f (... (f s i0 j0)...) iN jN. + The function to update the state given the input elements. + The initial state. + The first input list. + The second input list. + The final state value. + + + Applies a function to each element of the collection, threading an accumulator argument + through the computation. Take the second argument, and apply the function to it + and the first element of the list. Then feed this result into the function along + with the second element and so on. Return the final result. + If the input function is f and the elements are i0...iN then + computes f (... (f s i0) i1 ...) iN. + The function to update the state given the input elements. + The initial state. + The input list. + The final state value. + + + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true" + The function to test the input elements. + The input list. + A list containing only the elements that satisfy the predicate. + + + Returns the index of the first element in the list + that satisfies the given predicate. + Raises KeyNotFoundException if no such element exists. + The function to test the input elements. + The input list. + Thrown if the predicate evaluates to false for all the + elements of the list. + The index of the first element that satisfies the predicate. + + + Returns the first element for which the given function returns true. + Raises KeyNotFoundException if no such element exists. + The function to test the input elements. + The input list. + Thrown if the predicate evaluates to false for + all the elements of the list. + The first element that satisfies the predicate. + + + Tests if any pair of corresponding elements of the lists satisfies the given predicate. + + The predicate is applied to matching elements in the two collections up to the lesser of the + two lengths of the collections. If any application returns true then the overall result is + true and no further elements are tested. Otherwise, if one collections is longer + than the other then the System.ArgumentException exception is raised. + Otherwise, false is returned. + The function to test the input elements. + The first input list. + The second input list. + Thrown when the input lists differ in length. + True if any pair of elements satisfy the predicate. + + + Tests if any element of the list satisfies the given predicate. + + The predicate is applied to the elements of the input list. If any application + returns true then the overall result is true and no further elements are tested. + Otherwise, false is returned. + The function to test the input elements. + The input list. + True if any element satisfies the predicate. + + + Returns an empty list of the given type. + + + Returns a new list that contains the elements of each the lists in order. + The input sequence of lists. + The resulting concatenated list. + + + For each element of the list, applies the given function. Concatenates all the results and return the combined list. + The function to transform each input element into a sublist to be concatenated. + The input list. + The concatenation of the transformed sublists. + + + Applies the given function to each element of the list. Returns + the list comprised of the results x for each element where + the function returns Some(x) + The function to generate options from the elements. + The input list. + The list comprising the values selected from the chooser function. + + + Returns the average of the elements generated by applying the function to each element of the list. + + Raises System.ArgumentException if list is empty. + The function to transform the list elements into the type to be averaged. + The input list. + Thrown when the list is empty. + The resulting average. + + + Returns the average of the elements in the list. + + Raises System.ArgumentException if list is empty. + The input list. + Thrown when the list is empty. + The resulting average. + + + Returns a new list that contains the elements of the first list + followed by elements of the second. + The first input list. + The second input list. + The resulting list. + + + Basic operations on lists. + + + Returns the key of the first mapping in the collection that satisfies the given predicate. + Returns 'None' if no such element exists. + The function to test the input elements. + The input map. + The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair. + + + Evaluates the function on each mapping in the collection. Returns the key for the first mapping + where the function returns 'true'. Raise KeyNotFoundException if no such element exists. + The function to test the input elements. + The input map. + Thrown if the key does not exist in the map. + The first key for which the predicate evaluates true. + + + Lookup an element in the map, returning a Some value if the element is in the domain + of the map and None if not. + The input key. + The input map. + The found Some value or None. + + + Removes an element from the domain of the map. No exception is raised if the element is not present. + The input key. + The input map. + The resulting map. + + + Builds two new maps, one containing the bindings for which the given predicate returns 'true', + and the other the remaining bindings. + The function to test the input elements. + The input map. + A pair of maps in which the first contains the elements for which the predicate returned true + and the second containing the elements for which the predicated returned false. + + + Tests if an element is in the domain of the map. + The input key. + The input map. + True if the map contains the key. + + + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The key passed to the + function indicates the key of element being transformed. + The function to transform the key/value pairs. + The input map. + The resulting map of keys and transformed values. + + + Returns true if the given predicate returns true for all of the + bindings in the map. + The function to test the input elements. + The input map. + True if the predicate evaluates to true for all of the bindings in the map. + + + Builds a new map containing only the bindings for which the given predicate returns 'true'. + The function to test the key/value pairs. + The input map. + The filtered map. + + + Returns true if the given predicate returns true for one of the + bindings in the map. + The function to test the input elements. + The input map. + True if the predicate returns true for one of the key/value pairs. + + + Applies the given function to each binding in the dictionary + The function to apply to each key/value pair. + The input map. + + + Folds over the bindings in the map + The function to update the state given the input key/value pairs. + The initial state. + The input map. + The final state value. + + + Folds over the bindings in the map. + The function to update the state given the input key/value pairs. + The input map. + The initial state. + The final state value. + + + Searches the map looking for the first element where the given function returns a Some value + The function to generate options from the key/value pairs. + The input map. + The first result. + + + Searches the map looking for the first element where the given function returns a Some value. + The function to generate options from the key/value pairs. + The input map. + The first result. + + + Lookup an element in the map, raising KeyNotFoundException if no binding + exists in the map. + The input key. + The input map. + Thrown when the key does not exist in the map. + The value mapped to the given key. + + + The empty map. + + + Is the map empty? + The input map. + True if the map is empty. + + + Returns an array of all key-value pairs in the mapping. + The array will be ordered by the keys of the map. + The input map. + The array of key/value pairs. + + + Returns a list of all key-value pairs in the mapping. + The list will be ordered by the keys of the map. + The input map. + The list of key/value pairs. + + + Views the collection as an enumerable sequence of pairs. + The sequence will be ordered by the keys of the map. + The input map. + The sequence of key/value pairs. + + + Returns a new map made from the given bindings. + The input sequence of key/value pairs. + The resulting map. + + + Returns a new map made from the given bindings. + The input array of key/value pairs. + The resulting map. + + + Returns a new map made from the given bindings. + The input list of key/value pairs. + The resulting map. + + + Returns a new map with the binding added to the given map. + The input key. + The input value. + The input map. + The resulting map. + + + Functional programming operators related to the Map<_,_> type. + + + Combines the three sequences into a list of triples. The sequences need not have equal lengths: + when one sequence is exhausted any remaining elements in the other + sequences are ignored. + + The first input sequence. + The second input sequence. + The third input sequence. + + The result sequence. + + Thrown when any of the input sequences is null. + + + Combines the two sequences into a list of pairs. The two sequences need not have equal lengths: + when one sequence is exhausted any remaining elements in the other + sequence are ignored. + + The first input sequence. + The second input sequence. + + The result sequence. + + Thrown when either of the input sequences is null. + + + Returns a sequence that yields sliding windows of containing elements drawn from the input + sequence. Each window is returned as a fresh array. + + The number of elements in each window. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + + + Returns a sequence that contains the elements generated by the given computation. + The given initial state argument is passed to the element generator. + For each IEnumerator elements in the stream are generated on-demand by applying the element + generator, until a None value is returned by the element generator. Each call to the element + generator returns a new residual state. + + The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + A function that takes in the current state and returns an option tuple of the next + element of the sequence and the next state value. + The initial state value. + + The result sequence. + + + Returns a sequence that when enumerated returns at most N elements. + + The maximum number of items to enumerate. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Applies the given function to successive elements, returning the first + result where the function returns "Some(x)". + + A function that transforms items from the input sequence into options. + The input sequence. + + The chosen element or None. + + Thrown when the input sequence is null. + + + Returns the index of the first element in the sequence + that satisfies the given predicate. Return None if no such element exists. + + A function that evaluates to a Boolean when given an item in the sequence. + The input sequence. + + The found index or None. + + Thrown when the input sequence is null. + + + Returns the first element for which the given function returns true. + Return None if no such element exists. + + A function that evaluates to a Boolean when given an item in the sequence. + The input sequence. + + The found element or None. + + Thrown when the input sequence is null. + + + Builds a list from the given collection. + + The input sequence. + + The result list. + + Thrown when the input sequence is null. + + + Builds an array from the given collection. + + The input sequence. + + The result array. + + Thrown when the input sequence is null. + + + Returns a sequence that, when iterated, yields elements of the underlying sequence while the + given predicate returns true, and then returns no further elements. + + A function that evaluates to false when no more items should be returned. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns the first N elements of the sequence. + Throws InvalidOperationException + if the count exceeds the number of elements in the sequence. Seq.truncate + returns as many items as the sequence contains instead of throwing an exception. + + The number of items to take. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + Thrown when count exceeds the number of elements + in the sequence. + + + Returns the sum of the results generated by applying the function to each element of the sequence. + The generated elements are summed using the + operator and Zero property associated with the generated type. + + A function to transform items from the input sequence into the type that will be summed. + The input sequence. + + The computed sum. + + + Returns the sum of the elements in the sequence. + + The elements are summed using the + operator and Zero property associated with the generated type. + + The input sequence. + + The computed sum. + + + Applies a key-generating function to each element of a sequence and yield a sequence ordered + by keys. The keys are compared using generic comparison as implemented by Operators.compare. + + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. + + This is a stable sort, that is the original order of equal elements is preserved. + + A function to transform items of the input sequence into comparable keys. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Yields a sequence ordered by keys. + + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. + + This is a stable sort, that is the original order of equal elements is preserved. + + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns a sequence that, when iterated, skips elements of the underlying sequence while the + given predicate returns true, and then yields the remaining elements of the sequence. + + A function that evaluates an element of the sequence to a boolean value. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns a sequence that skips N elements of the underlying sequence and then yields the + remaining elements of the sequence. + + The number of items to skip. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + Thrown when count exceeds the number of elements + in the sequence. + + + Returns a sequence that yields one item only. + + The input item. + + The result sequence of one item. + + + Like fold, but computes on-demand and returns the sequence of intermediary and final results. + + A function that updates the state with each element from the sequence. + The initial state. + The input sequence. + + The resulting sequence of computed states. + + Thrown when the input sequence is null. + + + Applies a function to each element of the sequence, threading an accumulator argument + through the computation. Begin by applying the function to the first two elements. + Then feed this result into the function along with the third element and so on. + Return the final result. + + A function that takes in the current accumulated result and the next + element of the sequence to produce the next accumulated result. + The input sequence. + + The final result of the reduction function. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + + + Builds a new sequence object that delegates to the given sequence object. This ensures + the original sequence cannot be rediscovered and mutated by a type cast. For example, + if given an array the returned sequence will return the elements of the array, but + you cannot cast the returned sequence object to an array. + + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Applies the given function to successive elements, returning the first + x where the function returns "Some(x)". + + A function to transform each item of the input sequence into an option of the output type. + The input sequence. + + The selected element. + + Thrown when the input sequence is null. + Thrown when every item of the sequence + evaluates to None when the given function is applied. + + + Returns a sequence of each element in the input sequence and its predecessor, with the + exception of the first element which is only returned as the predecessor of the second element. + + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Views the given list as a sequence. + + The input list. + + The result sequence. + + + Views the given array as a sequence. + + The input array. + + The result sequence. + + Thrown when the input sequence is null. + + + Computes the nth element in the collection. + + The index of element to retrieve. + The input sequence. + + The nth element of the sequence. + + Thrown when the input sequence is null. + + + Returns the lowest of all elements of the sequence, compared via Operators.min on the function result. + + A function to transform items from the input sequence into comparable keys. + The input sequence. + + The smallest element of the sequence. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + + + Returns the lowest of all elements of the sequence, compared via Operators.min. + + The input sequence. + + The smallest element of the sequence. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + + + Returns the greatest of all elements of the sequence, compared via Operators.max on the function result. + + A function to transform items from the input sequence into comparable keys. + The input sequence. + + The largest element of the sequence. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + + + Returns the greatest of all elements of the sequence, compared via Operators.max + + The input sequence. + + Thrown when the input sequence is null. + Thrown when the input sequence is empty. + + The largest element of the sequence. + + + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The integer index passed to the + function indicates the index (from 0) of element being transformed. + + A function to transform items from the input sequence that also supplies the current index. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Builds a new collection whose elements are the results of applying the given function + to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. + + A function to transform pairs of items from the input sequences. + The first input sequence. + The second input sequence. + + The result sequence. + + Thrown when either of the input sequences is null. + + + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The given function will be applied + as elements are demanded using the MoveNext method on enumerators retrieved from the + object. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + A function to transform items from the input sequence. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns the length of the sequence + + The input sequence. + + The length of the sequence. + + Thrown when the input sequence is null. + + + Applies the given function to two collections simultaneously. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. + + A function to apply to each pair of elements from the input sequences. + The first input sequence. + The second input sequence. + + Thrown when either of the input sequences is null. + + + Applies the given function to each element of the collection. The integer passed to the + function indicates the index of element. + + A function to apply to each element of the sequence that can also access the current index. + The input sequence. + + Thrown when the input sequence is null. + + + Applies the given function to each element of the collection. + + A function to apply to each element of the sequence. + The input sequence. + + Thrown when the input sequence is null. + + + Generates a new sequence which, when iterated, will return successive + elements by calling the given function. The results of calling the function + will not be saved, that is the function will be reapplied as necessary to + regenerate the elements. The function is passed the index of the item being + generated. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + Iteration can continue up to Int32.MaxValue. + + A function that generates an item in the sequence from a given index. + + The result sequence. + + + Generates a new sequence which, when iterated, will return successive + elements by calling the given function, up to the given count. Each element is saved after its + initialization. The function is passed the index of the item being + generated. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + The maximum number of items to generate for the sequence. + A function that generates an item in the sequence from a given index. + + The result sequence. + + Thrown when count is negative. + + + Returns true if the sequence contains no elements, false otherwise. + + The input sequence. + + True if the sequence is empty; false otherwise. + + Thrown when the input sequence is null. + + + Returns the only element of the sequence. + + The input sequence. + + The last element of the sequence. + + Thrown when the input sequence is null. + Thrown when the input does not have precisely one element. + + + Returns the last element of the sequence. + + The input sequence. + + The last element of the sequence. + + Thrown when the input sequence is null. + Thrown when the input does not have any elements. + + + Returns the first element of the sequence. + + The input sequence. + + The first element of the sequence. + + Thrown when the input sequence is null. + Thrown when the input does not have any elements. + + + Applies a key-generating function to each element of a sequence and yields a sequence of + unique keys. Each unique key contains a sequence of all elements that match + to this key. + + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. + + A function that transforms an element of the sequence into a comparable key. + The input sequence. + + The result sequence. + + + Tests the all pairs of elements drawn from the two sequences satisfy the + given predicate. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. + + A function to test pairs of elements from the input sequences. + The first input sequence. + The second input sequence. + + True if all pairs satisfy the predicate; false otherwise. + + Thrown when either of the input sequences is null. + + + Tests if all elements of the sequence satisfy the given predicate. + + The predicate is applied to the elements of the input sequence. If any application + returns false then the overall result is false and no further elements are tested. + Otherwise, true is returned. + + A function to test an element of the input sequence. + The input sequence. + + True if every element of the sequence satisfies the predicate; false otherwise. + + Thrown when the input sequence is null. + + + Applies a function to each element of the collection, threading an accumulator argument + through the computation. If the input function is f and the elements are i0...iN + then computes f (... (f s i0)...) iN + + A function that updates the state with each element from the sequence. + The initial state. + The input sequence. + + The state object after the folding function is applied to each element of the sequence. + + Thrown when the input sequence is null. + + + Returns the index of the first element for which the given function returns true. + + A function to test whether the index of a particular element should be returned. + The input sequence. + + The index of the first element for which the predicate returns true. + + Thrown if no element returns true when + evaluated by the predicate + Thrown when the input sequence is null + + + Returns the first element for which the given function returns true. + + A function to test whether an item in the sequence should be returned. + The input sequence. + + The first element for which the predicate returns true. + + Thrown if no element returns true when + evaluated by the predicate + Thrown when the input sequence is null + + + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true". + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + Remember sequence is lazy, effects are delayed until it is enumerated. + + A synonym for Seq.filter. + + A function to test whether each item in the input sequence should be included in the output. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true". This is a synonym for Seq.where. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + Remember sequence is lazy, effects are delayed until it is enumerated. + + A function to test whether each item in the input sequence should be included in the output. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Tests if any pair of corresponding elements of the input sequences satisfies the given predicate. + + The predicate is applied to matching elements in the two sequences up to the lesser of the + two lengths of the collections. If any application returns true then the overall result is + true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. + + A function to test each pair of items from the input sequences. + The first input sequence. + The second input sequence. + + True if any result from the predicate is true; false otherwise. + + Thrown when either of the two input sequences is null. + + + Tests if any element of the sequence satisfies the given predicate. + + The predicate is applied to the elements of the input sequence. If any application + returns true then the overall result is true and no further elements are tested. + Otherwise, false is returned. + + A function to test each item of the input sequence. + The input sequence. + + True if any result from the predicate is true; false otherwise. + + Thrown when the input sequence is null. + + + Creates an empty sequence. + + An empty sequence. + + + Returns a sequence that contains no duplicate entries according to the + generic hash and equality comparisons on the keys returned by the given key-generating function. + If an element occurs multiple times in the sequence then the later occurrences are discarded. + + A function transforming the sequence items into comparable keys. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns a sequence that contains no duplicate entries according to generic hash and + equality comparisons on the entries. + If an element occurs multiple times in the sequence then the later occurrences are discarded. + + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns a sequence that is built from the given delayed specification of a + sequence. + + The input function is evaluated each time an IEnumerator for the sequence + is requested. + + The generating function for the sequence. + + + Applies a key-generating function to each element of a sequence and return a sequence yielding unique + keys and their number of occurrences in the original sequence. + + Note that this function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. + + A function transforming each item of input sequence into a key to be + compared against the others. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Combines the given enumeration-of-enumerations as a single concatenated + enumeration. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + The input enumeration-of-enumerations. + + The result sequence. + + Thrown when the input sequence is null. + + + Compares two sequences using the given comparison function, element by element. + Returns the first non-zero result from the comparison function. If the end of a sequence + is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence + is shorter. + + A function that takes an element from each sequence and returns an int. + If it evaluates to a non-zero value iteration is stopped and that value is returned. + The first input sequence. + The second input sequence. + + The first non-zero value from the comparison function. + + Thrown when either of the input sequences + is null. + + + Applies the given function to each element of the sequence and concatenates all the + results. + + Remember sequence is lazy, effects are delayed until it is enumerated. + + A function to transform elements of the input sequence into the sequences + that will then be concatenated. + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Applies the given function to each element of the list. Return + the list comprised of the results "x" for each element where + the function returns Some(x). + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not + be accessed concurrently. + + A function to transform items of type T into options of type U. + The input sequence of type T. + + The result sequence. + + Thrown when the input sequence is null. + + + Wraps a loosely-typed System.Collections sequence as a typed sequence. + + The use of this function usually requires a type annotation. + An incorrect type annotation may result in runtime type + errors. + Individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns a sequence that corresponds to a cached version of the input sequence. + This result sequence will have the same elements as the input sequence. The result + can be enumerated multiple times. The input sequence will be enumerated at most + once and only as far as is necessary. Caching a sequence is typically useful when repeatedly + evaluating items in the original sequence is computationally expensive or if + iterating the sequence causes side-effects that the user does not want to be + repeated multiple times. + + Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator + values may be used simultaneously from different threads (accesses to + the internal lookaside table are thread safe). Each individual IEnumerator + is not typically thread safe and should not be accessed concurrently. + + Once enumeration of the input sequence has started, + it's enumerator will be kept live by this object until the enumeration has completed. + At that point, the enumerator will be disposed. + + The enumerator may be disposed and underlying cache storage released by + converting the returned sequence object to type IDisposable, and calling the Dispose method + on this object. The sequence object may then be re-enumerated and a fresh enumerator will + be used. + + The input sequence. + + The result sequence. + + Thrown when the input sequence is null. + + + Returns the average of the results generated by applying the function to each element + of the sequence. + + The elements are averaged using the + operator, DivideByInt method and Zero property + associated with the generated type. + + A function applied to transform each element of the sequence. + The input sequence. + + The average. + + Thrown when the input sequence is null. + Thrown when the input sequence has zero elements. + + + Returns the average of the elements in the sequence. + + The elements are averaged using the + operator, DivideByInt method and Zero property + associated with the element type. + + The input sequence. + + The average. + + Thrown when the input sequence is null. + Thrown when the input sequence has zero elements. + + + Wraps the two given enumerations as a single concatenated + enumeration. + + The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed + concurrently. + + The first sequence. + The second sequence. + + The result sequence. + + Thrown when either of the two provided sequences is + null. + + + Basic operations on IEnumerables. + + + Returns a new set with the elements of the second set removed from the first. + The first input set. + The set whose elements will be removed from set1. + The set with the elements of set2 removed from set1. + + + Builds a new collection from the given enumerable object. + The input sequence. + The set containing elements. + + + Returns an ordered view of the collection as an enumerable object. + The input set. + An ordered sequence of the elements of set. + + + Builds an array that contains the elements of the set in order. + The input set. + An ordered array of the elements of set. + + + Builds a set that contains the same elements as the given array. + The input array. + A set containing the elements of array. + + + Builds a list that contains the elements of the set in order. + The input set. + An ordered list of the elements of set. + + + Builds a set that contains the same elements as the given list. + The input list. + A set containing the elements form the input list. + + + Returns the highest element in the set according to the ordering being used for the set. + The input set. + The max value from the set. + + + Returns the lowest element in the set according to the ordering being used for the set. + The input set. + The min value from the set. + + + Returns a new set with the given element removed. No exception is raised if + the set doesn't contain the given element. + The element to remove. + The input set. + The input set with value removed. + + + Splits the set into two sets containing the elements for which the given predicate + returns true and false respectively. + The function to test set elements. + The input set. + A pair of sets with the first containing the elements for which predicate returns + true and the second containing the elements for which predicate returns false. + + + Applies the given function to each element of the set, in order according + to the comparison function. + The function to apply to each element. + The input set. + + + Returns "true" if the set is empty. + The input set. + True if set is empty. + + + Computes the union of a sequence of sets. + The sequence of sets to untion. + The union of the input sets. + + + Computes the union of the two sets. + The first input set. + The second input set. + The union of set1 and set2. + + + Computes the intersection of a sequence of sets. The sequence must be non-empty. + The sequence of sets to intersect. + The intersection of the input sets. + + + Computes the intersection of the two sets. + The first input set. + The second input set. + The intersection of set1 and set2. + + + Tests if all elements of the collection satisfy the given predicate. + If the input function is f and the elements are i0...iN and "j0...jN" + then computes p i0 && ... && p iN. + The function to test set elements. + The input set. + True if all elements of set satisfy predicate. + + + Applies the given accumulating function to all the elements of the set. + The accumulating function. + The input set. + The initial state. + The final state. + + + Applies the given accumulating function to all the elements of the set + The accumulating function. + The initial state. + The input set. + The final state. + + + Returns a new collection containing the results of applying the + given function to each element of the input set. + The function to transform elements of the input set. + The input set. + A set containing the transformed elements. + + + Returns a new collection containing only the elements of the collection + for which the given predicate returns true. + The function to test set elements. + The input set. + The set containing only the elements for which predicate returns true. + + + Tests if any element of the collection satisfies the given predicate. + If the input function is predicate and the elements are i0...iN + then computes p i0 or ... or p iN. + The function to test set elements. + The input set. + True if any element of set satisfies predicate. + + + Returns the number of elements in the set. Same as size. + The input set. + The number of elements in the set. + + + Evaluates to "true" if all elements of the second set are in the first, and at least + one element of the first is not in the second. + The potential superset. + The set to test against. + True if set1 is a proper superset of set2. + + + Evaluates to "true" if all elements of the second set are in the first. + The potential superset. + The set to test against. + True if set1 is a superset of set2. + + + Evaluates to "true" if all elements of the first set are in the second, and at least + one element of the second is not in the first. + The potential subset. + The set to test against. + True if set1 is a proper subset of set2. + + + Evaluates to "true" if all elements of the first set are in the second + The potential subset. + The set to test against. + True if set1 is a subset of set2. + + + Evaluates to "true" if the given element is in the given set. + The element to test. + The input set. + True if element is in set. + + + Returns a new set with an element added to the set. No exception is raised if + the set already contains the given element. + The value to add. + The input set. + A new set containing value. + + + The set containing the given element. + The value for the set to contain. + The set containing value. + + + The empty set for the type 'T. + + + Functional programming operators related to the Set<_> type. + + + Gets the default cancellation token for executing asynchronous computations. + The default CancellationToken. + + + Creates an asynchronous computation that returns the CancellationToken governing the execution + of the computation. + In async { let! token = Async.CancellationToken ...} token can be used to initiate other + asynchronous operations that will cancel cooperatively with this workflow. + An asynchronous computation capable of retrieving the CancellationToken from a computation + expression. + + + Creates an asynchronous computation that executes computation. + If this computation is cancelled before it completes then the computation generated by + running compensation is executed. + The input asynchronous computation. + The function to be run if the computation is cancelled. + An asynchronous computation that runs the compensation if the input computation + is cancelled. + + + Creates an asynchronous computation that queues a work item that runs + its continuation. + A computation that generates a new work item in the thread pool. + + + Creates an asynchronous computation that creates a new thread and runs + its continuation in that thread. + A computation that will execute on a new thread. + + + Creates an asynchronous computation that runs + its continuation using syncContext.Post. If syncContext is null + then the asynchronous computation is equivalent to SwitchToThreadPool(). + The synchronization context to accept the posted computation. + An asynchronous computation that uses the syncContext context to execute. + + + Runs an asynchronous computation, starting immediately on the current operating system + thread. Call one of the three continuations when the operation completes. + If no cancellation token is provided then the default cancellation token + is used. + The asynchronous computation to execute. + The function called on success. + The function called on exception. + The function called on cancellation. + The CancellationToken to associate with the computation. + The default is used if this parameter is not provided. + + + Runs an asynchronous computation, starting immediately on the current operating system + thread. + If no cancellation token is provided then the default cancellation token is used. + The asynchronous computation to execute. + The CancellationToken to associate with the computation. + The default is used if this parameter is not provided. + + + Creates an asynchronous computation which starts the given computation as a System.Threading.Tasks.Task + + + Starts a child computation within an asynchronous workflow. + This allows multiple asynchronous computations to be executed simultaneously. + + This method should normally be used as the immediate + right-hand-side of a let! binding in an F# asynchronous workflow, that is, + + async { ... + let! completor1 = childComputation1 |> Async.StartChild + let! completor2 = childComputation2 |> Async.StartChild + ... + let! result1 = completor1 + let! result2 = completor2 + ... } + + When used in this way, each use of StartChild starts an instance of childComputation + and returns a completor object representing a computation to wait for the completion of the operation. + When executed, the completor awaits the completion of childComputation. + The child computation. + The timeout value in milliseconds. If one is not provided + then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + A new computation that waits for the input computation to finish. + + + Executes a computation in the thread pool. + If no cancellation token is provided then the default cancellation token is used. + A System.Threading.Tasks.Task that will be completed + in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) + + + + Starts the asynchronous computation in the thread pool. Do not await its result. + + If no cancellation token is provided then the default cancellation token is used. + The computation to run asynchronously. + The cancellation token to be associated with the computation. + If one is not supplied, the default cancellation token is used. + + + Creates an asynchronous computation that will sleep for the given time. This is scheduled + using a System.Threading.Timer object. The operation will not block operating system threads + for the duration of the wait. + The number of milliseconds to sleep. + An asynchronous computation that will sleep for the given time. + Thrown when the due time is negative + and not infinite. + + + Runs the asynchronous computation and await its result. + + If an exception occurs in the asynchronous computation then an exception is re-raised by this + function. + + If no cancellation token is provided then the default cancellation token is used. + + The timeout parameter is given in milliseconds. A value of -1 is equivalent to + System.Threading.Timeout.Infinite. + The computation to run. + The amount of time in milliseconds to wait for the result of the + computation before raising a System.TimeoutException. If no value is provided + for timeout then a default of -1 is used to correspond to System.Threading.Timeout.Infinite. + The cancellation token to be associated with the computation. + If one is not supplied, the default cancellation token is used. + The result of the computation. + + + Creates an asynchronous computation that executes all the given asynchronous computations, + initially queueing each as work items and using a fork/join pattern. + + If all child computations succeed, an array of results is passed to the success continuation. + + If any child computation raises an exception, then the overall computation will trigger an + exception, and cancel the others. + + The overall computation will respond to cancellation while executing the child computations. + If cancelled, the computation will cancel any remaining child computations but will still wait + for the other child computations to complete. + A sequence of distinct computations to be parallelized. + A computation that returns an array of values from the sequence of input computations. + + + Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. + + For example, + async { use! holder = Async.OnCancel interruption ... } + generates an asynchronous computation where, if a cancellation happens any time during + the execution of the asynchronous computation in the scope of holder, then action + interruption is executed on the thread that is performing the cancellation. This can + be used to arrange for a computation to be asynchronously notified that a cancellation + has occurred, e.g. by setting a flag, or deregistering a pending I/O action. + The function that is executed on the thread performing the + cancellation. + An asynchronous computation that triggers the interruption if it is cancelled + before being disposed. + + + Creates an asynchronous computation that runs the given computation and ignores + its result. + The input computation. + A computation that is equivalent to the input computation, but disregards the result. + + + Creates an asynchronous computation that captures the current + success, exception and cancellation continuations. The callback must + eventually call exactly one of the given continuations. + The function that accepts the current success, exception, and cancellation + continuations. + An asynchronous computation that provides the callback with the current continuations. + + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in CLI APIs. This overlaod should be used if the operation is + qualified by three arguments. For example, + Async.FromBeginEnd(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) + When the computation is run, beginFunc is executed, with + a callback which represents the continuation of the computation. + When the callback is invoked, the overall result is fetched using endFunc. + + The computation will respond to cancellation while waiting for the completion + of the operation. If a cancellation occurs, and cancelAction is specified, then it is + executed, and the computation continues to wait for the completion of the operation. + + If cancelAction is not specified, then cancellation causes the computation + to stop immediately, and subsequent invocations of the callback are ignored. + The first argument for the operation. + The second argument for the operation. + The third argument for the operation. + The function initiating a traditional CLI asynchronous operation. + The function completing a traditional CLI asynchronous operation. + An optional function to be executed when a cancellation is requested. + An asynchronous computation wrapping the given Begin/End functions. + + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in CLI APIs. This overlaod should be used if the operation is + qualified by two arguments. For example, + Async.FromBeginEnd(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) + When the computation is run, beginFunc is executed, with + a callback which represents the continuation of the computation. + When the callback is invoked, the overall result is fetched using endFunc. + + The computation will respond to cancellation while waiting for the completion + of the operation. If a cancellation occurs, and cancelAction is specified, then it is + executed, and the computation continues to wait for the completion of the operation. + + If cancelAction is not specified, then cancellation causes the computation + to stop immediately, and subsequent invocations of the callback are ignored. + The first argument for the operation. + The second argument for the operation. + The function initiating a traditional CLI asynchronous operation. + The function completing a traditional CLI asynchronous operation. + An optional function to be executed when a cancellation is requested. + An asynchronous computation wrapping the given Begin/End functions. + + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in CLI APIs. This overlaod should be used if the operation is + qualified by one argument. For example, + Async.FromBeginEnd(place,ws.BeginGetWeather,ws.EndGetWeather) + When the computation is run, beginFunc is executed, with + a callback which represents the continuation of the computation. + When the callback is invoked, the overall result is fetched using endFunc. + + The computation will respond to cancellation while waiting for the completion + of the operation. If a cancellation occurs, and cancelAction is specified, then it is + executed, and the computation continues to wait for the completion of the operation. + + If cancelAction is not specified, then cancellation causes the computation + to stop immediately, and subsequent invocations of the callback are ignored. + The argument for the operation. + The function initiating a traditional CLI asynchronous operation. + The function completing a traditional CLI asynchronous operation. + An optional function to be executed when a cancellation is requested. + An asynchronous computation wrapping the given Begin/End functions. + + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in CLI APIs. For example, + Async.FromBeginEnd(ws.BeginGetWeather,ws.EndGetWeather) + When the computation is run, beginFunc is executed, with + a callback which represents the continuation of the computation. + When the callback is invoked, the overall result is fetched using endFunc. + + The computation will respond to cancellation while waiting for the completion + of the operation. If a cancellation occurs, and cancelAction is specified, then it is + executed, and the computation continues to wait for the completion of the operation. + + If cancelAction is not specified, then cancellation causes the computation + to stop immediately, and subsequent invocations of the callback are ignored. + The function initiating a traditional CLI asynchronous operation. + The function completing a traditional CLI asynchronous operation. + An optional function to be executed when a cancellation is requested. + An asynchronous computation wrapping the given Begin/End functions. + + + Creates an asynchronous computation that executes computation. + If this computation completes successfully then return Choice1Of2 with the returned + value. If this computation raises an exception before it completes then return Choice2Of2 + with the raised exception. + The input computation that returns the type T. + A computation that returns a choice of type T or exception. + + + Raises the cancellation condition for the most recent set of asynchronous computations started + without any specific CancellationToken. Replaces the global CancellationTokenSource with a new + global token source for any asynchronous computations created after this point without any + specific CancellationToken. + + + Creates an asynchronous computation that will wait on the given WaitHandle. + + The computation returns true if the handle indicated a result within the given timeout. + The WaitHandle that can be signalled. + The timeout value in milliseconds. If one is not provided + then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + An asynchronous computation that waits on the given WaitHandle. + + + + Return an asynchronous computation that will wait for the given task to complete and return + its result. + + + + Creates an asynchronous computation that will wait on the IAsyncResult. + + The computation returns true if the handle indicated a result within the given timeout. + The IAsyncResult to wait on. + The timeout value in milliseconds. If one is not provided + then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + An asynchronous computation that waits on the given IAsyncResult. + + + Creates an asynchronous computation that waits for a single invocation of a CLI + event by adding a handler to the event. Once the computation completes or is + cancelled, the handler is removed from the event. + + The computation will respond to cancellation while waiting for the event. If a + cancellation occurs, and cancelAction is specified, then it is executed, and + the computation continues to wait for the event. + + If cancelAction is not specified, then cancellation causes the computation + to cancel immediately. + The event to handle once. + An optional function to execute instead of cancelling when a + cancellation is issued. + An asynchronous computation that waits for the event to be invoked. + + + Creates three functions that can be used to implement the .NET Asynchronous + Programming Model (APM) for a given asynchronous computation. + + The functions should normally be published as members with prefix Begin, + End and Cancel, and can be used within a type definition as follows: + + let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg -> computation) + member x.BeginSomeOperation(arg,callback,state:obj) = beginAction(arg,callback,state) + member x.EndSomeOperation(iar) = endAction(iar) + member x.CancelSomeOperation(iar) = cancelAction(iar) + + + If the asynchronous computation takes no arguments, then AsBeginEnd is used as follows: + + let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun () -> computation) + member x.BeginSomeOperation(callback,state:obj) = beginAction((),callback,state) + member x.EndSomeOperation(iar) = endAction(iar) + member x.CancelSomeOperation(iar) = cancelAction(iar) + + + + If the asynchronous computation takes two arguments, then AsBeginEnd is used as follows: + + let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg1 arg2 -> computation) + member x.BeginSomeOperation(arg1,arg2,callback,state:obj) = beginAction((),callback,state) + member x.EndSomeOperation(iar) = endAction(iar) + member x.CancelSomeOperation(iar) = cancelAction(iar) + + + In each case, the resulting API will be familiar to programmers in other CLI languages and + is a useful way to publish asynchronous computations in CLI components. + A function generating the asynchronous computation to split into the traditional + .NET Asynchronous Programming Model. + A tuple of the begin, end, and cancel members. + + + This static class holds members for creating and manipulating asynchronous computations. + + + Creates an asynchronous computation that just returns (). + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of empty else branches in the + async { ... } computation expression syntax. + An asynchronous computation that returns (). + + + Creates an asynchronous computation that runs computation repeatedly + until guard() becomes false. + + A cancellation check is performed whenever the computation is executed. + + The existence of this method permits the use of while in the + async { ... } computation expression syntax. + The function to determine when to stop executing computation. + The function to be executed. Equivalent to the body + of a while expression. + An asynchronous computation that behaves similarly to a while loop when run. + + + Creates an asynchronous computation that runs binder(resource). + The action resource.Dispose() is executed as this computation yields its result + or if the asynchronous computation exits by an exception or by cancellation. + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of use and use! in the + async { ... } computation expression syntax. + The resource to be used and disposed. + The function that takes the resource and returns an asynchronous + computation. + An asynchronous computation that binds and eventually disposes resource. + + + Creates an asynchronous computation that runs computation and returns its result. + If an exception happens then catchHandler(exn) is called and the resulting computation executed instead. + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of try/with in the + async { ... } computation expression syntax. + The input computation. + The function to run when computation throws an exception. + An asynchronous computation that executes computation and calls catchHandler if an + exception is thrown. + + + Creates an asynchronous computation that runs computation. The action compensation is executed + after computation completes, whether computation exits normally or by an exception. If compensation raises an exception itself + the original exception is discarded and the new exception becomes the overall result of the computation. + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of try/finally in the + async { ... } computation expression syntax. + The input computation. + The action to be run after computation completes or raises an + exception (including cancellation). + An asynchronous computation that executes computation and compensation aftewards or + when an exception is raised. + + + Delegates to the input computation. + + The existence of this method permits the use of return! in the + async { ... } computation expression syntax. + The input computation. + The input computation. + + + Creates an asynchronous computation that returns the result v. + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of return in the + async { ... } computation expression syntax. + The value to return from the computation. + An asynchronous computation that returns value when executed. + + + Creates an asynchronous computation that enumerates the sequence seq + on demand and runs body for each element. + + A cancellation check is performed on each iteration of the loop. + + The existence of this method permits the use of for in the + async { ... } computation expression syntax. + The sequence to enumerate. + A function to take an item from the sequence and create + an asynchronous computation. Can be seen as the body of the for expression. + An asynchronous computation that will enumerate the sequence and run body + for each element. + + + Creates an asynchronous computation that runs generator. + + A cancellation check is performed when the computation is executed. + The function to run. + An asynchronous computation that runs generator. + + + Creates an asynchronous computation that first runs computation1 + and then runs computation2, returning the result of computation2. + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of expression sequencing in the + async { ... } computation expression syntax. + The first part of the sequenced computation. + The second part of the sequenced computation. + An asynchronous computation that runs both of the computations sequentially. + + + Creates an asynchronous computation that runs computation, and when + computation generates a result T, runs binder res. + + A cancellation check is performed when the computation is executed. + + The existence of this method permits the use of let! in the + async { ... } computation expression syntax. + The computation to provide an unbound result. + The function to bind the result of computation. + An asynchronous computation that performs a monadic bind on the result + of computation. + + + + Generate an object used to build asynchronous computations using F# computation expressions. The value + 'async' is a pre-defined instance of this type. + + A cancellation check is performed when the computation is executed. + + + + The type of the async operator, used to build workflows for asynchronous computations. + + + Sends a reply to a PostAndReply message. + The value to send. + + + A handle to a capability to reply to a PostAndReply message. + + + A compositional asynchronous computation, which, when run, will eventually produce a value + of type T, or else raises an exception. + + Asynchronous computations are normally specified using an F# computation expression. + + When run, asynchronous computations have two modes: as a work item (executing synchronous + code), or as a wait item (waiting for an event or I/O completion). + + When run, asynchronous computations can be governed by CancellationToken. This can usually + be specified when the async computation is started. The associated CancellationTokenSource + may be used to cancel the asynchronous computation. Asynchronous computations built using + computation expressions can check the cancellation condition regularly. Synchronous + computations within an asynchronous computation do not automatically check this condition. + + + Publishes the event as a first class event value. + + + Triggers the event using the given parameters. + The parameters for the event. + + + Creates an event object suitable for implementing an arbitrary type of delegate. + The event object. + + + Event implementations for an arbitrary type of delegate. + + + Publishes an observation as a first class value. + + + Triggers an observation using the given parameters. + The event parameters. + + + Creates an observable object. + The created event. + + + Event implementations for the IEvent<_> type. + + + Publishes the event as a first class event value. + + + Triggers the event using the given sender object and parameters. The sender object may be null. + The object triggering the event. + The parameters for the event. + + + Creates an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument. + The created event. + + + Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. + + + + + + A delegate type associated with the F# event type IEvent<_> + The object that fired the event. + The event arguments. + + + Remove a listener delegate from an event listener store. + The delegate to be removed from the event listener store. + + + Connect a handler delegate object to the event. A handler can + be later removed using RemoveHandler. The listener will + be invoked when the event is fired. + A delegate to be invoked when the event is fired. + + + First class event values for arbitrary delegate types. + + F# gives special status to member properties compatible with type IDelegateEvent and + tagged with the CLIEventAttribute. In this case the F# compiler generates approriate + CLI metadata to make the member appear to other CLI languages as a CLI event. + + + First-class listening points (i.e. objects that permit you to register a callback + activated when the event is triggered). + + + First class event values for CLI events conforming to CLI Framework standards. + + + The type of delayed computations. + + Use the values in the Lazy module to manipulate + values of this type, and the notation lazy expr to create values + of type . + + + Raises a timeout exception if a message not received in this amount of time. By default + no timeout is used. + + + Occurs when the execution of the agent results in an exception. + + + Occurs when the execution of the agent results in an exception. + + + Raises a timeout exception if a message not received in this amount of time. By default + no timeout is used. + + + Returns the number of unprocessed messages in the message queue of the agent. + + + Occurs when the execution of the agent results in an exception. + + + Scans for a message by looking through messages in arrival order until scanner + returns a Some value. Other messages remain in the queue. + + This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. + The function to return None if the message is to be skipped + or Some if the message is to be processed and removed from the queue. + An optional timeout in milliseconds. Defaults to -1 which corresponds + to System.Threading.Timeout.Infinite. + An asynchronous computation that scanner built off the read message. + + + Waits for a message. This will consume the first message in arrival order. + + This method is for use within the body of the agent. + + Returns None if a timeout is given and the timeout is exceeded. + + This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. + An optional timeout in milliseconds. Defaults to -1 which + corresponds to System.Threading.Timeout.Infinite. + An asynchronous computation that returns the received message or + None if the timeout is exceeded. + + + Like PostAndReply, but returns None if no reply within the timeout period. + The function to incorporate the AsyncReplyChannel into + the message to be sent. + An optional timeout parameter (in milliseconds) to wait for a reply message. + Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + The reply from the agent or None if the timeout expires. + + + Starts the agent. + + + Creates and starts an agent. The body function is used to generate the asynchronous + computation executed by the agent. + The function to produce an asynchronous computation that will be executed + as the read loop for the MailboxProcessor when Start is called. + An optional cancellation token for the body. + Defaults to Async.DefaultCancellationToken. + The created MailboxProcessor. + + + Scans for a message by looking through messages in arrival order until scanner + returns a Some value. Other messages remain in the queue. + + Returns None if a timeout is given and the timeout is exceeded. + + This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. + The function to return None if the message is to be skipped + or Some if the message is to be processed and removed from the queue. + An optional timeout in milliseconds. Defaults to -1 which corresponds + to System.Threading.Timeout.Infinite. + An asynchronous computation that scanner built off the read message. + Thrown when the timeout is exceeded. + + + Waits for a message. This will consume the first message in arrival order. + + This method is for use within the body of the agent. + + This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. + An optional timeout in milliseconds. Defaults to -1 which corresponds + to System.Threading.Timeout.Infinite. + An asynchronous computation that returns the received message. + Thrown when the timeout is exceeded. + + + Like AsyncPostAndReply, but returns None if no reply within the timeout period. + The function to incorporate the AsyncReplyChannel into + the message to be sent. + An optional timeout parameter (in milliseconds) to wait for a reply message. + Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + An asynchronous computation that will return the reply or None if the timeout expires. + + + Posts a message to an agent and await a reply on the channel, synchronously. + + The message is generated by applying buildMessage to a new reply channel + to be incorporated into the message. The receiving agent must process this + message and invoke the Reply method on this reply channel precisely once. + The function to incorporate the AsyncReplyChannel into + the message to be sent. + An optional timeout parameter (in milliseconds) to wait for a reply message. + Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + The reply from the agent. + + + Posts a message to an agent and await a reply on the channel, asynchronously. + + The message is generated by applying buildMessage to a new reply channel + to be incorporated into the message. The receiving agent must process this + message and invoke the Reply method on this reply channel precisely once. + The function to incorporate the AsyncReplyChannel into + the message to be sent. + An optional timeout parameter (in milliseconds) to wait for a reply message. + Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + An asychronous computation that will wait for the reply from the agent. + + + Posts a message to the message queue of the MailboxProcessor, asynchronously. + The message to post. + + + Creates an agent. The body function is used to generate the asynchronous + computation executed by the agent. This function is not executed until + Start is called. + The function to produce an asynchronous computation that will be executed + as the read loop for the MailboxProcessor when Start is called. + An optional cancellation token for the body. + Defaults to Async.DefaultCancellationToken. + The created MailboxProcessor. + + + A message-processing agent which executes an asynchronous computation. + + The agent encapsulates a message queue that supports multiple-writers and + a single reader agent. Writers send messages to the agent by using the Post + method and its variations. + + The agent may wait for messages using the Receive or TryReceive methods or + scan through all available messages using the Scan or TryScan method. + + + + + + Connects a listener function to the observable. The listener will + be invoked for each observation. The listener can be removed by + calling Dispose on the returned IDisposable object. + The function to be called for each observation. + An object that will remove the listener if disposed. + + + Permanently connects a listener function to the observable. The listener will + be invoked for each observation. + The function to be called for each observation. + + + Returns an asynchronous computation that will write the given bytes to the stream. + The buffer to write from. + An optional offset as a number of bytes in the stream. + An optional number of bytes to write to the stream. + An asynchronous computation that will write the given bytes to the stream. + Thrown when the sum of offset and count is longer than + the buffer length. + Thrown when offset or count is negative. + + + Returns an asynchronous computation that will read the given number of bytes from the stream. + The number of bytes to read. + An asynchronous computation that returns the read byte[] when run. + + + Returns an asynchronous computation that will read from the stream into the given buffer. + The buffer to read into. + An optional offset as a number of bytes in the stream. + An optional number of bytes to read from the stream. + An asynchronous computation that will read from the stream into the given buffer. + Thrown when the sum of offset and count is longer than + the buffer length. + Thrown when offset or count is negative. + + + A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. + + + Returns a new event that triggers on the second and subsequent triggerings of the input event. + The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as + a pair. The argument passed to the N-1th triggering is held in hidden internal state until the + Nth triggering occurs. + The input event. + An event that triggers on pairs of consecutive values passed from the source event. + + + Runs the given function each time the given event is triggered. + The function to call when the event is triggered. + The input event. + + + Returns a new event consisting of the results of applying the given accumulating function + to successive values triggered on the input event. An item of internal state + records the current value of the state parameter. The internal state is not locked during the + execution of the accumulation function, so care should be taken that the + input IEvent not triggered by multiple threads simultaneously. + The function to update the state with each event value. + The initial state. + The input event. + An event that fires on the updated state values. + + + Returns a new event which fires on a selection of messages from the original event. + The selection function takes an original message to an optional new message. + The function to select and transform event values to pass on. + The input event. + An event that fires only when the chooser returns Some. + + + Returns a new event that listens to the original event and triggers the + first resulting event if the application of the function to the event arguments + returned a Choice1Of2, and the second event if it returns a Choice2Of2. + The function to transform event values into one of two types. + The input event. + A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and + the second fires whenever splitter evaluates to Choice2of2. + + + Returns a new event that listens to the original event and triggers the + first resulting event if the application of the predicate to the event arguments + returned true, and the second event if it returned false. + The function to determine which output event to trigger. + The input event. + A tuple of events. The first is triggered when the predicate evaluates to true + and the second when the predicate evaluates to false. + + + Returns a new event that listens to the original event and triggers the resulting + event only when the argument to the event passes the given function. + The function to determine which triggers from the event to propagate. + The input event. + An event that only passes values that pass the predicate. + + + Returns a new event that passes values transformed by the given function. + The function to transform event values. + The input event. + An event that passes the transformed values. + + + Fires the output event when either of the input events fire. + The first input event. + The second input event. + An event that fires when either of the input events fire. + + + + + + Forces the execution of this value and return its result. Same as Value. Mutual exclusion is used to + prevent other threads also computing the value. + The value of the Lazy object. + + + Creates a lazy computation that evaluates to the given value when forced. + The input value. + The created Lazy object. + + + Creates a lazy computation that evaluates to the result of the given function when forced. + The function to provide the value when needed. + The created Lazy object. + + + Extensions related to Lazy values. + + + Returns a new observable that triggers on the second and subsequent triggerings of the input observable. + The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as + a pair. The argument passed to the N-1th triggering is held in hidden internal state until the + Nth triggering occurs. + + For each observer, the registered intermediate observing object is not thread safe. + That is, observations arising from the source must not be triggered concurrently + on different threads. + The input Observable. + An Observable that triggers on successive pairs of observations from the input Observable. + + + Creates an observer which subscribes to the given observable and which calls + the given function for each observation. + The function to be called on each observation. + The input Observable. + An object that will remove the callback if disposed. + + + Creates an observer which permanently subscribes to the given observable and which calls + the given function for each observation. + The function to be called on each observation. + The input Observable. + + + Returns an observable which, for each observer, allocates an item of state + and applies the given accumulating function to successive values arising from + the input. The returned object will trigger observations for each computed + state value, excluding the initial value. The returned object propagates + all errors arising from the source and completes when the source completes. + + For each observer, the registered intermediate observing object is not thread safe. + That is, observations arising from the source must not be triggered concurrently + on different threads. + The function to update the state with each observation. + The initial state. + The input Observable. + An Observable that triggers on the updated state values. + + + Returns an observable which chooses a projection of observations from the source + using the given function. The returned object will trigger observations x + for which the splitter returns Some x. The returned object also propagates + all errors arising from the source and completes when the source completes. + The function that returns Some for observations to be propagated + and None for observations to ignore. + The input Observable. + An Observable that only propagates some of the observations from the source. + + + Returns two observables which split the observations of the source by the + given function. The first will trigger observations x for which the + splitter returns Choice1Of2 x. The second will trigger observations + y for which the splitter returns Choice2Of2 y The splitter is + executed once for each subscribed observer. Both also propagate error + observations arising from the source and each completes when the source + completes. + The function that takes an observation an transforms + it into one of the two output Choice types. + The input Observable. + A tuple of Observables. The first triggers when splitter returns Choice1of2 + and the second triggers when splitter returns Choice2of2. + + + Returns two observables which partition the observations of the source by + the given function. The first will trigger observations for those values + for which the predicate returns true. The second will trigger observations + for those values where the predicate returns false. The predicate is + executed once for each subscribed observer. Both also propagate all error + observations arising from the source and each completes when the source + completes. + The function to determine which output Observable will trigger + a particular observation. + The input Observable. + A tuple of Observables. The first triggers when the predicate returns true, and + the second triggers when the predicate returns false. + + + Returns an observable which filters the observations of the source + by the given function. The observable will see only those observations + for which the predicate returns true. The predicate is executed once for + each subscribed observer. The returned object also propagates error + observations arising from the source and completes when the source completes. + The function to apply to observations to determine if it should + be kept. + The input Observable. + An Observable that filters observations based on filter. + + + Returns an observable which transforms the observations of the source by the + given function. The transformation function is executed once for each + subscribed observer. The returned object also propagates error observations + arising from the source and completes when the source completes. + The function applied to observations from the source. + The input Observable. + An Observable of the type specified by mapping. + + + Returns an observable for the merged observations from the sources. + The returned object propagates success and error values arising + from either source and completes when both the sources have completed. + + For each observer, the registered intermediate observing object is not + thread safe. That is, observations arising from the sources must not + be triggered concurrently on different threads. + The first Observable. + The second Observable. + An Observable that propagates information from both sources. + + + Basic operations on first class event and other observable objects. + + + Returns an asynchronous computation that, when run, will wait for the download of the given URI. + The URI to retrieve. + An asynchronous computation that will wait for the download of the URI. + + + Returns an asynchronous computation that, when run, will wait for a response to the given WebRequest. + An asynchronous computation that waits for response to the WebRequest. + + + A module of extension members providing asynchronous operations for some basic Web operations. + + + Creates an instance of the attribute + AbstractClassAttribute + + + Adding this attribute to class definition makes it abstract, which means it need not + implement all its methods. Instances of abstract classes may not be constructed directly. + + + Creates an instance of the attribute + AllowNullLiteralAttribute + + + Adding this attribute to a type lets the 'null' literal be used for the type + within F# code. This attribute may only be added to F#-defined class or + interface types. + + + Indicates the namespace or module to be automatically opened when an assembly is referenced + or an enclosing module opened. + + + Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced + The namespace or module to be automatically opened when an assembly is referenced + or an enclosing module opened. + AutoOpenAttribute + + + Creates an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened + AutoOpenAttribute + + + This attribute is used for two purposes. When applied to an assembly, it must be given a string + argument, and this argument must indicate a valid module or namespace in that assembly. Source + code files compiled with a reference to this assembly are processed in an environment + where the given path is automatically opened. + + When applied to a module within an assembly, then the attribute must not be given any arguments. + When the enclosing namespace is opened in user source code, the module is also implicitly opened. + + + The value of the attribute, indicating whether the type is automatically marked serializable or not + + + Creates an instance of the attribute + Indicates whether the type should be serializable by default. + AutoSerializableAttribute + + + Adding this attribute to a type with value 'false' disables the behaviour where F# makes the + type Serializable by default. + + + Creates an instance of the attribute + CLIEventAttribute + + + Adding this attribute to a property with event type causes it to be compiled with as a CLI + metadata event, through a syntactic translation to a pair of 'add_EventName' and + 'remove_EventName' methods. + + + Creates an instance of the attribute + CLIMutableAttribute + + + Adding this attribute to a record type causes it to be compiled to a CLI representation + with a default constructor with property getters and setters. + + + Choice 2 of 2 choices + + + Choice 1 of 2 choices + + + Helper types for active patterns with 2 choices. + + + Choice 3 of 3 choices + + + Choice 2 of 3 choices + + + Choice 1 of 3 choices + + + Helper types for active patterns with 3 choices. + + + Choice 4 of 4 choices + + + Choice 3 of 4 choices + + + Choice 2 of 4 choices + + + Choice 1 of 4 choices + + + Helper types for active patterns with 4 choices. + + + Choice 5 of 5 choices + + + Choice 4 of 5 choices + + + Choice 3 of 5 choices + + + Choice 2 of 5 choices + + + Choice 1 of 5 choices + + + Helper types for active patterns with 5 choices. + + + Choice 6 of 6 choices + + + Choice 5 of 6 choices + + + Choice 4 of 6 choices + + + Choice 3 of 6 choices + + + Choice 2 of 6 choices + + + Choice 1 of 6 choices + + + Helper types for active patterns with 6 choices. + + + Choice 7 of 7 choices + + + Choice 6 of 7 choices + + + Choice 5 of 7 choices + + + Choice 4 of 7 choices + + + Choice 3 of 7 choices + + + Choice 2 of 7 choices + + + Choice 1 of 7 choices + + + Helper types for active patterns with 7 choices. + + + Creates an instance of the attribute + ClassAttribute + + + Adding this attribute to a type causes it to be represented using a CLI class. + + + Creates an instance of the attribute + ComparisonConditionalOnAttribute + + + This attribute is used to indicate a generic container type satisfies the F# 'comparison' + constraint only if a generic argument also satisfies this constraint. For example, adding + this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports + comparison if the type X also supports comparison and all other conditions for C<X> to support + comparison are also met. The type C<'T> can still be used with other type arguments, but a type such + as C<(int -> int)> will not support comparison because the type (int -> int) is an F# function type + and does not support comparison. + + This attribute will be ignored if it is used on the generic parameters of functions or methods. + + + Indicates the number of arguments in each argument group + + + Creates an instance of the attribute + Indicates the number of arguments in each argument group. + CompilationArgumentCountsAttribute + + + This attribute is generated automatically by the F# compiler to tag functions and members + that accept a partial application of some of their arguments and return a residual function + + + Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code + + + Indicates the relationship between the compiled entity and F# source code + + + Indicates the sequence number of the entity, if any, in a linear sequence of elements with F# source code + + + Creates an instance of the attribute + Indicates the type of source construct. + CompilationMappingAttribute + + + Creates an instance of the attribute + Indicates the type of source construct. + CompilationMappingAttribute + + + Creates an instance of the attribute + Indicates the type of source construct. + CompilationMappingAttribute + + + This attribute is inserted automatically by the F# compiler to tag types + and methods in the generated CLI code with flags indicating the correspondence + with original source constructs. It is used by the functions in the + Microsoft.FSharp.Reflection namespace to reverse-map compiled constructs to + their original forms. It is not intended for use from user code. + + + Indicates one or more adjustments to the compiled representation of an F# type or member + + + Creates an instance of the attribute + Indicates adjustments to the compiled representation of the type or member. + CompilationRepresentationAttribute + + + This attribute is used to adjust the runtime representation for a type. + For example, it may be used to note that the null representation + may be used for a type. This affects how some constructs are compiled. + + + Compile a property as a CLI event. + + + Permit the use of null as a representation for nullary discriminators in a discriminated union. + + + append 'Module' to the end of a module whose name clashes with a type name in the same namespace. + + + Compile a member as 'instance' even if null is used as a representation for this type. + + + Compile an instance member as 'static' . + + + No special compilation representation. + + + + + + Indicates one or more adjustments to the compiled representation of an F# type or member. + + + Indicates the name of the entity in F# source code + + + Creates an instance of the attribute + The name of the method in source. + CompilationSourceNameAttribute + + + This attribute is inserted automatically by the F# compiler to tag + methods which are given the 'CompiledName' attribute. It is not intended + for use from user code. + + + The name of the value as it appears in compiled code + + + Creates an instance of the attribute + The name to use in compiled code. + CompiledNameAttribute + + + Adding this attribute to a value or function definition in an F# module changes the name used + for the value in compiled CLI code. + + + Indicates if the construct should always be hidden in an editing environment. + + + Indicates if the message should indicate a compiler error. Error numbers less than + 10000 are considered reserved for use by the F# compiler and libraries. + + + Indicates the number associated with the message. + + + Indicates the warning message to be emitted when F# source code uses this construct + + + Indicates if the construct should always be hidden in an editing environment. + + + Indicates if the message should indicate a compiler error. Error numbers less than + 10000 are considered reserved for use by the F# compiler and libraries. + + + Creates an instance of the attribute. + + + Indicates that a message should be emitted when F# source code uses this construct. + + + Creates an instance of the attribute + CustomComparisonAttribute + + + Adding this attribute to a type indicates it is a type with a user-defined implementation of comparison. + + + Creates an instance of the attribute + CustomEqualityAttribute + + + Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. + + + Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation + + + Indicates if the custom operation maintains the variable space of the query of computation expression + + + Indicates the name used for the 'on' part of the custom query operator for join-like operators + + + Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs + + + Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint + + + Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group + + + Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation + + + Get the name of the custom operation when used in a query or other computation expression + + + Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation + + + Indicates if the custom operation maintains the variable space of the query of computation expression + + + Indicates the name used for the 'on' part of the custom query operator for join-like operators + + + Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs + + + Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint + + + Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group + + + Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation + + + Creates an instance of the attribute + CustomOperationAttribute + + + + Indicates that a member on a computation builder type is a custom query operator, + and indicates the name of that operator. + + + + The value of the attribute, indicating whether the type has a default augmentation or not + + + Creates an instance of the attribute + Indicates whether to generate helper members on the CLI class representing a discriminated + union. + DefaultAugmentationAttribute + + + Adding this attribute to a discriminated union with value false + turns off the generation of standard helper member tester, constructor + and accessor members for the generated CLI class for that type. + + + Indicates if a constraint is asserted that the field type supports 'null' + + + Creates an instance of the attribute + Indicates whether to assert that the field type supports null. + DefaultValueAttribute + + + Creates an instance of the attribute + DefaultValueAttribute + + + Adding this attribute to a field declaration means that the field is + not initialized. During type checking a constraint is asserted that the field type supports 'null'. + If the 'check' value is false then the constraint is not asserted. + + + Creates an instance of the attribute + EntryPointAttribute + + + Adding this attribute to a function indicates it is the entrypoint for an application. + If this attribute is not specified for an EXE then the initialization implicit in the + module bindings in the last file in the compilation sequence are used as the entrypoint. + + + Creates an instance of the attribute + EqualityConditionalOnAttribute + + + This attribute is used to indicate a generic container type satisfies the F# 'equality' + constraint only if a generic argument also satisfies this constraint. For example, adding + this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports + equality if the type X also supports equality and all other conditions for C<X> to support + equality are also met. The type C<'T> can still be used with other type arguments, but a type such + as C<(int -> int)> will not support equality because the type (int -> int) is an F# function type + and does not support equality. + + This attribute will be ignored if it is used on the generic parameters of functions or methods. + + + Indicates the warning message to be emitted when F# source code uses this construct + + + Creates an instance of the attribute + The warning message to be emitted when code uses this construct. + ExperimentalAttribute + + + This attribute is used to tag values that are part of an experimental library + feature. + + + Convert an value of type System.Converter to a F# first class function value + The input System.Converter. + An F# function of the same type. + + + Convert an F# first class function value to a value of type System.Converter + The input function. + A System.Converter of the function type. + + + Convert an F# first class function value to a value of type System.Converter + The input function. + System.Converter<'T,'U> + + + Invoke an F# first class function value with two curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + The input function. + The first arg. + The second arg. + The function result. + + + Invoke an F# first class function value with three curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + The input function. + The first arg. + The second arg. + The third arg. + The function result. + + + Invoke an F# first class function value with four curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + The input function. + The first arg. + The second arg. + The third arg. + The fourth arg. + The function result. + + + Invoke an F# first class function value with five curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + The input function. + The first arg. + The second arg. + The third arg. + The fourth arg. + The fifth arg. + The function result. + + + Invoke an F# first class function value with one argument + + 'U + + + Convert an value of type System.Converter to a F# first class function value + The input System.Converter. + An F# function of the same type. + + + Construct an instance of an F# first class function value + The created F# function. + + + The CLI type used to represent F# function values. This type is not + typically used directly, though may be used from other CLI languages. + + + The release number of the F# version associated with the attribute + + + The minor version number of the F# version associated with the attribute + + + The major version number of the F# version associated with the attribute + + + Creates an instance of the attribute + The major version number. + The minor version number. + The release number. + FSharpInterfaceDataVersionAttribute + + + This attribute is added to generated assemblies to indicate the + version of the data schema used to encode additional F# + specific information in the resource attached to compiled F# libraries. + + + Specialize the type function at a given type + The specialized type. + + + Construct an instance of an F# first class type function value + FSharpTypeFunc + + + The CLI type used to represent F# first-class type function values. This type is for use + by compiled F# code. + + + Type of a formatting expression. + Function type generated by printf. + Type argument passed to %a formatters + Value generated by the overall printf action (e.g. sprint generates a string) + Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) + + + Type of a formatting expression. + Function type generated by printf. + Type argument passed to %a formatters + Value generated by the overall printf action (e.g. sprint generates a string) + Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) + Tuple of values generated by scan or match. + + + Convert the given Converter delegate object to an F# function value + The input Converter. + The F# function. + + + Convert the given Action delegate object to an F# function value + The input action. + The F# function. + + + A utility function to convert function values from tupled to curried form + The input tupled function. + The output curried function. + + + A utility function to convert function values from tupled to curried form + The input tupled function. + The output curried function. + + + A utility function to convert function values from tupled to curried form + The input tupled function. + The output curried function. + + + A utility function to convert function values from tupled to curried form + The input tupled function. + The output curried function. + + + Helper functions for converting F# first class function values to and from CLI representaions + of functions using delegates. + + + Creates an instance of the attribute + GeneralizableValueAttribute + + + Adding this attribute to a non-function value with generic parameters indicates that + uses of the construct can give rise to generic code through type inference. + + + Creates an instance of the attribute + InterfaceAttribute + + + Adding this attribute to a type causes it to be represented using a CLI interface. + + + Creates an instance of the attribute + LiteralAttribute + + + Adding this attribute to a value causes it to be compiled as a CLI constant literal. + + + Creates an instance of the attribute + MeasureAnnotatedAbbreviationAttribute + + + Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. + This may only be used under very limited conditions. + + + Creates an instance of the attribute + MeasureAttribute + + + Adding this attribute to a type causes it to be interpreted as a unit of measure. + This may only be used under very limited conditions. + + + Creates an instance of the attribute + NoComparisonAttribute + + + Adding this attribute to a type indicates it is a type where comparison is an abnormal operation. + This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the + F# type system, this helps ensure that the F# generic comparison function is not instantiated directly + at this type. The attribute and checking does not constrain the use of comparison with base or child + types of this type. + + + Creates an instance of the attribute + NoDynamicInvocationAttribute + + + This attribute is used to tag values that may not be dynamically invoked at runtime. This is + typically added to inlined functions whose implementations include unverifiable code. It + causes the method body emitted for the inlined function to raise an exception if + dynamically invoked, rather than including the unverifiable code in the generated + assembly. + + + Creates an instance of the attribute + NoEqualityAttribute + + + Adding this attribute to a type indicates it is a type where equality is an abnormal operation. + This means that the type does not satisfy the F# 'equality' constraint. Within the bounds of the + F# type system, this helps ensure that the F# generic equality function is not instantiated directly + at this type. The attribute and checking does not constrain the use of comparison with base or child + types of this type. + + + The representation of "Value of type 'T" + The input value. + An option representing the value. + + + The representation of "No value" + + + Get the value of a 'Some' option. A NullReferenceException is raised if the option is 'None'. + + + Create an option value that is a 'None' value. + + + Return 'true' if the option is a 'Some' value. + + + Return 'true' if the option is a 'None' value. + + + Create an option value that is a 'Some' value. + The input value + An option representing the value. + + + The type of optional values. When used from other CLI languages the + empty option is the null value. + + Use the constructors Some and None to create values of this type. + Use the values in the Option module to manipulate values of this type, + or pattern match against the values directly. + + None values will appear as the value null to other CLI languages. + Instance methods on this type will appear as static methods to other CLI languages + due to the use of null as a value representation. + + + Creates an instance of the attribute + OptionalArgumentAttribute + + + This attribute is added automatically for all optional arguments. + + + The raw text of the format string. + + + Construct a format string + The input string. + The PrintfFormat containing the formatted result. + + + Type of a formatting expression. + Function type generated by printf. + Type argument passed to %a formatters + Value generated by the overall printf action (e.g. sprint generates a string) + Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) + + + Construct a format string + The input string. + The created format string. + + + Type of a formatting expression. + Function type generated by printf. + Type argument passed to %a formatters + Value generated by the overall printf action (e.g. sprint generates a string) + Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) + Tuple of values generated by scan or match. + + + Creates an instance of the attribute + ProjectionParameterAttribute + + + Indicates that, when a custom operator is used in a computation expression, + a parameter is automatically parameterized by the variable space of the computation expression + + + + The current value of the reference cell + + + + The current value of the reference cell + + + The current value of the reference cell + + + The type of mutable references. Use the functions [:=] and [!] to get and + set values of this type. + + + Creates an instance of the attribute + ReferenceEqualityAttribute + + + Adding this attribute to a record or union type disables the automatic generation + of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' + and 'System.IComparable' for the type. The type will by default use reference equality. + + + Creates an instance of the attribute + ReflectedDefinitionAttribute + + + Adding this attribute to the let-binding for the definition of a top-level + value makes the quotation expression that implements the value available + for use at runtime. + + + Creates an instance of the attribute + RequireQualifiedAccessAttribute + + + This attribute is used to indicate that references to the elements of a module, record or union + type require explicit qualified access. + + + Creates an instance of the attribute + RequiresExplicitTypeArgumentsAttribute + + + Adding this attribute to a type, value or member requires that + uses of the construct must explicitly instantiate any generic type parameters. + + + The value of the attribute, indicating whether the type is sealed or not. + + + Creates an instance of the attribute + Indicates whether the class is sealed. + SealedAttribute + + + Creates an instance of the attribute. + The created attribute. + + + Adding this attribute to class definition makes it sealed, which means it may not + be extended or implemented. + + + Indicates that the compiled entity had private or internal representation in F# source code. + + + The mask of values related to the kind of the compiled entity. + + + Indicates that the compiled entity is part of the representation of an F# value declaration. + + + Indicates that the compiled entity is part of the representation of an F# union case declaration. + + + Indicates that the compiled entity is part of the representation of an F# module declaration. + + + Indicates that the compiled entity is part of the representation of an F# closure. + + + Indicates that the compiled entity is part of the representation of an F# exception declaration. + + + Indicates that the compiled entity is part of the representation of an F# record or union case field declaration. + + + Indicates that the compiled entity is part of the representation of an F# class or other object type declaration. + + + Indicates that the compiled entity is part of the representation of an F# record type declaration. + + + Indicates that the compiled entity is part of the representation of an F# union type declaration. + + + Indicates that the compiled entity has no relationship to an element in F# source code. + + + + + + Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. + + + Creates an instance of the attribute + StructAttribute + + + Adding this attribute to a type causes it to be represented using a CLI struct. + + + Creates an instance of the attribute + StructuralComparisonAttribute + + + Adding this attribute to a record, union, exception, or struct type confirms the + automatic generation of implementations for 'System.IComparable' for the type. + + + Creates an instance of the attribute + StructuralEqualityAttribute + + + Adding this attribute to a record, union or struct type confirms the automatic + generation of overrides for 'System.Object.Equals(obj)' and + 'System.Object.GetHashCode()' for the type. + + + Indicates the text to display by default when objects of this type are displayed + using '%A' printf formatting patterns and other two-dimensional text-based display + layouts. + + + Creates an instance of the attribute + Indicates the text to display when using the '%A' printf formatting. + StructuredFormatDisplayAttribute + + + This attribute is used to mark how a type is displayed by default when using + '%A' printf formatting patterns and other two-dimensional text-based display layouts. + In this version of F# the only valid values are of the form PreText {PropertyName} PostText. + The property name indicates a property to evaluate and to display instead of the object itself. + + + The type 'unit', which has only one value "()". This value is special and + always uses the representation 'null'. + + + Creates an instance of the attribute + UnverifiableAttribute + + + This attribute is used to tag values whose use will result in the generation + of unverifiable code. These values are inevitably marked 'inline' to ensure that + the unverifiable constructs are not present in the actual code for the F# library, + but are rather copied to the source code of the caller. + + + Creates an instance of the attribute + VolatileFieldAttribute + + + Adding this attribute to an F# mutable binding causes the "volatile" + prefix to be used for all accesses to the field. + + + Four dimensional arrays, typically zero-based. Non-zero-based arrays + can be created using methods on the System.Array type. + + Use the values in the Array4D module + to manipulate values of this type, or the notation arr.[x1,x2,x3,x4] to get and set array + values. + + + Three dimensional arrays, typically zero-based. Non-zero-based arrays + can be created using methods on the System.Array type. + + Use the values in the Array3D module + to manipulate values of this type, or the notation arr.[x1,x2,x3] to get and set array + values. + + + Two dimensional arrays, typically zero-based. + + Use the values in the Array2D module + to manipulate values of this type, or the notation arr.[x,y] to get/set array + values. + + Non-zero-based arrays can also be created using methods on the System.Array type. + + + Single dimensional, zero-based arrays, written int[], string[] etc. + Use the values in the Array module to manipulate values + of this type, or the notation arr.[x] to get/set array + values. + + + Single dimensional, zero-based arrays, written int[], string[] etc. + + Use the values in the Array module to manipulate values + of this type, or the notation arr.[x] to get/set array + values. + + + + + + An abbreviation for the CLI type System.Boolean. + + + Represents a managed pointer in F# code. + + + An abbreviation for the CLI type System.Byte. + + + An abbreviation for the CLI type System.Char. + + + An abbreviation for the CLI type System.Decimal. + + + The type of decimal numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.Decimal. + + + An abbreviation for the CLI type System.Double. + + + An abbreviation for the CLI type System.Exception. + + + An abbreviation for the CLI type System.Double. + + + An abbreviation for the CLI type System.Single. + + + The type of floating point numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.Single. + + + The type of floating point numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.Double. + + + This type is for internal use by the F# code generator. + + + An abbreviation for the CLI type System.Int32. + + + An abbreviation for the CLI type System.Int16. + + + The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.Int16. + + + An abbreviation for the CLI type System.Int32. + + + An abbreviation for the CLI type System.Int64. + + + The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.Int64. + + + An abbreviation for the CLI type System.SByte. + + + The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.Int32. + + + An abbreviation for the CLI type System.IntPtr. + + + Represents an unmanaged pointer in F# code. + + This type should only be used when writing F# code that interoperates + with native code. Use of this type in F# code may result in + unverifiable code being generated. Conversions to and from the + nativeint type may be required. Values of this type can be generated + by the functions in the NativeInterop.NativePtr module. + + + An abbreviation for the CLI type System.Object. + + + The type of optional values. When used from other CLI languages the + empty option is the null value. + + Use the constructors Some and None to create values of this type. + Use the values in the Option module to manipulate values of this type, + or pattern match against the values directly. + + 'None' values will appear as the value null to other CLI languages. + Instance methods on this type will appear as static methods to other CLI languages + due to the use of null as a value representation. + + + The type of mutable references. Use the functions [:=] and [!] to get and + set values of this type. + + + An abbreviation for the CLI type System.SByte. + + + The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + System.SByte. + + + An abbreviation for the CLI type System.Single. + + + An abbreviation for the CLI type System.String. + + + An abbreviation for the CLI type System.UInt16. + + + An abbreviation for the CLI type System.UInt32. + + + An abbreviation for the CLI type System.UInt64. + + + An abbreviation for the CLI type System.Byte. + + + An abbreviation for the CLI type System.UIntPtr. + + + The type 'unit', which has only one value "()". This value is special and + always uses the representation 'null'. + + + + + + + + + + + + Non-exhaustive match failures will raise the MatchFailureException exception + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + A new enumerator for the sequence. + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + A reference to the sequence. + + A 0, 1, and 2 respectively indicate Stop, Yield, and Goto conditions for the sequence generator. + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + A new sequence generator for the expression. + + + The F# compiler emits implementations of this type for compiled sequence expressions. + + + + Namespace name the provider injects types into. + + + + + Compilers call this method to query a type provider for a type name. + + Resolver should return a type called name in namespace NamespaceName or null if the type is unknown. + + + + + + The top-level types + + + + + + The sub-namespaces in this namespace. An optional member to prevent generation of namespaces until an outer namespace is explored. + + + + + + + + Triggered when an assumption changes that invalidates the resolutions so far reported by the provider + + + + + Triggered when an assumption changes that invalidates the resolutions so far reported by the provider + + + + + Triggered when an assumption changes that invalidates the resolutions so far reported by the provider + + + + + Get the static parameters for a provided type. + + A type returned by GetTypes or ResolveTypeName + + + + + Namespace name the this TypeProvider injects types into. + + + + + Called by the compiler to ask for an Expression tree to replace the given MethodBase with. + + MethodBase that was given to the compiler by a type returned by a GetType(s) call. + Expressions that represent the parameters to this call. + An expression that the compiler will use in place of the given method base. + + + + Get the physical contents of the given logical provided assembly. + + + + + Apply static arguments to a provided type that accepts static arguments. + + The provider must return a type with the given mangled name. + the provided type definition which has static parameters + the full path of the type, including encoded representations of static parameters + the static parameters, indexed by name + + + + + + + Represents the inverse of a measure expressions when returned as a generic argument of a provided type. + + + Represents the '1' measure expression when returned as a generic argument of a provided type. + + + Represents the product of two measure expressions when returned as a generic argument of a provided type. + + + + + + Creates an instance of the attribute + TypeProviderAssemblyAttribute + The name of the design-time assembly for this type provider. + + + Creates an instance of the attribute + TypeProviderAssemblyAttribute + + + Place attribute on runtime assembly to indicate that there is a corresponding design-time + assembly that contains a type provider. Runtime and designer assembly may be the same. + + + Creates an instance of the attribute + TypeProviderAttribute + + + Place on a class that implements ITypeProvider to extend the compiler + + + + Get the full path to use for temporary files for the type provider instance. + + + + + version of referenced system runtime assembly + + + + + Get the full path to referenced assembly that caused this type provider instance to be created. + + + + + Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. + + + + + Get the referenced assemblies for the type provider instance. + + + + + Indicates if the type provider host responds to invalidation events for type provider instances. + + + + + Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. + + + + + Get the full path to use for temporary files for the type provider instance. + + + + + version of referenced system runtime assembly + + + + + Get the full path to referenced assembly that caused this type provider instance to be created. + + + + + Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. + + + + + Get the referenced assemblies for the type provider instance. + + + + + Indicates if the type provider host responds to invalidation events for type provider instances. + + + + + Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. + + + + + Checks if given type exists in target system runtime library + + + + + + + + If the class that implements ITypeProvider has a constructor that accepts TypeProviderConfig + then it will be constructed with an instance of TypeProviderConfig. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates an instance of the attribute + TypeProviderEditorHideMethodsAttribute + + + Indicates that a code editor should hide all System.Object methods from the intellisense menus for instances of a provided type + + + + + + + + + + + + Additional type attribute flags related to provided types + + + + + + Creates an instance of the attribute + TypeProviderXmlDocAttribute + + + + The TypeProviderXmlDocAttribute attribute can be added to types and members. + The language service will display the CommentText property from the attribute + in the appropriate place when the user hovers over a type or member. + + + + + + + + + + + + + + + + Creates an anonymous event with the given handlers. + + A function to handle adding a delegate for the event to trigger. + A function to handle removing a delegate that the event triggers. + A function to produce the delegate type the event can trigger. + + The initialized event. + + + The F# compiler emits calls to this function to implement the use operator for F# sequence + expressions. + + The resource to be used and disposed. + The input sequence. + + The result sequence. + + + The F# compiler emits calls to this function to implement the compiler-intrinsic + conversions from untyped System.Collections.IEnumerable sequences to typed sequences. + + An initializer function. + A function to iterate and test if end of sequence is reached. + A function to retrieve the current element. + + The resulting typed sequence. + + + The F# compiler emits calls to this function to + implement the try/finally operator for F# sequence expressions. + + The input sequence. + A computation to be included in an enumerator's Dispose method. + + The result sequence. + + + The F# compiler emits calls to this function to + implement the while operator for F# sequence expressions. + + A function that indicates whether iteration should continue. + The input sequence. + + The result sequence. + + + A group of functions used as part of the compiled representation of F# sequence expressions. + + + Builds a query using query syntax and operators. + + + An active pattern to force the execution of values of type Lazy<_>. + + + Special prefix operator for splicing untyped expressions into quotation holes. + + + Special prefix operator for splicing typed expressions into quotation holes. + + + Builds a 2D array from a sequence of sequences of elements. + + + Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. + + + Converts the argument to signed byte. + This is a direct conversion for all + primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. + Otherwise the operation requires and invokes a ToSByte method on the input type. + + + Converts the argument to byte. + This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type. + + + Converts the argument to 64-bit float. + This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type. + + + Converts the argument to 32-bit float. + This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type. + + + Builds an aysnchronous workflow using computation expression syntax. + + + Builds a set from a sequence of objects. The objects are indexed using generic comparison. + The input sequence of elements. + The created set. + + + Print to a file using the given format, and add a newline. + The file TextWriter. + The formatter. + The formatted result. + + + Print to a file using the given format. + The file TextWriter. + The formatter. + The formatted result. + + + Print to a string buffer and raise an exception with the given + result. Helper printers must return strings. + The formatter. + The formatted result. + + + Print to a string using the given format. + The formatter. + The formatted result. + + + Print to stderr using the given format, and add a newline. + The formatter. + The formatted result. + + + Print to stderr using the given format. + The formatter. + The formatted result. + + + Print to stdout using the given format, and add a newline. + The formatter. + The formatted result. + + + Print to stdout using the given format. + The formatter. + The formatted result. + + + + + + Divides a value by an integer. + The input value. + The input int. + The division result. + + + + + + Resolves to the value 'one' for any primitive numeric type or any type with a static member called 'One' + + + Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' + + + A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive. + + + A compiler intrinsic that implements dynamic invocations to the checked '*' operator. + + + A compiler intrinsic that implements dynamic invocations to the '*' operator. + + + A compiler intrinsic that implements dynamic invocations to the checked '+' operator. + + + A compiler intrinsic that implements dynamic invocations to the '+' operator. + + + Resolves to the value 'one' for any primitive numeric type or any type with a static member called 'One'. + + + Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero'. + + + Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings + The input string. + The parsed value. + + + Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings + The input string. + The parsed value. + + + Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings + The input string. + The parsed value. + + + Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings + The input string. + The parsed value. + + + Creates an sbyte value with units-of-measure + The input sbyte. + The sbyte with units-of-measure. + + + Creates an int16 value with units-of-measure + The input int16. + The int16 with units-of-measure. + + + Creates an int64 value with units-of-measure + The input int64. + The int64 with units of measure. + + + Creates an int32 value with units-of-measure + The input int. + The int with units of measure. + + + Creates a decimal value with units-of-measure + The input decimal. + The decimal with units of measure. + + + Creates a float32 value with units-of-measure + The input float. + The float with units-of-measure. + + + Creates a float value with units-of-measure + The input float. + The float with units-of-measure. + + + Get the underlying value for an enum value + The input enum. + The enumeration as a value. + + + Build an enum value from an underlying value + The input value. + The value as an enumeration. + + + Recursively hash a part of a value according to its structure. + The comparison function. + The input object. + The hashed value. + + + Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# + records, lists and union types. + The limit on the number of nodes. + The input object. + The hashed value. + + + Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# + records, lists and union types. + The input object. + The hashed value. + + + Make an F# hash/equality object for the given type using node-limited hashing when hashing F# + records, lists and union types. + The input limit on the number of nodes. + System.Collections.Generic.IEqualityComparer<'T> + + + Make an F# hash/equality object for the given type + + + Make an F# comparer object for the given type, where it can be null if System.Collections.Generic.Comparer<'T>.Default + + + Make an F# comparer object for the given type + + + A static F# comparer object + + + Return an F# comparer object suitable for hashing and equality. This hashing behaviour + of the returned comparer is not limited by an overall node count when hashing F# + records, lists and union types. This equality comparer has equivalence + relation semantics ([nan] = [nan]). + + + Return an F# comparer object suitable for hashing and equality. This hashing behaviour + of the returned comparer is not limited by an overall node count when hashing F# + records, lists and union types. + + + The physical hash. Hashes on the object identity, except for value types, + where we hash on the contents. + The input object. + The hashed value. + + + Reference/physical equality. + True if the inputs are reference-equal, false otherwise. + The first value. + The second value. + The result of the comparison. + + + Take the maximum of two values structurally according to the order given by GenericComparison + The first value. + The second value. + The maximum value. + + + Take the minimum of two values structurally according to the order given by GenericComparison + The first value. + The second value. + The minimum value. + + + Compare two values + The first value. + The second value. + The result of the comparison. + + + Compare two values + The first value. + The second value. + The result of the comparison. + + + Compare two values + The first value. + The second value. + The result of the comparison. + + + Compare two values + The first value. + The second value. + The result of the comparison. + + + Compare two values. May be called as a recursive case from an implementation of System.IComparable to + ensure consistent NaN comparison semantics. + The function to compare the values. + The first value. + The second value. + The result of the comparison. + + + Compare two values + The first value. + The second value. + The result of the comparison. + + + Compare two values for equality + + The first value. + The second value. + The result of the comparison. + + + Compare two values for equality using equivalence relation semantics ([nan] = [nan]) + The first value. + The second value. + The result of the comparison. + + + Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan]) + The first value. + The second value. + The result of the comparison. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + A primitive entry point used by the F# compiler for optimization purposes. + + + The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs + + + + The standard overloaded associative (4-indexed) mutation operator + + + + The standard overloaded associative (3-indexed) mutation operator + + + The standard overloaded associative (2-indexed) mutation operator + + + The standard overloaded associative (indexed) mutation operator + + + The standard overloaded associative (4-indexed) lookup operator + + + The standard overloaded associative (3-indexed) lookup operator + + + The standard overloaded associative (2-indexed) lookup operator + + + The standard overloaded associative (indexed) lookup operator + + + A compiler intrinsic for checking initialization soundness of recursive bindings + + + A compiler intrinsic for checking initialization soundness of recursive static bindings + + + A compiler intrinsic for checking initialization soundness of recursive bindings + + + A compiler intrinsic for the efficient compilation of sequence expressions + + + This function implements parsing of decimal constants + + + This function implements calls to default constructors + acccessed by 'new' constraints. + + + Primitive used by pattern match compilation + + + A compiler intrinsic that implements the ':?' operator + + + A compiler intrinsic that implements the ':?' operator + + + A compiler intrinsic that implements the ':?>' operator + + + A compiler intrinsic that implements the ':?>' operator + + + The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs + + + Address-of. Uses of this value may result in the generation of unverifiable code. + The input object. + The unmanaged pointer. + + + Address-of. Uses of this value may result in the generation of unverifiable code. + The input object. + The managed pointer. + + + Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand + The first value. + The second value. + The result of the operation. + + + Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand. + + + Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand + The first value. + The second value. + The result of the operation. + + + Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand. + + + The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs + + + + + + + + + + + + + + + + + + For internal use only + + + Language primitives associated with the F# language + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + + Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' + + + + An active pattern to match values of type System.Collections.Generic.KeyValuePair + The input key/value pair. + A tuple containing the key and value. + + + Converts the argument to character. Numeric inputs are converted according to the UTF-16 + encoding for characters. String inputs must be exactly one character long. For other + input types the operation requires an appropriate static conversion method on the input type. + The input value. + The converted char. + + + Converts the argument to System.Decimal using a direct conversion for all + primitive numeric types. For strings, the input is converted using UInt64.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted decimal. + + + Converts the argument to a string using ToString. + + For standard integer and floating point values the ToString conversion + uses CultureInfo.InvariantCulture. + The input value. + The converted string. + + + Converts the argument to unsigned native integer using a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted unativeint + + + Converts the argument to signed native integer. This is a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted nativeint + + + Converts the argument to 64-bit float. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Double.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted float + + + Converts the argument to 32-bit float. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Single.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted float32 + + + Converts the argument to unsigned 64-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using UInt64.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint64 + + + Converts the argument to signed 64-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Int64.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int64 + + + Converts the argument to unsigned 32-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using UInt32.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint32 + + + Converts the argument to signed 32-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Int32.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int32 + + + Converts the argument to a particular enum type. + The input value. + The converted enum type. + + + Converts the argument to signed 32-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Int32.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int + + + Converts the argument to unsigned 16-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using UInt16.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint16 + + + Converts the argument to signed 16-bit integer. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Int16.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int16 + + + Converts the argument to signed byte. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using SByte.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted sbyte + + + Converts the argument to byte. This is a direct conversion for all + primitive numeric types. For strings, the input is converted using Byte.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted byte + + + Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. + The input base. + The input exponent. + The base raised to the exponent. + + + Overloaded power operator. + The input base. + The input exponent. + The base raised to the exponent. + + + Overloaded truncate operator. + The input value. + The truncated value. + + + Hyperbolic tangent of the given number + The input value. + The hyperbolic tangent of the input. + + + Tangent of the given number + The input value. + The tangent of the input. + + + Hyperbolic sine of the given number + The input value. + The hyperbolic sine of the input. + + + Sine of the given number + The input value. + The sine of the input. + + + Hyperbolic cosine of the given number + The input value. + The hyperbolic cosine of the input. + + + Cosine of the given number + The input value. + The cosine of the input. + + + Square root of the given number + The input value. + The square root of the input. + + + Logarithm to base 10 of the given number + The input value. + The logarithm to base 10 of the input. + + + Natural logarithm of the given number + The input value. + The natural logarithm of the input. + + + Round the given number + The input value. + The nearest integer to the input value. + + + Sign of the given number + The input value. + -1, 0, or 1 depending on the sign of the input. + + + Floor of the given number + The input value. + The floor of the input. + + + Exponential of the given number + The input value. + The exponential of the input. + + + Ceiling of the given number + The input value. + The ceiling of the input. + + + Inverse tangent of x/y where x and y are specified separately + The y input value. + The x input value. + The inverse tangent of the input ratio. + + + Inverse tangent of the given number + The input value. + The inverse tangent of the input. + + + Inverse sine of the given number + The input value. + The inverse sine of the input. + + + Inverse cosine of the given number + The input value. + The inverse cosine of the input. + + + Absolute value of the given number. + The input value. + The absolute value of the input. + + + A generic hash function. This function has the same behaviour as 'hash', + however the default structural hashing for F# union, record and tuple + types stops when the given limit of nodes is reached. The exact behaviour of + the function can be adjusted on a type-by-type basis by implementing + GetHashCode for each type. + The limit of nodes. + The input object. + The computed hash. + + + A generic hash function, designed to return equal hash values for items that are + equal according to the "=" operator. By default it will use structural hashing + for F# union, record and tuple types, hashing the complete contents of the + type. The exact behaviour of the function can be adjusted on a + type-by-type basis by implementing GetHashCode for each type. + The input object. + The computed hash. + + + Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. + + + Generate a System.Type representation for a type definition. If the + input type is a generic type instantiation then return the + generic type definition associated with all such instantiations. + + + An internal, library-only compiler intrinsic for compile-time + generation of a RuntimeMethodHandle. + + + Generate a System.Type runtime representation of a static type. + The static type is still maintained on the value returned. + + + Clean up resources associated with the input object after the completion of the given function. + Cleanup occurs even when an exception is raised by the protected + code. + The resource to be disposed after action is called. + The action that accepts the resource. + The resulting value. + + + Execute the function as a mutual-exclusion region using the input value as a lock. + The object to be locked. + The action to perform during the lock. + The resulting value. + + + The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences + The start value of the range. + The step value of the range. + The end value of the range. + The sequence spanning the range using the specified step size. + + + The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences + The start value of the range. + The end value of the range. + The sequence spanning the range. + + + Reads the value of the property System.Console.Out. + + + Reads the value of the property System.Console.Error. + + + Reads the value of the property System.Console.In. + + + Equivalent to System.Single.NaN + + + Equivalent to System.Single.PositiveInfinity + + + Equivalent to System.Double.NaN + + + Equivalent to System.Double.PositiveInfinity + + + Exit the current hardware isolated process, if security settings permit, + otherwise raise an exception. Calls System.Environment.Exit. + The exit code to use. + The result value. + + + Builds a sequence using sequence expression syntax + The input sequence. + The result sequence. + + + Negate a logical value. not true equals false and not false equals true + The value to negate. + The result of the negation. + + + Concatenate two lists. + The first list. + The second list. + The concatenation of the lists. + + + Increment a mutable reference cell containing an integer + The reference cell. + + + Decrement a mutable reference cell containing an integer + The reference cell. + + + Dereference a mutable reference cell + The cell to dereference. + The value contained in the cell. + + + Assign to a mutable reference cell + The cell to mutate. + The value to set inside the cell. + + + Create a mutable reference cell + The value to contain in the cell. + The created reference cell. + + + The identity function + The input value. + The same value. + + + Throw a System.InvalidOperationException exception + The exception message. + The result value. + + + Throw a System.ArgumentNullException exception + The argument name. + The result value. + + + Throw a System.ArgumentException exception with + the given argument name and message. + The argument name. + The exception message. + The result value. + + + Throw a System.Exception exception. + The exception message. + The result value. + + + Boxes a strongly typed value. + The value to box. + The boxed object. + + + Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. + The boxed value. + The unboxed result. + + + Ignore the passed value. This is often used to throw away results of a computation. + The value to ignore. + + + Minimum based on generic comparison + The first value. + The second value. + The minimum value. + + + Maximum based on generic comparison + The first value. + The second value. + The maximum value. + + + Generic comparison. + The first value. + The second value. + The result of the comparison. + + + Return the second element of a tuple, snd (a,b) = b. + The input tuple. + The second value. + + + Return the first element of a tuple, fst (a,b) = a. + The input tuple. + The first value. + + + Matches System.Exception objects whose runtime type is precisely System.Exception + The input exception. + A string option. + + + Builds a System.Exception object. + The message for the Exception. + A System.Exception. + + + Rethrows an exception. This should only be used when handling an exception + The result value. + + + Rethrows an exception. This should only be used when handling an exception + The result value. + + + Raises an exception + The exception to raise. + The result value. + + + Concatenate two strings. The operator '+' may also be used. + + + Used to specify a default value for an optional argument in the implementation of a function + An option representing the argument. + The default value of the argument. + The argument value. If it is None, the defaultValue is returned. + + + Apply a function to three values, the values being a triple on the right, the function on the left + The function. + The first argument. + The second argument. + The third argument. + The function result. + + + Apply a function to two values, the values being a pair on the right, the function on the left + The function. + The first argument. + The second argument. + The function result. + + + Apply a function to a value, the value being on the right, the function on the left + The function. + The argument. + The function result. + + + Apply a function to three values, the values being a triple on the left, the function on the right + The first argument. + The second argument. + The third argument. + The function. + The function result. + + + Apply a function to two values, the values being a pair on the left, the function on the right + The first argument. + The second argument. + The function. + The function result. + + + Apply a function to a value, the value being on the left, the function on the right + The argument. + The function. + The function result. + + + Compose two functions, the function on the right being applied first + The second function to apply. + The first function to apply. + The composition of the input functions. + + + Compose two functions, the function on the left being applied first + The first function to apply. + The second function to apply. + The composition of the input functions. + + + Structural inequality + The first parameter. + The second parameter. + The result of the comparison. + + + Structural equality + The first parameter. + The second parameter. + The result of the comparison. + + + Structural less-than-or-equal comparison + The first parameter. + The second parameter. + The result of the comparison. + + + Structural greater-than-or-equal + The first parameter. + The second parameter. + The result of the comparison. + + + Structural greater-than + The first parameter. + The second parameter. + The result of the comparison. + + + Structural less-than comparison + The first parameter. + The second parameter. + The result of the comparison. + + + Overloaded prefix-plus operator + The input value. + The result of the operation. + + + Overloaded bitwise-NOT operator + The input value. + The result of the operation. + + + Overloaded byte-shift right operator by a specified number of bits + The input value. + The amount to shift. + The result of the operation. + + + Overloaded byte-shift left operator by a specified number of bits + The input value. + The amount to shift. + The result of the operation. + + + Overloaded bitwise-XOR operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded bitwise-OR operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded bitwise-AND operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded modulo operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded division operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded multiplication operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded subtraction operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded addition operator + The first parameter. + The second parameter. + The result of the operation. + + + Overloaded unary negation. + The value to negate. + The result of the operation. + + + Converts the argument to char. Numeric inputs are converted using a checked + conversion according to the UTF-16 encoding for characters. String inputs must + be exactly one character long. For other input types the operation requires an + appropriate static conversion method on the input type. + The input value. + The converted char + + + Converts the argument to unativeint. This is a direct, checked conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted unativeint + + + Converts the argument to nativeint. This is a direct, checked conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted nativeint + + + Converts the argument to uint64. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.UInt64.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint64 + + + Converts the argument to int64. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.Int64.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int64 + + + Converts the argument to uint32. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.UInt32.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint32 + + + Converts the argument to int32. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.Int32.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int32 + + + Converts the argument to int. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.Int32.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int + + + Converts the argument to uint16. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.UInt16.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint16 + + + Converts the argument to int16. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.Int16.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int16 + + + Converts the argument to sbyte. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.SByte.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted sbyte + + + Converts the argument to byte. This is a direct, checked conversion for all + primitive numeric types. For strings, the input is converted using System.Byte.Parse() + with InvariantCulture settings. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted byte + + + Overloaded multiplication operator (checks for overflow) + The first value. + The second value. + The product of the two input values. + + + Overloaded addition operator (checks for overflow) + The first value. + The second value. + The sum of the two input values. + + + Overloaded subtraction operator (checks for overflow) + The first value. + The second value. + The first value minus the second value. + + + Overloaded unary negation (checks for overflow) + The input value. + The negated value. + + + This module contains the basic arithmetic operations with overflow checks. + + + Perform generic hashing on a value where the type of the value is not + statically required to satisfy the 'equality' constraint. + The computed hash value. + + + Perform generic equality on two values where the type of the values is not + statically required to satisfy the 'equality' constraint. + The result of the comparison. + + + Perform generic comparison on two values where the type of the values is not + statically required to have the 'comparison' constraint. + The result of the comparison. + + + Generate a default value for any type. This is null for reference types, + For structs, this is struct value where all fields have the default value. + This function is unsafe in the sense that some F# values do not have proper null values. + + + Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. + The boxed value. + The unboxed result. + + + This module contains basic operations which do not apply runtime and/or static checks + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'decimal' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float32' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'unativeint' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'nativeint' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint64' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int64' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint32' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int32' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint16' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int16' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'sbyte' + + + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'byte' + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + + Generate a range of values using the given zero, add, start, step and stop values + + + Generate a range of values using the given zero, add, start, step and stop values + + + Generate a range of char values + + + Generate a range of byte values + + + Generate a range of sbyte values + + + Generate a range of uint16 values + + + Generate a range of int16 values + + + Generate a range of unativeint values + + + Generate a range of nativeint values + + + Generate a range of uint32 values + + + Generate a range of uint64 values + + + Generate a range of int64 values + + + Generate a range of float32 values + + + Generate a range of float values + + + Generate a range of integers + + + Gets a slice from a string + The source string. + The index of the first character of the slice. + The index of the last character of the slice. + The substring from the given indices. + + + Sets a slice of an array + The target array. + The start index of the first dimension. + The end index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The start index of the third dimension. + The end index of the third dimension. + The start index of the fourth dimension. + The end index of the fourth dimension. + The source array. + + + Gets a slice of an array + The source array. + The start index of the first dimension. + The end index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The start index of the third dimension. + The end index of the third dimension. + The start index of the fourth dimension. + The end index of the fourth dimension. + The four dimensional sub array from the given indices. + + + Sets a slice of an array + The target array. + The start index of the first dimension. + The end index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The start index of the third dimension. + The end index of the third dimension. + The source array. + + + Gets a slice of an array + The source array. + The start index of the first dimension. + The end index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The start index of the third dimension. + The end index of the third dimension. + The three dimensional sub array from the given indices. + + + Sets a vector slice of a 2D array. The index of the second dimension is fixed. + The target array. + The start index of the first dimension. + The end index of the first dimension. + The index of the second dimension. + The source array. + + + Sets a vector slice of a 2D array. The index of the first dimension is fixed. + The target array. + The index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The source array. + + + Sets a region slice of an array + The target array. + The start index of the first dimension. + The end index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The source array. + + + Gets a vector slice of a 2D array. The index of the second dimension is fixed. + The source array. + The start index of the first dimension. + The end index of the first dimension. + The fixed index of the second dimension. + The sub array from the input indices. + + + Gets a vector slice of a 2D array. The index of the first dimension is fixed. + The source array. + The index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The sub array from the input indices. + + + Gets a region slice of an array + The source array. + The start index of the first dimension. + The end index of the first dimension. + The start index of the second dimension. + The end index of the second dimension. + The two dimensional sub array from the input indices. + + + Sets a slice of an array + The target array. + The start index. + The end index. + The source array. + + + Gets a slice of an array + The input array. + The start index. + The end index. + The sub array from the input indices. + + + A module of compiler intrinsic functions for efficient implementations of F# integer ranges + and dynamic invocations of other F# operators + + + Basic F# Operators. This module is automatically opened in all F# code. + + + Invoke an F# first class function value that accepts five curried arguments + without intervening execution + The first arg. + The second arg. + The third arg. + The fourth arg. + The fifth arg. + The function result. + + + Adapt an F# first class function value to be an optimized function value that can + accept five curried arguments without intervening execution. + The input function. + The optimized function. + + + Construct an optimized function value that can accept five curried + arguments without intervening execution. + The optimized function. + + + The CLI type used to represent F# function values that accept five curried arguments + without intervening execution. This type should not typically used directly from + either F# code or from other CLI languages. + + + Invoke an F# first class function value that accepts four curried arguments + without intervening execution + The first arg. + The second arg. + The third arg. + The fourth arg. + The function result. + + + Adapt an F# first class function value to be an optimized function value that can + accept four curried arguments without intervening execution. + The input function. + The optimized function. + + + Construct an optimized function value that can accept four curried + arguments without intervening execution. + The optimized function. + + + The CLI type used to represent F# function values that accept four curried arguments + without intervening execution. This type should not typically used directly from + either F# code or from other CLI languages. + + + Invoke an F# first class function value that accepts three curried arguments + without intervening execution + The first arg. + The second arg. + The third arg. + The function result. + + + Adapt an F# first class function value to be an optimized function value that can + accept three curried arguments without intervening execution. + The input function. + The adapted function. + + + Construct an optimized function value that can accept three curried + arguments without intervening execution. + The optimized function. + + + The CLI type used to represent F# function values that accept + three iterated (curried) arguments without intervening execution. This type should not + typically used directly from either F# code or from other CLI languages. + + + Invoke the optimized function value with two curried arguments + The first arg. + The second arg. + The function result. + + + Adapt an F# first class function value to be an optimized function value that can + accept two curried arguments without intervening execution. + The input function. + The adapted function. + + + Construct an optimized function value that can accept two curried + arguments without intervening execution. + The optimized function. + + + The CLI type used to represent F# function values that accept + two iterated (curried) arguments without intervening execution. This type should not + typically used directly from either F# code or from other CLI languages. + + + An implementation module used to hold some private implementations of function + value invocation. + + + Convert the option to a list of length 0 or 1. + The input option. + The result list. + + + Convert the option to an array of length 0 or 1. + The input option. + The result array. + + + bind f inp evaluates to match inp with None -> None | Some x -> f x + A function that takes the value of type T from an option and transforms it into + an option containing a value of type U. + The input option. + An option of the output type of the binder. + + + map f inp evaluates to match inp with None -> None | Some x -> Some (f x). + A function to apply to the option value. + The input option. + An option of the input value after applying the mapping function, or None if the input is None. + + + iter f inp executes match inp with None -> () | Some x -> f x. + A function to apply to the option value. + The input option. + Unit if the option is None, otherwise it returns the result of applying the predicate + to the option value. + + + forall p inp evaluates to match inp with None -> true | Some x -> p x. + A function that evaluates to a boolean when given a value from the option type. + The input option. + True if the option is None, otherwise it returns the result of applying the predicate + to the option value. + + + exists p inp evaluates to match inp with None -> false | Some x -> p x. + A function that evaluates to a boolean when given a value from the option type. + The input option. + False if the option is None, otherwise it returns the result of applying the predicate + to the option value. + + + fold f inp s evaluates to match inp with None -> s | Some x -> f x s. + A function to update the state data when given a value from an option. + The input option. + The initial state. + The original state if the option is None, otherwise it returns the updated state with the folder + and the option value. + + + fold f s inp evaluates to match inp with None -> s | Some x -> f s x. + A function to update the state data when given a value from an option. + The initial state. + The input option. + The original state if the option is None, otherwise it returns the updated state with the folder + and the option value. + + + count inp evaluates to match inp with None -> 0 | Some _ -> 1. + The input option. + A zero if the option is None, a one otherwise. + + + Gets the value associated with the option. + The input option. + The value within the option. + Thrown when the option is None. + + + Returns true if the option is None. + The input option. + True if the option is None. + + + Returns true if the option is not None. + The input option. + True if the option is not None. + + + Basic operations on options. + + + Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the + arguments and return type of the format operation. + + + Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the + arguments and return type of the format operation. + + + Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the + arguments and return type of the format operation. + + + Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the + arguments of the format operation and the last the overall return type. + + + Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the + arguments of the format operation and the last the overall return type. + + + Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the + arguments of the format operation and the last the overall return type. + + + Print to a string buffer and raise an exception with the given + result. Helper printers must return strings. + The input formatter. + The arguments of the formatter. + + + sprintf, but call the given 'final' function to generate the result. + See kprintf. + The function called to generate a result from the formatted string. + The input formatter. + The arguments of the formatter. + + + printf, but call the given 'final' function to generate the result. + For example, these let the printing force a flush after all output has + been entered onto the channel, but not before. + The function called after formatting to generate the format result. + The input formatter. + The arguments of the formatter. + + + fprintf, but call the given 'final' function to generate the result. + See kprintf. + The function called after formatting to generate the format result. + The input TextWriter. + The input formatter. + The arguments of the formatter. + + + bprintf, but call the given 'final' function to generate the result. + See kprintf. + The function called after formatting to generate the format result. + The input StringBuilder. + The input formatter. + The arguments of the formatter. + + + Print to a string via an internal string buffer and return + the result as a string. Helper printers must return strings. + The input formatter. + The formatted string. + + + Formatted printing to stdout, adding a newline. + The input formatter. + The return type and arguments of the formatter. + + + Formatted printing to stdout + The input formatter. + The return type and arguments of the formatter. + + + Formatted printing to stderr, adding a newline + The input formatter. + The return type and arguments of the formatter. + + + Formatted printing to stderr + The input formatter. + The return type and arguments of the formatter. + + + Print to a text writer, adding a newline + The TextWriter to print to. + The input formatter. + The return type and arguments of the formatter. + + + Print to a text writer. + The TextWriter to print to. + The input formatter. + The return type and arguments of the formatter. + + + Print to a System.Text.StringBuilder + The StringBuilder to print to. + The input formatter. + The return type and arguments of the formatter. + + + Extensible printf-style formatting for numbers and other datatypes + + Format specifications are strings with "%" markers indicating format + placeholders. Format placeholders consist of: + + %[flags][width][.precision][type] + + where the type is interpreted as follows: + + %b: bool, formatted as "true" or "false" + %s: string, formatted as its unescaped contents + %c: character literal + %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. + %u: any basic integer type formatted as an unsigned decimal integer + %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal + (a-f)/Hexadecimal (A-F)/Octal integer + + %e, %E, %f, %F, %g, %G: + any basic floating point type (float,float32) formatted + using a C-style floating point format specifications, i.e + + %e, %E: Signed value having the form [-]d.dddde[sign]ddd where + d is a single decimal digit, dddd is one or more decimal + digits, ddd is exactly three decimal digits, and sign + is + or - + + %f: Signed value having the form [-]dddd.dddd, where dddd is one + or more decimal digits. The number of digits before the + decimal point depends on the magnitude of the number, and + the number of digits after the decimal point depends on + the requested precision. + + %g, %G: Signed value printed in f or e format, whichever is + more compact for the given value and precision. + + + %M: System.Decimal value + + %O: Any value, printed by boxing the object and using it's ToString method(s) + + %A: Any value, printed with the default layout settings + + %a: A general format specifier, requires two arguments: + (1) a function which accepts two arguments: + (a) a context parameter of the appropriate type for the + given formatting function (e.g. an #System.IO.TextWriter) + (b) a value to print + and which either outputs or returns appropriate text. + + (2) the particular value to print + + + %t: A general format specifier, requires one argument: + (1) a function which accepts a context parameter of the + appropriate type for the given formatting function (e.g. + an System.IO.TextWriter)and which either outputs or returns + appropriate text. + + Basic integer types are: + byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint + Basic floating point types are: + float, float32 + + The optional width is an integer indicating the minimal width of the + result. For instance, %6d prints an integer, prefixing it with spaces + to fill at least 6 characters. If width is '*', then an extra integer + argument is taken to specify the corresponding width. + + any number + '*': + + Valid flags are: + + 0: add zeros instead of spaces to make up the required width + '-': left justify the result within the width specified + '+': add a '+' character if the number is positive (to match a '-' sign + for negatives) + ' ': add an extra space if the number is positive (to match a '-' + sign for negatives) + + The printf '#' flag is invalid and a compile-time error will be reported if it is used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the length of the string. + The input string. + The number of characters in the string. + + + Returns a string by concatenating count instances of str. + The number of copies of the input string will be copied. + The input string. + The concatenated string. + Thrown when count is negative. + + + Tests if any character of the string satisfies the given predicate. + The function to test each character of the string. + The input string. + True if any character returns true for the predicate and false otherwise. + + + Tests if all characters in the string satisfy the given predicate. + The function to test each character of the string. + The input string. + True if all characters return true for the predicate and false otherwise. + + + Builds a new string whose characters are the results of applying the function mapping + to each index from 0 to count-1 and concatenating the resulting + strings. + The number of strings to initialize. + The function to take an index and produce a string to + be concatenated with the others. + The constructed string. + Thrown when count is negative. + + + Builds a new string whose characters are the results of applying the function mapping + to each of the characters of the input string and concatenating the resulting + strings. + The function to produce a string from each character of the input string. + The input string. + The concatenated string. + + + Builds a new string whose characters are the results of applying the function mapping + to each character and index of the input string. + The function to apply to each character and index of the string. + The input string. + The resulting string. + + + Builds a new string whose characters are the results of applying the function mapping + to each of the characters of the input string. + The function to apply to the characters of the string. + The input string. + The resulting string. + + + Applies the function action to the index of each character in the string and the + character itself. + The function to apply to each character and index of the string. + The input string. + + + Applies the function action to each character in the string. + The function to be applied to each character of the string. + The input string. + + + Returns a new string made by concatenating the given strings + with separator sep, that is a1 + sep + ... + sep + aN. + The separator string to be inserted between the strings + of the input sequence. + The sequence of strings to be concatenated. + A new string consisting of the concatenated strings separated by + the separation string. + Thrown when strings is null. + + + Functional programming operators for string processing. Further string operations + are available via the member functions on strings and other functionality in + System.String + and System.Text.RegularExpressions types. + + + + The SI unit of catalytic activity + + + + + The SI unit of does equivalent + + + + + The SI unit of absorbed dose + + + + + The SI unit of activity referred to a radionuclide + + + + + The SI unit of illuminance + + + + + The SI unit of luminous flux + + + + + The SI unit of inductance + + + + + The SI unit of magnetic flux density + + + + + The SI unit of magnetic flux + + + + + The SI unit of electric conductance + + + + + The SI unit of electric resistance + + + + + The SI unit of capacitance + + + + + The SI unit of electric potential difference, electromotive force + + + + + The SI unit of electric charge, amount of electricity + + + + + The SI unit of power, radiant flux + + + + + The SI unit of energy, work, amount of heat + + + + + The SI unit of pressure, stress + + + + + The SI unit of force + + + + + The SI unit of frequency + + + + + The SI unit of luminous intensity + + + + + The SI unit of amount of substance + + + + + The SI unit of thermodynamic temperature + + + + + The SI unit of electric current + + + + + The SI unit of time + + + + + The SI unit of mass + + + + + The SI unit of length + + + + + The SI unit of length + + + + + A synonym for henry, the SI unit of inductance + + + + + A synonym for katal, the SI unit of catalytic activity + + + + + A synonym for sievert, the SI unit of does equivalent + + + + + A synonym for gray, the SI unit of absorbed dose + + + + + A synonym for becquerel, the SI unit of activity referred to a radionuclide + + + + + A synonym for lux, the SI unit of illuminance + + + + + A synonym for lumen, the SI unit of luminous flux + + + + + A synonym for tesla, the SI unit of magnetic flux density + + + + + A synonym for weber, the SI unit of magnetic flux + + + + + A synonym for UnitNames.ohm, the SI unit of electric resistance. + + + + + A synonym for siemens, the SI unit of electric conductance + + + + + A synonym for farad, the SI unit of capacitance + + + + + A synonym for volt, the SI unit of electric potential difference, electromotive force + + + + + A synonym for coulomb, the SI unit of electric charge, amount of electricity + + + + + A synonym for watt, the SI unit of power, radiant flux + + + + + A synonym for joule, the SI unit of energy, work, amount of heat + + + + + A synonym for pascal, the SI unit of pressure, stress + + + + + A synonym for newton, the SI unit of force + + + + + A synonym for hertz, the SI unit of frequency + + + + + A synonym for candela, the SI unit of luminous intensity + + + + + A synonym for mole, the SI unit of amount of substance + + + + + A synonym for kelvin, the SI unit of thermodynamic temperature + + + + + A synonym for ampere, the SI unit of electric current + + + + + A synonym for second, the SI unit of time + + + + + A synonym for kilogram, the SI unit of mass + + + + + A synonym for Metre, the SI unit of length + + + + + A method used to support the F# query syntax. Returns an empty sequence that has the specified type argument. + + + + + A method used to support the F# query syntax. Returns a sequence that contains the specified values. + + + + + A method used to support the F# query syntax. Returns a sequence of length one that contains the specified value. + + + + A query operator that selects those elements based on a specified predicate. + + + + A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given nullable sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + + A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given nullable sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + + A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + + A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + + A query operator that selects elements from a sequence as long as a specified condition is true, and then skips the remaining elements. + + + + A query operator that selects a specified number of contiguous elements from those selected so far. + + + + A query operator that selects a nullable value for each element selected so far and returns the sum of these values. + If any nullable does not have a value, it is ignored. + + + + A query operator that selects a value for each element selected so far and returns the sum of these values. + + + + + A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. + + + + + A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. + + + + A query operator that sorts the elements selected so far in descending order by the given nullable sorting key. + + + + A query operator that sorts the elements selected so far in ascending order by the given nullable sorting key. + + + + A query operator that sorts the elements selected so far in descending order by the given sorting key. + + + + A query operator that sorts the elements selected so far in ascending order by the given sorting key. + + + + A query operator that bypasses elements in a sequence as long as a specified condition is true and then selects the remaining elements. + + + + A query operator that bypasses a specified number of the elements selected so far and selects the remaining elements. + + + + A query operator that projects each of the elements selected so far. + + + + + + + + + + + + + + A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IQueryable rules. + + + + + A method used to support the F# query syntax. Indicates that the query should be passed as a quotation to the Run method. + + + + A query operator that selects the element at a specified index amongst those selected so far. + + + + A query operator that selects a nullable value for each element selected so far and returns the minimum of these values. + If any nullable does not have a value, it is ignored. + + + + A query operator that selects a value for each element selected so far and returns the minimum resulting value. + + + + A query operator that selects a nullable value for each element selected so far and returns the maximum of these values. + If any nullable does not have a value, it is ignored. + + + + A query operator that selects a value for each element selected so far and returns the maximum resulting value. + + + + A query operator that correlates two sets of selected values based on matching keys and groups the results. + If any group is empty, a group with a single default value is used instead. + Normal usage is 'leftOuterJoin y in elements2 on (key1 = key2) into group'. + + + + A query operator that selects the last element of those selected so far, or a default value if no element is found. + + + + A query operator that selects the last element of those selected so far. + + + + A query operator that correlates two sets of selected values based on matching keys. + Normal usage is 'join y in elements2 on (key1 = key2)'. + + + + A query operator that selects the first element of those selected so far, or a default value if the sequence contains no elements. + + + + A query operator that selects the first element from those selected so far. + + + + A query operator that selects a value for each element selected so far and groups the elements by the given key. + + + + A query operator that correlates two sets of selected values based on matching keys and groups the results. + Normal usage is 'groupJoin y in elements2 on (key1 = key2) into group'. + + + + A query operator that groups the elements selected so far according to a specified key selector. + + + + + A method used to support the F# query syntax. Projects each element of a sequence to another sequence and combines the resulting sequences into one sequence. + + + + A query operator that selects the first element selected so far that satisfies a specified condition. + + + + A query operator that determines whether any element selected so far satisfies a condition. + + + + A query operator that selects the single, specific element of those selected so far, or a default value if that element is not found. + + + + A query operator that selects the single, specific element selected so far + + + + A query operator that selects distinct elements from the elements selected so far. + + + + A query operator that returns the number of selected elements. + + + + A query operator that determines whether the selected elements contains a specified element. + + + + A query operator that selects a nullable value for each element selected so far and returns the average of these values. + If any nullable does not have a value, it is ignored. + + + + A query operator that selects a value for each element selected so far and returns the average of these values. + + + + A query operator that determines whether all elements selected so far satisfies a condition. + + + + Create an instance of this builder. Use 'query { ... }' to use the query syntax. + + + + The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. + + + + + A property used to support the F# query syntax. + + + + + A method used to support the F# query syntax. + + + + + A partial input or result in an F# query. This type is used to support the F# query syntax. + + + + Converts the argument to character. Numeric inputs are converted according to the UTF-16 + encoding for characters. The operation requires an appropriate static conversion method on the input type. + The input value. + The converted char. + + + Converts the argument to System.Decimal using a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted decimal. + + + Converts the argument to unsigned native integer using a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted unativeint + + + Converts the argument to signed native integer. This is a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + The input value. + The converted nativeint + + + Converts the argument to 64-bit float. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted float + + + Converts the argument to 32-bit float. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted float32 + + + Converts the argument to unsigned 64-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint64 + + + Converts the argument to signed 64-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int64 + + + Converts the argument to unsigned 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint32 + + + Converts the argument to signed 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int32 + + + Converts the argument to a particular enum type. + The input value. + The converted enum type. + + + Converts the argument to signed 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int + + + Converts the argument to unsigned 16-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted uint16 + + + Converts the argument to signed 16-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted int16 + + + Converts the argument to signed byte. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted sbyte + + + Converts the argument to byte. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + The input value. + The converted byte + + + + Functions for converting nullable values + + + + + The division operator where a nullable value appears on both left and right sides + + + + + The division operator where a nullable value appears on the right + + + + + The division operator where a nullable value appears on the left + + + + + The modulus operator where a nullable value appears on both left and right sides + + + + + The modulus operator where a nullable value appears on the right + + + + + The modulus operator where a nullable value appears on the left + + + + + The multiplication operator where a nullable value appears on both left and right sides + + + + + The multiplication operator where a nullable value appears on the right + + + + + The multiplication operator where a nullable value appears on the left + + + + + The subtraction operator where a nullable value appears on both left and right sides + + + + + The subtraction operator where a nullable value appears on the right + + + + + The subtraction operator where a nullable value appears on the left + + + + + The addition operator where a nullable value appears on both left and right sides + + + + + The addition operator where a nullable value appears on the right + + + + + The addition operator where a nullable value appears on the left + + + + + The '<>' operator where a nullable value appears on both left and right sides + + + + + The '=' operator where a nullable value appears on both left and right sides + + + + + The '<' operator where a nullable value appears on both left and right sides + + + + + The '<=' operator where a nullable value appears on both left and right sides + + + + + The '>' operator where a nullable value appears on both left and right sides + + + + + The '>=' operator where a nullable value appears on both left and right sides + + + + + The '<>' operator where a nullable value appears on the right + + + + + The '=' operator where a nullable value appears on the right + + + + + The '<' operator where a nullable value appears on the right + + + + + The '<=' operator where a nullable value appears on the right + + + + + The '>' operator where a nullable value appears on the right + + + + + The '>=' operator where a nullable value appears on the right + + + + + The '<>' operator where a nullable value appears on the left + + + + + The '=' operator where a nullable value appears on the left + + + + + The '<' operator where a nullable value appears on the left + + + + + The '<=' operator where a nullable value appears on the left + + + + + The '>' operator where a nullable value appears on the left + + + + + The '>=' operator where a nullable value appears on the left + + + + + Operators for working with nullable values + + + + + A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IEnumerable rules. + + + + + + + + A method used to support the F# query syntax. Runs the given quotation as a query using LINQ rules. + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This type shouldn't be used directly from user code. + + + + + + + + + + + + + + + + + + + + + + + A type used to reconstruct a grouping after applying a mutable->immutable mapping transformation + on a result of a query. + + + + + + + + + + + + + + + + + + + + The generic MethodInfo for Select function + Describes how we got from productions of immutable objects to productions of anonymous objects, with enough information + that we can invert the process in final query results. + + + + + + + + Given the expression part of a "yield" or "select" which produces a result in terms of immutable tuples or immutable records, + generate an equivalent expression yielding anonymous objects. Also return the conversion for the immutable-to-mutable correspondence + so we can reverse this later. + + + + + Simplify gets of tuples and gets of record fields. + + + + + Cleanup the use of property-set object constructions in leaf expressions that form parts of F# queries. + + + + + + + + Given an type involving immutable tuples and records, logically corresponding to the type produced at a + "yield" or "select", convert it to a type involving anonymous objects according to the conversion data. + + + + + + + + + + + + + + + + + + + + Recognize anonymous type construction written using 'new AnonymousObject(<e1>, <e2>, ...)' + + + + + + + + + + + + + + + + + Recognize object construction written using 'new O(Prop1 = <e>, Prop2 = <e>, ...)' + + + + + Tests whether a list consists only of assignments of properties of the + given variable, null values (ignored) and ends by returning the given variable + (pattern returns only property assignments) + + + + + Recognize sequential series written as (... ((<e>; <e>); <e>); ...) + + + + + + + + + + + + + + + + + + + + + + + A runtime helper used to evaluate nested quotation literals. + + + + + Evaluates a subset of F# quotations by first converting to a LINQ expression, for the subset of LINQ expressions represented by the + expression syntax in the C# language. + + + + + Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the + expression syntax in the C# language. + + + + + Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the + expression syntax in the C# language. + + + + + When used in a quotation, this function indicates a specific conversion + should be performed when converting the quotation to a LINQ expression. + + This function should not be called directly. + + + + + When used in a quotation, this function indicates a specific conversion + should be performed when converting the quotation to a LINQ expression. + + This function should not be called directly. + + + + + When used in a quotation, this function indicates a specific conversion + should be performed when converting the quotation to a LINQ expression. + + This function should not be called directly. + + + + + + + Allocates a region of memory on the stack. + The number of objects of type T to allocate. + A typed pointer to the allocated memory. + + + Assigns the value into the memory location referenced by the typed native + pointer computed by adding index * sizeof<'T> to the given input pointer. + The input pointer. + The index by which to offset the pointer. + The value to assign. + + + Assigns the value into the memory location referenced by the given typed native pointer. + The input pointer. + The value to assign. + + + Dereferences the given typed native pointer. + The input pointer. + The value at the pointer address. + + + Dereferences the typed native pointer computed by adding index * sizeof<'T> to the + given input pointer. + The input pointer. + The index by which to offset the pointer. + The value at the pointer address. + + + Returns a typed native pointer by adding index * sizeof<'T> to the + given input pointer. + The input pointer. + The index by which to offset the pointer. + A typed pointer. + + + Returns a machine address for a given typed native pointer. + The input pointer. + The machine address. + + + Returns a typed native pointer for a given machine address. + The pointer address. + A typed pointer. + + + Contains operations on native pointers. Use of these operators may + result in the generation of unverifiable code. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the raw expression associated with this type-carrying expression + + + Type-carrying quoted expressions. Expressions are generated either + by quotations in source text or programatically + + + Returns type of an expression. + + + Returns the custom attributes of an expression. + + + Builds an expression that represents a while loop + The predicate to control the loop iteration. + The body of the while loop. + The resulting expression. + + + Builds an expression that represents setting a mutable variable + The input variable. + The value to set. + The resulting expression. + + + Builds an expression that represents a variable + The input variable. + The resulting expression. + + + Builds an expression that represents a constant value + The typed value. + The resulting expression. + + + Builds an expression that represents a constant value of a particular type + The untyped object. + The type of the object. + The resulting expression. + + + Builds an expression that represents a test of a value is of a particular union case + The expression to test. + The description of the union case. + The resulting expression. + + + Builds an expression that represents a type test. + The expression to test. + The target type. + The resulting expression. + + + Builds an expression that represents getting a field of a tuple + The input tuple. + The index of the tuple element to get. + The resulting expression. + + + Builds an expression that represents a try/with construct for exception filtering and catching. + The body of the try expression. + + + The variable to bind to a caught exception. + The expression evaluated when an exception is caught. + The resulting expression. + + + Try and find a stored reflection definition for the given method. Stored reflection + definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. + The description of the method to find. + The reflection definition or None if a match could not be found. + + + Builds an expression that represents a try/finally construct + The body of the try expression. + The final part of the expression to be evaluated. + The resulting expression. + + + Format the expression as a string + Indicates if method, property, constructor and type objects should be printed in detail. If false, these are abbreviated to their name. + The formatted string. + + + Substitutes through the given expression using the given functions + to map variables to new values. The functions must give consistent results + at each application. Variable renaming may occur on the target expression + if variable capture occurs. + The function to map variables into expressions. + The expression with the given substitutions. + + + Builds an expression that represents the sequential execution of one expression followed by another + The first expression. + The second expression. + The resulting expression. + + + Permits interactive environments such as F# Interactive + to explicitly register new pickled resources that represent persisted + top level definitions. The string indicates a unique name for the resources + being added. The format for the bytes is the encoding generated by the F# compiler. + The assembly associated with the resource. + The unique name for the resources being added. + The serialized resource to register with the environment. + + + Builds an expression that represents a nested quotation literal + The expression being quoted. + The resulting expression. + + + Builds an expression that represents writing to a static property + The description of the property. + The value to set. + List of indices for the property if it is an indexed property. + The resulting expression. + + + Builds an expression that represents writing to a property of an object + The input object. + The description of the property. + The value to set. + List of indices for the property if it is an indexed property. + The resulting expression. + + + Builds an expression that represents reading a static property + The description of the property. + List of indices for the property if it is an indexed property. + The resulting expression. + + + Builds an expression that represents reading a property of an object + The input object. + The description of the property. + List of indices for the property if it is an indexed property. + The resulting expression. + + + Builds an expression that represents the creation of a union case value + The description of the union case. + The list of arguments for the case. + The resulting expression. + + + Builds an expression that represents the creation of an F# tuple value + The list of elements of the tuple. + The resulting expression. + + + Builds record-construction expressions + The type of record. + The list of elements of the record. + The resulting expression. + + + Builds an expression that represents the invocation of an object constructor + The description of the constructor. + The list of arguments to the constructor. + The resulting expression. + + + Builds an expression that represents the creation of a delegate value for the given type + The type of delegate. + The parameters for the delegate. + The body of the function. + The resulting expression. + + + Builds an expression that represents the creation of an array value initialized with the given elements + The type for the elements of the array. + The list of elements of the array. + The resulting expression. + + + Builds recursives expressions associated with 'let rec' constructs + The list of bindings for the let expression. + The sub-expression where the bindings are in scope. + The resulting expression. + + + Builds expressions associated with 'let' constructs + The variable in the let expression. + The expression bound to the variable. + The sub-expression where the binding is in scope. + The resulting expression. + + + Builds an expression that represents the constrution of an F# function value + The parameter to the function. + The body of the function. + The resulting expression. + + + Builds 'if ... then ... else' expressions. + The condition expression. + The then sub-expression. + The else sub-expression. + The resulting expression. + + + Fetches or creates a new variable with the given name and type from a global pool of shared variables + indexed by name and type. The type is given by the expicit or inferred type parameter + The variable name. + The created of fetched typed global variable. + + + Gets the free expression variables of an expression as a list. + A sequence of the free variables in the expression. + + + Builds a 'for i = ... to ... do ...' expression that represent loops over integer ranges + The sub-expression declaring the loop variable. + The sub-expression setting the initial value of the loop variable. + The sub-expression declaring the final value of the loop variable. + The sub-expression representing the body of the loop. + The resulting expression. + + + Builds an expression that represents writing to a field of an object + The input object. + The description of the field to write to. + The value to set to the field. + The resulting expression. + + + Builds an expression that represents writing to a static field + The description of the field to write to. + The value to the set to the field. + The resulting expression. + + + Builds an expression that represents the access of a field of an object + The input object. + The description of the field to access. + The resulting expression. + + + Builds an expression that represents the access of a static field + The description of the field to access. + The resulting expression. + + + + + + This function is called automatically when quotation syntax (<@ @>) and related typed-expression + quotations are used. The bytes are a pickled binary representation of an unlinked form of the quoted expression, + and the System.Type argument is any type in the assembly where the quoted + expression occurs, i.e. it helps scope the interpretation of the cross-assembly + references in the bytes. + A type in the assembly where the quotation occurs. + The list of spliced types. + The list of spliced expressions. + The serialized form of the quoted expression. + The resulting expression. + + + Builds an expression that represents the invocation of a default object constructor + The type on which the constructor is invoked. + The resulting expression. + + + Builds an expression that represents the coercion of an expression to a type + The expression to coerce. + The target type. + The resulting expression. + + + Returns a new typed expression given an underlying runtime-typed expression. + A type annotation is usually required to use this function, and + using an incorrect type annotation may result in a later runtime exception. + The expression to cast. + The resulting typed expression. + + + Builds an expression that represents a call to an instance method associated with an object + The input object. + The description of the method to call. + The list of arguments to the method. + The resulting expression. + + + Builds an expression that represents a call to an static method or module-bound function + The MethodInfo describing the method to call. + The list of arguments to the method. + The resulting expression. + + + Builds an expression that represents the application of a first class function value to multiple arguments + The function to apply. + The list of lists of arguments to the function. + The resulting expression. + + + Builds an expression that represents the application of a first class function value to a single argument. + The function to apply. + The argument to the function. + The resulting expression. + + + Builds an expression that represents setting the value held at a particular address. + The target expression. + The value to set at the address. + The resulting expression. + + + Builds an expression that represents getting the address of a value. + The target expression. + The resulting expression. + + + Quoted expressions annotated with System.Type values. + + + The type associated with the variable + + + The declared name of the variable + + + Indicates if the variable represents a mutable storage location + + + Fetches or create a new variable with the given name and type from a global pool of shared variables + indexed by name and type + The name of the variable. + The type associated with the variable. + The retrieved or created variable. + + + Creates a new variable with the given name, type and mutability + The declared name of the variable. + The type associated with the variable. + Indicates if the variable represents a mutable storage location. Default is false. + The created variable. + + + Information at the binding site of a variable + + + Re-build combination expressions. The first parameter should be an object + returned by the ShapeCombination case of the active pattern in this module. + The input shape. + The list of arguments. + The rebuilt expression. + + + An active pattern that performs a complete decomposition viewing the expression tree as a binding structure + The input expression. + The decomposed Var, Lambda, or ConstApp. + + + Active patterns for traversing, visiting, rebuilding and tranforming expressions in a generic way + + + An active pattern to recognize property setters that have an associated ReflectedDefinition + The description of the property. + The expression of the method definition if found, or None. + + + An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition + The description of the property. + The expression of the method definition if found, or None. + + + An active pattern to recognize methods that have an associated ReflectedDefinition + The description of the method. + The expression of the method definition if found, or None. + + + A parameterized active pattern to recognize calls to a specified function or method. + The returned elements are the optional target object (present if the target is an + instance method), the generic type instantation (non-empty if the target is a generic + instantiation), and the arguments to the function or method. + The input template expression to specify the method to call. + The optional target object (present if the target is an + instance method), the generic type instantation (non-empty if the target is a generic + instantiation), and the arguments to the function or method. + + + An active pattern to recognize constant unsigned int64 expressions + The input expression to match against. + uint64 option + + + An active pattern to recognize constant int64 expressions + The input expression to match against. + int64 option + + + An active pattern to recognize constant unsigned int32 expressions + The input expression to match against. + uint32 option + + + An active pattern to recognize constant int32 expressions + The input expression to match against. + int32 option + + + An active pattern to recognize constant unsigned int16 expressions + The input expression to match against. + uint16 option + + + An active pattern to recognize constant int16 expressions + The input expression to match against. + int16 option + + + An active pattern to recognize constant byte expressions + The input expression to match against. + byte option + + + An active pattern to recognize constant signed byte expressions + The input expression to match against. + sbyte option + + + An active pattern to recognize constant unicode character expressions + The input expression to match against. + char option + + + An active pattern to recognize constant 64-bit floating point number expressions + The input expression to match against. + float option + + + An active pattern to recognize constant 32-bit floating point number expressions + The input expression to match against. + float32 option + + + An active pattern to recognize constant string expressions + The input expression to match against. + string option + + + An active pattern to recognize constant boolean expressions + The input expression to match against. + bool option + + + An active pattern to recognize () constant expressions + The input expression to match against. + unit option + + + An active pattern to recognize expressions of the form a || b + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions of the form a && b + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value + The input expression to match against. + (Expr * Expr list list) option + + + An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value + The input expression to match against. + (Var list list * Expr) option + + + Contains a set of derived F# active patterns to analyze F# expression objects + + + An active pattern to recognize expressions that represent setting a mutable variable + The input expression to match against. + (Var * Expr) option + + + An active pattern to recognize expressions that represent a variable + The input expression to match against. + Var option + + + An active pattern to recognize expressions that represent a constant value + The input expression to match against. + (obj * Type) option + + + An active pattern to recognize expressions that represent a test if a value is of a particular union case + The input expression to match against. + (Expr * UnionCaseInfo) option + + + An active pattern to recognize expressions that represent a dynamic type test + The input expression to match against. + (Expr * Type) option + + + An active pattern to recognize expressions that represent getting a tuple field + The input expression to match against. + (Expr * int) option + + + An active pattern to recognize expressions that represent a try/finally construct + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching + The input expression to match against. + (Expr * Var * Expr * Var * Expr) option + + + An active pattern to recognize expressions that represent sequential exeuction of one expression followed by another + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions that represent a nested quotation literal + The input expression to match against. + Expr option + + + An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module + The input expression to match against. + (Expr option * PropertyInfo * Expr list * Expr) option + + + An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module + The input expression to match against. + (Expr option * PropertyInfo * Expr list) option + + + An active pattern to recognize expressions that represent construction of tuple values + The input expression to match against. + (Expr list) option + + + An active pattern to recognize expressions that represent construction of particular union case values + The input expression to match against. + (UnionCaseInfo * Expr list) option + + + An active pattern to recognize expressions that represent construction of record values + The input expression to match against. + (Type * Expr list) option + + + An active pattern to recognize expressions that represent invocation of object constructors + The input expression to match against. + (ConstructorInfo * Expr list) option + + + An active pattern to recognize expressions that represent construction of delegate values + The input expression to match against. + (Type * Var list * Expr) option + + + An active pattern to recognize expressions that represent invocations of a default constructor of a struct + The input expression to match against. + Type option + + + An active pattern to recognize expressions that represent the construction of arrays + The input expression to match against. + (Type * Expr list) option + + + An active pattern to recognize expressions that represent recursive let bindings of one or more variables + The input expression to match against. + ((Var * Expr) list * Expr) option + + + An active pattern to recognize expressions that represent let bindings + The input expression to match against. + (Var * Expr * Expr) option + + + An active pattern to recognize expressions that represent first class function values + The input expression to match against. + (Var * Expr) option + + + An active pattern to recognize expressions that represent conditionals + The input expression to match against. + (Expr * Expr * Expr) option + + + An active pattern to recognize expressions that represent while loops + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions that represent loops over integer ranges + The input expression to match against. + (Var * Expr * Expr * Expr) option + + + An active pattern to recognize expressions that represent setting a static or instance field + The input expression to match against. + (Expr option * FieldInfo * Expr) option + + + An active pattern to recognize expressions that represent getting a static or instance field + The input expression to match against. + (Expr option * FieldInfo) option + + + An active pattern to recognize expressions that represent coercions from one type to another + The input expression to match against. + (Expr * Type) option + + + An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules + The input expression to match against. + (Expr option * MethodInfo * Expr list) option + + + An active pattern to recognize expressions that represent applications of first class function values + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions that represent setting the value held at an address + The input expression to match against. + (Expr * Expr) option + + + An active pattern to recognize expressions that represent getting the address of a value + The input expression to match against. + Expr option + + + Contains a set of primitive F# active patterns to analyze F# expression objects + + + Returns a System.Type representing an F# tuple type with the given element types + An array of types for the tuple elements. + The type representing the tuple containing the input elements. + + + Returns a System.Type representing the F# function type with the given domain and range + The input type of the function. + The output type of the function. + The function type with the given domain and range. + + + Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type + The type to check. + Optional binding flags. + True if the type check succeeds. + + + Return true if the typ is a representation of an F# tuple type + The type to check. + True if the type check succeeds. + + + Return true if the typ is a representation of an F# record type + The type to check. + Optional binding flags. + True if the type check succeeds. + + + Return true if the typ is a System.Type value corresponding to the compiled form of an F# module + The type to check. + True if the type check succeeds. + + + Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type + The type to check. + True if the type check succeeds. + + + Returns true if the typ is a representation of an F# exception declaration + The type to check. + Optional binding flags. + True if the type check is an F# exception. + + + Gets the cases of a union type. + + Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. + The input union type. + Optional binding flags. + Thrown when the input type is not a union type. + An array of descriptions of the cases of the given union type. + + + Gets the tuple elements from the representation of an F# tuple type. + The input tuple type. + An array of the types contained in the given tuple type. + + + Reads all the fields from a record value, in declaration order + + Assumes the given input is a record value. If not, ArgumentException is raised. + The input record type. + Optional binding flags. + An array of descriptions of the properties of the record type. + + + Gets the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type + The input function type. + A tuple of the domain and range types of the input function. + + + Reads all the fields from an F# exception declaration, in declaration order + + Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. + The exception type to read. + Optional binding flags. + Thrown if the given type is not an exception. + An array containing the PropertyInfo of each field in the exception. + + + Contains operations associated with constructing and analyzing F# types such as records, unions and tuples + + + Assumes the given type is a union type. + If not, ArgumentException is raised during pre-computation. + + Using the computed function is more efficient than calling GetUnionCase + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. + The type of union to optimize reading. + Optional binding flags. + An optimized function to read the tags of the given union type. + + + Precompute a property or static method for reading an integer representing the case tag of a union type. + The type of union to read. + Optional binding flags. + The description of the union case reader. + + + Precomputes a function for reading all the fields for a particular discriminator case of a union type + + Using the computed function will typically be faster than executing a corresponding call to GetFields + The description of the union case to read. + Optional binding flags. + A function to for reading the fields of the given union case. + + + A method that constructs objects of the given case + The description of the union case. + Optional binding flags. + The description of the constructor of the given union case. + + + Precomputes a function for constructing a discriminated union value for a particular union case. + The description of the union case. + Optional binding flags. + A function for constructing values of the given union case. + + + Precomputes a function for reading the values of a particular tuple type + + Assumes the given type is a TupleType. + If not, ArgumentException is raised during pre-computation. + The tuple type to read. + Thrown when the given type is not a tuple type. + A function to read values of the given tuple type. + + + Gets information that indicates how to read a field of a tuple + The input tuple type. + The index of the tuple element to describe. + The description of the tuple element and an optional type and index if the tuple is big. + + + Gets a method that constructs objects of the given tuple type. + For small tuples, no additional type will be returned. + + For large tuples, an additional type is returned indicating that + a nested encoding has been used for the tuple type. In this case + the suffix portion of the tuple type has the given type and an + object of this type must be created and passed as the last argument + to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo + can be used to determine the constructor for that the suffix type. + The input tuple type. + The description of the tuple type constructor and an optional extra type + for large tuples. + + + Precomputes a function for reading the values of a particular tuple type + + Assumes the given type is a TupleType. + If not, ArgumentException is raised during pre-computation. + The type of tuple to read. + Thrown when the given type is not a tuple type. + A function to read a particular tuple type. + + + Precompute a function for reading all the fields from a record. The fields are returned in the + same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for + this type. + + Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. + + Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. + The type of record to read. + Optional binding flags. + Thrown when the input type is not a record type. + An optimized reader for the given record type. + + + Precompute a function for reading a particular field from a record. + Assumes the given type is a RecordType with a field of the given name. + If not, ArgumentException is raised during pre-computation. + + Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. + The PropertyInfo of the field to read. + Thrown when the input type is not a record type. + A function to read the specified field from the record. + + + Get a ConstructorInfo for a record type + The record type. + Optional binding flags. + A ConstructorInfo for the given record type. + + + Precompute a function for constructing a record value. + + Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. + The type of record to construct. + Optional binding flags. + Thrown when the input type is not a record type. + A function to construct records of the given type. + + + Create a union case value. + The description of the union case to create. + The array of arguments to construct the given case. + Optional binding flags. + The constructed union case. + + + Creates an instance of a tuple type + + Assumes at least one element is given. If not, ArgumentException is raised. + The array of tuple fields. + The tuple type to create. + Thrown if no elements are given. + An instance of the tuple type with the given elements. + + + Creates an instance of a record type. + + Assumes the given input is a record type. + The type of record to make. + The array of values to initialize the record. + Optional binding flags for the record. + Thrown when the input type is not a record type. + The created record. + + + Builds a typed function from object from a dynamic function implementation + The function type of the implementation. + The untyped lambda of the function implementation. + A typed function from the given dynamic implementation. + + + Identify the union case and its fields for an object + + Assumes the given input is a union case value. If not, ArgumentException is raised. + + If the type is not given, then the runtime type of the input object is used to identify the + relevant union type. The type should always be given if the input object may be null. For example, + option values may be represented using the 'null'. + The input union case. + The union type containing the value. + Optional binding flags. + Thrown when the input type is not a union case value. + The description of the union case and its fields. + + + Reads all fields from a tuple. + + Assumes the given input is a tuple value. If not, ArgumentException is raised. + The input tuple. + Thrown when the input is not a tuple value. + An array of the fields from the given tuple. + + + Reads a field from a tuple value. + + Assumes the given input is a tuple value. If not, ArgumentException is raised. + The input tuple. + The index of the field to read. + The value of the field. + + + Reads all the fields from a record value. + + Assumes the given input is a record value. If not, ArgumentException is raised. + The record object. + Optional binding flags for the record. + Thrown when the input type is not a record type. + The array of fields from the record. + + + Reads a field from a record value. + + Assumes the given input is a record value. If not, ArgumentException is raised. + The record object. + The PropertyInfo describing the field to read. + Thrown when the input type is not a record type. + The field from the record. + + + Reads all the fields from a value built using an instance of an F# exception declaration + + Assumes the given input is an F# exception value. If not, ArgumentException is raised. + The exception instance. + Optional binding flags. + Thrown when the input type is not an F# exception. + The fields from the given exception. + + + Contains operations associated with constructing and analyzing values associated with F# types + such as records, unions and tuples. + + + The integer tag for the case. + + + The name of the case. + + + The type in which the case occurs. + + + The fields associated with the case, represented by a PropertyInfo. + The fields associated with the case. + + + Returns the custom attributes data associated with the case. + An list of custom attribute data items. + + + Returns the custom attributes associated with the case matching the given attribute type. + The type of attributes to return. + An array of custom attributes. + + + Returns the custom attributes associated with the case. + An array of custom attributes. + + + Represents a case of a discriminated union type + + + Returns true if the typ is a representation of an F# exception declaration + The type to check. + Optional flag that denotes accessibility of the private representation. + True if the type check is an F# exception. + + + Reads all the fields from an F# exception declaration, in declaration order + + Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. + The exception type to read. + Optional flag that denotes accessibility of the private representation. + Thrown if the given type is not an exception. + An array containing the PropertyInfo of each field in the exception. + + + Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type + The type to check. + Optional flag that denotes accessibility of the private representation. + True if the type check succeeds. + + + Return true if the typ is a representation of an F# record type + The type to check. + Optional flag that denotes accessibility of the private representation. + True if the type check succeeds. + + + Gets the cases of a union type. + + Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. + The input union type. + Optional flag that denotes accessibility of the private representation. + Thrown when the input type is not a union type. + An array of descriptions of the cases of the given union type. + + + Reads all the fields from a record value, in declaration order + + Assumes the given input is a record value. If not, ArgumentException is raised. + The input record type. + Optional flag that denotes accessibility of the private representation. + An array of descriptions of the properties of the record type. + + + Reads all the fields from a value built using an instance of an F# exception declaration + + Assumes the given input is an F# exception value. If not, ArgumentException is raised. + The exception instance. + Optional flag that denotes accessibility of the private representation. + Thrown when the input type is not an F# exception. + The fields from the given exception. + + + A method that constructs objects of the given case + The description of the union case. + Optional flag that denotes accessibility of the private representation. + The description of the constructor of the given union case. + + + Precomputes a function for constructing a discriminated union value for a particular union case. + The description of the union case. + Optional flag that denotes accessibility of the private representation. + A function for constructing values of the given union case. + + + Precomputes a function for reading all the fields for a particular discriminator case of a union type + + Using the computed function will typically be faster than executing a corresponding call to GetFields + The description of the union case to read. + Optional flag that denotes accessibility of the private representation. + A function to for reading the fields of the given union case. + + + Precompute a property or static method for reading an integer representing the case tag of a union type. + The type of union to read. + Optional flag that denotes accessibility of the private representation. + The description of the union case reader. + + + Assumes the given type is a union type. + If not, ArgumentException is raised during pre-computation. + + Using the computed function is more efficient than calling GetUnionCase + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. + The type of union to optimize reading. + Optional flag that denotes accessibility of the private representation. + An optimized function to read the tags of the given union type. + + + Identify the union case and its fields for an object + + Assumes the given input is a union case value. If not, ArgumentException is raised. + + If the type is not given, then the runtime type of the input object is used to identify the + relevant union type. The type should always be given if the input object may be null. For example, + option values may be represented using the 'null'. + The input union case. + The union type containing the value. + Optional flag that denotes accessibility of the private representation. + Thrown when the input type is not a union case value. + The description of the union case and its fields. + + + Create a union case value. + The description of the union case to create. + The array of arguments to construct the given case. + Optional flag that denotes accessibility of the private representation. + The constructed union case. + + + Get a ConstructorInfo for a record type + The record type. + Optional flag that denotes accessibility of the private representation. + A ConstructorInfo for the given record type. + + + Precompute a function for constructing a record value. + + Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. + The type of record to construct. + Optional flag that denotes accessibility of the private representation. + Thrown when the input type is not a record type. + A function to construct records of the given type. + + + Precompute a function for reading all the fields from a record. The fields are returned in the + same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for + this type. + + Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. + + Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. + The type of record to read. + Optional flag that denotes accessibility of the private representation. + Thrown when the input type is not a record type. + An optimized reader for the given record type. + + + Reads all the fields from a record value. + + Assumes the given input is a record value. If not, ArgumentException is raised. + The record object. + Optional flag that denotes accessibility of the private representation. + Thrown when the input type is not a record type. + The array of fields from the record. + + + Creates an instance of a record type. + + Assumes the given input is a record type. + The type of record to make. + The array of values to initialize the record. + Optional flags that denotes accessibility of the private representation. + Thrown when the input type is not a record type. + The created record. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A record of options to control structural formatting. + For F# Interactive properties matching those of this value can be accessed via the 'fsi' + value. + + Floating Point format given in the same format accepted by System.Double.ToString, + e.g. f6 or g15. + + If ShowProperties is set the printing process will evaluate properties of the values being + displayed. This may cause additional computation. + + The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects + to a small, finite depth, as determined by the printing parameters. + This may lead to additional computation being performed during printing. + + <example> + From F# Interactive the default settings can be adjusted using, for example, + <pre> + open Microsoft.FSharp.Compiler.Interactive.Settings;; + setPrintWidth 120;; + </pre> + </example> + + + + + Data representing structured layouts of terms. + + + + + Convert any value to a layout using the given formatting options. The + layout can then be processed using formatting display engines such as + those in the LayoutOps module. any_to_string and output_any are + built using any_to_layout with default format options. + + + + + + + + Ouput any value to a channel using the same set of formatting rules + as any_to_string + + + + + Convert any value to a string using a standard formatter + Data is typically formatted in a structured format, e.g. + lists are formatted using the "[1;2]" notation. + The details of the format are not specified and may change + from version to version and according to the flags given + to the F# compiler. The format is intended to be human-readable, + not machine readable. If alternative generic formats are required + you should develop your own formatter, using the code in the + implementation of this file as a starting point. + + Data from other .NET languages is formatted using a virtual + call to Object.ToString() on the boxed version of the input. + + + + + + + + For limitting layout of list-like sequences (lists,arrays,etc). + unfold a list of items using (project and z) making layout list via itemL. + If reach maxLength (before exhausting) then truncate. + + + + + See tagL + + + + + Layout like an F# list. + + + + + Layout like an F# option. + + + + + Layout list vertically. + + + + + Layout two vertically. + + + + + Form tuple of layouts. + + + + + Wrap braces around layout. + + + + + Wrap square brackets around layout. + + + + + Wrap round brackets around Layout. + + + + + Join layouts into a list separated using the given Layout. + + + + + Join layouts into a semi-colon separated list. + + + + + Join layouts into a space separated list. + + + + + Join layouts into a comma separated list. + + + + + Join broken with ident=2 + + + + + Join broken with ident=1 + + + + + Join broken with ident=0 + + + + + Join, possible break with indent=2 + + + + + Join, possible break with indent=1 + + + + + Join, possible break with indent=0 + + + + + Join, unbreakable. + + + + + An string which is left parenthesis (no space on the right). + + + + + An string which is right parenthesis (no space on the left). + + + + + An string which requires no spaces either side. + + + + + An string leaf + + + + + An uninterpreted leaf, to be interpreted into a string + by the layout engine. This allows leaf layouts for numbers, strings and + other atoms to be customized according to culture. + + + + + Is it the empty layout? + + + + + The empty layout + + + + + A layout is a sequence of strings which have been joined together. + The strings are classified as words, separators and left and right parenthesis. + This classification determines where spaces are inserted. + A joint is either unbreakable, breakable or broken. + If a joint is broken the RHS layout occurs on the next line with optional indentation. + A layout can be squashed to for given width which forces breaks as required. + + + + diff --git a/fsharp/bin/Debug/fsharp.XML b/fsharp/bin/Debug/fsharp.XML new file mode 100644 index 0000000..7ede0c8 --- /dev/null +++ b/fsharp/bin/Debug/fsharp.XML @@ -0,0 +1,6 @@ + + +Exercism.fsharp + + + diff --git a/fsharp/bin/Debug/nunit.framework.dll b/fsharp/bin/Debug/nunit.framework.dll new file mode 100644 index 0000000..780727f Binary files /dev/null and b/fsharp/bin/Debug/nunit.framework.dll differ diff --git a/fsharp/bin/Debug/nunit.framework.xml b/fsharp/bin/Debug/nunit.framework.xml new file mode 100644 index 0000000..4c8c26e --- /dev/null +++ b/fsharp/bin/Debug/nunit.framework.xml @@ -0,0 +1,10960 @@ + + + + nunit.framework + + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + Delegate used by tests that execute code and + capture any thrown exception. + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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. + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + 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 + + + + 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 + + + + 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + + 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 + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + 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. + + 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. + + 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 + 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. + + The expected Exception Type + 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 + The message that will be displayed on failure + + + + 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 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + + + + 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 + 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 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 + 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 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + + + + Assert that a string is either null or 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 either null or equal to string.Empty + + 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 string to be tested + + + + Assert that a string is not null or 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 null or empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is not null or empty + + The string to be tested + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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. + + 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + The first value, expected to be less + The second value, expected to be greater + + + + 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 + The message to display in case of failure + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + + + + 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 + + + + Gets the number of assertions executed so far and + resets the counter to zero. + + + + + 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. + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 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 the same path or under 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. + + + + + 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 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 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 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 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 whether a collection is ordered + + + + + 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. + + 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. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + Arguments to use in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + 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 + + + + 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. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression 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 InconclusiveException 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 + + + + 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the + method throws an . + + The evaluated condition + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException on failure. + + 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 InconclusiveException 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + 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. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Waits for pending asynchronous operations to complete, if appropriate, + and returns a proper result of the invocation by unwrapping task results + + The raw result of the method invocation + The unwrapped result, if necessary + + + + A set of Assert methods operationg on one or more collections + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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 + + + + 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 containing objects to be considered + The message that will be displayed on failure + + + + Asserts that all items contained in collection are not equal to null. + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + + + + Asserts that superset is not a subject of subset. + + 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. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is a subset of subset. + + 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. + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Summary description for DirectoryAssert + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + 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. + + 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. + + 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. + + 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. + + 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 + + + + 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. + + 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. + + 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. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + 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 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Summary description for FileAssert. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + 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. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + 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. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal + + + + 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 + + + + GlobalSettings is a place for setting default values used + by the framework in performing asserts. + + + + + Default tolerance for floating point equality + + + + + Class used to guard against unexpected argument values + by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + 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 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. + + + + + 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. + + + + + Method to handle an expected exception + + 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is under 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. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Indicates whether a result has been specified. + This is necessary because the result may be + null, so it's value cannot be checked. + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + 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. + + + + + + + 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 + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attribute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are 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. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are Notequal, without regard to case. + + 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. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The regex pattern to be matched + The actual string + + + + 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 + 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. + + The regex pattern to be used + The actual string + + + + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It provides a number of instance modifiers + for use in initializing the test case. + + Note: Instance modifiers are getters that return + the same instance after modifying it's state. + + + + + The 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 + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + 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 + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Ignores this TestCase. + + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Marks this TestCase as Explicit + + + + + + Marks this TestCase as Explicit, specifying the reason. + + The reason. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Returns true if the result has been set + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + Gets a list of categories associated with this test. + + + + + Gets the property dictionary for this test + + + + + Provide the context information of the current test + + + + + Constructs a TestContext using the provided context dictionary + + A context dictionary + + + + 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 a TestAdapter representing the currently executing test in this context. + + + + + Gets a ResultAdapter representing the current result for the test + executing in this context. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputing files created + by this test run. + + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Constructs a TestAdapter for this context + + The context dictionary + + + + The name of the test. + + + + + The FullName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a context + + 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 TestStatus of current test. This enum will be used + in future versions of NUnit and so is to be preferred + to the TestState value. + + + + + Provides details about a test + + + + + Creates an instance of TestDetails + + 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. + + + + + 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 ResultState enum indicates the result of running a test + + + + + The result is inconclusive + + + + + The test was not runnable. + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + Helper class with static methods used to supply constraints + that operate on strings. + + + + + 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 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 fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + 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. + + + + + 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 + + + + + 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 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. + + 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 a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Writes the text for an expected value. + + The expected value. + + + + Writes the text for a modifier + + The modifier. + + + + 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 + + + + Abstract method to get the max line length + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + 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 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + Writes the text for a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Write the text for a modifier. + + The modifier. + + + + Writes the text for an expected value. + + The expected value. + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The constraint for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Gets or sets the maximum line length for this writer + + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + 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 + + + + + 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 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. + + + + + Attribute used to provide descriptive text about a + test case or fixture. + + + + + Construct the attribute + + Text describing the test + + + + Gets the test description + + + + + Enumeration indicating how the expected message parameter is to be used + + + + 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 + + + + + + Constructor for a non-specific exception + + + + + Constructor for a given type of exception + + The type of the expected exception + + + + Constructor for a given exception name + + The full name of the expected exception + + + + Gets or sets the expected exception type + + + + + Gets or sets the full Type name of the expected exception + + + + + Gets or sets the expected message text + + + + + Gets or sets the user message displayed in case of failure + + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets the name of a method to be used as an exception handler + + + + + 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 + + + + The reason test is marked explicit + + + + + 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 without giving a reason + for ignoring the test. + + + + + Constructs the attribute giving a reason for ignoring the test + + The reason for ignoring the test + + + + The reason for ignoring a test + + + + + 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 itemss 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 + + + + + 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-deliminted list of platforms + + + + 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 + + + + 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. + + + + + 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 + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + Summary description for MaxTimeAttribute. + + + + + Construct a MaxTimeAttribute, given a time in milliseconds. + + The maximum elapsed time in milliseconds + + + + RandomAttribute is used to supply a set of random values + to a single parameter of a parameterized test. + + + + + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. + + + + + Abstract base class for attributes that apply to parameters + and supply data for the parameter. + + + + + Gets the data to be provided to the specified parameter + + + + + 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. + + + + + 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 + + + + + Construct a set of doubles from 0.0 to 1.0, + specifying only the count. + + + + + + Construct a set of doubles from min to max + + + + + + + + Construct a set of ints from min to max + + + + + + + + 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 longs + + + + + + + + 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 + + + + RequiredAddinAttribute may be used to indicate the names of any addins + that must be present in order to run some or all of the tests in an + assembly. If the addin is not loaded, the entire assembly is marked + as NotRunnable. + + + + + Initializes a new instance of the class. + + The required addin. + + + + Gets the name of required addin. + + The required addin name. + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + 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. + + + + + 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 static (shared in VB) property + that returns a list of tests. + + + + + 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. + + + + + Provide actions to execute before and after tests. + + + + + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + + + + + Executed before each test is run + + Provides details about the test that is going to be run. + + + + Executed after each test is run + + Provides details about the test that has just been run. + + + + Provides the target for the action attribute + + 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")] + publc void TestDescriptionMethod() + {} + } + + + + + + Descriptive text for this test + + + + + 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 the list of arguments to a test case + + + + + Gets or sets the expected result. Use + ExpectedResult by preference. + + The result. + + + + Gets or sets the expected result. + + The result. + + + + Gets a flag indicating whether an expected + result has been set. + + + + + Gets a list of categories associated with this test; + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + Gets or sets the expected exception. + + The expected exception. + + + + Gets or sets the name the expected exception. + + The expected name of the exception. + + + + Gets or sets the expected message of the expected exception + + The expected message of the exception. + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets or sets the description. + + The description. + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the explicit status of the test + + + + + Gets or sets the reason for not running the test + + + + + Gets or sets the reason for not running the test. + Set has the side effect of marking the test as ignored. + + The ignore reason. + + + + FactoryAttribute indicates the source to be used to + provide test cases for a test method. + + + + + Construct with the name of the data source, which must + be a property, field or method of the test class itself. + + An array of the names of the factories that will provide data + + + + Construct with a Type, which must implement IEnumerable + + The Type that will provide data + + + + Construct with a Type and name. + that don't support params arrays. + + 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 + + + + + A Type to be used as a source + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + [TestFixture] + public class ExampleClass + {} + + + + + 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. + + + + + + Descriptive text for this fixture + + + + + Gets and sets the category for this fixture. + May be a comma-separated list of categories. + + + + + Gets a list of categories for this fixture + + + + + The arguments originally provided to the attribute + + + + + Gets or sets a value indicating whether this should be ignored. + + true if ignore; otherwise, false. + + + + Gets or sets the ignore reason. May set Ignored as a side effect. + + The ignore reason. + + + + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. + + + + + Attribute used to identify a method that is + called before any tests in a fixture are run. + + + + + 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. + + + + + 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")] + 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. + + + + + Construct a TimeoutAttribute given a time in milliseconds + + 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 RequiresSTAAttribute + + + + + 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 on a separate thread. + + + + + Construct a RequiresThreadAttribute + + + + + Construct a RequiresThreadAttribute, specifying the apartment + + + + + 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 the data source to be used + + + + 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 the 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 + + + + + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + + + + + Abstract base class used for prefixes + + + + + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + + + + + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + Static UnsetObject used to detect derived constraints + failing to set the actual value. + + + + + The actual value being tested against a constraint + + + + + The display name of this Constraint for use by ToString() + + + + + Argument fields used by ToString(); + + + + + The builder holding this constraint + + + + + Construct a constraint with no arguments + + + + + Construct a constraint with one argument + + + + + Construct a constraint with two arguments + + + + + Sets the ConstraintBuilder holding this constraint + + + + + 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 MessageWriter on which to display the message + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by 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 + True for success, false for failure + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 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. + + + + + 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. + + + + + 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. + + + + + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + + + + + The base constraint + + + + + Construct given a base constraint + + + + + + Construct an AllItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + AndConstraint succeeds only if both members succeed. + + + + + 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 + + + + Create an AndConstraint from two other constraints + + The first constraint + The second 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 a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + Construct a TypeConstraint for a given Type + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. + + The writer on which the actual value is displayed + + + + Construct an AssignableFromConstraint for the type provided + + + + + + Test whether an object can be assigned from the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + + + + + Construct an AssignableToConstraint for the type provided + + + + + + Test whether an object can be assigned to the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + 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 attriute + Type and base constraint. + + + + + + + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. + + + + + Writes a description of the attribute to the specified writer. + + + + + Writes the actual value supplied to the specified writer. + + + + + 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 + + + + + + Tests whether the object provides the expected attribute. + + 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 + + + + + BasicConstraint is the abstract base for constraints that + perform a simple comparison to a constant value. + + + + + Initializes a new instance of the class. + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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. + + + + + 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 use the supplied EqualityAdapter. + NOTE: For internal use only. + + The EqualityAdapter 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 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 + + + + Flag the constraint to ignore case and return self. + + + + + Construct a CollectionContainsConstraint + + + + + + Test whether the expected item is contained in the collection + + + + + + + Write a descripton of the constraint to a MessageWriter + + + + + + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + + + + + Construct a CollectionEquivalentConstraint + + + + + + Test whether two collections are equivalent + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionOrderedConstraint is used to test whether a collection is ordered. + + + + + Construct a CollectionOrderedConstraint + + + + + Modifies the constraint to use an IComparer and returns self. + + + + + Modifies the constraint to use an IComparer<T> and returns self. + + + + + Modifies the constraint to use a Comparison<T> and returns self. + + + + + Modifies the constraint to test ordering by the value of + a specified property and returns self. + + + + + Test whether the collection is ordered + + + + + + + Write a description of the constraint to a MessageWriter + + + + + + Returns the string representation of the constraint. + + + + + + If used performs a reverse comparison + + + + + 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 + + + + Test whether the actual collection is a subset of + the expected collection provided. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. + + + + + Construct a CollectionTally object from a comparer and a collection + + + + + 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 + + + + The number of objects remaining in the tally + + + + + ComparisonAdapter class centralizes all comparisons of + values in NUnit, adapting to the use of any provided + IComparer, IComparer<T> or Comparison<T> + + + + + Returns a ComparisonAdapter that wraps an IComparer + + + + + Returns a ComparisonAdapter that wraps an IComparer<T> + + + + + Returns a ComparisonAdapter that wraps a Comparison<T> + + + + + Compares two objects + + + + + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. + + + + + Construct a ComparisonAdapter for an IComparer + + + + + Compares two objects + + + + + + + + Construct a default ComparisonAdapter + + + + + ComparisonAdapter<T> extends ComparisonAdapter and + allows use of an IComparer<T> or Comparison<T> + to actually perform the comparison. + + + + + Construct a ComparisonAdapter for an IComparer<T> + + + + + Compare a Type T to an object + + + + + Construct a ComparisonAdapter for a Comparison<T> + + + + + 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. This class supplies the Using modifiers. + + + + + ComparisonAdapter to be used in making the comparison + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Modifies the constraint to use an IComparer and returns self + + + + + Modifies the constraint to use an IComparer<T> and returns self + + + + + Modifies the constraint to use a Comparison<T> and returns self + + + + + Delegate used to delay evaluation of the actual value + to be used in evaluating a 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 reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + + + + + 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 expresson 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. + + + + + OperatorStack is a type-safe stack for holding ConstraintOperators + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified operator onto the stack. + + The op. + + + + Pops the topmost operator from the stack. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost operator without modifying the stack. + + The top. + + + + ConstraintStack is a type-safe stack for holding Constraints + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. + + The constraint. + + + + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost constraint without modifying the stack. + + 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. + + + + + 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. + + + + + 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. + + + + + 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 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 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 same path or under 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. + + + + + 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 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 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. + + + + + With is currently a NOP - reserved for future use. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + Flag the constraint to ignore case and return self. + + + + + Applies a delay to the match so that a match can be evaluated in the future. + + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + If the value of is less than 0 + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + The time interval used for polling + If the value of is less than 0 + + + + Test whether the constraint is satisfied by a given value + + 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 + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + EmptyCollectionConstraint tests whether a collection is empty. + + + + + Check that the collection is empty + + + + + + + Write the constraint description to a MessageWriter + + + + + + 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. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EmptyDirectoryConstraint is used to test that a directory is empty + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + EmptyStringConstraint tests whether a string is empty. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EndsWithConstraint can test whether a string ends + with an expected substring. + + + + + 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 + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + Modify the constraint to ignore case in matching. + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + If true, strings in error messages will be clipped + + + + + NUnitEqualityComparer used to test equality. + + + + + Initializes a new instance of the class. + + The expected value. + + + + Flag the constraint to use a tolerance when determining equality. + + Tolerance value to be used + 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 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 + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Write description of this constraint + + 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 enumerations, 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 + + + + 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. + + + + + 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 + + + + EqualityAdapter class handles all equality comparisons + that use an IEqualityComparer, IEqualityComparer<T> + or a ComparisonAdapter. + + + + + 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 EqualityAdapter that wraps an IComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + + + + + Returns an EqualityAdapter that wraps an IComparer<T>. + + + + + Returns an EqualityAdapter that wraps a Comparison<T>. + + + + + EqualityAdapter that wraps an IComparer. + + + + + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. + + + + + EqualityAdapter that wraps an IComparer. + + + + + EqualityAdapterList represents a list of EqualityAdapters + in a common class across platforms. + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + Test that an object is of the exact type specified + + 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 + + The MessageWriter to use + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overriden to write additional information + in the case of an Exception. + + The MessageWriter to use + + + + 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 + + + + + FailurePointList represents a set of FailurePoints + in a cross-platform way. + + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + 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/ + + + + + + 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 + + + + 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 + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is greater than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + 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 + + + + Test whether an object is of the specified type or a derived type + + 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 + + The MessageWriter to use + + + + Tests whether a value is less than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is less than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Static methods used in creating messages + + + + + Static string used when strings are clipped + + + + + 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 + + + + 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 enumerable, + 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 + + + + + Test that the actual value is an NaN + + + + + + + Write the constraint description to a specified writer + + + + + + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. + + + + + Construct a NoItemConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + NullConstraint tests that the actual value is null + + + + + Initializes a new instance of the class. + + + + + NullEmptyStringConstraint tests whether a string is either null or empty. + + + + + Constructs a new NullOrEmptyStringConstraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + Compares two objects + + + + + + + + Returns the default NUnitComparer. + + + + + Generic version of NUnitComparer + + + + + + Compare two objects of the same type + + + + + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. + + + + + + + + + + Compares two objects for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + + If true, all string comparisons will ignore case + + + + + 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 occured. + + + + + RecursionDetector used to check for recursion when + evaluating self-referencing enumerables. + + + + + Compares two objects for equality within a tolerance, setting + the tolerance to the actual tolerance used if an empty + tolerance is supplied. + + + + + 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 + + + + 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. + + + + + RecursionDetector detects when a comparison + between two enumerables has reached a point + where the same objects that were previously + compared are again being compared. This allows + the caller to stop the comparison if desired. + + + + + Check whether two objects have previously + been compared, returning true if they have. + The two objects are remembered, so that a + second call will always return true. + + + + + OrConstraint succeeds if either member succeeds + + + + + Create an OrConstraint from two other constraints + + The first constraint + The second 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 + + + + Write a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. + + + + + The expected path used in the constraint + + + + + Flag indicating whether a caseInsensitive comparison should be made + + + + + Construct a PathConstraint for a give expected path + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns true if the expected path and actual path match + + + + + Returns the string representation of this constraint + + + + + Transform the provided path to its canonical form so that it + may be more easily be compared with other paths. + + The original path + The path in canonical form + + + + Test whether one path in canonical form is under another. + + The first path - supposed to be the parent path + The second path - supposed to be the child path + Indicates whether case should be ignored + + + + + Modifies the current instance to be case-insensitve + and returns it. + + + + + Modifies the current instance to be case-sensitve + and returns it. + + + + + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. + + + + + Construct a PredicateConstraint from a predicate + + + + + Determines whether the predicate succeeds when applied + to the actual value. + + + + + Writes the description to a MessageWriter + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 vaue + of the property. The two constraints are now separate. + + + + + Initializes a new instance of the class. + + The name of the property. + + + + Test whether the property exists for a given object + + The object to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. + + The writer on which the actual value is displayed + + + + 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. + To. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Resolve the current expression to a Constraint + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + 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 either + of the argument constraints is 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. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + 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 the string representation of the constraint. + + A string representing the constraint + + + + Resolves the ReusableConstraint by returning the constraint + that it originally wrapped. + + A resolved constraint + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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 + + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overridden in ThrowsNothingConstraint to write + information about the exception that was actually caught. + + The writer on which the actual value is displayed + + + + 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. + + + + + Constructs a linear tolerance of a specdified amount + + + + + Constructs a tolerance given an amount and ToleranceMode + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + 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. + + + + + Returns a zero Tolerance object, equivalent to + specifying an exact match. + + + + + Gets the ToleranceMode for the current Tolerance + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance is empty. + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared values my deviate from each other. + + + + + Compares two values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + Check that all items are unique. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + XmlSerializableConstraint tests whether + an object is serializable in XML format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Represents a constraint that succeeds if all the + members of a collection match a base constraint. + + + + + Abstract base for operators that indicate how to + apply a constraint to items in a collection. + + + + + PrefixOperator takes a single constraint and modifies + it's action in some way. + + + + + 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. + + + + + 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. + + + + + + The syntax element preceding this operator + + + + + The syntax element folowing 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. + + + + + + Returns the constraint created by applying this + prefix to another constraint. + + + + + + + Constructs a CollectionOperator + + + + + 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 + + + + + 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. + + + + + + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. + + + + + Gets the left precedence of the operator + + + + + Gets the right precedence of the operator + + + + + 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. + + + + + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. + + + + + 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. + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + 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 + + + + + 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. + + + + + 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. + + + + + + Gets the name of the property to which the operator applies + + + + + 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 modifes the + order of evaluation because of its precedence. + + + + + Constructor for the WithOperator + + + + + Returns a constraint that wraps its argument + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + + + + + + + Compares two objects of a given Type for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + diff --git a/fsharp/example/Example.fs b/fsharp/example/Example.fs new file mode 100644 index 0000000..fd1ec6b --- /dev/null +++ b/fsharp/example/Example.fs @@ -0,0 +1,4 @@ +module Example + +type Example() = + member this.Add(x, y) = x + y \ No newline at end of file diff --git a/fsharp/example/ExampleTest.fs b/fsharp/example/ExampleTest.fs new file mode 100644 index 0000000..a6703fa --- /dev/null +++ b/fsharp/example/ExampleTest.fs @@ -0,0 +1,16 @@ +module SumOfMultiplesTest + +open NUnit.Framework +open Example + +[] +type ExampleTest() = + let mutable example = Example() + + [] + [] + [] + [] + [] + member tc.Can_add(x, y, expected) = + Assert.That(example.Add(x, y), Is.EqualTo(expected)) \ No newline at end of file diff --git a/fsharp/obj/Debug/Exercism.fsharp.dll b/fsharp/obj/Debug/Exercism.fsharp.dll new file mode 100644 index 0000000..a2a4754 Binary files /dev/null and b/fsharp/obj/Debug/Exercism.fsharp.dll differ diff --git a/fsharp/obj/Debug/Exercism.fsharp.fsproj.FileListAbsolute.txt b/fsharp/obj/Debug/Exercism.fsharp.fsproj.FileListAbsolute.txt new file mode 100644 index 0000000..b257122 --- /dev/null +++ b/fsharp/obj/Debug/Exercism.fsharp.fsproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\fsharp.XML +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\Exercism.fsharp.dll +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\Exercism.fsharp.pdb +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\FSharp.Core.dll +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\nunit.framework.dll +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\FSharp.Core.xml +C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\nunit.framework.xml +C:\Users\brbuller\Development\exercism\fsharp\obj\Debug\Exercism.fsharp.fsprojResolveAssemblyReference.cache +C:\Users\brbuller\Development\exercism\fsharp\obj\Debug\Exercism.fsharp.dll +C:\Users\brbuller\Development\exercism\fsharp\obj\Debug\Exercism.fsharp.pdb diff --git a/fsharp/obj/Debug/Exercism.fsharp.fsprojResolveAssemblyReference.cache b/fsharp/obj/Debug/Exercism.fsharp.fsprojResolveAssemblyReference.cache new file mode 100644 index 0000000..64729a9 Binary files /dev/null and b/fsharp/obj/Debug/Exercism.fsharp.fsprojResolveAssemblyReference.cache differ diff --git a/fsharp/obj/Debug/Exercism.fsharp.pdb b/fsharp/obj/Debug/Exercism.fsharp.pdb new file mode 100644 index 0000000..b57cbd2 Binary files /dev/null and b/fsharp/obj/Debug/Exercism.fsharp.pdb differ diff --git a/fsharp/packages.config b/fsharp/packages.config new file mode 100644 index 0000000..ad37a52 --- /dev/null +++ b/fsharp/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/javascript/Exercism.javascript.csproj b/javascript/Exercism.javascript.csproj new file mode 100644 index 0000000..200dc03 --- /dev/null +++ b/javascript/Exercism.javascript.csproj @@ -0,0 +1,117 @@ + + + + + Debug + AnyCPU + + + 2.0 + {E312906C-B57F-4D93-9A55-540D2D0ABBB2} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Exercism.javascript + Exercism.javascript + v4.5 + true + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + ..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + Web.config + + + Web.config + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 61434 + / + http://localhost:61434/ + False + False + + + False + + + + + + \ No newline at end of file diff --git a/javascript/Exercism.javascript.csproj.user b/javascript/Exercism.javascript.csproj.user new file mode 100644 index 0000000..98f8356 --- /dev/null +++ b/javascript/Exercism.javascript.csproj.user @@ -0,0 +1,31 @@ + + + + true + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + True + + + + + \ No newline at end of file diff --git a/javascript/Properties/AssemblyInfo.cs b/javascript/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..03329c4 --- /dev/null +++ b/javascript/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Exercism.javascript")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Exercism.javascript")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/javascript/Web.Debug.config b/javascript/Web.Debug.config new file mode 100644 index 0000000..2e302f9 --- /dev/null +++ b/javascript/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/javascript/Web.Release.config b/javascript/Web.Release.config new file mode 100644 index 0000000..c358444 --- /dev/null +++ b/javascript/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/javascript/Web.config b/javascript/Web.config new file mode 100644 index 0000000..bfb640d --- /dev/null +++ b/javascript/Web.config @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/javascript/bin/Exercism.javascript.dll b/javascript/bin/Exercism.javascript.dll new file mode 100644 index 0000000..f1f7173 Binary files /dev/null and b/javascript/bin/Exercism.javascript.dll differ diff --git a/javascript/bin/Exercism.javascript.dll.config b/javascript/bin/Exercism.javascript.dll.config new file mode 100644 index 0000000..bfb640d --- /dev/null +++ b/javascript/bin/Exercism.javascript.dll.config @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/javascript/bin/Exercism.javascript.pdb b/javascript/bin/Exercism.javascript.pdb new file mode 100644 index 0000000..9c42d27 Binary files /dev/null and b/javascript/bin/Exercism.javascript.pdb differ diff --git a/javascript/bin/nunit.framework.dll b/javascript/bin/nunit.framework.dll new file mode 100644 index 0000000..c0cb94e Binary files /dev/null and b/javascript/bin/nunit.framework.dll differ diff --git a/javascript/bin/nunit.framework.xml b/javascript/bin/nunit.framework.xml new file mode 100644 index 0000000..cba9c50 --- /dev/null +++ b/javascript/bin/nunit.framework.xml @@ -0,0 +1,17681 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the path to the directory from which an assembly was loaded. + + The assembly. + The path. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + + + + + + Gets the assembly path from code base. + + Public for testing purposes + The code base. + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + 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 + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a file. + + Path to the file to use + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + NUnitTestFixtureBuilder is able to build a fixture given + a class marked with a TestFixtureAttribute or an unmarked + class containing test methods. In the first case, it is + called by the attribute and in the second directly by + NUnitSuiteBuilder. + + + + + Build a TestFixture from type provided. A non-null TestSuite + must always be returned, since the method is generally called + because the user has marked the target class as a fixture. + If something prevents the fixture from being used, it should + be returned nonetheless, labelled as non-runnable. + + An ITypeInfo for the fixture to be used. + A TestSuite object or one derived from TestSuite. + + + + Overload of BuildFrom called by tests that have arguments. + Builds a fixture using the provided type and information + in the ITestFixtureData object. + + The TypeInfo for which to construct a fixture. + An object implementing ITestFixtureData or null. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + 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 CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + 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. + + + + + Construct an EventListenerTextWriter + + The name of the stream to use for events + The default writer to use if no listener is available + + + + Write a single char + + + + + Write a string + + + + + Write a string followed by a newline + + + + + Get the Encoding for this TextWriter + + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 EventPumpState enum represents the state of an + EventPump. + + + + + The pump is stopped + + + + + The pump is pumping events with no stop requested + + + + + The pump is pumping events but a stop has been requested + + + + + EventPump pulls events out of an EventQueue and sends + them to a listener. It is used to send events back to + the client without using the CallContext of the test + runner thread. + + + + + The downstream listener to which we send events + + + + + The queue that holds our events + + + + + Thread to do the pumping + + + + + The current state of the eventpump + + + + + Constructor + + The EventListener to receive events + The event queue to pull events from + + + + Gets or sets the current state of the pump + + + + + Gets or sets the name of this EventPump + (used only internally and for testing). + + + + + Dispose stops the pump + Disposes the used WaitHandle, too. + + + + + Start the pump + + + + + Tell the pump to stop after emptying the queue. + + + + + 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. + + + + + NUnit.Core.Event is the abstract base for all stored events. + An Event is the stored representation of a call to the + ITestListener interface and is used to record such calls + or to queue them for forwarding on another thread or at + a later time. + + + + + The Send method is implemented by derived classes to send the event to the specified listener. + + The listener. + + + + TestStartedEvent holds information needed to call the TestStarted method. + + + + + Initializes a new instance of the class. + + The test. + + + + Calls TestStarted on the specified listener. + + The listener. + + + + TestFinishedEvent holds information needed to call the TestFinished method. + + + + + Initializes a new instance of the class. + + The result. + + + + Calls TestFinished on the specified listener. + + The listener. + + + + TestOutputEvent holds information needed to call the TestOutput method. + + + + + Initializes a new instance of the class. + + The output object. + + + + Calls TestOutput on the specified listener. + + The listener. + + + + Implements a queue of work items each of which + is queued as a WaitCallback. + + + + + Gets the count of items in the queue. + + + + + Enqueues the specified event + + The event to enqueue. + + + + Removes the first element from the queue and returns it (or null). + + + If true and the queue is empty, the calling thread is blocked until + either an element is enqueued, or is called. + + + + + If the queue not empty + the first element. + + + otherwise, if ==false + or has been called + null. + + + + + + + Stop processing of the queue + + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. + + + + + Construct a ParallelWorkItemDispatcher + + Number of workers to use + + + + Enumerates all the shifts supported by the dispatcher + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + + + + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. + + + + + The EventQueue created and filled by this listener + + + + + Construct a QueuingEventListener + + + + + A test has started + + The test that is starting + + + + A test case finished + + Result of the test case + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + A TestWorker pulls work items from a queue + and executes them. + + + + + Event signaled immediately before executing a WorkItem + + + + + Event signaled immediately after executing a WorkItem + + + + + Construct a new TestWorker. + + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests + + + + The name of this worker - also used for the thread + + + + + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop + + + + + Start processing work items. + + + + + 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 + + + + 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. + + + + + Construct a TextCapture object + + The default destination for non-intercepted output + + + + Gets the Encoding in use by this TextWriter + + + + + Writes a single character + + The char to write + + + + Writes a string + + The string to write + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + Indicates whether this WorkItem may be run in parallel + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + WorkItemQueueState indicates the current state of a WorkItemQueue + + + + + The queue is paused + + + + + The queue is running + + + + + The queue is stopped + + + + + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. + + + + + Initializes a new instance of the class. + + The name of the queue. + + + + Gets the name of the work item queue. + + + + + Gets the total number of items processed so far + + + + + Gets the maximum number of work items. + + + + + Gets the current state of the queue + + + + + Get a bool indicating whether the queue is empty. + + + + + Enqueue a WorkItem to be processed + + The WorkItem to process + + + + Dequeue a WorkItem for processing + + A WorkItem or null if the queue has stopped + + + + Start or restart processing of items from the queue + + + + + Signal the queue to stop + + + + + Pause the queue for restarting later + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + 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. + + + + + Construct a WorkShift + + + + + Event that fires when the shift has ended + + + + + Gets a flag indicating whether the shift is currently active + + + + + Gets a list of the queues associated with this shift. + + Used for testing + + + + Gets the list of workers associated with this shift. + + + + + Gets a bool indicating whether this shift has any work to do + + + + + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. + + + + + Assign a worker to the shift. + + + + + + Start or restart processing for the shift + + + + + End the shift, pausing all queues and raising + the EndOfShift event. + + + + + Shut down the shift. + + + + + Cancel (abort or stop) the shift without completing all work + + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + OSPlatform represents a particular operating system platform + + + + + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater + + + + + Platform ID for Unix as defined by Mono + + + + + Platform ID for XBox as defined by .NET and Mono, but not CF + + + + + Platform ID for MacOSX as defined by .NET and Mono, but not CF + + + + + Get the OSPlatform under which we are currently running + + + + + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 + + + If an application is not manifested as Windows 8.1 or Windows 10, + the version returned from Environment.OSVersion will not be 6.3 and 10.0 + respectively, but will be 6.2 and 6.3. The correct value can be found in + the registry. + + The original version + The correct OS version + + + + Product Type Enumeration used for Windows + + + + + Product type is unknown or unspecified + + + + + Product type is Workstation + + + + + Product type is Domain Controller + + + + + Product type is Server + + + + + Construct from a platform ID and version + + + + + Construct from a platform ID, version and product type + + + + + Get the platform ID of this instance + + + + + Get the Version of this instance + + + + + Get the Product Type of this instance + + + + + Return true if this is a windows platform + + + + + Return true if this is a Unix or Linux platform + + + + + Return true if the platform is Win32S + + + + + Return true if the platform is Win32Windows + + + + + Return true if the platform is Win32NT + + + + + Return true if the platform is Windows CE + + + + + Return true if the platform is Xbox + + + + + Return true if the platform is MacOSX + + + + + Return true if the platform is Windows 95 + + + + + Return true if the platform is Windows 98 + + + + + Return true if the platform is Windows ME + + + + + Return true if the platform is NT 3 + + + + + Return true if the platform is NT 4 + + + + + Return true if the platform is NT 5 + + + + + Return true if the platform is Windows 2000 + + + + + Return true if the platform is Windows XP + + + + + Return true if the platform is Windows 2003 Server + + + + + Return true if the platform is NT 6 + + + + + Return true if the platform is NT 6.0 + + + + + Return true if the platform is NT 6.1 + + + + + Return true if the platform is NT 6.2 + + + + + Return true if the platform is NT 6.3 + + + + + Return true if the platform is Vista + + + + + Return true if the platform is Windows 2008 Server (original or R2) + + + + + Return true if the platform is Windows 2008 Server (original) + + + + + Return true if the platform is Windows 2008 Server R2 + + + + + Return true if the platform is Windows 2012 Server (original or R2) + + + + + Return true if the platform is Windows 2012 Server (original) + + + + + Return true if the platform is Windows 2012 Server R2 + + + + + Return true if the platform is Windows 7 + + + + + Return true if the platform is Windows 8 + + + + + Return true if the platform is Windows 8.1 + + + + + Return true if the platform is Windows 10 + + + + + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. + + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + + + + + Comma-delimited list of all supported OS platform constants + + + + + Comma-delimited list of all supported Runtime platform constants + + + + + Default constructor uses the operating system and + common language runtime of the system. + + + + + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. + + OperatingSystem to be used + RuntimeFramework to be used + + + + Test to determine if one of a collection of platforms + is being used currently. + + + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. + + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + ReaderWriterLock + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Enumeration identifying a common language + runtime implementation. + + + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + + + RuntimeFramework represents a particular version + of a common language runtime implementation. + + + + + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. + + + + + Construct from a runtime type and version. If the version has + two parts, it is taken as a framework version. If it has three + or more, it is taken as a CLR version. In either case, the other + version is deduced based on the runtime type and provided version. + + The runtime type of the framework + The version of the framework + + + + Static method to return a RuntimeFramework object + for the framework that is currently in use. + + + + + The type of this runtime framework + + + + + The framework version for this runtime framework + + + + + The CLR version for this runtime framework + + + + + Return true if any CLR version may be used in + matching this RuntimeFramework object. + + + + + Returns the Display name for this framework + + + + + 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'. + + + + + + + Overridden to return the short name of the framework + + + + + + Returns true if the current framework matches the + one supplied as an argument. Two frameworks match + if their runtime types are the same or either one + is RuntimeType.Any and all specified version components + are equal. Negative (i.e. unspecified) version + components are ignored. + + The RuntimeFramework to be matched. + True on match, otherwise false + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + Helper class used to save and restore certain static or + singleton settings in the environment that affect tests + or which might be changed by the user tests. + + An internal class is used to hold settings and a stack + of these objects is pushed and popped as Save and Restore + are called. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + The current Principal. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + Get the current context or return null if none is found. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + Gets or sets the current for the Thread. + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Obtain lifetime service object + + + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object implementing ICustomAttributeProvider + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + ThreadUtility provides a set of static methods convenient + for working with threads. + + + + + Do our best to Kill a thread + + The thread to kill + + + + Do our best to kill a thread, passing state info + + The thread to kill + Info for the ThreadAbortException handler + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + 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 + + + + Runs the tests in an assembly asyncronously reporting back the test results through the callback + + The callback that receives the test results + A string containing the XML representation of the filter to use + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts environment element + + Target node + The new node + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + Gets the default level of parallel execution (worker threads) + + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 . + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 + + + + 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 . + + 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 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. + + 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 InconclusiveException 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 + + + + 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. + + + + + 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 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. + + + + + 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. + + + + + + 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 + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + The EqualConstraintResult class is tailored for formatting + and displaying the result of an EqualConstraint. + + + + + Construct an EqualConstraintResult + + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Display the failure information for two collections that did not match. + + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections + + + + Displays a single line showing the types and sizes of the expected + and actual collections or arrays. If both are identical, the value is + only shown once. + + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line + + + + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both _values are shown. + + The MessageWriter on which to display + The expected array + The actual array + Index of the failure point in the underlying collections + The indentation level for the message line + + + + Display the failure information for two IEnumerables that did not match. + + The MessageWriter on which to display + The expected enumeration. + The actual enumeration + The depth of this failure in a set of nested collections + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + XmlSerializableConstraint tests whether + an object is serializable in xml format. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Asserts on Directories + + + + + 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. + + + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if the directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Asserts on Files + + + + + 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. + + + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + + + + 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 + + + + Asserts that the file exists. If it does not exist + an is thrown. + + The path to a file containing the actual value + + + + 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + A file containing the actual value + + + + Asserts that the file does not exist. If it does 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + The path to a file containing the actual value + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + 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. + + + + + 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. + + + + 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. + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 + + + + The IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + 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 + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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 + 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. + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + Gets a TextWriter that will send output directly to Console.Error + + + + + Gets a TextWriter for use in displaying immediate progress messages + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + A MarshalByRefObject that lives forever + + + + + Obtains a lifetime service object to control the lifetime policy for this instance. + + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + This class is used as a flag when we get a parameter list for a method/constructor, but + we do not know one of the types because null was passed in. + + + + diff --git a/javascript/example/example.js b/javascript/example/example.js new file mode 100644 index 0000000..1e81efd --- /dev/null +++ b/javascript/example/example.js @@ -0,0 +1,9 @@ +var Example = function () { + 'use strict'; + + this.add = function (x, y) { + return x + y; + }; +}; + +module.exports = Example; diff --git a/javascript/example/example_test.spec.js b/javascript/example/example_test.spec.js new file mode 100644 index 0000000..102ff59 --- /dev/null +++ b/javascript/example/example_test.spec.js @@ -0,0 +1,25 @@ +var Example = require('./example.js'); + +describe("Example", function() { + var example = new Example(); + + it("add 2 and 2", function () { + var result = example.add(2, 2); + expect(result).toEqual(4); + }); + + it("add 12 and 24", function () { + var result = example.add(12, 24); + expect(result).toEqual(36); + }); + + it("add 100 and 1", function () { + var result = example.add(100, 1); + expect(result).toEqual(101); + }); + + return it("add 2 and -2", function () { + var result = example.add(2, -2); + expect(result).toEqual(0); + }); +}); diff --git a/javascript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/javascript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8fd30b9 Binary files /dev/null and b/javascript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/javascript/obj/Debug/Exercism.javascript.csproj.FileListAbsolute.txt b/javascript/obj/Debug/Exercism.javascript.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..48cf9a2 --- /dev/null +++ b/javascript/obj/Debug/Exercism.javascript.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\brbuller\Development\exercism\javascript\bin\Exercism.javascript.dll.config +C:\Users\brbuller\Development\exercism\javascript\bin\Exercism.javascript.dll +C:\Users\brbuller\Development\exercism\javascript\bin\Exercism.javascript.pdb +C:\Users\brbuller\Development\exercism\javascript\obj\Debug\Exercism.javascript.csprojResolveAssemblyReference.cache +C:\Users\brbuller\Development\exercism\javascript\obj\Debug\Exercism.javascript.dll +C:\Users\brbuller\Development\exercism\javascript\obj\Debug\Exercism.javascript.pdb +C:\Users\brbuller\Development\exercism\javascript\bin\nunit.framework.dll +C:\Users\brbuller\Development\exercism\javascript\bin\nunit.framework.xml diff --git a/javascript/obj/Debug/Exercism.javascript.csprojResolveAssemblyReference.cache b/javascript/obj/Debug/Exercism.javascript.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..09a2d6a Binary files /dev/null and b/javascript/obj/Debug/Exercism.javascript.csprojResolveAssemblyReference.cache differ diff --git a/javascript/obj/Debug/Exercism.javascript.dll b/javascript/obj/Debug/Exercism.javascript.dll new file mode 100644 index 0000000..f1f7173 Binary files /dev/null and b/javascript/obj/Debug/Exercism.javascript.dll differ diff --git a/javascript/obj/Debug/Exercism.javascript.pdb b/javascript/obj/Debug/Exercism.javascript.pdb new file mode 100644 index 0000000..9c42d27 Binary files /dev/null and b/javascript/obj/Debug/Exercism.javascript.pdb differ diff --git a/javascript/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/javascript/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/javascript/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/javascript/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/javascript/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/javascript/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/javascript/packages.config b/javascript/packages.config new file mode 100644 index 0000000..8aeb2f8 --- /dev/null +++ b/javascript/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/javascript/test.bat b/javascript/test.bat new file mode 100644 index 0000000..a6fb355 --- /dev/null +++ b/javascript/test.bat @@ -0,0 +1,3 @@ +@echo off + +jasmine-node %1 \ No newline at end of file diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..6cb0e45 --- /dev/null +++ b/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg b/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg new file mode 100644 index 0000000..61e3a5e Binary files /dev/null and b/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg differ diff --git a/packages/NUnit.2.6.3/lib/nunit.framework.dll b/packages/NUnit.2.6.3/lib/nunit.framework.dll new file mode 100644 index 0000000..780727f Binary files /dev/null and b/packages/NUnit.2.6.3/lib/nunit.framework.dll differ diff --git a/packages/NUnit.2.6.3/lib/nunit.framework.xml b/packages/NUnit.2.6.3/lib/nunit.framework.xml new file mode 100644 index 0000000..4c8c26e --- /dev/null +++ b/packages/NUnit.2.6.3/lib/nunit.framework.xml @@ -0,0 +1,10960 @@ + + + + nunit.framework + + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + Delegate used by tests that execute code and + capture any thrown exception. + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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. + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + 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 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + 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 + + + + 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 + + + + 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + + 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 + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestDelegate + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + The message that will be displayed on failure + + + + 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 + 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. + + 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. + + 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 + 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. + + The expected Exception Type + 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 + The message that will be displayed on failure + + + + 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 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The 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 + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two floats are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + + 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. + + 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 + 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. + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + + + + 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 + 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 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 + 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 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + + + + Assert that a string is either null or 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 either null or equal to string.Empty + + 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 string to be tested + + + + Assert that a string is not null or 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 null or empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is not null or empty + + The string to be tested + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + 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 + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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 + 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 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. + + 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + 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 + 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. + + The first value, expected to be less + The second value, expected to be greater + + + + 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 + The message to display in case of failure + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + + + + 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 + + + + Gets the number of assertions executed so far and + resets the counter to zero. + + + + + 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. + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 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 the same path or under 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. + + + + + 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 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 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 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 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 whether a collection is ordered + + + + + 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. + + 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. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + Arguments to use in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + 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 + + + + 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. + + 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. + + 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. + + The actual value to test + A Constraint to be applied + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + 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 AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression 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 InconclusiveException 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 + + + + 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 + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the + method throws an . + + The evaluated condition + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException on failure. + + 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 InconclusiveException 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 + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + 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. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Waits for pending asynchronous operations to complete, if appropriate, + and returns a proper result of the invocation by unwrapping task results + + The raw result of the method invocation + The unwrapped result, if necessary + + + + A set of Assert methods operationg on one or more collections + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. 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 + + + + 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 containing objects to be considered + The message that will be displayed on failure + + + + Asserts that all items contained in collection are not equal to null. + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + + + + Asserts that superset is not a subject of subset. + + 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. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is a subset of subset. + + 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. + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + The message to be displayed on failure + + + + 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 + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Summary description for DirectoryAssert + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + 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. + + 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. + + 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. + + 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. + + 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 + + + + 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. + + 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. + + 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. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + 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 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + 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. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + 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. + + 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. + + A directory to search + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + A directory to search + sub-directory asserted to exist under directory + + + + Summary description for FileAssert. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + 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. + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + 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. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + 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. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + 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. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal + + + + 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 + + + + GlobalSettings is a place for setting default values used + by the framework in performing asserts. + + + + + Default tolerance for floating point equality + + + + + Class used to guard against unexpected argument values + by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + 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 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. + + + + + 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. + + + + + Method to handle an expected exception + + 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is under 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. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Indicates whether a result has been specified. + This is necessary because the result may be + null, so it's value cannot be checked. + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + 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. + + + + + + + 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 + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attribute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + 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. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are 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. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are Notequal, without regard to case. + + 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. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + 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. + + The regex pattern to be matched + The actual string + + + + 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 + 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. + + The regex pattern to be used + The actual string + + + + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It provides a number of instance modifiers + for use in initializing the test case. + + Note: Instance modifiers are getters that return + the same instance after modifying it's state. + + + + + The 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 + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + 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 + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Ignores this TestCase. + + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Marks this TestCase as Explicit + + + + + + Marks this TestCase as Explicit, specifying the reason. + + The reason. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Returns true if the result has been set + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + Gets a list of categories associated with this test. + + + + + Gets the property dictionary for this test + + + + + Provide the context information of the current test + + + + + Constructs a TestContext using the provided context dictionary + + A context dictionary + + + + 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 a TestAdapter representing the currently executing test in this context. + + + + + Gets a ResultAdapter representing the current result for the test + executing in this context. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputing files created + by this test run. + + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Constructs a TestAdapter for this context + + The context dictionary + + + + The name of the test. + + + + + The FullName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a context + + 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 TestStatus of current test. This enum will be used + in future versions of NUnit and so is to be preferred + to the TestState value. + + + + + Provides details about a test + + + + + Creates an instance of TestDetails + + 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. + + + + + 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 ResultState enum indicates the result of running a test + + + + + The result is inconclusive + + + + + The test was not runnable. + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + Helper class with static methods used to supply constraints + that operate on strings. + + + + + 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 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 fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + 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. + + + + + 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 + + + + + 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 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. + + 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 a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Writes the text for an expected value. + + The expected value. + + + + Writes the text for a modifier + + The modifier. + + + + 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 + + + + Abstract method to get the max line length + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + 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 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + Writes the text for a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Write the text for a modifier. + + The modifier. + + + + Writes the text for an expected value. + + The expected value. + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The constraint for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Gets or sets the maximum line length for this writer + + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + 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 + + + + + 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 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. + + + + + Attribute used to provide descriptive text about a + test case or fixture. + + + + + Construct the attribute + + Text describing the test + + + + Gets the test description + + + + + Enumeration indicating how the expected message parameter is to be used + + + + 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 + + + + + + Constructor for a non-specific exception + + + + + Constructor for a given type of exception + + The type of the expected exception + + + + Constructor for a given exception name + + The full name of the expected exception + + + + Gets or sets the expected exception type + + + + + Gets or sets the full Type name of the expected exception + + + + + Gets or sets the expected message text + + + + + Gets or sets the user message displayed in case of failure + + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets the name of a method to be used as an exception handler + + + + + 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 + + + + The reason test is marked explicit + + + + + 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 without giving a reason + for ignoring the test. + + + + + Constructs the attribute giving a reason for ignoring the test + + The reason for ignoring the test + + + + The reason for ignoring a test + + + + + 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 itemss 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 + + + + + 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-deliminted list of platforms + + + + 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 + + + + 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. + + + + + 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 + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + 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. + + + + + Default constructor + + + + + Summary description for MaxTimeAttribute. + + + + + Construct a MaxTimeAttribute, given a time in milliseconds. + + The maximum elapsed time in milliseconds + + + + RandomAttribute is used to supply a set of random values + to a single parameter of a parameterized test. + + + + + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. + + + + + Abstract base class for attributes that apply to parameters + and supply data for the parameter. + + + + + Gets the data to be provided to the specified parameter + + + + + 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. + + + + + 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 + + + + + Construct a set of doubles from 0.0 to 1.0, + specifying only the count. + + + + + + Construct a set of doubles from min to max + + + + + + + + Construct a set of ints from min to max + + + + + + + + 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 longs + + + + + + + + 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 + + + + RequiredAddinAttribute may be used to indicate the names of any addins + that must be present in order to run some or all of the tests in an + assembly. If the addin is not loaded, the entire assembly is marked + as NotRunnable. + + + + + Initializes a new instance of the class. + + The required addin. + + + + Gets the name of required addin. + + The required addin name. + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + 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. + + + + + 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 static (shared in VB) property + that returns a list of tests. + + + + + 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. + + + + + Provide actions to execute before and after tests. + + + + + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + + + + + Executed before each test is run + + Provides details about the test that is going to be run. + + + + Executed after each test is run + + Provides details about the test that has just been run. + + + + Provides the target for the action attribute + + 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")] + publc void TestDescriptionMethod() + {} + } + + + + + + Descriptive text for this test + + + + + 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 the list of arguments to a test case + + + + + Gets or sets the expected result. Use + ExpectedResult by preference. + + The result. + + + + Gets or sets the expected result. + + The result. + + + + Gets a flag indicating whether an expected + result has been set. + + + + + Gets a list of categories associated with this test; + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + Gets or sets the expected exception. + + The expected exception. + + + + Gets or sets the name the expected exception. + + The expected name of the exception. + + + + Gets or sets the expected message of the expected exception + + The expected message of the exception. + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets or sets the description. + + The description. + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the explicit status of the test + + + + + Gets or sets the reason for not running the test + + + + + Gets or sets the reason for not running the test. + Set has the side effect of marking the test as ignored. + + The ignore reason. + + + + FactoryAttribute indicates the source to be used to + provide test cases for a test method. + + + + + Construct with the name of the data source, which must + be a property, field or method of the test class itself. + + An array of the names of the factories that will provide data + + + + Construct with a Type, which must implement IEnumerable + + The Type that will provide data + + + + Construct with a Type and name. + that don't support params arrays. + + 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 + + + + + A Type to be used as a source + + + + + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. + + + + + [TestFixture] + public class ExampleClass + {} + + + + + 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. + + + + + + Descriptive text for this fixture + + + + + Gets and sets the category for this fixture. + May be a comma-separated list of categories. + + + + + Gets a list of categories for this fixture + + + + + The arguments originally provided to the attribute + + + + + Gets or sets a value indicating whether this should be ignored. + + true if ignore; otherwise, false. + + + + Gets or sets the ignore reason. May set Ignored as a side effect. + + The ignore reason. + + + + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. + + + + + Attribute used to identify a method that is + called before any tests in a fixture are run. + + + + + 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. + + + + + 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")] + 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. + + + + + Construct a TimeoutAttribute given a time in milliseconds + + 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 RequiresSTAAttribute + + + + + 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 on a separate thread. + + + + + Construct a RequiresThreadAttribute + + + + + Construct a RequiresThreadAttribute, specifying the apartment + + + + + 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 the data source to be used + + + + 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 the 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 + + + + + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + + + + + Abstract base class used for prefixes + + + + + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + + + + + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + Static UnsetObject used to detect derived constraints + failing to set the actual value. + + + + + The actual value being tested against a constraint + + + + + The display name of this Constraint for use by ToString() + + + + + Argument fields used by ToString(); + + + + + The builder holding this constraint + + + + + Construct a constraint with no arguments + + + + + Construct a constraint with one argument + + + + + Construct a constraint with two arguments + + + + + Sets the ConstraintBuilder holding this constraint + + + + + 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 MessageWriter on which to display the message + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by 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 + True for success, false for failure + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 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. + + + + + 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. + + + + + 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. + + + + + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + + + + + The base constraint + + + + + Construct given a base constraint + + + + + + Construct an AllItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + AndConstraint succeeds only if both members succeed. + + + + + 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 + + + + Create an AndConstraint from two other constraints + + The first constraint + The second 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 a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + Construct a TypeConstraint for a given Type + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. + + The writer on which the actual value is displayed + + + + Construct an AssignableFromConstraint for the type provided + + + + + + Test whether an object can be assigned from the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + + + + + Construct an AssignableToConstraint for the type provided + + + + + + Test whether an object can be assigned to the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + 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 attriute + Type and base constraint. + + + + + + + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. + + + + + Writes a description of the attribute to the specified writer. + + + + + Writes the actual value supplied to the specified writer. + + + + + 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 + + + + + + Tests whether the object provides the expected attribute. + + 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 + + + + + BasicConstraint is the abstract base for constraints that + perform a simple comparison to a constant value. + + + + + Initializes a new instance of the class. + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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. + + + + + 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 use the supplied EqualityAdapter. + NOTE: For internal use only. + + The EqualityAdapter 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 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 + + + + Flag the constraint to ignore case and return self. + + + + + Construct a CollectionContainsConstraint + + + + + + Test whether the expected item is contained in the collection + + + + + + + Write a descripton of the constraint to a MessageWriter + + + + + + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + + + + + Construct a CollectionEquivalentConstraint + + + + + + Test whether two collections are equivalent + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionOrderedConstraint is used to test whether a collection is ordered. + + + + + Construct a CollectionOrderedConstraint + + + + + Modifies the constraint to use an IComparer and returns self. + + + + + Modifies the constraint to use an IComparer<T> and returns self. + + + + + Modifies the constraint to use a Comparison<T> and returns self. + + + + + Modifies the constraint to test ordering by the value of + a specified property and returns self. + + + + + Test whether the collection is ordered + + + + + + + Write a description of the constraint to a MessageWriter + + + + + + Returns the string representation of the constraint. + + + + + + If used performs a reverse comparison + + + + + 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 + + + + Test whether the actual collection is a subset of + the expected collection provided. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. + + + + + Construct a CollectionTally object from a comparer and a collection + + + + + 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 + + + + The number of objects remaining in the tally + + + + + ComparisonAdapter class centralizes all comparisons of + values in NUnit, adapting to the use of any provided + IComparer, IComparer<T> or Comparison<T> + + + + + Returns a ComparisonAdapter that wraps an IComparer + + + + + Returns a ComparisonAdapter that wraps an IComparer<T> + + + + + Returns a ComparisonAdapter that wraps a Comparison<T> + + + + + Compares two objects + + + + + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. + + + + + Construct a ComparisonAdapter for an IComparer + + + + + Compares two objects + + + + + + + + Construct a default ComparisonAdapter + + + + + ComparisonAdapter<T> extends ComparisonAdapter and + allows use of an IComparer<T> or Comparison<T> + to actually perform the comparison. + + + + + Construct a ComparisonAdapter for an IComparer<T> + + + + + Compare a Type T to an object + + + + + Construct a ComparisonAdapter for a Comparison<T> + + + + + 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. This class supplies the Using modifiers. + + + + + ComparisonAdapter to be used in making the comparison + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Modifies the constraint to use an IComparer and returns self + + + + + Modifies the constraint to use an IComparer<T> and returns self + + + + + Modifies the constraint to use a Comparison<T> and returns self + + + + + Delegate used to delay evaluation of the actual value + to be used in evaluating a 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 reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + + + + + 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 expresson 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. + + + + + OperatorStack is a type-safe stack for holding ConstraintOperators + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified operator onto the stack. + + The op. + + + + Pops the topmost operator from the stack. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost operator without modifying the stack. + + The top. + + + + ConstraintStack is a type-safe stack for holding Constraints + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. + + The constraint. + + + + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost constraint without modifying the stack. + + 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. + + + + + 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. + + + + + 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. + + + + + 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 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 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 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 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 suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled 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 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 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 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 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 same path or under 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. + + + + + 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 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 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. + + + + + With is currently a NOP - reserved for future use. + + + + + 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 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 whether a collection is ordered + + + + + 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. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + Flag the constraint to ignore case and return self. + + + + + Applies a delay to the match so that a match can be evaluated in the future. + + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + If the value of is less than 0 + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + The time interval used for polling + If the value of is less than 0 + + + + Test whether the constraint is satisfied by a given value + + 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 + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + EmptyCollectionConstraint tests whether a collection is empty. + + + + + Check that the collection is empty + + + + + + + Write the constraint description to a MessageWriter + + + + + + 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. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EmptyDirectoryConstraint is used to test that a directory is empty + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + EmptyStringConstraint tests whether a string is empty. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EndsWithConstraint can test whether a string ends + with an expected substring. + + + + + 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 + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + Modify the constraint to ignore case in matching. + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + If true, strings in error messages will be clipped + + + + + NUnitEqualityComparer used to test equality. + + + + + Initializes a new instance of the class. + + The expected value. + + + + Flag the constraint to use a tolerance when determining equality. + + Tolerance value to be used + 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 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 + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Write description of this constraint + + 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 enumerations, 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 + + + + 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. + + + + + 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 + + + + EqualityAdapter class handles all equality comparisons + that use an IEqualityComparer, IEqualityComparer<T> + or a ComparisonAdapter. + + + + + 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 EqualityAdapter that wraps an IComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + + + + + Returns an EqualityAdapter that wraps an IComparer<T>. + + + + + Returns an EqualityAdapter that wraps a Comparison<T>. + + + + + EqualityAdapter that wraps an IComparer. + + + + + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. + + + + + EqualityAdapter that wraps an IComparer. + + + + + EqualityAdapterList represents a list of EqualityAdapters + in a common class across platforms. + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + Test that an object is of the exact type specified + + 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 + + The MessageWriter to use + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overriden to write additional information + in the case of an Exception. + + The MessageWriter to use + + + + 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 + + + + + FailurePointList represents a set of FailurePoints + in a cross-platform way. + + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + 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/ + + + + + + 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 + + + + 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 + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is greater than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + 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 + + + + Test whether an object is of the specified type or a derived type + + 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 + + The MessageWriter to use + + + + Tests whether a value is less than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is less than or equal to the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Static methods used in creating messages + + + + + Static string used when strings are clipped + + + + + 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 + + + + 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 enumerable, + 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 + + + + + Test that the actual value is an NaN + + + + + + + Write the constraint description to a specified writer + + + + + + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. + + + + + Construct a NoItemConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + NullConstraint tests that the actual value is null + + + + + Initializes a new instance of the class. + + + + + NullEmptyStringConstraint tests whether a string is either null or empty. + + + + + Constructs a new NullOrEmptyStringConstraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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. + + + + + Compares two objects + + + + + + + + Returns the default NUnitComparer. + + + + + Generic version of NUnitComparer + + + + + + Compare two objects of the same type + + + + + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. + + + + + + + + + + Compares two objects for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + + If true, all string comparisons will ignore case + + + + + 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 occured. + + + + + RecursionDetector used to check for recursion when + evaluating self-referencing enumerables. + + + + + Compares two objects for equality within a tolerance, setting + the tolerance to the actual tolerance used if an empty + tolerance is supplied. + + + + + 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 + + + + 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. + + + + + RecursionDetector detects when a comparison + between two enumerables has reached a point + where the same objects that were previously + compared are again being compared. This allows + the caller to stop the comparison if desired. + + + + + Check whether two objects have previously + been compared, returning true if they have. + The two objects are remembered, so that a + second call will always return true. + + + + + OrConstraint succeeds if either member succeeds + + + + + Create an OrConstraint from two other constraints + + The first constraint + The second 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 + + + + Write a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. + + + + + The expected path used in the constraint + + + + + Flag indicating whether a caseInsensitive comparison should be made + + + + + Construct a PathConstraint for a give expected path + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns true if the expected path and actual path match + + + + + Returns the string representation of this constraint + + + + + Transform the provided path to its canonical form so that it + may be more easily be compared with other paths. + + The original path + The path in canonical form + + + + Test whether one path in canonical form is under another. + + The first path - supposed to be the parent path + The second path - supposed to be the child path + Indicates whether case should be ignored + + + + + Modifies the current instance to be case-insensitve + and returns it. + + + + + Modifies the current instance to be case-sensitve + and returns it. + + + + + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. + + + + + Construct a PredicateConstraint from a predicate + + + + + Determines whether the predicate succeeds when applied + to the actual value. + + + + + Writes the description to a MessageWriter + + + + + 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 + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + 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 vaue + of the property. The two constraints are now separate. + + + + + Initializes a new instance of the class. + + The name of the property. + + + + Test whether the property exists for a given object + + The object to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. + + The writer on which the actual value is displayed + + + + 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. + To. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Resolve the current expression to a Constraint + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + 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 either + of the argument constraints is 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. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + 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 the string representation of the constraint. + + A string representing the constraint + + + + Resolves the ReusableConstraint by returning the constraint + that it originally wrapped. + + A resolved constraint + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + 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 + + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + 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. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The expected path + The actual path + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overridden in ThrowsNothingConstraint to write + information about the exception that was actually caught. + + The writer on which the actual value is displayed + + + + 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. + + + + + Constructs a linear tolerance of a specdified amount + + + + + Constructs a tolerance given an amount and ToleranceMode + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + 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. + + + + + Returns a zero Tolerance object, equivalent to + specifying an exact match. + + + + + Gets the ToleranceMode for the current Tolerance + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance is empty. + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared values my deviate from each other. + + + + + Compares two values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + Check that all items are unique. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + XmlSerializableConstraint tests whether + an object is serializable in XML format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Represents a constraint that succeeds if all the + members of a collection match a base constraint. + + + + + Abstract base for operators that indicate how to + apply a constraint to items in a collection. + + + + + PrefixOperator takes a single constraint and modifies + it's action in some way. + + + + + 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. + + + + + 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. + + + + + + The syntax element preceding this operator + + + + + The syntax element folowing 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. + + + + + + Returns the constraint created by applying this + prefix to another constraint. + + + + + + + Constructs a CollectionOperator + + + + + 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 + + + + + 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. + + + + + + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. + + + + + Gets the left precedence of the operator + + + + + Gets the right precedence of the operator + + + + + 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. + + + + + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. + + + + + 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. + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + 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 + + + + + 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. + + + + + 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. + + + + + + Gets the name of the property to which the operator applies + + + + + 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 modifes the + order of evaluation because of its precedence. + + + + + Constructor for the WithOperator + + + + + Returns a constraint that wraps its argument + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + + + + + + + Compares two objects of a given Type for equality within a tolerance + + The first object to compare + The second object to compare + The tolerance to use in the comparison + + + + diff --git a/packages/NUnit.2.6.3/license.txt b/packages/NUnit.2.6.3/license.txt new file mode 100644 index 0000000..b12903a --- /dev/null +++ b/packages/NUnit.2.6.3/license.txt @@ -0,0 +1,15 @@ +Copyright 2002-2013 Charlie Poole +Copyright 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov +Copyright 2000-2002 Philip A. Craig + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. + +Portions Copyright 2002-2013 Charlie Poole or Copyright 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright 2000-2002 Philip A. Craig + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. diff --git a/packages/NUnit.3.4.1/CHANGES.txt b/packages/NUnit.3.4.1/CHANGES.txt new file mode 100644 index 0000000..93e38aa --- /dev/null +++ b/packages/NUnit.3.4.1/CHANGES.txt @@ -0,0 +1,1126 @@ +NUnit 3.4 - June 30, 2016 + +Console Runner + + * A new option, --list-extensions, will display all the engine extensions that + have been installed by the engine. + +Issues Resolved + + * 1623 NUnit 3.4 is not integrated with TeamCity + * 1626 NUnit.ConsoleRunner is not picking up NUnit.Extension.NUnitV2ResultWriter + * 1628 Agent's process stays in memory when it was failed to unload AppDomain + * 1635 Console option to list loaded extensions + +NUnit 3.4 - June 25, 2016 + +Framework + + * Improvements in comparing equality using IEquatable + * Test case names will only be truncated if the runner requests it or it is overridden on the command line + with the --test-name-format option + * The .NET 2.0 version of the framework now includes LINQ. If your tests target .NET 2.0, you can now use + LINQ queries in your tests + +Engine + + * The TeamCity event listener has been separated out into an engine extension + * Fixed numerous issues around thread safety of parallel test runs + * Additional fixes to reduce memory usage + * Fixes for Mono 4.4 + +Console Runner + + * There is a new --params command line option that allows you to pass parameters to your tests + which can be retrieved using TestContext.Parameters + * Another new command line option --loaduserprofile causes the User Profile to be loaded into the + NUnit Agent process. + +Issues Resolved + + * 329 (CLI) Runner does not report AppDomain unloading timeout + * 720 Need a way to get test-specific command-line arguments at runtime + * 1010 Need to control engine use of extensions + * 1139 Nunit3 console doesn't show test output continously + * 1225 The --teamcity option should really be an extension + * 1241 Make TestDirectory accessible when TestCaseSource attributes are evaluated + * 1366 Classname for inherited test is not correct + * 1371 Support `dotnet test` in .NET CLI and .NET Core + * 1379 Console returns 0 for invalid fixtures + * 1422 Include TestListWithEmptyLine.tst in ZIP Package + * 1423 SingleThreaded attribute should raise an error if a thread is required + * 1425 Lazy initialization of OutWriter in TestResult is not thread safe + * 1427 Engine extensions load old packages + * 1430 TestObjects are retained for lifetime of test run, causing high memory usage + * 1432 NUnit hangs when reporting to TeamCity + * 1434 TestResult class needs to be thread-safe + * 1435 Parallel queue creation needs to be thread-safe + * 1436 CurrentFramework and Current Platform need to be more thread-safe + * 1439 EqualConstraint does Not use Equals Override on the Expected Object + * 1441 Add Linq for use internally in .NET 2.0 code + * 1446 TestOrderAttributeTests is not public + * 1450 Silverlight detection doesn't work when building on 32-bit OS + * 1457 Set the 2.0 build to ignore missing xml dcoumentation + * 1463 Should TestResult.AssertCount have a public setter? + * 1464 TNode.EscapeInvalidXmlCharacters recreates Regex continually + * 1470 Make EventQueue and associated classes lock-less and thread safe + * 1476 Examine need for "synchronous" events in event queue + * 1481 TestCase with generic return type causes NullReferenceException + * 1483 Remoting exceptions during test execution + * 1484 Comparing Equality using IEquatable Should Use Most Specific Method + * 1493 NUnit 2 test results report ParameterizedMethod but should be ParameterizedTest + * 1507 NullReferenceException when null arguments are used in TestFixtureAttribute + * 1513 Add new teamcity extension to packages + * 1518 NUnit does not send the "testStarted" TeamCity service message when exception was thrown from SetUp/OneTimeSetUp + * 1520 Detect Portable, Silverlight and Compact and give error message + * 1528 Use of Sleep(0) in NUnit + * 1543 Blank name attribute in nunit2-formatted XML result file test-run element + * 1547 Create separate assembly for System.Linq compatibility classes + * 1548 Invalid Exception when engine is in a 32-bit process + * 1549 Changing default behavior for generating test case names + * 1551 Path in default .addins file for ConsoleRunner package may not exist + * 1555 EndsWith calls in Constraint constructor can cause major perf issues + * 1560 Engine writes setting file unnecessarily + * 1573 Move Nunit.Portable.Agent to new Repo + * 1579 NUnit v3 dangerously overrides COMPLUS_Version environment variable + * 1582 Mono 4.4.0 Causes Test Failures + * 1593 Nunit Console Runner 3.2.1 and Mono 4.4 throws RemotingException + * 1597 Move Portable agent to its own repository + * 1605 TeamCity package has no pre-release suffix + * 1607 nunit.nuget.addins discovery pattern is wrong then restored through project.json + * 1617 Load user profile on test runners + +NUnit 3.2.1 - April 19, 2016 + +Framework + + * The output and error files are now thread safe when running tests in parallel + * Added a .NET 3.5 build of the framework preventing conflicts with the compatiblity classes in the 2.0 framework + * Added a SingleThreadedAttribute to be added to a TestFixture to indicate all child tests should run on the same thread + +Engine + + * Unless required, run all tests within a fixture on the same thread + * Added an EventListener extension point + * Reduced memory usage + +Console Runner + + * No longer probes for newer versions of the engine, instead uses the engine that is included with the console + +Issues Resolved + + * 332 Add CF to the Appveyor CI build + * 640 Keep CF Build (and other future builds) in Sync + * 773 Upgrade Travis CI from Legacy Infrastructure + * 1141 Explicit Tests get run when using --where with some filters + * 1161 NUnit3-Console should disallow the combination of --inprocess and --x86, giving an error message + * 1208 Apartment on assembly level broken + * 1231 Build may silently fail some tests + * 1247 Potential memory issue + * 1266 SetCultureAttribute does not work if set on assembly level + * 1302 Create EventListener ExtensionPoint for the Engine + * 1317 Getting CF framework unit tests running on CI build + * 1318 NUnit console runner fails with error code -100 + * 1327 TestCaseSource in NUnit 3 converts an argument declared as String[] to String + * 1329 Unable to build without Compact Framework + * 1333 Single Thread per Worker + * 1338 BUILDING.txt is outdated + * 1349 Collision on System.Func from nunit.framework with System.Core in .Net 3.5 (CS0433) + * 1352 Tests losing data setup on thread + * 1359 Compilation error in NUnitPortableDriverTests.cs + * 1383 Skip Silverlight build if SDK not installed + * 1386 Bug when using Assert.Equals() with types that explicitly implement IEquatable + * 1390 --testlist with file with blank first line causes IndexOutOfRangeException + * 1399 Fixed NullReference issue introduced by the fix for #681 + * 1405 ITestRunner.StopRun throws exception of type 'System.MissingMethodException' + * 1406 TextCapture is not threadsafe but is used to intercept calls that are expected to be threadsafe + * 1410 Make OutFile and ErrFile streamwriters synchronized + * 1413 Switch console to use a local engine + +NUnit 3.2 - March 5, 2016 + +Framework + + * Added an Order attribute that defines the order in which tests are run + * Added Assert.ThrowsAsync for testing if async methods throw an exception + * You can now compare unlike collections using Is.EquivalentTo().Using(...) + * Added the ability to add custom message formatters to MsgUtils + * TestCaseSourceAttribute now optionally takes an array of parameters that can be passed to the source method + * Added Is.Zero and Is.Not.Zero to the fluent syntax as a shorter option for Is.EqualTo(0) and Is.Not.EqualTo(0) + +Engine + + * Engine extensions can be installed via NuGet packages + +Issues Resolved + + * 170 Test Order Attribute + * 300 Create an NUnit Visual Studio Template + * 464 Async delegate assertions + * 532 Batch runner for Silverlight tests + * 533 Separate NUnitLite runner and autorunner + * 681 NUnit agent cannot resolve test dependency assemblies when mixed mode initialization runs in the default AppDomain + * 793 Replace CoreEngine by use of Extensions + * 907 Console report tests are too fragile + * 922 Wrap Console in NUnitLite + * 930 Switch from MSBuild based build system to Cake + * 981 Define NUnit Versioning for post-3.0 Development + * 1004 Poor formatting of results for Assert.AreEqual(DateTimeOffset, DateTimeOffset) + * 1018 ArgumentException when 2.x version of NUnit Framework is in the bin directory + * 1022 Support Comparing Unlike Collections using Is.EquivalentTo().Using(...) + * 1044 Re-order Test Summary Errors/Failures + * 1066 ApartmentAttribute and TestCaseAttribute(s) do not work together + * 1103 Can't use TestCaseData from base class + * 1109 NullReferenceException when using inherited property for ValueSource + * 1113 Console runner and xml output consistency + * 1117 Fix misbehaviour of Throws.Exception with non-void returning functions + * 1120 NUnitProject should parse .nunit project files containing Xml Declarations + * 1121 Usage of field set to null as value source leads to somewhat cryptic error + * 1122 Region may be disposed before test delegate is executed + * 1133 Provide a way to install extensions as nuget packages + * 1136 Don't allow V2 framework to update in V2 driver tests + * 1171 A bug when using Assert.That() with Is.Not.Empty + * 1185 Engine finds .NET 4.0 Client Profile twice + * 1187 ITestAssemblyRunner.StopRun as implemented by NUnitTestAssemblyRunner + * 1195 name attribute in test-suite and test-results element of output xml is different to nunit 2.6.4 using nunit2-format + * 1196 Custom value formatter for v3 via MsgUtils + * 1210 Available runtimes issues + * 1230 Add ability for testcasedatasource to have parameters passed to methods + * 1233 Add TestAssemblyRunner tests to both portable and silverlight builds + * 1234 Have default NUnitLite Runner Program.cs return exit code + * 1236 Make Appveyor NuGet feed more useable + * 1246 Introduce Is.Zero syntax to test for zero + * 1252 Exception thrown when any assembly is not found + * 1261 TypeHelper.GetDisplayName generates the wrong name for generic types with nested classes + * 1278 Fix optional parameters in TestCaseAttribute + * 1282 TestCase using Params Behaves Oddly + * 1283 Engine should expose available frameworks. + * 1286 value of the time attribute in nunit2 outputs depends on the machine culture + * 1297 NUnit.Engine nuget package improvements + * 1301 Assert.AreNotSame evaluates ToString unnecessarily + +NUnit 3.0.1 - December 1, 2015 + +Console Runner + + * The Nunit.Runners NuGet package was updated to become a meta-package that pulls in the NUnit.Console package + * Reinstated the --pause command line option that will display a message box allowing you to attach a debugger if the --debug option does not work + +Issues Resolved + + * 994 Add max number of Agents to the NUnit project file + * 1014 Ensure NUnit API assembly updates with MSI installs + * 1024 Added --pause flag to console runner + * 1030 Update Nunit.Runners package to 3.0 + * 1033 "No arguments were provided" with Theory and Values combination + * 1035 Check null arguments + * 1037 Async tests not working on Windows 10 Universal + * 1041 NUnit2XmlResult Writer is reporting Sucess when test fails + * 1042 NUnit2 reports on 3.0 is different than 2.6.4 + * 1046 FloatingPointNumerics.AreAlmostEqualUlps throws OverflowException + * 1049 Cannot select Generic tests from command line + * 1050 Do not expose System.Runtime.CompilerServices.ExtensionAttribute to public + * 1054 Create nuget feeds for CI builds on Appveyor + * 1055 nunit3 console runner --where option does not return error on invalid selection string + * 1060 Remove "Version 3" from NUnit Nuget Package + * 1061 Nunit30Settings.xml becomes corrupted + * 1062 Console.WriteLine statements in "OneTimeSetUp" and "OneTimeTearDown" annotated methods are not directed to the console when using nunit3-console.exe runner + * 1063 Error in Random Test + +NUnit 3.0.0 Final Release - November 15, 2015 + +Issues Resolved + + * 635 Mono 4.0 Support + +NUnit 3.0.0 Release Candidate 3 - November 13, 2015 + +Engine + + * The engine now only sets the config file for project.nunit to project.config if project.config exists. Otherwise, each assembly uses its own config, provided it is run in a separate AppDomain by itself. + + NOTE: It is not possible for multiple assemblies in the same AppDomain to use different configs. This is not an NUnit limitation, it's just how configs work! + +Issues Resolved + + * 856 Extensions support for third party runners in NUnit 3.0 + * 1003 Delete TeamCityEventHandler as it is not used + * 1015 Specifying .nunit project and --framework on command line causes crash + * 1017 Remove Assert.Multiple from framework + +NUnit 3.0.0 Release Candidate 2 - November 8, 2015 + +Engine + + * The IDriverFactory extensibility interface has been modified. + +Issues Resolved + + * 970 Define PARALLEL in CF build of nunitlite + * 978 It should be possible to determine version of NUnit using nunit console tool + * 983 Inconsistent return codes depending on ProcessModel + * 986 Update docs for parallel execution + * 988 Don't run portable tests from NUnit Console + * 990 V2 driver is passing invalid filter elements to NUnit + * 991 Mono.Options should not be exposed to public directly + * 993 Give error message when a regex filter is used with NUnit V2 + * 997 Add missing XML Documentation + * 1008 NUnitLite namespace not updated in the NuGet Packages + +NUnit 3.0.0 Release Candidate - November 1, 2015 + +Framework + + * The portable build now supports ASP.NET 5 and the new Core CLR. + + NOTE: The `nunit3-console` runner cannot run tests that reference the portable build. + You may run such tests using NUnitLite or a platform-specific runner. + + * `TestCaseAttribute` and `TestCaseData` now allow modifying the test name without replacing it entirely. + * The Silverlight packages are now separate downloads. + +NUnitLite + + * The NUnitLite runner now produces the same output display and XML results as the console runner. + +Engine + + * The format of the XML result file has been finalized and documented. + +Console Runner + + * The console runner program is now called `nunit3-console`. + * Console runner output has been modified so that the summary comes at the end, to reduce the need for scrolling. + +Issues Resolved + + * 59 Length of generated test names should be limited + * 68 Customization of test case name generation + * 404 Split tests between nunitlite.runner and nunit.framework + * 575 Add support for ASP.NET 5 and the new Core CLR + * 783 Package separately for Silverlight + * 833 Intermittent failure of WorkItemQueueTests.StopQueue_WithWorkers + * 859 NUnit-Console output - move Test Run Summary to end + * 867 Remove Warnings from Ignored tests + * 868 Review skipped tests + * 887 Move environment and settings elements to the assembly suite in the result file + * 899 Colors for ColorConsole on grey background are too light + * 904 InternalPreserveStackTrace is not supported on all Portable platforms + * 914 Unclear error message from console runner when assembly has no tests + * 916 Console runner dies when test agent dies + * 918 Console runner --where parameter is case sensitive + * 920 Remove addins\nunit.engine.api.dll from NuGet package + * 929 Rename nunit-console.exe + * 931 Remove beta warnings from NuGet packages + * 936 Explicit skipped tests not displayed + * 939 Installer complains about .NET even if already installed + * 940 Confirm or modify list of packages for release + * 947 Breaking API change in ValueSourceAttribute + * 949 Update copyright in NUnit Console + * 954 NUnitLite XML output is not consistent with the engine's + * 955 NUnitLite does not display the where clause + * 959 Restore filter options for NUnitLite portable build + * 960 Intermittent failure of CategoryFilterTests + * 967 Run Settings Report is not being displayed. + +NUnit 3.0.0 Beta 5 - October 16, 2015 + +Framework + + * Parameterized test cases now support nullable arguments. + * The NUnit framework may now be built for the .NET Core framework. Note that this is only available through building the source code. A binary will be available in the next release. + +Engine + + * The engine now runs multiple test assemblies in parallel by default + * The output XML now includes more information about the test run, including the text of the command used, any engine settings and the filter used to select tests. + * Extensions may now specify data in an identifying attribute, for use by the engine in deciding whether to load that extension. + + +Console Runner + + * The console now displays all settings used by the engine to run tests as well as the filter used to select tests. + * The console runner accepts a new option --maxagents. If multiple assemblies are run in separate processes, this value may be used to limit the number that are executed simultaneously in parallel. + * The console runner no longer accepts the --include and --exclude options. Instead, the new --where option provides a more general way to express which tests will be executed, such as --where "cat==Fast && Priority==High". See the docs for details of the syntax. + * The new --debug option causes NUnit to break in the debugger immediately before tests are run. This simplifies debugging, especially when the test is run in a separate process. + +Issues Resolved + + * 41 Check for zeroes in Assert messages + * 254 Finalize XML format for test results + * 275 NUnitEqualityComparer fails to compare IEquatable where second object is derived from T + * 304 Run test Assemblies in parallel + * 374 New syntax for selecting tests to be run + * 515 OSPlatform.IsMacOSX doesn't work + * 573 nunit-console hangs on Mac OS X after all tests have run + * 669 TeamCity service message should have assembly name as a part of test name. + * 689 The TeamCity service message "testFinished" should have an integer value in the "duration" attribute + * 713 Include command information in XML + * 719 We have no way to configure tests for several assemblies using NUnit project file and the common installation from msi file + * 735 Workers number in xml report file cannot be found + * 784 Build Portable Framework on Linux + * 790 Allow Extensions to provide data through an attribute + * 794 Make it easier to debug tests as well as NUnit itself + * 801 NUnit calls Dispose multiple times + * 814 Support nullable types with TestCase + * 818 Possible error in Merge Pull Request #797 + * 821 Wrapped method results in loss of result information + * 822 Test for Debugger in NUnitTestAssemblyRunner probably should not be in CF build + * 824 Remove unused System.Reflection using statements + * 826 Randomizer uniqueness tests fail randomly! + * 828 Merge pull request #827 (issue 826) + * 830 Add ability to report test results synchronously to test runners + * 837 Enumerators not disposed when comparing IEnumerables + * 840 Add missing copyright notices + * 844 Pull Request #835 (Issue #814) does not build in CF + * 847 Add new --process:inprocess and --inprocess options + * 850 Test runner fails if test name contains invalid xml characters + * 851 'Exclude' console option is not working in NUnit Lite + * 853 Cannot run NUnit Console from another directory + * 860 Use CDATA section for message, stack-trace and output elements of XML + * 863 Eliminate core engine + * 865 Intermittent failures of StopWatchTests + * 869 Tests that use directory separator char to determine platform misreport Linux on MaxOSX + * 870 NUnit Console Runtime Environment misreports on MacOSX + * 874 Add .NET Core Framework + * 878 Cannot exclude MacOSX or XBox platforms when running on CF + * 892 Fixed test runner returning early when executing more than one test run. + * 894 Give nunit.engine and nunit.engine.api assemblies strong names + * 896 NUnit 3.0 console runner not placing test result xml in --work directory + +NUnit 3.0.0 Beta 4 - August 25, 2015 + +Framework + + * A new RetryAttribute allows retrying of failing tests. + * New SupersetConstraint and Is.SupersetOf syntax complement SubsetConstraint. + * Tests skipped due to ExplicitAttribute are now reported as skipped. + +Engine + + * We now use Cecil to examine assemblies prior to loading them. + * Extensions are no longer based on Mono.Addins but use our own extension framework. + +Issues Resolved + + * 125 3rd-party dependencies should be downloaded on demand + * 283 What should we do when a user extension does something bad? + * 585 RetryAttribute + * 642 Restructure MSBuild script + * 649 Change how we zip packages + * 654 ReflectionOnlyLoad and ReflectionOnlyLoadFrom + * 664 Invalid "id" attribute in the report for case "test started" + * 685 In the some cases when tests cannot be started NUnit returns exit code "0" + * 728 Missing Assert.That overload + * 741 Explicit Tests get run when using --exclude + * 746 Framework should send events for all tests + * 747 NUnit should apply attributes even if test is non-runnable + * 749 Review Use of Mono.Addins for Engine Extensibility + * 750 Include Explicit Tests in Test Results + * 753 Feature request: Is.SupersetOf() assertion constraint + * 755 TimeOut attribute doesn't work with TestCaseSource Attribute + * 757 Implement some way to wait for execution to complete in ITestEngineRunner + * 760 Packaging targets do not run on Linux + * 766 Added overloads for True()/False() accepting booleans + * 778 Build and build.cmd scripts invoke nuget.exe improperly + * 780 Teamcity fix + * 782 No sources for 2.6.4 + +NUnit 3.0.0 Beta 3 - July 15, 2015 + +Framework + + * The RangeAttribute has been extended to support more data types including + uint, long and ulong + * Added platform support for Windows 10 and fixed issues with Windows 8 and + 8.1 support + * Added async support to the portable version of NUnit Framework + * The named members of the TestCaseSource and ValueSource attributes must now be + static. + * RandomAttribute has been extended to add support for new data types including + uint, long, ulong, short, ushort, float, byte and sbyte + * TestContext.Random has also been extended to add support for new data types including + uint, long, ulong, short, ushort, float, byte, sbyte and decimal + * Removed the dependency on Microsoft.Bcl.Async from the NUnit Framework assembly + targeting .NET 4.0. If you want to write async tests in .NET 4.0, you will need + to reference the NuGet package yourself. + * Added a new TestFixtureSource attribute which is the equivalent to TestCaseSource + but provides for instantiation of fixtures. + * Significant improvements have been made in how NUnit deduces the type arguments of + generic methods based on the arguments provided. + +Engine + + * If the target framework is not specified, test assemblies that are compiled + to target .NET 4.5 will no longer run in .NET 4.0 compatibility mode + + Console + + * If the console is run without arguments, it will now display help + +Issues Resolved + + * 47 Extensions to RangeAttribute + * 237 System.Uri .ctor works not properly under Nunit + * 244 NUnit should properly distinguish between .NET 4.0 and 4.5 + * 310 Target framework not specified on the AppDomain when running against .Net 4.5 + * 321 Rationalize how we count tests + * 472 Overflow exception and DivideByZero exception from the RangeAttribute + * 524 int and char do not compare correctly? + * 539 Truncation of string arguments + * 544 AsyncTestMethodTests for 4.5 Framework fails frequently on Travis CI + * 656 Unused parameter in Console.WriteLine found + * 670 Failing Tests in TeamCity Build + * 673 Ensure proper disposal of engine objects + * 674 Engine does not release test assemblies + * 679 Windows 10 Support + * 682 Add Async Support to Portable Framework + * 683 Make FrameworkController available in portable build + * 687 TestAgency does not launch agent process correctly if runtime type is not specified (i.e. v4.0) + * 692 PlatformAttribute_OperatingSystemBitNess fails when running in 32-bit process + * 693 Generic Test Method cannot determine type arguments for fixture when passed as IEnumerable + * 698 Require TestCaseSource and ValueSource named members to be static + * 703 TeamCity non-equal flowid for 'testStarted' and 'testFinished' messages + * 712 Extensions to RandomAttribute + * 715 Provide a data source attribute at TestFixture Level + * 718 RangeConstraint gives error with from and two args of differing types + * 723 Does nunit.nuspec require dependency on Microsoft.Bcl.Async? + * 724 Adds support for Nullable to Assert.IsTrue and Assert.IsFalse + * 734 Console without parameters doesn't show help + +NUnit 3.0.0 Beta 2 - May 12, 2015 + +Framework + + * The Compact Framework version of the framework is now packaged separately + and will be distributed as a ZIP file and as a NuGet package. + * The NUnit 2.x RepeatAttribute was added back into the framework. + * Added Throws.ArgumentNullException + * Added GetString methods to NUnit.Framework.Internal.RandomGenerator to + create repeatable random strings for testing + * When checking the equality of DateTimeOffset, you can now use the + WithSameOffset modifier + * Some classes intended for internal usage that were public for testing + have now been made internal. Additional classes will be made internal + for the final 3.0 release. + +Engine + + * Added a core engine which is a non-extensible, minimal engine for use by + devices and similar situations where reduced functionality is compensated + for by reduced size and simplicity of usage. See + https://github.com/nunit/dev/wiki/Core-Engine for more information. + +Issues Resolved + + * 22 Add OSArchitecture Attribute to Environment node in result xml + * 24 Assert on Dictionary Content + * 48 Explicit seems to conflict with Ignore + * 168 Create NUnit 3.0 documentation + * 196 Compare DateTimeOffsets including the offset in the comparison + * 217 New icon for the 3.0 release + * 316 NUnitLite TextUI Runner + * 320 No Tests found: Using parametrized Fixture and TestCaseSource + * 360 Better exception message when using non-BCL class in property + * 454 Rare registry configurations may cause NUnit to fail + * 478 RepeatAttribute + * 481 Testing multiple assemblies in nunitlite + * 538 Potential bug using TestContext in constructors + * 546 Enable Parallel in NUnitLite/CF (or more) builds + * 551 TextRunner not passing the NumWorkers option to the ITestAssemblyRunner + * 556 Executed tests should always return a non-zero duration + * 559 Fix text of NuGet packages + * 560 Fix PackageVersion property on wix install projects + * 562 Program.cs in NUnitLite NuGet package is incorrect + * 564 NUnitLite Nuget package is Beta 1a, Framework is Beta 1 + * 565 NUnitLite Nuget package adds Program.cs to a VB Project + * 568 Isolate packaging from building + * 570 ThrowsConstraint failure message should include stack trace of actual exception + * 576 Throws.ArgumentNullException would be nice + * 577 Documentation on some members of Throws falsely claims that they return `TargetInvocationException` constraints + * 579 No documentation for recommended usage of TestCaseSourceAttribute + * 580 TeamCity Service Message Uses Incorrect Test Name with NUnit2Driver + * 582 Test Ids Are Not Unique + * 583 TeamCity service messages to support parallel test execution + * 584 Non-runnable assembly has incorrect ResultState + * 609 Add support for integration with TeamCity + * 611 Remove unused --teamcity option from CF build of NUnitLite + * 612 MaxTime doesn't work when used for TestCase + * 621 Core Engine + * 622 nunit-console fails when use --output + * 628 Modify IService interface and simplify ServiceContext + * 631 Separate packaging for the compact framework + * 646 ConfigurationManager.AppSettings Params Return Null under Beta 1 + * 648 Passing 2 or more test assemblies targeting > .NET 2.0 to nunit-console fails + +NUnit 3.0.0 Beta 1 - March 25, 2015 + +General + + * There is now a master windows installer for the framework, engine and console runner. + +Framework + + * We no longer create a separate framework build for .NET 3.5. The 2.0 and + 3.5 builds were essentially the same, so the former should now be used + under both runtimes. + * A new Constraint, DictionaryContainsKeyConstraint, may be used to test + that a specified key is present in a dictionary. + * LevelOfParallelizationAttribute has been renamed to LevelOfParallelismAttribute. + * The Silverlight runner now displays output in color and includes any + text output created by the tests. + * The class and method names of each test are included in the output xml + where applicable. + * String arguments used in test case names are now truncated to 40 rather + than 20 characters. + +Engine + + * The engine API has now been finalized. It permits specifying a minimum + version of the engine that a runner is able to use. The best installed + version of the engine will be loaded. Third-party runners may override + the selection process by including a copy of the engine in their + installation directory and specifying that it must be used. + * The V2 framework driver now uses the event listener and test listener + passed to it by the runner. This corrects several outstanding issues + caused by events not being received and allows selecting V2 tests to + be run from the command-line, in the same way that V3 tests are selected. + +Console + + * The console now defaults to not using shadowcopy. There is a new option + --shadowcopy to turn it on if needed. + +Issues Resolved + + * 224 Silverlight Support + * 318 TestActionAttribute: Retrieving the TestFixture + * 428 Add ExpectedExceptionAttribute to C# samples + * 440 Automatic selection of Test Engine to use + * 450 Create master install that includes the framework, engine and console installs + * 477 Assert does not work with ArraySegment + * 482 nunit-console has multiple errors related to -framework option + * 483 Adds constraint for asserting that a dictionary contains a particular key + * 484 Missing file in NUnit.Console nuget package + * 485 Can't run v2 tests with nunit-console 3.0 + * 487 NUnitLite can't load assemblies by their file name + * 488 Async setup and teardown still don't work + * 497 Framework installer shold register the portable framework + * 504 Option --workers:0 is ignored + * 508 Travis builds with failure in engine tests show as successful + * 509 Under linux, not all mono profiles are listed as available + * 512 Drop the .NET 3.5 build + * 517 V2 FrameworkDriver does not make use of passed in TestEventListener + * 523 Provide an option to disable shadowcopy in NUnit v3 + * 528 V2 FrameworkDriver does not make use of passed in TestFilter + * 530 Color display for Silverlight runner + * 531 Display text output from tests in Silverlight runner + * 534 Add classname and methodname to test result xml + * 541 Console help doesn't indicate defaults + +NUnit 3.0.0 Alpha 5 - January 30, 2015 + +General + + * A Windows installer is now included in the release packages. + +Framework + + * TestCaseAttribute now allows arguments with default values to be omitted. Additionaly, it accepts a Platform property to specify the platforms on which the test case should be run. + * TestFixture and TestCase attributes now enforce the requirement that a reason needs to be provided when ignoring a test. + * SetUp, TearDown, OneTimeSetUp and OneTimeTearDown methods may now be async. + * String arguments over 20 characters in length are truncated when used as part of a test name. + +Engine + + * The engine is now extensible using Mono.Addins. In this release, extension points are provided for FrameworkDrivers, ProjectLoaders and OutputWriters. The following addins are bundled as a part of NUnit: + * A FrameworkDriver that allows running NUnit V2 tests under NUnit 3.0. + * ProjectLoaders for NUnit and Visual Studio projects. + * An OutputWriter that creates XML output in NUnit V2 format. + * DomainUsage now defaults to Multiple if not specified by the runner + +Console + + * New options supported: + * --testlist provides a list of tests to run in a file + * --stoponerror indicates that the run should terminate when any test fails. + +Issues Resolved + + * 20 TestCaseAttribute needs Platform property. + * 60 NUnit should support async setup, teardown, fixture setup and fixture teardown. + * 257 TestCaseAttribute should not require parameters with default values to be specified. + * 266 Pluggable framework drivers. + * 368 Create addin model. + * 369 Project loader addins + * 370 OutputWriter addins + * 403 Move ConsoleOptions.cs and Options.cs to Common and share... + * 419 Create Windows Installer for NUnit. + * 427 [TestFixture(Ignore=true)] should not be allowed. + * 437 Errors in tests under Linux due to hard-coded paths. + * 441 NUnit-Console should support --testlist option + * 442 Add --stoponerror option back to nunit-console. + * 456 Fix memory leak in RuntimeFramework. + * 459 Remove the Mixed Platforms build configuration. + * 468 Change default domain usage to multiple. + * 469 Truncate string arguments in test names in order to limit the length. + +NUnit 3.0.0 Alpha 4 - December 30, 2014 + +Framework + + * ApartmentAttribute has been added, replacing STAAttribute and MTAAttribute. + * Unnecessary overloads of Assert.That and Assume.That have been removed. + * Multiple SetUpFixtures may be specified in a single namespace. + * Improvements to the Pairwise strategy test case generation algorithm. + * The new NUnitLite runner --testlist option, allows a list of tests to be kept in a file. + +Engine + + * A driver is now included, which allows running NUnit 2.x tests under NUnit 3.0. + * The engine can now load and run tests specified in a number of project formats: + * NUnit (.nunit) + * Visual Studio C# projects (.csproj) + * Visual Studio F# projects (.vjsproj) + * Visual Studio Visual Basic projects (.vbproj) + * Visual Studio solutions (.sln) + * Legacy C++ and Visual JScript projects (.csproj and .vjsproj) are also supported + * Support for the current C++ format (.csxproj) is not yet available + * Creation of output files like TestResult.xml in various formats is now a + service of the engine, available to any runner. + +Console + + * The command-line may now include any number of assemblies and/or supported projects. + +Issues Resolved + + * 37 Multiple SetUpFixtures should be permitted on same namespace + * 210 TestContext.WriteLine in an AppDomain causes an error + * 227 Add support for VS projects and solutions + * 231 Update C# samples to use NUnit 3.0 + * 233 Update F# samples to use NUnit 3.0 + * 234 Update C++ samples to use NUnit 3.0 + * 265 Reorganize console reports for nunit-console and nunitlite + * 299 No full path to assembly in XML file under Compact Framework + * 301 Command-line length + * 363 Make Xml result output an engine service + * 377 CombiningStrategyAttributes don't work correctly on generic methods + * 388 Improvements to NUnitLite runner output + * 390 Specify exactly what happens when a test times out + * 396 ApartmentAttribute + * 397 CF nunitlite runner assembly has the wrong name + * 407 Assert.Pass() with ]]> in message crashes console runner + * 414 Simplify Assert overloads + * 416 NUnit 2.x Framework Driver + * 417 Complete work on NUnit projects + * 420 Create Settings file in proper location + +NUnit 3.0.0 Alpha 3 - November 29, 2014 + +Breaking Changes + + * NUnitLite tests must reference both the nunit.framework and nunitlite assemblies. + +Framework + + * The NUnit and NUnitLite frameworks have now been merged. There is no longer any distinction + between them in terms of features, although some features are not available on all platforms. + * The release includes two new framework builds: compact framework 3.5 and portable. The portable + library is compatible with .NET 4.5, Silverlight 5.0, Windows 8, Windows Phone 8.1, + Windows Phone Silverlight 8, Mono for Android and MonoTouch. + * A number of previously unsupported features are available for the Compact Framework: + - Generic methods as tests + - RegexConstraint + - TimeoutAttribute + - FileAssert, DirectoryAssert and file-related constraints + +Engine + + * The logic of runtime selection has now changed so that each assembly runs by default + in a separate process using the runtime for which it was built. + * On 64-bit systems, each test process is automatically created as 32-bit or 64-bit, + depending on the platform specified for the test assembly. + +Console + + * The console runner now runs tests in a separate process per assembly by default. They may + still be run in process or in a single separate process by use of command-line options. + * The console runner now starts in the highest version of the .NET runtime available, making + it simpler to debug tests by specifying that they should run in-process on the command-line. + * The -x86 command-line option is provided to force execution in a 32-bit process on a 64-bit system. + * A writeability check is performed for each output result file before trying to run the tests. + * The -teamcity option is now supported. + +Issues Resolved + + * 12 Compact framework should support generic methods + * 145 NUnit-console fails if test result message contains invalid xml characters + * 155 Create utility classes for platform-specific code + * 223 Common code for NUnitLite console runner and NUnit-Console + * 225 Compact Framework Support + * 238 Improvements to running 32 bit tests on a 64 bit system + * 261 Add portable nunitlite build + * 284 NUnitLite Unification + * 293 CF does not have a CurrentDirectory + * 306 Assure NUnit can write resultfile + * 308 Early disposal of runners + * 309 NUnit-Console should support incremental output under TeamCity + * 325 Add RegexConstraint to compact framework build + * 326 Add TimeoutAttribute to compact framework build + * 327 Allow generic test methods in the compact framework + * 328 Use .NET Stopwatch class for compact framework builds + * 331 Alpha 2 CF does not build + * 333 Add parallel execution to desktop builds of NUnitLite + * 334 Include File-related constraints and syntax in NUnitLite builds + * 335 Re-introduce 'Classic' NUnit syntax in NUnitLite + * 336 Document use of separate obj directories per build in our projects + * 337 Update Standard Defines page for .NET 3.0 + * 341 Move the NUnitLite runners to separate assemblies + * 367 Refactor XML Escaping Tests + * 372 CF Build TestAssemblyRunnerTests + * 373 Minor CF Test Fixes + * 378 Correct documentation for PairwiseAttribute + * 386 Console Output Improvements + +NUnit 3.0.0 Alpha 2 - November 2, 2014 + +Breaking Changes + + * The console runner no longer displays test results in the debugger. + * The NUnitLite compact framework 2.0 build has been removed. + * All addin support has been removed from the framework. Documentation of NUnit 3.0 extensibility features will be published in time for the beta release. In the interim, please ask for support on the nunit-discuss list. + +General + + * A separate solution has been created for Linux + * We now have continuous integration builds under both Travis and Appveyor + * The compact framework 3.5 build is now working and will be supported in future releases. + +New Features + + * The console runner now automatically detects 32- versus 64-bit test assemblies. + * The NUnitLite report output has been standardized to match that of nunit-console. + * The NUnitLite command-line has been standardized to match that of nunit-console where they share the same options. + * Both nunit-console and NUnitLite now display output in color. + * ActionAttributes now allow specification of multiple targets on the attribute as designed. This didn't work in the first alpha. + * OneTimeSetUp and OneTimeTearDown failures are now shown on the test report. Individual test failures after OneTimeSetUp failure are no longer shown. + * The console runner refuses to run tests build with older versions of NUnit. A plugin will be available to run older tests in the future. + +Issues Resolved + + * 222 Color console for NUnitLite + * 229 Timing failures in tests + * 241 Remove reference to Microslft BCL packages + * 243 Create solution for Linux + * 245 Multiple targets on action attributes not implemented + * 246 C++ tests do not compile in VS2013 + * 247 Eliminate trace display when running tests in debug + * 255 Add new result states for more precision in where failures occur + * 256 ContainsConstraint break when used with AndConstraint + * 264 Stacktrace displays too many entries + * 269 Add manifest to nunit-console and nunit-agent + * 270 OneTimeSetUp failure results in too much output + * 271 Invalid tests should be treated as errors + * 274 Command line options should be case insensitive + * 276 NUnit-console should not reference nunit.framework + * 278 New result states (ChildFailure and SetupFailure) break NUnit2XmlOutputWriter + * 282 Get tests for NUnit2XmlOutputWriter working + * 288 Set up Appveyor CI build + * 290 Stack trace still displays too many items + * 315 NUnit 3.0 alpha: Cannot run in console on my assembly + * 319 CI builds are not treating test failures as failures of the build + * 322 Remove Stopwatch tests where they test the real .NET Stopwatch + +NUnit 3.0.0 Alpha 1 - September 22, 2014 + +Breaking Changes + + * Legacy suites are no longer supported + * Assert.NullOrEmpty is no longer supported (Use Is.Null.Or.Empty) + +General + + * MsBuild is now used for the build rather than NAnt + * The framework test harness has been removed now that nunit-console is at a point where it can run the tests. + +New Features + + * Action Attributes have been added with the same features as in NUnit 2.6.3. + * TestContext now has a method that allows writing to the XML output. + * TestContext.CurrentContext.Result now provides the error message and stack trace during teardown. + * Does prefix operator supplies several added constraints. + +Issues Resolved + + * 6 Log4net not working with NUnit + * 13 Standardize commandline options for nunitlite runner + * 17 No allowance is currently made for nullable arguents in TestCase parameter conversions + * 33 TestCaseSource cannot refer to a parameterized test fixture + * 54 Store message and stack trace in TestContext for use in TearDown + * 111 Implement Changes to File, Directory and Path Assertions + * 112 Implement Action Attributes + * 156 Accessing multiple AppDomains within unit tests result in SerializationException + * 163 Add --trace option to NUnitLite + * 167 Create interim documentation for the alpha release + * 169 Design and implement distribution of NUnit packages + * 171 Assert.That should work with any lambda returning bool + * 175 Test Harness should return an error if any tests fail + * 180 Errors in Linux CI build + * 181 Replace NAnt with MsBuild / XBuild + * 183 Standardize commandline options for test harness + * 188 No output from NUnitLite when selected test is not found + * 189 Add string operators to Does prefix + * 193 TestWorkerTests.BusyExecutedIdleEventsCalledInSequence fails occasionally + * 197 Deprecate or remove Assert.NullOrEmpty + * 202 Eliminate legacy suites + * 203 Combine framework, engine and console runner in a single solution and repository + * 209 Make Ignore attribute's reason mandatory + * 215 Running 32-bit tests on a 64-bit OS + * 219 Teardown failures are not reported + +Console Issues Resolved (Old nunit-console project, now combined with nunit) + + * 2 Failure in TestFixtureSetUp is not reported correctly + * 5 CI Server for nunit-console + * 6 System.NullReferenceException on start nunit-console-x86 + * 21 NUnitFrameworkDriverTests fail if not run from same directory + * 24 'Debug' value for /trace option is deprecated in 2.6.3 + * 38 Confusing Excluded categories output + +NUnit 2.9.7 - August 8, 2014 + +Breaking Changes + + * NUnit no longer supports void async test methods. You should use a Task return Type instead. + * The ExpectedExceptionAttribute is no longer supported. Use Assert.Throws() or Assert.That(..., Throws) instead for a more precise specification of where the exception is expected to be thrown. + +New Features + + * Parallel test execution is supported down to the Fixture level. Use ParallelizableAttribute to indicate types that may be run in parallel. + * Async tests are supported for .NET 4.0 if the user has installed support for them. + * A new FileExistsConstraint has been added along with FileAssert.Exists and FileAssert.DoesNotExist + * ExpectedResult is now supported on simple (non-TestCase) tests. + * The Ignore attribute now takes a named parameter Until, which allows specifying a date after which the test is no longer ignored. + * The following new values are now recognized by PlatformAttribute: Win7, Win8, Win8.1, Win2012Server, Win2012ServerR2, NT6.1, NT6.2, 32-bit, 64-bit + * TimeoutAttribute is now supported under Silverlight + * ValuesAttribute may be used without any values on an enum or boolean argument. All possible values are used. + * You may now specify a tolerance using Within when testing equality of DateTimeOffset values. + * The XML output now includes a start and end time for each test. + +Issues Resolved + + * 8 [SetUpFixture] is not working as expected + * 14 CI Server for NUnit Framework + * 21 Is.InRange Constraint Ambiguity + * 27 Values attribute support for enum types + * 29 Specifying a tolerance with "Within" doesn't work for DateTimeOffset data types + * 31 Report start and end time of test execution + * 36 Make RequiresThread, RequiresSTA, RequiresMTA inheritable + * 45 Need of Enddate together with Ignore + * 55 Incorrect XML comments for CollectionAssert.IsSubsetOf + * 62 Matches(Constraint) does not work as expected + * 63 Async support should handle Task return type without state machine + * 64 AsyncStateMachineAttribute should only be checked by name + * 65 Update NUnit Wiki to show the new location of samples + * 66 Parallel Test Execution within test assemblies + * 67 Allow Expected Result on simple tests + * 70 EquivalentTo isn't compatible with IgnoreCase for dictioneries + * 75 Async tests should be supported for projects that target .NET 4.0 + * 82 nunit-framework tests are timing out on Linux + * 83 Path-related tests fail on Linux + * 85 Culture-dependent NUnit tests fail on non-English machine + * 88 TestCaseSourceAttribute documentation + * 90 EquivalentTo isn't compatible with IgnoreCase for char + * 100 Changes to Tolerance definitions + * 110 Add new platforms to PlatformAttribute + * 113 Remove ExpectedException + * 118 Workarounds for missing InternalPreserveStackTrace in mono + * 121 Test harness does not honor the --worker option when set to zero + * 129 Standardize Timeout in the Silverlight build + * 130 Add FileAssert.Exists and FileAssert.DoesNotExist + * 132 Drop support for void async methods + * 153 Surprising behavior of DelayedConstraint pollingInterval + * 161 Update API to support stopping an ongoing test run + +NOTE: Bug Fixes below this point refer to the number of the bug in Launchpad. + +NUnit 2.9.6 - October 4, 2013 + +Main Features + + * Separate projects for nunit-console and nunit.engine + * New builds for .NET 4.5 and Silverlight + * TestContext is now supported + * External API is now stable; internal interfaces are separate from API + * Tests may be run in parallel on separate threads + * Solutions and projects now use VS2012 (except for Compact framework) + +Bug Fixes + + * 463470 We should encapsulate references to pre-2.0 collections + * 498690 Assert.That() doesn't like properties with scoped setters + * 501784 Theory tests do not work correctly when using null parameters + * 531873 Feature: Extraction of unit tests from NUnit test assembly and calling appropriate one + * 611325 Allow Teardown to detect if last test failed + * 611938 Generic Test Instances disappear + * 655882 Make CategoryAttribute inherited + * 664081 Add Server2008 R2 and Windows 7 to PlatformAttribute + * 671432 Upgrade NAnt to Latest Release + * 676560 Assert.AreEqual does not support IEquatable + * 691129 Add Category parameter to TestFixture + * 697069 Feature request: dynamic location for TestResult.xml + * 708173 NUnit's logic for comparing arrays - use Comparer if it is provided + * 709062 "System.ArgumentException : Cannot compare" when the element is a list + * 712156 Tests cannot use AppDomain.SetPrincipalPolicy + * 719184 Platformdependency in src/ClientUtilities/util/Services/DomainManager.cs:40 + * 719187 Using Path.GetTempPath() causes conflicts in shared temporary folders + * 735851 Add detection of 3.0, 3.5 and 4.0 frameworks to PlatformAttribute + * 736062 Deadlock when EventListener performs a Trace call + EventPump synchronisation + * 756843 Failing assertion does not show non-linear tolerance mode + * 766749 net-2.0\nunit-console-x86.exe.config should have a element and also enable loadFromRemoteSources + * 770471 Assert.IsEmpty does not support IEnumerable + * 785460 Add Category parameter to TestCaseSourceAttribute + * 787106 EqualConstraint provides inadequate failure information for IEnumerables + * 792466 TestContext MethodName + * 794115 HashSet incorrectly reported + * 800089 Assert.Throws() hides details of inner AssertionException + * 848713 Feature request: Add switch for console to break on any test case error + * 878376 Add 'Exactly(n)' to the NUnit constraint syntax + * 882137 When no tests are run, higher level suites display as Inconclusive + * 882517 NUnit 2.5.10 doesn't recognize TestFixture if there are only TestCaseSource inside + * 885173 Tests are still executed after cancellation by user + * 885277 Exception when project calls for a runtime using only 2 digits + * 885604 Feature request: Explicit named parameter to TestCaseAttribute + * 890129 DelayedConstraint doesn't appear to poll properties of objects + * 892844 Not using Mono 4.0 profile under Windows + * 893919 DelayedConstraint fails polling properties on references which are initially null + * 896973 Console output lines are run together under Linux + * 897289 Is.Empty constraint has unclear failure message + * 898192 Feature Request: Is.Negative, Is.Positive + * 898256 IEnumerable for Datapoints doesn't work + * 899178 Wrong failure message for parameterized tests that expect exceptions + * 904841 After exiting for timeout the teardown method is not executed + * 908829 TestCase attribute does not play well with variadic test functions + * 910218 NUnit should add a trailing separator to the ApplicationBase + * 920472 CollectionAssert.IsNotEmpty must dispose Enumerator + * 922455 Add Support for Windows 8 and Windows 2012 Server to PlatformAttribute + * 928246 Use assembly.Location instead of assembly.CodeBase + * 958766 For development work under TeamCity, we need to support nunit2 formatted output under direct-runner + * 1000181 Parameterized TestFixture with System.Type as constructor arguments fails + * 1000213 Inconclusive message Not in report output + * 1023084 Add Enum support to RandomAttribute + * 1028188 Add Support for Silverlight + * 1029785 Test loaded from remote folder failed to run with exception System.IODirectory + * 1037144 Add MonoTouch support to PlatformAttribute + * 1041365 Add MaxOsX and Xbox support to platform attribute + * 1057981 C#5 async tests are not supported + * 1060631 Add .NET 4.5 build + * 1064014 Simple async tests should not return Task + * 1071164 Support async methods in usage scenarios of Throws constraints + * 1071343 Runner.Load fails on CF if the test assembly contains a generic method + * 1071861 Error in Path Constraints + * 1072379 Report test execution time at a higher resolution + * 1074568 Assert/Assume should support an async method for the ActualValueDelegate + * 1082330 Better Exception if SetCulture attribute is applied multiple times + * 1111834 Expose Random Object as part of the test context + * 1111838 Include Random Seed in Test Report + * 1172979 Add Category Support to nunitlite Runner + * 1203361 Randomizer uniqueness tests sometimes fail + * 1221712 When non-existing test method is specified in -test, result is still "Tests run: 1, Passed: 1" + * 1223294 System.NullReferenceException thrown when ExpectedExceptionAttribute is used in a static class + * 1225542 Standardize commandline options for test harness + +Bug Fixes in 2.9.6 But Not Listed Here in the Release + + * 541699 Silverlight Support + * 1222148 /framework switch does not recognize net-4.5 + * 1228979 Theories with all test cases inconclusive are not reported as failures + + +NUnit 2.9.5 - July 30, 2010 + +Bug Fixes + + * 483836 Allow non-public test fixtures consistently + * 487878 Tests in generic class without proper TestFixture attribute should be invalid + * 498656 TestCase should show array values in GUI + * 513989 Is.Empty should work for directories + * 519912 Thread.CurrentPrincipal Set In TestFixtureSetUp Not Maintained Between Tests + * 532488 constraints from ConstraintExpression/ConstraintBuilder are not reusable + * 590717 categorie contains dash or trail spaces is not selectable + * 590970 static TestFixtureSetUp/TestFixtureTearDown methods in base classes are not run + * 595683 NUnit console runner fails to load assemblies + * 600627 Assertion message formatted poorly by PropertyConstraint + * 601108 Duplicate test using abstract test fixtures + * 601645 Parametered test should try to convert data type from source to parameter + * 605432 ToString not working properly for some properties + * 606548 Deprecate Directory Assert in 2.5 and remove it in 3.0 + * 608875 NUnit Equality Comparer incorrectly defines equality for Dictionary objects + +NUnit 2.9.4 - May 4, 2010 + +Bug Fixes + + * 419411 Fixture With No Tests Shows as Non-Runnable + * 459219 Changes to thread princpal cause failures under .NET 4.0 + * 459224 Culture test failure under .NET 4.0 + * 462019 Line endings needs to be better controlled in source + * 462418 Assume.That() fails if I specify a message + * 483845 TestCase expected return value cannot be null + * 488002 Should not report tests in abstract class as invalid + * 490679 Category in TestCaseData clashes with Category on ParameterizedMethodSuite + * 501352 VS2010 projects have not been updated for new directory structure + * 504018 Automatic Values For Theory Test Parameters Not Provided For bool And enum + * 505899 'Description' parameter in both TestAttribute and TestCaseAttribute is not allowed + * 523335 TestFixtureTearDown in static class not executed + * 556971 Datapoint(s)Attribute should work on IEnumerable as well as on Arrays + * 561436 SetCulture broken with 2.5.4 + * 563532 DatapointsAttribute should be allowed on properties and methods + +NUnit 2.9.3 - October 26, 2009 + +Main Features + + * Created new API for controlling framework + * New builds for .Net 3.5 and 4.0, compact framework 3.5 + * Support for old style tests has been removed + * New adhoc runner for testing the framework + +Bug Fixes + + * 432805 Some Framework Tests don't run on Linux + * 440109 Full Framework does not support "Contains" + +NUnit 2.9.2 - September 19, 2009 + +Main Features + + * NUnitLite code is now merged with NUnit + * Added NUnitLite runner to the framework code + * Added Compact framework builds + +Bug Fixes + + * 430100 Assert.Catch should return T + * 432566 NUnitLite shows empty string as argument + * 432573 Mono test should be at runtime + +NUnit 2.9.1 - August 27, 2009 + +General + + * Created a separate project for the framework and framework tests + * Changed license to MIT / X11 + * Created Windows installer for the framework + +Bug Fixes + + * 400502 NUnitEqualityComparer.StreamsE­qual fails for same stream + * 400508 TestCaseSource attirbute is not working when Type is given + * 400510 TestCaseData variable length ctor drops values + * 417557 Add SetUICultureAttribute from NUnit 2.5.2 + * 417559 Add Ignore to TestFixture, TestCase and TestCaseData + * 417560 Merge Assert.Throws and Assert.Catch changes from NUnit 2.5.2 + * 417564 TimeoutAttribute on Assembly diff --git a/packages/NUnit.3.4.1/LICENSE.txt b/packages/NUnit.3.4.1/LICENSE.txt new file mode 100644 index 0000000..b5850c4 --- /dev/null +++ b/packages/NUnit.3.4.1/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/packages/NUnit.3.4.1/NOTICES.txt b/packages/NUnit.3.4.1/NOTICES.txt new file mode 100644 index 0000000..2d57979 --- /dev/null +++ b/packages/NUnit.3.4.1/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/packages/NUnit.3.4.1/NUnit.3.4.1.nupkg b/packages/NUnit.3.4.1/NUnit.3.4.1.nupkg new file mode 100644 index 0000000..ebc4669 Binary files /dev/null and b/packages/NUnit.3.4.1/NUnit.3.4.1.nupkg differ diff --git a/packages/NUnit.3.4.1/lib/dotnet/nunit.framework.dll b/packages/NUnit.3.4.1/lib/dotnet/nunit.framework.dll new file mode 100644 index 0000000..576ca03 Binary files /dev/null and b/packages/NUnit.3.4.1/lib/dotnet/nunit.framework.dll differ diff --git a/packages/NUnit.3.4.1/lib/dotnet/nunit.framework.xml b/packages/NUnit.3.4.1/lib/dotnet/nunit.framework.xml new file mode 100644 index 0000000..fe70727 --- /dev/null +++ b/packages/NUnit.3.4.1/lib/dotnet/nunit.framework.xml @@ -0,0 +1,15993 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which is the AssemblyName + + + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + 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 + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + NUnitTestFixtureBuilder is able to build a fixture given + a class marked with a TestFixtureAttribute or an unmarked + class containing test methods. In the first case, it is + called by the attribute and in the second directly by + NUnitSuiteBuilder. + + + + + Build a TestFixture from type provided. A non-null TestSuite + must always be returned, since the method is generally called + because the user has marked the target class as a fixture. + If something prevents the fixture from being used, it should + be returned nonetheless, labelled as non-runnable. + + An ITypeInfo for the fixture to be used. + A TestSuite object or one derived from TestSuite. + + + + Overload of BuildFrom called by tests that have arguments. + Builds a fixture using the provided type and information + in the ITestFixtureData object. + + The TypeInfo for which to construct a fixture. + An object implementing ITestFixtureData or null. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 + + + + A simplified implementation of .NET 4 CountdownEvent + for use in earlier versions of .NET. Only the methods + used by NUnit are implemented. + + + + + Construct a CountdownEvent + + The initial count + + + + Gets the initial count established for the CountdownEvent + + + + + Gets the current count remaining for the CountdownEvent + + + + + Decrement the count by one + + + + + Block the thread until the count reaches zero + + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + Helper class used to save and restore certain static or + singleton settings in the environment that affect tests + or which might be changed by the user tests. + + An internal class is used to hold settings and a stack + of these objects is pushed and popped as Save and Restore + are called. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object deriving from MemberInfo + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object deriving from MemberInfo + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + 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 + + + + Runs the tests in an assembly asyncronously reporting back the test results through the callback + + The callback that receives the test results + A string containing the XML representation of the filter to use + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 . + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 + + + + 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 . + + 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 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. + + 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 InconclusiveException 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 + + + + 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 + + + + + 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 + + + + 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 + + + + + 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. + + + + 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. + + + + + 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 + + + + 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 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. + + + + + 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. + + + + + + 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. + + + + + 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 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 actual value falls + within a specified range. + + + + + 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 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 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 + + + + 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 + + + + 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. + + + + + 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 + + + + 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 . + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + 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 + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + 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 + + + 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 + + + + 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 + + + + + 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 the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + 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 + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + 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. + + + + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + 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 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 starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Thrown when an assertion failed. + + + + 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 ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + 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. + + + + + 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. + + + + 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. + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 + + + + The IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + 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. + + + + + 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 + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 + + + + 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 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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. + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + Specifies flags that control binding and the way in which the search for members + and types is conducted by reflection. + + + + + Specifies no binding flag. + + + + + Specifies that only members declared at the level of the supplied type's hierarchy + should be considered. Inherited members are not considered. + + + + + Specifies that instance members are to be included in the search. + + + + + Specifies that static members are to be included in the search. + + + + + Specifies that public members are to be included in the search. + + + + + Specifies that non-public members are to be included in the search. + + + + + Specifies that public and protected static members up the hierarchy should be + returned. Private static members in inherited classes are not returned. Static + members include fields, methods, events, and properties. Nested types are not + returned. + + + + + A MarshalByRefObject that lives forever + + + + + Some path based methods that we need even in the Portable framework which + does not have the System.IO.Path class + + + + + Windows directory separator + + + + + Alternate directory separator + + + + + A volume separator character. + + + + + Get the file name and extension of the specified path string. + + The path string from which to obtain the file name and extension. + The filename as a . If the last character of is a directory or volume separator character, this method returns . If is null, this method returns null. + + + + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks + + + This version of the class allows direct calls on Type on + those platforms that would normally require use of + GetTypeInfo(). + + + + + Returns an array of generic arguments for the give type + + + + + + + Gets the constructor with the given parameter types + + + + + + + + Gets the constructors for a type + + + + + + + + + + + + + + + + + + + + + + + Gets declared or inherited interfaces on this type + + + + + + + Gets the member on a given type by name. BindingFlags ARE IGNORED. + + + + + + + + + Gets all members on a given type. BindingFlags ARE IGNORED. + + + + + + + + Gets field of the given name on the type + + + + + + + + Gets property of the given name on the type + + + + + + + + Gets property of the given name on the type + + + + + + + + + Gets the method with the given name and parameter list + + + + + + + + Gets the method with the given name and parameter list + + + + + + + + + Gets the method with the given name and parameter list + + + + + + + + + Gets public methods on the given type + + + + + + + Gets methods on a type + + + + + + + + Extensions to the various MemberInfo derived classes + + + + + Returns the get method for the given property + + + + + + + + Returns an array of custom attributes of the specified type applied to this member + + Portable throws an argument exception if T does not + derive from Attribute. NUnit uses interfaces to find attributes, thus + this method + + + + Returns an array of custom attributes of the specified type applied to this parameter + + + + + Returns an array of custom attributes of the specified type applied to this assembly + + + + + Extensions for Assembly that are not available in portable + + + + + DNX does not have a version of GetCustomAttributes on Assembly that takes an inherit + parameter since it doesn't make sense on Assemblies. This version just ignores the + inherit parameter. + + The assembly + The type of attribute you are looking for + Ignored + + + + + Gets the types in a given assembly + + + + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + 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. + + + + + A shim of the .NET interface for platforms that do not support it. + Used to indicate that a control can be the target of a callback event on the server. + + + + + Processes a callback event that targets a control. + + + + + + Returns the results of a callback event that targets a control. + + + + + + A shim of the .NET attribute for platforms that do not support it. + + + + diff --git a/packages/NUnit.3.4.1/lib/net20/NUnit.System.Linq.dll b/packages/NUnit.3.4.1/lib/net20/NUnit.System.Linq.dll new file mode 100644 index 0000000..569de1b Binary files /dev/null and b/packages/NUnit.3.4.1/lib/net20/NUnit.System.Linq.dll differ diff --git a/packages/NUnit.3.4.1/lib/net20/nunit.framework.dll b/packages/NUnit.3.4.1/lib/net20/nunit.framework.dll new file mode 100644 index 0000000..d131f10 Binary files /dev/null and b/packages/NUnit.3.4.1/lib/net20/nunit.framework.dll differ diff --git a/packages/NUnit.3.4.1/lib/net20/nunit.framework.xml b/packages/NUnit.3.4.1/lib/net20/nunit.framework.xml new file mode 100644 index 0000000..70f7926 --- /dev/null +++ b/packages/NUnit.3.4.1/lib/net20/nunit.framework.xml @@ -0,0 +1,17988 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the path to the directory from which an assembly was loaded. + + The assembly. + The path. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + + + + + + Gets the assembly path from code base. + + Public for testing purposes + The code base. + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + 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 + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a file. + + Path to the file to use + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + 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. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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. + + + + + Construct an EventListenerTextWriter + + The name of the stream to use for events + The default writer to use if no listener is available + + + + Write a single char + + + + + Write a string + + + + + Write a string followed by a newline + + + + + Get the Encoding for this TextWriter + + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + 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. + + + + + Construct a TextCapture object + + The default destination for non-intercepted output + + + + Gets the Encoding in use by this TextWriter + + + + + Writes a single character + + The char to write + + + + Writes a string + + The string to write + + + + Writes a string followed by a line terminator + + The string to write + + + + 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. + + + + + Construct a WorkShift + + + + + Event that fires when the shift has ended + + + + + Gets a flag indicating whether the shift is currently active + + + + + Gets a list of the queues associated with this shift. + + Used for testing + + + + Gets the list of workers associated with this shift. + + + + + Gets a bool indicating whether this shift has any work to do + + + + + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. + + + + + Assign a worker to the shift. + + + + + + Start or restart processing for the shift + + + + + End the shift, pausing all queues and raising + the EndOfShift event. + + + + + Shut down the shift. + + + + + Cancel (abort or stop) the shift without completing all work + + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 + + + + A simplified implementation of .NET 4 CountdownEvent + for use in earlier versions of .NET. Only the methods + used by NUnit are implemented. + + + + + Construct a CountdownEvent + + The initial count + + + + Gets the initial count established for the CountdownEvent + + + + + Gets the current count remaining for the CountdownEvent + + + + + Decrement the count by one + + + + + Block the thread until the count reaches zero + + + + + The EventPumpState enum represents the state of an + EventPump. + + + + + The pump is stopped + + + + + The pump is pumping events with no stop requested + + + + + The pump is pumping events but a stop has been requested + + + + + EventPump pulls events out of an EventQueue and sends + them to a listener. It is used to send events back to + the client without using the CallContext of the test + runner thread. + + + + + The downstream listener to which we send events + + + + + The queue that holds our events + + + + + Thread to do the pumping + + + + + The current state of the eventpump + + + + + Constructor + + The EventListener to receive events + The event queue to pull events from + + + + Gets or sets the current state of the pump + + + + + Gets or sets the name of this EventPump + (used only internally and for testing). + + + + + Dispose stops the pump + Disposes the used WaitHandle, too. + + + + + Start the pump + + + + + Tell the pump to stop after emptying the queue. + + + + + 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. + + + + + NUnit.Core.Event is the abstract base for all stored events. + An Event is the stored representation of a call to the + ITestListener interface and is used to record such calls + or to queue them for forwarding on another thread or at + a later time. + + + + + The Send method is implemented by derived classes to send the event to the specified listener. + + The listener. + + + + TestStartedEvent holds information needed to call the TestStarted method. + + + + + Initializes a new instance of the class. + + The test. + + + + Calls TestStarted on the specified listener. + + The listener. + + + + TestFinishedEvent holds information needed to call the TestFinished method. + + + + + Initializes a new instance of the class. + + The result. + + + + Calls TestFinished on the specified listener. + + The listener. + + + + TestOutputEvent holds information needed to call the TestOutput method. + + + + + Initializes a new instance of the class. + + The output object. + + + + Calls TestOutput on the specified listener. + + The listener. + + + + Implements a queue of work items each of which + is queued as a WaitCallback. + + + + + Gets the count of items in the queue. + + + + + Enqueues the specified event + + The event to enqueue. + + + + Removes the first element from the queue and returns it (or null). + + + If true and the queue is empty, the calling thread is blocked until + either an element is enqueued, or is called. + + + + + If the queue not empty + the first element. + + + otherwise, if ==false + or has been called + null. + + + + + + + Stop processing of the queue + + + + + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. + + + + + The EventQueue created and filled by this listener + + + + + Construct a QueuingEventListener + + + + + A test has started + + The test that is starting + + + + A test case finished + + Result of the test case + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + A TestWorker pulls work items from a queue + and executes them. + + + + + Event signaled immediately before executing a WorkItem + + + + + Event signaled immediately after executing a WorkItem + + + + + Construct a new TestWorker. + + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests + + + + The name of this worker - also used for the thread + + + + + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop + + + + + Start processing work items. + + + + + 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 + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + Indicates whether this WorkItem may be run in parallel + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. + + + + + Construct a ParallelWorkItemDispatcher + + Number of workers to use + + + + Enumerates all the shifts supported by the dispatcher + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + + + + WorkItemQueueState indicates the current state of a WorkItemQueue + + + + + The queue is paused + + + + + The queue is running + + + + + The queue is stopped + + + + + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. + + + + + Initializes a new instance of the class. + + The name of the queue. + + + + Gets the name of the work item queue. + + + + + Gets the total number of items processed so far + + + + + Gets the maximum number of work items. + + + + + Gets the current state of the queue + + + + + Get a bool indicating whether the queue is empty. + + + + + Enqueue a WorkItem to be processed + + The WorkItem to process + + + + Dequeue a WorkItem for processing + + A WorkItem or null if the queue has stopped + + + + Start or restart processing of items from the queue + + + + + Signal the queue to stop + + + + + Pause the queue for restarting later + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + The CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + OSPlatform represents a particular operating system platform + + + + + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater + + + + + Platform ID for Unix as defined by Mono + + + + + Platform ID for XBox as defined by .NET and Mono, but not CF + + + + + Platform ID for MacOSX as defined by .NET and Mono, but not CF + + + + + Get the OSPlatform under which we are currently running + + + + + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 + + + If an application is not manifested as Windows 8.1 or Windows 10, + the version returned from Environment.OSVersion will not be 6.3 and 10.0 + respectively, but will be 6.2 and 6.3. The correct value can be found in + the registry. + + The original version + The correct OS version + + + + Product Type Enumeration used for Windows + + + + + Product type is unknown or unspecified + + + + + Product type is Workstation + + + + + Product type is Domain Controller + + + + + Product type is Server + + + + + Construct from a platform ID and version + + + + + Construct from a platform ID, version and product type + + + + + Get the platform ID of this instance + + + + + Get the Version of this instance + + + + + Get the Product Type of this instance + + + + + Return true if this is a windows platform + + + + + Return true if this is a Unix or Linux platform + + + + + Return true if the platform is Win32S + + + + + Return true if the platform is Win32Windows + + + + + Return true if the platform is Win32NT + + + + + Return true if the platform is Windows CE + + + + + Return true if the platform is Xbox + + + + + Return true if the platform is MacOSX + + + + + Return true if the platform is Windows 95 + + + + + Return true if the platform is Windows 98 + + + + + Return true if the platform is Windows ME + + + + + Return true if the platform is NT 3 + + + + + Return true if the platform is NT 4 + + + + + Return true if the platform is NT 5 + + + + + Return true if the platform is Windows 2000 + + + + + Return true if the platform is Windows XP + + + + + Return true if the platform is Windows 2003 Server + + + + + Return true if the platform is NT 6 + + + + + Return true if the platform is NT 6.0 + + + + + Return true if the platform is NT 6.1 + + + + + Return true if the platform is NT 6.2 + + + + + Return true if the platform is NT 6.3 + + + + + Return true if the platform is Vista + + + + + Return true if the platform is Windows 2008 Server (original or R2) + + + + + Return true if the platform is Windows 2008 Server (original) + + + + + Return true if the platform is Windows 2008 Server R2 + + + + + Return true if the platform is Windows 2012 Server (original or R2) + + + + + Return true if the platform is Windows 2012 Server (original) + + + + + Return true if the platform is Windows 2012 Server R2 + + + + + Return true if the platform is Windows 7 + + + + + Return true if the platform is Windows 8 + + + + + Return true if the platform is Windows 8.1 + + + + + Return true if the platform is Windows 10 + + + + + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. + + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + + + + + Comma-delimited list of all supported OS platform constants + + + + + Comma-delimited list of all supported Runtime platform constants + + + + + Default constructor uses the operating system and + common language runtime of the system. + + + + + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. + + OperatingSystem to be used + RuntimeFramework to be used + + + + Test to determine if one of a collection of platforms + is being used currently. + + + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. + + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + ReaderWriterLock + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Enumeration identifying a common language + runtime implementation. + + + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + + + RuntimeFramework represents a particular version + of a common language runtime implementation. + + + + + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. + + + + + Construct from a runtime type and version. If the version has + two parts, it is taken as a framework version. If it has three + or more, it is taken as a CLR version. In either case, the other + version is deduced based on the runtime type and provided version. + + The runtime type of the framework + The version of the framework + + + + Static method to return a RuntimeFramework object + for the framework that is currently in use. + + + + + The type of this runtime framework + + + + + The framework version for this runtime framework + + + + + The CLR version for this runtime framework + + + + + Return true if any CLR version may be used in + matching this RuntimeFramework object. + + + + + Returns the Display name for this framework + + + + + 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'. + + + + + + + Overridden to return the short name of the framework + + + + + + Returns true if the current framework matches the + one supplied as an argument. Two frameworks match + if their runtime types are the same or either one + is RuntimeType.Any and all specified version components + are equal. Negative (i.e. unspecified) version + components are ignored. + + The RuntimeFramework to be matched. + True on match, otherwise false + + + + 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. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + The current Principal. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + Get the current context or return null if none is found. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + Gets or sets the current for the Thread. + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Obtain lifetime service 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object implementing ICustomAttributeProvider + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + ThreadUtility provides a set of static methods convenient + for working with threads. + + + + + Do our best to Kill a thread + + The thread to kill + + + + Do our best to kill a thread, passing state info + + The thread to kill + Info for the ThreadAbortException handler + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts environment element + + Target node + The new node + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + Gets the default level of parallel execution (worker threads) + + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + 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 + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Attribute used to identify a method that is called once + to perform setup before any child tests are run. + + + + + 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. + + + + 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 + + + + + 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 + + + + + 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. + + + + + 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. + + + + 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. + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + + + + 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. + + + + + 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. + + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + 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 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. + + + + + 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. + + + + + + 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. + + + + 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. + + + + + 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 + + + + + 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. + + + + 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 + + + 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. + + + + 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 + + + + 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 + + + + 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 + + + + + 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. + + + + + + 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. + + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + XmlSerializableConstraint tests whether + an object is serializable in xml format. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + 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. + + + + + 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 + + + + The IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 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. + + + + + 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. + + + + 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. + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + Asserts on Directories + + + + + 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. + + + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if the directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + Delegate used by tests that execute 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 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. + + 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 InconclusiveException 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 + + + + 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 + + + + + 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 + + + + + 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 + + + + + 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 + + + + + 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 + + + + + Marks a test to use a Sequential join of any argument + data provided. Arguments will be combined into test cases, + taking the next value of each argument until all are used. + + + + + Default constructor + + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + SetUpFixtureAttribute is used to identify a SetUpFixture + + + + + Build a SetUpFixture from type provided. Normally called for a Type + on which the attribute has been placed. + + The type info of the fixture to be used. + A SetUpFixture object as a TestSuite. + + + + Attribute used to identify a method that is called + immediately after each test is run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + 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. + + + + + 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. + + + + + 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 + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Asserts on Files + + + + + 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. + + + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + + + + 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 + + + + Asserts that the file exists. If it does not exist + an is thrown. + + The path to a file containing the actual value + + + + 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + A file containing the actual value + + + + Asserts that the file does not exist. If it does 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + The path to a file containing the actual value + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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 + 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. + + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + Gets a TextWriter that will send output directly to Console.Error + + + + + Gets a TextWriter for use in displaying immediate progress messages + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + A MarshalByRefObject that lives forever + + + + + Obtains a lifetime service object to control the lifetime policy for this instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks + + + This version of the class supplies GetTypeInfo() on platforms + that don't support it. + + + + + GetTypeInfo gives access to most of the Type information we take for granted + on .NET Core and Windows Runtime. Rather than #ifdef different code for different + platforms, it is easiest to just code all platforms as if they worked this way, + thus the simple passthrough. + + + + + + + Extensions for Assembly that are not available in pre-4.5 .NET releases + + + + + An easy way to get a single custom attribute from an assembly + + The attribute Type + The assembly + An attribute of Type T + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + 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. + + + + + Represents a thread-safe first-in, first-out collection of objects. + + Specifies the type of elements in the queue. + + All public and protected members of are thread-safe and may be used + concurrently from multiple threads. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the + class that contains elements copied from the specified collection + + The collection whose elements are copied to the new . + The argument is + null. + + + + Adds an object to the end of the . + + The object to add to the end of the . The value can be a null reference + (Nothing in Visual Basic) for reference types. + + + + + Attempts to add an object to the . + + The object to add to the . The value can be a null + reference (Nothing in Visual Basic) for reference types. + + true if the object was added successfully; otherwise, false. + For , this operation will always add the object to the + end of the + and return true. + + + + Attempts to remove and return the object at the beginning of the . + + + When this method returns, if the operation was successful, contains the + object removed. If no object was available to be removed, the value is unspecified. + + true if an element was removed and returned from the beginning of the + successfully; otherwise, false. + + + + Attempts to return an object from the beginning of the + without removing it. + + When this method returns, contains an object from + the beginning of the or an + unspecified value if the operation failed. + true if and object was returned successfully; otherwise, false. + + + + Returns an enumerator that iterates through a collection. + + An that can be used to iterate through the collection. + + + + Returns an enumerator that iterates through the . + + An enumerator for the contents of the . + + The enumeration represents a moment-in-time snapshot of the contents + of the queue. It does not reflect any updates to the collection after + was called. The enumerator is safe to use + concurrently with reads from and writes to the queue. + + + + + Copies the elements of the to an , starting at a particular + index. + + The one-dimensional Array that is the + destination of the elements copied from the + . The Array must have zero-based indexing. + The zero-based index in at which copying + begins. + is a null reference (Nothing in + Visual Basic). + is less than + zero. + + is multidimensional. -or- + does not have zero-based indexing. -or- + is equal to or greater than the length of the + -or- The number of elements in the source is + greater than the available space from to the end of the destination + . -or- The type of the source cannot be cast automatically to the type of the + destination . + + + + + Copies the elements to an existing one-dimensional Array, starting at the specified array index. + + The one-dimensional Array that is the + destination of the elements copied from the + . The Array must have zero-based + indexing. + The zero-based index in at which copying + begins. + is a null reference (Nothing in + Visual Basic). + is less than + zero. + is equal to or greater than the + length of the + -or- The number of elements in the source is greater than the + available space from to the end of the destination . + + + + + Copies the elements stored in the to a new array. + + A new array containing a snapshot of elements copied from the . + + + + Gets a value indicating whether access to the is + synchronized with the SyncRoot. + + true if access to the is synchronized + with the SyncRoot; otherwise, false. For , this property always + returns false. + + + + Attempts to remove and return an object from the . + + + When this method returns, if the operation was successful, contains the + object removed. If no object was available to be removed, the value is unspecified. + + true if an element was removed and returned successfully; otherwise, false. + For , this operation will attempt to remove the object + from the beginning of the . + + + + + Gets an object that can be used to synchronize access to the . This property is not supported. + + The SyncRoot property is not supported. + + + + Gets the number of elements contained in the . + + The number of elements contained in the . + + For determining whether the collection contains any items, use of the + property is recommended rather than retrieving the number of items from the + property and comparing it to 0. + + + + + Gets a value that indicates whether the is empty. + + true if the is empty; otherwise, false. + + For determining whether the collection contains any items, use of this property is recommended + rather than retrieving the number of items from the property and comparing it + to 0. However, as this collection is intended to be accessed concurrently, it may be the case + that another thread will modify the collection after returns, thus invalidating + the result. + + + + + Defines methods to manipulate thread-safe collections intended for producer/consumer usage. + + Specifies the type of elements in the collection. + + All implementations of this interface must enable all members of this interface + to be used concurrently from multiple threads. + + + + + Attempts to add an object to the . + + The object to add to the . + true if the object was added successfully; otherwise, false. + The was invalid for this collection. + + + + Attempts to remove and return an object from the . + + + When this method returns, if the object was removed and returned successfully, contains the removed object. If no object was available to be removed, the value is + unspecified. + + true if an object was removed and returned successfully; otherwise, false. + + + + Copies the elements contained in the to a new array. + + A new array containing the elements copied from the . + + + + Copies the elements of the to + an + , starting at a specified index. + + The one-dimensional that is the destination of + the elements copied from the . + The array must have zero-based indexing. + The zero-based index in at which copying + begins. + is a null reference (Nothing in + Visual Basic). + is less than + zero. + is equal to or greater than the + length of the + -or- The number of elements in the source is greater than the + available space from to the end of the destination . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/NUnit.3.4.1/lib/net35/nunit.framework.dll b/packages/NUnit.3.4.1/lib/net35/nunit.framework.dll new file mode 100644 index 0000000..63baf45 Binary files /dev/null and b/packages/NUnit.3.4.1/lib/net35/nunit.framework.dll differ diff --git a/packages/NUnit.3.4.1/lib/net35/nunit.framework.xml b/packages/NUnit.3.4.1/lib/net35/nunit.framework.xml new file mode 100644 index 0000000..39f70a6 --- /dev/null +++ b/packages/NUnit.3.4.1/lib/net35/nunit.framework.xml @@ -0,0 +1,18007 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the path to the directory from which an assembly was loaded. + + The assembly. + The path. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + + + + + + Gets the assembly path from code base. + + Public for testing purposes + The code base. + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + 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 + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a file. + + Path to the file to use + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + 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. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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. + + + + + Construct an EventListenerTextWriter + + The name of the stream to use for events + The default writer to use if no listener is available + + + + Write a single char + + + + + Write a string + + + + + Write a string followed by a newline + + + + + Get the Encoding for this TextWriter + + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + 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. + + + + + Construct a TextCapture object + + The default destination for non-intercepted output + + + + Gets the Encoding in use by this TextWriter + + + + + Writes a single character + + The char to write + + + + Writes a string + + The string to write + + + + Writes a string followed by a line terminator + + The string to write + + + + 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. + + + + + Construct a WorkShift + + + + + Event that fires when the shift has ended + + + + + Gets a flag indicating whether the shift is currently active + + + + + Gets a list of the queues associated with this shift. + + Used for testing + + + + Gets the list of workers associated with this shift. + + + + + Gets a bool indicating whether this shift has any work to do + + + + + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. + + + + + Assign a worker to the shift. + + + + + + Start or restart processing for the shift + + + + + End the shift, pausing all queues and raising + the EndOfShift event. + + + + + Shut down the shift. + + + + + Cancel (abort or stop) the shift without completing all work + + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 + + + + A simplified implementation of .NET 4 CountdownEvent + for use in earlier versions of .NET. Only the methods + used by NUnit are implemented. + + + + + Construct a CountdownEvent + + The initial count + + + + Gets the initial count established for the CountdownEvent + + + + + Gets the current count remaining for the CountdownEvent + + + + + Decrement the count by one + + + + + Block the thread until the count reaches zero + + + + + The EventPumpState enum represents the state of an + EventPump. + + + + + The pump is stopped + + + + + The pump is pumping events with no stop requested + + + + + The pump is pumping events but a stop has been requested + + + + + EventPump pulls events out of an EventQueue and sends + them to a listener. It is used to send events back to + the client without using the CallContext of the test + runner thread. + + + + + The downstream listener to which we send events + + + + + The queue that holds our events + + + + + Thread to do the pumping + + + + + The current state of the eventpump + + + + + Constructor + + The EventListener to receive events + The event queue to pull events from + + + + Gets or sets the current state of the pump + + + + + Gets or sets the name of this EventPump + (used only internally and for testing). + + + + + Dispose stops the pump + Disposes the used WaitHandle, too. + + + + + Start the pump + + + + + Tell the pump to stop after emptying the queue. + + + + + 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. + + + + + NUnit.Core.Event is the abstract base for all stored events. + An Event is the stored representation of a call to the + ITestListener interface and is used to record such calls + or to queue them for forwarding on another thread or at + a later time. + + + + + The Send method is implemented by derived classes to send the event to the specified listener. + + The listener. + + + + TestStartedEvent holds information needed to call the TestStarted method. + + + + + Initializes a new instance of the class. + + The test. + + + + Calls TestStarted on the specified listener. + + The listener. + + + + TestFinishedEvent holds information needed to call the TestFinished method. + + + + + Initializes a new instance of the class. + + The result. + + + + Calls TestFinished on the specified listener. + + The listener. + + + + TestOutputEvent holds information needed to call the TestOutput method. + + + + + Initializes a new instance of the class. + + The output object. + + + + Calls TestOutput on the specified listener. + + The listener. + + + + Implements a queue of work items each of which + is queued as a WaitCallback. + + + + + Gets the count of items in the queue. + + + + + Enqueues the specified event + + The event to enqueue. + + + + Removes the first element from the queue and returns it (or null). + + + If true and the queue is empty, the calling thread is blocked until + either an element is enqueued, or is called. + + + + + If the queue not empty + the first element. + + + otherwise, if ==false + or has been called + null. + + + + + + + Stop processing of the queue + + + + + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. + + + + + The EventQueue created and filled by this listener + + + + + Construct a QueuingEventListener + + + + + A test has started + + The test that is starting + + + + A test case finished + + Result of the test case + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + A TestWorker pulls work items from a queue + and executes them. + + + + + Event signaled immediately before executing a WorkItem + + + + + Event signaled immediately after executing a WorkItem + + + + + Construct a new TestWorker. + + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests + + + + The name of this worker - also used for the thread + + + + + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop + + + + + Start processing work items. + + + + + 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 + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + Indicates whether this WorkItem may be run in parallel + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. + + + + + Construct a ParallelWorkItemDispatcher + + Number of workers to use + + + + Enumerates all the shifts supported by the dispatcher + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + + + + WorkItemQueueState indicates the current state of a WorkItemQueue + + + + + The queue is paused + + + + + The queue is running + + + + + The queue is stopped + + + + + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. + + + + + Initializes a new instance of the class. + + The name of the queue. + + + + Gets the name of the work item queue. + + + + + Gets the total number of items processed so far + + + + + Gets the maximum number of work items. + + + + + Gets the current state of the queue + + + + + Get a bool indicating whether the queue is empty. + + + + + Enqueue a WorkItem to be processed + + The WorkItem to process + + + + Dequeue a WorkItem for processing + + A WorkItem or null if the queue has stopped + + + + Start or restart processing of items from the queue + + + + + Signal the queue to stop + + + + + Pause the queue for restarting later + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + The CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + OSPlatform represents a particular operating system platform + + + + + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater + + + + + Platform ID for Unix as defined by Mono + + + + + Platform ID for XBox as defined by .NET and Mono, but not CF + + + + + Platform ID for MacOSX as defined by .NET and Mono, but not CF + + + + + Get the OSPlatform under which we are currently running + + + + + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 + + + If an application is not manifested as Windows 8.1 or Windows 10, + the version returned from Environment.OSVersion will not be 6.3 and 10.0 + respectively, but will be 6.2 and 6.3. The correct value can be found in + the registry. + + The original version + The correct OS version + + + + Product Type Enumeration used for Windows + + + + + Product type is unknown or unspecified + + + + + Product type is Workstation + + + + + Product type is Domain Controller + + + + + Product type is Server + + + + + Construct from a platform ID and version + + + + + Construct from a platform ID, version and product type + + + + + Get the platform ID of this instance + + + + + Get the Version of this instance + + + + + Get the Product Type of this instance + + + + + Return true if this is a windows platform + + + + + Return true if this is a Unix or Linux platform + + + + + Return true if the platform is Win32S + + + + + Return true if the platform is Win32Windows + + + + + Return true if the platform is Win32NT + + + + + Return true if the platform is Windows CE + + + + + Return true if the platform is Xbox + + + + + Return true if the platform is MacOSX + + + + + Return true if the platform is Windows 95 + + + + + Return true if the platform is Windows 98 + + + + + Return true if the platform is Windows ME + + + + + Return true if the platform is NT 3 + + + + + Return true if the platform is NT 4 + + + + + Return true if the platform is NT 5 + + + + + Return true if the platform is Windows 2000 + + + + + Return true if the platform is Windows XP + + + + + Return true if the platform is Windows 2003 Server + + + + + Return true if the platform is NT 6 + + + + + Return true if the platform is NT 6.0 + + + + + Return true if the platform is NT 6.1 + + + + + Return true if the platform is NT 6.2 + + + + + Return true if the platform is NT 6.3 + + + + + Return true if the platform is Vista + + + + + Return true if the platform is Windows 2008 Server (original or R2) + + + + + Return true if the platform is Windows 2008 Server (original) + + + + + Return true if the platform is Windows 2008 Server R2 + + + + + Return true if the platform is Windows 2012 Server (original or R2) + + + + + Return true if the platform is Windows 2012 Server (original) + + + + + Return true if the platform is Windows 2012 Server R2 + + + + + Return true if the platform is Windows 7 + + + + + Return true if the platform is Windows 8 + + + + + Return true if the platform is Windows 8.1 + + + + + Return true if the platform is Windows 10 + + + + + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. + + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + + + + + Comma-delimited list of all supported OS platform constants + + + + + Comma-delimited list of all supported Runtime platform constants + + + + + Default constructor uses the operating system and + common language runtime of the system. + + + + + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. + + OperatingSystem to be used + RuntimeFramework to be used + + + + Test to determine if one of a collection of platforms + is being used currently. + + + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. + + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + ReaderWriterLock + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Enumeration identifying a common language + runtime implementation. + + + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + + + RuntimeFramework represents a particular version + of a common language runtime implementation. + + + + + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. + + + + + Construct from a runtime type and version. If the version has + two parts, it is taken as a framework version. If it has three + or more, it is taken as a CLR version. In either case, the other + version is deduced based on the runtime type and provided version. + + The runtime type of the framework + The version of the framework + + + + Static method to return a RuntimeFramework object + for the framework that is currently in use. + + + + + The type of this runtime framework + + + + + The framework version for this runtime framework + + + + + The CLR version for this runtime framework + + + + + Return true if any CLR version may be used in + matching this RuntimeFramework object. + + + + + Returns the Display name for this framework + + + + + 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'. + + + + + + + Overridden to return the short name of the framework + + + + + + Returns true if the current framework matches the + one supplied as an argument. Two frameworks match + if their runtime types are the same or either one + is RuntimeType.Any and all specified version components + are equal. Negative (i.e. unspecified) version + components are ignored. + + The RuntimeFramework to be matched. + True on match, otherwise false + + + + 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. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + The current Principal. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + Get the current context or return null if none is found. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + Gets or sets the current for the Thread. + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Obtain lifetime service 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object implementing ICustomAttributeProvider + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + ThreadUtility provides a set of static methods convenient + for working with threads. + + + + + Do our best to Kill a thread + + The thread to kill + + + + Do our best to kill a thread, passing state info + + The thread to kill + Info for the ThreadAbortException handler + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + 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 + + + + Runs the tests in an assembly asyncronously reporting back the test results through the callback + + The callback that receives the test results + A string containing the XML representation of the filter to use + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts environment element + + Target node + The new node + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + Gets the default level of parallel execution (worker threads) + + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + 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 + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Attribute used to identify a method that is called once + to perform setup before any child tests are run. + + + + + 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. + + + + 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 + + + + + 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 + + + + + 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. + + + + + 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. + + + + 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. + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + + + + 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. + + + + + 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. + + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + 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 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. + + + + + 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. + + + + + + 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. + + + + 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. + + + + + 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 + + + + + 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. + + + + 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 + + + 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. + + + + 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 + + + + 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 + + + + 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 + + + + + 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. + + + + + + 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. + + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + XmlSerializableConstraint tests whether + an object is serializable in xml format. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + + + + 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 + + + + 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 + + + + 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 . + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + 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. + + + + + 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 + + + + The IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 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. + + + + + 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. + + + + 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. + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + Asserts on Directories + + + + + 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. + + + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if the directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + Delegate used by tests that execute 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 . + + 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 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. + + 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 InconclusiveException 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 + + + + 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 + + + + + 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 + + + + + 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 + + + + + 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 + + + + + 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 + + + + + Marks a test to use a Sequential join of any argument + data provided. Arguments will be combined into test cases, + taking the next value of each argument until all are used. + + + + + Default constructor + + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + SetUpFixtureAttribute is used to identify a SetUpFixture + + + + + Build a SetUpFixture from type provided. Normally called for a Type + on which the attribute has been placed. + + The type info of the fixture to be used. + A SetUpFixture object as a TestSuite. + + + + Attribute used to identify a method that is called + immediately after each test is run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + 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. + + + + + 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. + + + + + 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 + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Asserts on Files + + + + + 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. + + + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + + + + 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 + + + + Asserts that the file exists. If it does not exist + an is thrown. + + The path to a file containing the actual value + + + + 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + A file containing the actual value + + + + Asserts that the file does not exist. If it does 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + The path to a file containing the actual value + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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 + 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. + + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + Gets a TextWriter that will send output directly to Console.Error + + + + + Gets a TextWriter for use in displaying immediate progress messages + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + A MarshalByRefObject that lives forever + + + + + Obtains a lifetime service object to control the lifetime policy for this instance. + + + + + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks + + + This version of the class supplies GetTypeInfo() on platforms + that don't support it. + + + + + GetTypeInfo gives access to most of the Type information we take for granted + on .NET Core and Windows Runtime. Rather than #ifdef different code for different + platforms, it is easiest to just code all platforms as if they worked this way, + thus the simple passthrough. + + + + + + + Extensions for Assembly that are not available in pre-4.5 .NET releases + + + + + An easy way to get a single custom attribute from an assembly + + The attribute Type + The assembly + An attribute of Type T + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + 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. + + + + + Represents a thread-safe first-in, first-out collection of objects. + + Specifies the type of elements in the queue. + + All public and protected members of are thread-safe and may be used + concurrently from multiple threads. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the + class that contains elements copied from the specified collection + + The collection whose elements are copied to the new . + The argument is + null. + + + + Adds an object to the end of the . + + The object to add to the end of the . The value can be a null reference + (Nothing in Visual Basic) for reference types. + + + + + Attempts to add an object to the . + + The object to add to the . The value can be a null + reference (Nothing in Visual Basic) for reference types. + + true if the object was added successfully; otherwise, false. + For , this operation will always add the object to the + end of the + and return true. + + + + Attempts to remove and return the object at the beginning of the . + + + When this method returns, if the operation was successful, contains the + object removed. If no object was available to be removed, the value is unspecified. + + true if an element was removed and returned from the beginning of the + successfully; otherwise, false. + + + + Attempts to return an object from the beginning of the + without removing it. + + When this method returns, contains an object from + the beginning of the or an + unspecified value if the operation failed. + true if and object was returned successfully; otherwise, false. + + + + Returns an enumerator that iterates through a collection. + + An that can be used to iterate through the collection. + + + + Returns an enumerator that iterates through the . + + An enumerator for the contents of the . + + The enumeration represents a moment-in-time snapshot of the contents + of the queue. It does not reflect any updates to the collection after + was called. The enumerator is safe to use + concurrently with reads from and writes to the queue. + + + + + Copies the elements of the to an , starting at a particular + index. + + The one-dimensional Array that is the + destination of the elements copied from the + . The Array must have zero-based indexing. + The zero-based index in at which copying + begins. + is a null reference (Nothing in + Visual Basic). + is less than + zero. + + is multidimensional. -or- + does not have zero-based indexing. -or- + is equal to or greater than the length of the + -or- The number of elements in the source is + greater than the available space from to the end of the destination + . -or- The type of the source cannot be cast automatically to the type of the + destination . + + + + + Copies the elements to an existing one-dimensional Array, starting at the specified array index. + + The one-dimensional Array that is the + destination of the elements copied from the + . The Array must have zero-based + indexing. + The zero-based index in at which copying + begins. + is a null reference (Nothing in + Visual Basic). + is less than + zero. + is equal to or greater than the + length of the + -or- The number of elements in the source is greater than the + available space from to the end of the destination . + + + + + Copies the elements stored in the to a new array. + + A new array containing a snapshot of elements copied from the . + + + + Gets a value indicating whether access to the is + synchronized with the SyncRoot. + + true if access to the is synchronized + with the SyncRoot; otherwise, false. For , this property always + returns false. + + + + Attempts to remove and return an object from the . + + + When this method returns, if the operation was successful, contains the + object removed. If no object was available to be removed, the value is unspecified. + + true if an element was removed and returned successfully; otherwise, false. + For , this operation will attempt to remove the object + from the beginning of the . + + + + + Gets an object that can be used to synchronize access to the . This property is not supported. + + The SyncRoot property is not supported. + + + + Gets the number of elements contained in the . + + The number of elements contained in the . + + For determining whether the collection contains any items, use of the + property is recommended rather than retrieving the number of items from the + property and comparing it to 0. + + + + + Gets a value that indicates whether the is empty. + + true if the is empty; otherwise, false. + + For determining whether the collection contains any items, use of this property is recommended + rather than retrieving the number of items from the property and comparing it + to 0. However, as this collection is intended to be accessed concurrently, it may be the case + that another thread will modify the collection after returns, thus invalidating + the result. + + + + + Defines methods to manipulate thread-safe collections intended for producer/consumer usage. + + Specifies the type of elements in the collection. + + All implementations of this interface must enable all members of this interface + to be used concurrently from multiple threads. + + + + + Attempts to add an object to the . + + The object to add to the . + true if the object was added successfully; otherwise, false. + The was invalid for this collection. + + + + Attempts to remove and return an object from the . + + + When this method returns, if the object was removed and returned successfully, contains the removed object. If no object was available to be removed, the value is + unspecified. + + true if an object was removed and returned successfully; otherwise, false. + + + + Copies the elements contained in the to a new array. + + A new array containing the elements copied from the . + + + + Copies the elements of the to + an + , starting at a specified index. + + The one-dimensional that is the destination of + the elements copied from the . + The array must have zero-based indexing. + The zero-based index in at which copying + begins. + is a null reference (Nothing in + Visual Basic). + is less than + zero. + is equal to or greater than the + length of the + -or- The number of elements in the source is greater than the + available space from to the end of the destination . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/NUnit.3.4.1/lib/net40/nunit.framework.dll b/packages/NUnit.3.4.1/lib/net40/nunit.framework.dll new file mode 100644 index 0000000..21bc807 Binary files /dev/null and b/packages/NUnit.3.4.1/lib/net40/nunit.framework.dll differ diff --git a/packages/NUnit.3.4.1/lib/net40/nunit.framework.xml b/packages/NUnit.3.4.1/lib/net40/nunit.framework.xml new file mode 100644 index 0000000..d5228b9 --- /dev/null +++ b/packages/NUnit.3.4.1/lib/net40/nunit.framework.xml @@ -0,0 +1,17714 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the path to the directory from which an assembly was loaded. + + The assembly. + The path. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + + + + + + Gets the assembly path from code base. + + Public for testing purposes + The code base. + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + 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 + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a file. + + Path to the file to use + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + 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 + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + NUnitTestFixtureBuilder is able to build a fixture given + a class marked with a TestFixtureAttribute or an unmarked + class containing test methods. In the first case, it is + called by the attribute and in the second directly by + NUnitSuiteBuilder. + + + + + Build a TestFixture from type provided. A non-null TestSuite + must always be returned, since the method is generally called + because the user has marked the target class as a fixture. + If something prevents the fixture from being used, it should + be returned nonetheless, labelled as non-runnable. + + An ITypeInfo for the fixture to be used. + A TestSuite object or one derived from TestSuite. + + + + Overload of BuildFrom called by tests that have arguments. + Builds a fixture using the provided type and information + in the ITestFixtureData object. + + The TypeInfo for which to construct a fixture. + An object implementing ITestFixtureData or null. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 + + + + 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. + + + + + Construct an EventListenerTextWriter + + The name of the stream to use for events + The default writer to use if no listener is available + + + + Write a single char + + + + + Write a string + + + + + Write a string followed by a newline + + + + + Get the Encoding for this TextWriter + + + + + The EventPumpState enum represents the state of an + EventPump. + + + + + The pump is stopped + + + + + The pump is pumping events with no stop requested + + + + + The pump is pumping events but a stop has been requested + + + + + EventPump pulls events out of an EventQueue and sends + them to a listener. It is used to send events back to + the client without using the CallContext of the test + runner thread. + + + + + The downstream listener to which we send events + + + + + The queue that holds our events + + + + + Thread to do the pumping + + + + + The current state of the eventpump + + + + + Constructor + + The EventListener to receive events + The event queue to pull events from + + + + Gets or sets the current state of the pump + + + + + Gets or sets the name of this EventPump + (used only internally and for testing). + + + + + Dispose stops the pump + Disposes the used WaitHandle, too. + + + + + Start the pump + + + + + Tell the pump to stop after emptying the queue. + + + + + 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. + + + + + NUnit.Core.Event is the abstract base for all stored events. + An Event is the stored representation of a call to the + ITestListener interface and is used to record such calls + or to queue them for forwarding on another thread or at + a later time. + + + + + The Send method is implemented by derived classes to send the event to the specified listener. + + The listener. + + + + TestStartedEvent holds information needed to call the TestStarted method. + + + + + Initializes a new instance of the class. + + The test. + + + + Calls TestStarted on the specified listener. + + The listener. + + + + TestFinishedEvent holds information needed to call the TestFinished method. + + + + + Initializes a new instance of the class. + + The result. + + + + Calls TestFinished on the specified listener. + + The listener. + + + + TestOutputEvent holds information needed to call the TestOutput method. + + + + + Initializes a new instance of the class. + + The output object. + + + + Calls TestOutput on the specified listener. + + The listener. + + + + Implements a queue of work items each of which + is queued as a WaitCallback. + + + + + Gets the count of items in the queue. + + + + + Enqueues the specified event + + The event to enqueue. + + + + Removes the first element from the queue and returns it (or null). + + + If true and the queue is empty, the calling thread is blocked until + either an element is enqueued, or is called. + + + + + If the queue not empty + the first element. + + + otherwise, if ==false + or has been called + null. + + + + + + + Stop processing of the queue + + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. + + + + + Construct a ParallelWorkItemDispatcher + + Number of workers to use + + + + Enumerates all the shifts supported by the dispatcher + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + + + + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. + + + + + The EventQueue created and filled by this listener + + + + + Construct a QueuingEventListener + + + + + A test has started + + The test that is starting + + + + A test case finished + + Result of the test case + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + A TestWorker pulls work items from a queue + and executes them. + + + + + Event signaled immediately before executing a WorkItem + + + + + Event signaled immediately after executing a WorkItem + + + + + Construct a new TestWorker. + + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests + + + + The name of this worker - also used for the thread + + + + + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop + + + + + Start processing work items. + + + + + 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 + + + + 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. + + + + + Construct a TextCapture object + + The default destination for non-intercepted output + + + + Gets the Encoding in use by this TextWriter + + + + + Writes a single character + + The char to write + + + + Writes a string + + The string to write + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + Indicates whether this WorkItem may be run in parallel + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + WorkItemQueueState indicates the current state of a WorkItemQueue + + + + + The queue is paused + + + + + The queue is running + + + + + The queue is stopped + + + + + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. + + + + + Initializes a new instance of the class. + + The name of the queue. + + + + Gets the name of the work item queue. + + + + + Gets the total number of items processed so far + + + + + Gets the maximum number of work items. + + + + + Gets the current state of the queue + + + + + Get a bool indicating whether the queue is empty. + + + + + Enqueue a WorkItem to be processed + + The WorkItem to process + + + + Dequeue a WorkItem for processing + + A WorkItem or null if the queue has stopped + + + + Start or restart processing of items from the queue + + + + + Signal the queue to stop + + + + + Pause the queue for restarting later + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + 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. + + + + + Construct a WorkShift + + + + + Event that fires when the shift has ended + + + + + Gets a flag indicating whether the shift is currently active + + + + + Gets a list of the queues associated with this shift. + + Used for testing + + + + Gets the list of workers associated with this shift. + + + + + Gets a bool indicating whether this shift has any work to do + + + + + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. + + + + + Assign a worker to the shift. + + + + + + Start or restart processing for the shift + + + + + End the shift, pausing all queues and raising + the EndOfShift event. + + + + + Shut down the shift. + + + + + Cancel (abort or stop) the shift without completing all work + + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + OSPlatform represents a particular operating system platform + + + + + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater + + + + + Platform ID for Unix as defined by Mono + + + + + Platform ID for XBox as defined by .NET and Mono, but not CF + + + + + Platform ID for MacOSX as defined by .NET and Mono, but not CF + + + + + Get the OSPlatform under which we are currently running + + + + + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 + + + If an application is not manifested as Windows 8.1 or Windows 10, + the version returned from Environment.OSVersion will not be 6.3 and 10.0 + respectively, but will be 6.2 and 6.3. The correct value can be found in + the registry. + + The original version + The correct OS version + + + + Product Type Enumeration used for Windows + + + + + Product type is unknown or unspecified + + + + + Product type is Workstation + + + + + Product type is Domain Controller + + + + + Product type is Server + + + + + Construct from a platform ID and version + + + + + Construct from a platform ID, version and product type + + + + + Get the platform ID of this instance + + + + + Get the Version of this instance + + + + + Get the Product Type of this instance + + + + + Return true if this is a windows platform + + + + + Return true if this is a Unix or Linux platform + + + + + Return true if the platform is Win32S + + + + + Return true if the platform is Win32Windows + + + + + Return true if the platform is Win32NT + + + + + Return true if the platform is Windows CE + + + + + Return true if the platform is Xbox + + + + + Return true if the platform is MacOSX + + + + + Return true if the platform is Windows 95 + + + + + Return true if the platform is Windows 98 + + + + + Return true if the platform is Windows ME + + + + + Return true if the platform is NT 3 + + + + + Return true if the platform is NT 4 + + + + + Return true if the platform is NT 5 + + + + + Return true if the platform is Windows 2000 + + + + + Return true if the platform is Windows XP + + + + + Return true if the platform is Windows 2003 Server + + + + + Return true if the platform is NT 6 + + + + + Return true if the platform is NT 6.0 + + + + + Return true if the platform is NT 6.1 + + + + + Return true if the platform is NT 6.2 + + + + + Return true if the platform is NT 6.3 + + + + + Return true if the platform is Vista + + + + + Return true if the platform is Windows 2008 Server (original or R2) + + + + + Return true if the platform is Windows 2008 Server (original) + + + + + Return true if the platform is Windows 2008 Server R2 + + + + + Return true if the platform is Windows 2012 Server (original or R2) + + + + + Return true if the platform is Windows 2012 Server (original) + + + + + Return true if the platform is Windows 2012 Server R2 + + + + + Return true if the platform is Windows 7 + + + + + Return true if the platform is Windows 8 + + + + + Return true if the platform is Windows 8.1 + + + + + Return true if the platform is Windows 10 + + + + + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. + + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + + + + + Comma-delimited list of all supported OS platform constants + + + + + Comma-delimited list of all supported Runtime platform constants + + + + + Default constructor uses the operating system and + common language runtime of the system. + + + + + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. + + OperatingSystem to be used + RuntimeFramework to be used + + + + Test to determine if one of a collection of platforms + is being used currently. + + + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. + + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + ReaderWriterLock + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Enumeration identifying a common language + runtime implementation. + + + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + + + RuntimeFramework represents a particular version + of a common language runtime implementation. + + + + + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. + + + + + Construct from a runtime type and version. If the version has + two parts, it is taken as a framework version. If it has three + or more, it is taken as a CLR version. In either case, the other + version is deduced based on the runtime type and provided version. + + The runtime type of the framework + The version of the framework + + + + Static method to return a RuntimeFramework object + for the framework that is currently in use. + + + + + The type of this runtime framework + + + + + The framework version for this runtime framework + + + + + The CLR version for this runtime framework + + + + + Return true if any CLR version may be used in + matching this RuntimeFramework object. + + + + + Returns the Display name for this framework + + + + + 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'. + + + + + + + Overridden to return the short name of the framework + + + + + + Returns true if the current framework matches the + one supplied as an argument. Two frameworks match + if their runtime types are the same or either one + is RuntimeType.Any and all specified version components + are equal. Negative (i.e. unspecified) version + components are ignored. + + The RuntimeFramework to be matched. + True on match, otherwise false + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + Helper class used to save and restore certain static or + singleton settings in the environment that affect tests + or which might be changed by the user tests. + + An internal class is used to hold settings and a stack + of these objects is pushed and popped as Save and Restore + are called. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + The current Principal. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + Get the current context or return null if none is found. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + Gets or sets the current for the Thread. + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Obtain lifetime service object + + + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object implementing ICustomAttributeProvider + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + ThreadUtility provides a set of static methods convenient + for working with threads. + + + + + Do our best to Kill a thread + + The thread to kill + + + + Do our best to kill a thread, passing state info + + The thread to kill + Info for the ThreadAbortException handler + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + 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 + + + + Runs the tests in an assembly asyncronously reporting back the test results through the callback + + The callback that receives the test results + A string containing the XML representation of the filter to use + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts environment element + + Target node + The new node + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + Gets the default level of parallel execution (worker threads) + + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 . + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 + + + + 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 . + + 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 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. + + 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 InconclusiveException 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 + + + + 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 + + + + 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. + + + + 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 + + + + 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 + + + + 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 + + + + + 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 + + + + 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 + + + + + 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 + + + + + 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 + + + + + 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 + + + + + Marks a test to use a Sequential join of any argument + data provided. Arguments will be combined into test cases, + taking the next value of each argument until all are used. + + + + + Default constructor + + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + SetUpFixtureAttribute is used to identify a SetUpFixture + + + + + Build a SetUpFixture from type provided. Normally called for a Type + on which the attribute has been placed. + + The type info of the fixture to be used. + A SetUpFixture object as a TestSuite. + + + + Attribute used to identify a method that is called + immediately after each test is run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + 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 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. + + + + + 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. + + + + + + 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. + + + + 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. + + + + 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 + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + The EqualConstraintResult class is tailored for formatting + and displaying the result of an EqualConstraint. + + + + + Construct an EqualConstraintResult + + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Display the failure information for two collections that did not match. + + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections + + + + Displays a single line showing the types and sizes of the expected + and actual collections or arrays. If both are identical, the value is + only shown once. + + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line + + + + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both _values are shown. + + The MessageWriter on which to display + The expected array + The actual array + Index of the failure point in the underlying collections + The indentation level for the message line + + + + Display the failure information for two IEnumerables that did not match. + + The MessageWriter on which to display + The expected enumeration. + The actual enumeration + The depth of this failure in a set of nested collections + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + XmlSerializableConstraint tests whether + an object is serializable in xml format. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Asserts on Directories + + + + + 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. + + + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if the directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + 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. + + + + + 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. + + + + 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. + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 + + + + The IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + 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. + + + + + 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 + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 + + + + Asserts on Files + + + + + 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. + + + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + + + + 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 + + + + Asserts that the file exists. If it does not exist + an is thrown. + + The path to a file containing the actual value + + + + 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + A file containing the actual value + + + + Asserts that the file does not exist. If it does 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + The path to a file containing the actual value + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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 + 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. + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + Gets a TextWriter that will send output directly to Console.Error + + + + + Gets a TextWriter for use in displaying immediate progress messages + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + A MarshalByRefObject that lives forever + + + + + Obtains a lifetime service object to control the lifetime policy for this instance. + + + + + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks + + + This version of the class supplies GetTypeInfo() on platforms + that don't support it. + + + + + GetTypeInfo gives access to most of the Type information we take for granted + on .NET Core and Windows Runtime. Rather than #ifdef different code for different + platforms, it is easiest to just code all platforms as if they worked this way, + thus the simple passthrough. + + + + + + + Extensions for Assembly that are not available in pre-4.5 .NET releases + + + + + An easy way to get a single custom attribute from an assembly + + The attribute Type + The assembly + An attribute of Type T + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + This class is used as a flag when we get a parameter list for a method/constructor, but + we do not know one of the types because null was passed in. + + + + diff --git a/packages/NUnit.3.4.1/lib/net45/nunit.framework.dll b/packages/NUnit.3.4.1/lib/net45/nunit.framework.dll new file mode 100644 index 0000000..c0cb94e Binary files /dev/null and b/packages/NUnit.3.4.1/lib/net45/nunit.framework.dll differ diff --git a/packages/NUnit.3.4.1/lib/net45/nunit.framework.xml b/packages/NUnit.3.4.1/lib/net45/nunit.framework.xml new file mode 100644 index 0000000..cba9c50 --- /dev/null +++ b/packages/NUnit.3.4.1/lib/net45/nunit.framework.xml @@ -0,0 +1,17681 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the path to the directory from which an assembly was loaded. + + The assembly. + The path. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which may be the + path to the assembly or the AssemblyName + + + + + + + Gets the assembly path from code base. + + Public for testing purposes + The code base. + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + 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 + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a file. + + Path to the file to use + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + NUnitTestFixtureBuilder is able to build a fixture given + a class marked with a TestFixtureAttribute or an unmarked + class containing test methods. In the first case, it is + called by the attribute and in the second directly by + NUnitSuiteBuilder. + + + + + Build a TestFixture from type provided. A non-null TestSuite + must always be returned, since the method is generally called + because the user has marked the target class as a fixture. + If something prevents the fixture from being used, it should + be returned nonetheless, labelled as non-runnable. + + An ITypeInfo for the fixture to be used. + A TestSuite object or one derived from TestSuite. + + + + Overload of BuildFrom called by tests that have arguments. + Builds a fixture using the provided type and information + in the ITestFixtureData object. + + The TypeInfo for which to construct a fixture. + An object implementing ITestFixtureData or null. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + 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 CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + 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. + + + + + Construct an EventListenerTextWriter + + The name of the stream to use for events + The default writer to use if no listener is available + + + + Write a single char + + + + + Write a string + + + + + Write a string followed by a newline + + + + + Get the Encoding for this TextWriter + + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 EventPumpState enum represents the state of an + EventPump. + + + + + The pump is stopped + + + + + The pump is pumping events with no stop requested + + + + + The pump is pumping events but a stop has been requested + + + + + EventPump pulls events out of an EventQueue and sends + them to a listener. It is used to send events back to + the client without using the CallContext of the test + runner thread. + + + + + The downstream listener to which we send events + + + + + The queue that holds our events + + + + + Thread to do the pumping + + + + + The current state of the eventpump + + + + + Constructor + + The EventListener to receive events + The event queue to pull events from + + + + Gets or sets the current state of the pump + + + + + Gets or sets the name of this EventPump + (used only internally and for testing). + + + + + Dispose stops the pump + Disposes the used WaitHandle, too. + + + + + Start the pump + + + + + Tell the pump to stop after emptying the queue. + + + + + 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. + + + + + NUnit.Core.Event is the abstract base for all stored events. + An Event is the stored representation of a call to the + ITestListener interface and is used to record such calls + or to queue them for forwarding on another thread or at + a later time. + + + + + The Send method is implemented by derived classes to send the event to the specified listener. + + The listener. + + + + TestStartedEvent holds information needed to call the TestStarted method. + + + + + Initializes a new instance of the class. + + The test. + + + + Calls TestStarted on the specified listener. + + The listener. + + + + TestFinishedEvent holds information needed to call the TestFinished method. + + + + + Initializes a new instance of the class. + + The result. + + + + Calls TestFinished on the specified listener. + + The listener. + + + + TestOutputEvent holds information needed to call the TestOutput method. + + + + + Initializes a new instance of the class. + + The output object. + + + + Calls TestOutput on the specified listener. + + The listener. + + + + Implements a queue of work items each of which + is queued as a WaitCallback. + + + + + Gets the count of items in the queue. + + + + + Enqueues the specified event + + The event to enqueue. + + + + Removes the first element from the queue and returns it (or null). + + + If true and the queue is empty, the calling thread is blocked until + either an element is enqueued, or is called. + + + + + If the queue not empty + the first element. + + + otherwise, if ==false + or has been called + null. + + + + + + + Stop processing of the queue + + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. + + + + + Construct a ParallelWorkItemDispatcher + + Number of workers to use + + + + Enumerates all the shifts supported by the dispatcher + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + + + + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. + + + + + The EventQueue created and filled by this listener + + + + + Construct a QueuingEventListener + + + + + A test has started + + The test that is starting + + + + A test case finished + + Result of the test case + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + A TestWorker pulls work items from a queue + and executes them. + + + + + Event signaled immediately before executing a WorkItem + + + + + Event signaled immediately after executing a WorkItem + + + + + Construct a new TestWorker. + + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests + + + + The name of this worker - also used for the thread + + + + + Indicates whether the worker thread is running + + + + + Our ThreadProc, which pulls and runs tests in a loop + + + + + Start processing work items. + + + + + 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 + + + + 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. + + + + + Construct a TextCapture object + + The default destination for non-intercepted output + + + + Gets the Encoding in use by this TextWriter + + + + + Writes a single character + + The char to write + + + + Writes a string + + The string to write + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + Indicates whether this WorkItem may be run in parallel + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + WorkItemQueueState indicates the current state of a WorkItemQueue + + + + + The queue is paused + + + + + The queue is running + + + + + The queue is stopped + + + + + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. + + + + + Initializes a new instance of the class. + + The name of the queue. + + + + Gets the name of the work item queue. + + + + + Gets the total number of items processed so far + + + + + Gets the maximum number of work items. + + + + + Gets the current state of the queue + + + + + Get a bool indicating whether the queue is empty. + + + + + Enqueue a WorkItem to be processed + + The WorkItem to process + + + + Dequeue a WorkItem for processing + + A WorkItem or null if the queue has stopped + + + + Start or restart processing of items from the queue + + + + + Signal the queue to stop + + + + + Pause the queue for restarting later + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + 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. + + + + + Construct a WorkShift + + + + + Event that fires when the shift has ended + + + + + Gets a flag indicating whether the shift is currently active + + + + + Gets a list of the queues associated with this shift. + + Used for testing + + + + Gets the list of workers associated with this shift. + + + + + Gets a bool indicating whether this shift has any work to do + + + + + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. + + + + + Assign a worker to the shift. + + + + + + Start or restart processing for the shift + + + + + End the shift, pausing all queues and raising + the EndOfShift event. + + + + + Shut down the shift. + + + + + Cancel (abort or stop) the shift without completing all work + + true if the WorkShift should be aborted, false if it should allow its currently running tests to complete + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + Serialization Constructor + + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + OSPlatform represents a particular operating system platform + + + + + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater + + + + + Platform ID for Unix as defined by Mono + + + + + Platform ID for XBox as defined by .NET and Mono, but not CF + + + + + Platform ID for MacOSX as defined by .NET and Mono, but not CF + + + + + Get the OSPlatform under which we are currently running + + + + + Gets the actual OS Version, not the incorrect value that might be + returned for Win 8.1 and Win 10 + + + If an application is not manifested as Windows 8.1 or Windows 10, + the version returned from Environment.OSVersion will not be 6.3 and 10.0 + respectively, but will be 6.2 and 6.3. The correct value can be found in + the registry. + + The original version + The correct OS version + + + + Product Type Enumeration used for Windows + + + + + Product type is unknown or unspecified + + + + + Product type is Workstation + + + + + Product type is Domain Controller + + + + + Product type is Server + + + + + Construct from a platform ID and version + + + + + Construct from a platform ID, version and product type + + + + + Get the platform ID of this instance + + + + + Get the Version of this instance + + + + + Get the Product Type of this instance + + + + + Return true if this is a windows platform + + + + + Return true if this is a Unix or Linux platform + + + + + Return true if the platform is Win32S + + + + + Return true if the platform is Win32Windows + + + + + Return true if the platform is Win32NT + + + + + Return true if the platform is Windows CE + + + + + Return true if the platform is Xbox + + + + + Return true if the platform is MacOSX + + + + + Return true if the platform is Windows 95 + + + + + Return true if the platform is Windows 98 + + + + + Return true if the platform is Windows ME + + + + + Return true if the platform is NT 3 + + + + + Return true if the platform is NT 4 + + + + + Return true if the platform is NT 5 + + + + + Return true if the platform is Windows 2000 + + + + + Return true if the platform is Windows XP + + + + + Return true if the platform is Windows 2003 Server + + + + + Return true if the platform is NT 6 + + + + + Return true if the platform is NT 6.0 + + + + + Return true if the platform is NT 6.1 + + + + + Return true if the platform is NT 6.2 + + + + + Return true if the platform is NT 6.3 + + + + + Return true if the platform is Vista + + + + + Return true if the platform is Windows 2008 Server (original or R2) + + + + + Return true if the platform is Windows 2008 Server (original) + + + + + Return true if the platform is Windows 2008 Server R2 + + + + + Return true if the platform is Windows 2012 Server (original or R2) + + + + + Return true if the platform is Windows 2012 Server (original) + + + + + Return true if the platform is Windows 2012 Server R2 + + + + + Return true if the platform is Windows 7 + + + + + Return true if the platform is Windows 8 + + + + + Return true if the platform is Windows 8.1 + + + + + Return true if the platform is Windows 10 + + + + + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. + + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. + + + + + Comma-delimited list of all supported OS platform constants + + + + + Comma-delimited list of all supported Runtime platform constants + + + + + Default constructor uses the operating system and + common language runtime of the system. + + + + + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. + + OperatingSystem to be used + RuntimeFramework to be used + + + + Test to determine if one of a collection of platforms + is being used currently. + + + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Tests to determine if the current platform is supported + based on a platform attribute. + + The attribute to examine + + + + + Test to determine if the a particular platform or comma- + delimited set of platforms is in use. + + Name of the platform or comma-separated list of platform ids + True if the platform is in use on the system + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + ReaderWriterLock + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Enumeration identifying a common language + runtime implementation. + + + + Any supported runtime framework + + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + + + RuntimeFramework represents a particular version + of a common language runtime implementation. + + + + + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. + + + + + Construct from a runtime type and version. If the version has + two parts, it is taken as a framework version. If it has three + or more, it is taken as a CLR version. In either case, the other + version is deduced based on the runtime type and provided version. + + The runtime type of the framework + The version of the framework + + + + Static method to return a RuntimeFramework object + for the framework that is currently in use. + + + + + The type of this runtime framework + + + + + The framework version for this runtime framework + + + + + The CLR version for this runtime framework + + + + + Return true if any CLR version may be used in + matching this RuntimeFramework object. + + + + + Returns the Display name for this framework + + + + + 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'. + + + + + + + Overridden to return the short name of the framework + + + + + + Returns true if the current framework matches the + one supplied as an argument. Two frameworks match + if their runtime types are the same or either one + is RuntimeType.Any and all specified version components + are equal. Negative (i.e. unspecified) version + components are ignored. + + The RuntimeFramework to be matched. + True on match, otherwise false + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + Helper class used to save and restore certain static or + singleton settings in the environment that affect tests + or which might be changed by the user tests. + + An internal class is used to hold settings and a stack + of these objects is pushed and popped as Save and Restore + are called. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + The current Principal. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + Get the current context or return null if none is found. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + Gets or sets the current for the Thread. + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Obtain lifetime service object + + + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object implementing ICustomAttributeProvider + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + ThreadUtility provides a set of static methods convenient + for working with threads. + + + + + Do our best to Kill a thread + + The thread to kill + + + + Do our best to kill a thread, passing state info + + The thread to kill + Info for the ThreadAbortException handler + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + 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 + + + + Runs the tests in an assembly asyncronously reporting back the test results through the callback + + The callback that receives the test results + A string containing the XML representation of the filter to use + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts environment element + + Target node + The new node + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + Gets the default level of parallel execution (worker threads) + + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 . + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 + + + + 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 . + + 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 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. + + 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 InconclusiveException 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 + + + + 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. + + + + + 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 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. + + + + + 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. + + + + + + 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 + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + The EqualConstraintResult class is tailored for formatting + and displaying the result of an EqualConstraint. + + + + + Construct an EqualConstraintResult + + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Display the failure information for two collections that did not match. + + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections + + + + Displays a single line showing the types and sizes of the expected + and actual collections or arrays. If both are identical, the value is + only shown once. + + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line + + + + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both _values are shown. + + The MessageWriter on which to display + The expected array + The actual array + Index of the failure point in the underlying collections + The indentation level for the message line + + + + Display the failure information for two IEnumerables that did not match. + + The MessageWriter on which to display + The expected enumeration. + The actual enumeration + The depth of this failure in a set of nested collections + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + XmlSerializableConstraint tests whether + an object is serializable in xml format. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Asserts on Directories + + + + + 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. + + + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if the directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both point to the same directory. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory exists. If it does not exist + an is thrown. + + The path to a directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + A directory containing the actual value + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory does not exist. If it does exist + an is thrown. + + The path to a directory containing the actual value + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a constraint that succeeds if the value + is a file or directory and it exists. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Thrown when an assertion failed. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Gets the ResultState provided by this exception + + + + + Asserts on Files + + + + + 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. + + + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that the file exists. If it does not exist + an is thrown. + + A file containing the actual value + + + + 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 + + + + Asserts that the file exists. If it does not exist + an is thrown. + + The path to a file containing the actual value + + + + 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + A file containing the actual value + + + + Asserts that the file does not exist. If it does 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 + + + + Asserts that the file does not exist. If it does exist + an is thrown. + + The path to a file containing the actual value + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + 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. + + + + + 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. + + + + 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. + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 + + + + The IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + 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. + + + + + 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 + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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 + 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. + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + Gets a TextWriter that will send output directly to Console.Error + + + + + Gets a TextWriter for use in displaying immediate progress messages + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory containing the current test assembly. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + A MarshalByRefObject that lives forever + + + + + Obtains a lifetime service object to control the lifetime policy for this instance. + + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + This class is used as a flag when we get a parameter list for a method/constructor, but + we do not know one of the types because null was passed in. + + + + diff --git a/packages/NUnit.3.4.1/lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/nunit.framework.dll b/packages/NUnit.3.4.1/lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/nunit.framework.dll new file mode 100644 index 0000000..576ca03 Binary files /dev/null and b/packages/NUnit.3.4.1/lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/nunit.framework.dll differ diff --git a/packages/NUnit.3.4.1/lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/nunit.framework.xml b/packages/NUnit.3.4.1/lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/nunit.framework.xml new file mode 100644 index 0000000..fe70727 --- /dev/null +++ b/packages/NUnit.3.4.1/lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/nunit.framework.xml @@ -0,0 +1,15993 @@ + + + + nunit.framework + + + + + AssemblyHelper provides static methods for working + with assemblies. + + + + + Gets the path from which the assembly defining a type was loaded. + + The Type. + The path. + + + + 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. + + + + Gets the AssemblyName of an assembly. + + The assembly + An AssemblyName + + + + Loads an assembly given a string, which is the AssemblyName + + + + + + + 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. + + + + 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. + + + + + Gets a flag indicating whether the InternalTrace is initialized + + + + + Initialize the internal trace using a provided TextWriter and level + + A TextWriter + The InternalTraceLevel + + + + Get a named Logger + + + + + + Get a logger named for a particular Type. + + + + + 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 + + + + + A trace listener that writes to a separate file per domain + and process using it. + + + + + Construct an InternalTraceWriter that writes to a + TextWriter provided by the caller. + + + + + + Returns the character encoding in which the output is written. + + The character encoding in which the output is written. + + + + Writes a character to the text string or stream. + + The character to write to the text stream. + + + + Writes a string to the text string or stream. + + The string to write. + + + + Writes a string followed by a line terminator to the text string or stream. + + The string to write. If is null, only the line terminator is written. + + + + 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. + + + + Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. + + + + + Provides internal logging to the NUnit framework + + + + + Initializes a new instance of the class. + + The name. + The log level. + The writer where logs are sent. + + + + Logs the message at error level. + + The message. + + + + Logs the message at error level. + + The message. + The message arguments. + + + + Logs the message at warm level. + + The message. + + + + Logs the message at warning level. + + The message. + The message arguments. + + + + Logs the message at info level. + + The message. + + + + Logs the message at info level. + + The message. + The message arguments. + + + + Logs the message at debug level. + + The message. + + + + Logs the message at debug level. + + The message. + The message arguments. + + + + 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 + + + + CombinatorialStrategy creates test cases by using all possible + combinations of the parameter data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + Provides data from fields marked with the DatapointAttribute or the + DatapointsAttribute. + + + + + 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. + + + + + 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 + + + + + Built-in SuiteBuilder for all types of test classes. + + + + + 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 + + + + Build a TestSuite from TypeInfo provided. + + The fixture type to build + A TestSuite built from that type + + + + 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. + + + + 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 + + + + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + Builds a ParameterizedMethodSuite containing individual test cases. + + The method for which a test is to be built. + The list of test cases to include. + A ParameterizedMethodSuite populated with test cases + + + + 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. + + + + Class that can build a tree of automatic namespace + suites from a group of fixtures. + + + + + NamespaceDictionary of all test suites we have created to represent + namespaces. Used to locate namespace parent suites for fixtures. + + + + + The root of the test suite being created by this builder. + + + + + Initializes a new instance of the class. + + The root suite. + + + + Gets the root entry in the tree created by the NamespaceTreeBuilder. + + The root suite. + + + + Adds the specified fixtures to the tree. + + The fixtures to be added. + + + + Adds the specified fixture to the tree. + + The fixture to be added. + + + + NUnitTestCaseBuilder is a utility class used by attributes + that build test cases. + + + + + Constructs an + + + + + Builds a single NUnitTestMethod, either as a child of the fixture + or as one of a set of test cases under a ParameterizedTestMethodSuite. + + The MethodInfo from which to construct the TestMethod + The suite or fixture to which the new test will be added + The ParameterSet to be used, or null + + + + + Helper method that checks the signature of a TestMethod and + any supplied parameters to determine if the test is valid. + + Currently, NUnitTestMethods are required to be public, + non-abstract methods, either static or instance, + returning void. They may take arguments but the _values must + be provided or the TestMethod is not considered runnable. + + Methods not meeting these criteria will be marked as + non-runnable and the method will return false in that case. + + The TestMethod to be checked. If it + is found to be non-runnable, it will be modified. + Parameters to be used for this test, or null + True if the method signature is valid, false if not + + The return value is no longer used internally, but is retained + for testing purposes. + + + + + NUnitTestFixtureBuilder is able to build a fixture given + a class marked with a TestFixtureAttribute or an unmarked + class containing test methods. In the first case, it is + called by the attribute and in the second directly by + NUnitSuiteBuilder. + + + + + Build a TestFixture from type provided. A non-null TestSuite + must always be returned, since the method is generally called + because the user has marked the target class as a fixture. + If something prevents the fixture from being used, it should + be returned nonetheless, labelled as non-runnable. + + An ITypeInfo for the fixture to be used. + A TestSuite object or one derived from TestSuite. + + + + Overload of BuildFrom called by tests that have arguments. + Builds a fixture using the provided type and information + in the ITestFixtureData object. + + The TypeInfo for which to construct a fixture. + An object implementing ITestFixtureData or null. + + + + + Method to add test cases to the newly constructed fixture. + + The fixture to which cases should be added + + + + 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 + + + + 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 + + + + + + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea + + + + + Initializes a new instance of the FleaRand class. + + The seed. + + + + 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. + + + + + Initializes a new instance of FeatureInfo class. + + Index of a dimension. + Index of a feature. + + + + 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. + + + + + Initializes a new instance of FeatureTuple class for a single feature. + + Single feature. + + + + Initializes a new instance of FeatureTuple class for a pair of features. + + First feature. + Second feature. + + + + TestCase represents a single test case covering a list of features. + + + + + Initializes a new instance of TestCaseInfo class. + + A number of features in the test case. + + + + 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. + + + + + + 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. + + + + + Gets the test cases generated by this strategy instance. + + A set of test cases. + + + + The ParameterDataProvider class implements IParameterDataProvider + and hosts one or more individual providers. + + + + + Construct with a collection of individual providers + + + + + 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. + + + + 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 + + + + ParameterDataSourceProvider supplies individual argument _values for + single parameters using attributes implementing IParameterDataSource. + + + + + 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. + + + + + 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 + + + + + SequentialStrategy creates test cases by using all of the + parameter data sources in parallel, substituting null + when any of them run out of data. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + 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 CommandStage enumeration represents the defined stages + of execution for a series of TestCommands. The int _values + of the enum are used to apply decorators in the proper + order. Lower _values are applied first and are therefore + "closer" to the actual test execution. + + + No CommandStage is defined for actual invocation of the test or + for creation of the context. Execution may be imagined as + proceeding from the bottom of the list upwards, with cleanup + after the test running in the opposite order. + + + + + Use an application-defined default value. + + + + + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. + + + + + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. + + + + + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. + + + + + TODO: Documentation needed for class + + + + TODO: Documentation needed for field + + + + TODO: Documentation needed for constructor + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The inner command. + The max time allowed in milliseconds + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext + + The context in which the test should run. + A TestResult + + + + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. + + + + + Constructs a OneTimeSetUpCommand for a suite + + The suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run after Setup + + + + Overridden to run the one-time setup for a suite. + + The TestExecutionContext to be used. + A TestResult + + + + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. + + + + + Construct a OneTimeTearDownCommand + + The test suite to which the command applies + A SetUpTearDownList for use by the command + A List of TestActionItems to be run before teardown. + + + + Overridden to run the teardown methods specified on the test. + + The TestExecutionContext to be used. + A TestResult + + + + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. + + + + + Construct a SetUpTearDownNode + + A list of setup methods for this level + A list teardown methods for this level + + + + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. + + + + + Run SetUp on this level. + + The execution context to use for running. + + + + Run TearDown for this level. + + + + + + TODO: Documentation needed for class + + + + + Initializes a new instance of the class. + + The test being skipped. + + + + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + + The execution context for the test + A TestResult + + + + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. + + + + + Initializes a new instance of the class. + + The inner command. + + + + Runs the test, saving a TestResult in the supplied TestExecutionContext. + + The context in which the test should run. + A TestResult + + + + 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. + + + + + Construct a TestActionItem + + The ITestAction to be included + + + + Run the BeforeTest method of the action and remember that it has been run. + + The test to which the action applies + + + + Run the AfterTest action, but only if the BeforeTest + action was actually run. + + The test to which the action applies + + + + 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. + + + + + Construct a TestCommand for a test. + + The test to be executed + + + + Gets the test associated with this command. + + + + + Runs the test in a specified context, returning a TestResult. + + The TestExecutionContext to be used for running the test. + A TestResult + + + + TestMethodCommand is the lowest level concrete command + used to run actual test cases. + + + + + Initializes a new instance of the class. + + The test. + + + + Runs the test, saving a TestResult in the execution context, as + well as returning it. If the test has an expected result, it + is asserts on that value. Since failed tests and errors throw + an exception, this command must be wrapped in an outer command, + will handle that exception and records the failure. This role + is usually played by the SetUpTearDown command. + + The execution context + + + + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. + + + + + Constructs a TheoryResultCommand + + The command to be wrapped by this one + + + + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + + + + + + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. + + + + + Default constructor uses the current culture. + + + + + Construct a CultureDetector for a particular culture for testing. + + The culture to be used + + + + Test to determine if one of a collection of cultures + is being used currently. + + + + + + + Tests to determine if the current culture is supported + based on a culture attribute. + + The attribute to examine + + + + + 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 + + + + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. + + + + + ExceptionHelper provides static methods for working with exceptions + + + + + Rethrows an exception, preserving its stack trace + + The exception to rethrow + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined message string. + + + + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. + + The exception. + A combined stack trace. + + + + Gets the stack trace of the exception. + + The exception. + A string representation of the stack trace. + + + + A utility class to create TestCommands + + + + + Gets the command to be executed before any of + the child tests are run. + + A TestCommand + + + + Gets the command to be executed after all of the + child tests are run. + + A TestCommand + + + + Creates a test command for use in running this test. + + + + + + Creates a command for skipping a test. The result returned will + depend on the test RunState. + + + + + 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 + + + + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. + + + + + List of Child WorkItems + + + + + A count of how many tests in the work item have a value for the Order Property + + + + + 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. + + + 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. + + + + Sorts tests under this suite. + + + + + 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 + + + + A simplified implementation of .NET 4 CountdownEvent + for use in earlier versions of .NET. Only the methods + used by NUnit are implemented. + + + + + Construct a CountdownEvent + + The initial count + + + + Gets the initial count established for the CountdownEvent + + + + + Gets the current count remaining for the CountdownEvent + + + + + Decrement the count by one + + + + + Block the thread until the count reaches zero + + + + + An IWorkItemDispatcher handles execution of work items. + + + + + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + + The item to dispatch + + + + Cancel the ongoing run completely. + If no run is in process, the call has no effect. + + true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete + + + + 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. + + + + + Construct a simple work item for a test. + + The test to be executed + The filter used to select this test + + + + Method that performs actually performs the work. + + + + + 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. + + + + + 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 + + + + Cancel (abort or stop) the ongoing run. + If no run is in process, the call has no effect. + + true if the run should be aborted, false if it should allow its currently running test to complete + + + + 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. + + + + + Creates a work item. + + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + + + + + Construct a WorkItem for a particular test. + + The test that the WorkItem will run + + + + 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 + + + + Event triggered when the item is complete + + + + + Gets the current state of the WorkItem + + + + + The test being executed by the work item + + + + + The execution context + + + + + The unique id of the worker executing this item. + + + + + The test actions to be performed before and after this test + + + + + The test result + + + + + Execute the current work item, including any + child work items. + + + + + Cancel (abort or stop) a WorkItem + + true if the WorkItem should be aborted, false if it should run to completion + + + + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. + + + + + Method called by the derived class when all work is complete + + + + + The current state of a work item + + + + + Ready to run or continue + + + + + Work Item is executing + + + + + Complete + + + + + 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. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Gets or sets the maximum line length for this writer + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a given + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The result of 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. + + 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 string comparisons + If true, clip the strings to fit the max line length + + + + 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 + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The ConstraintResult for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Combines multiple filters so that a test must pass all + of them in order to pass this filter. + + + + + Constructs an empty AndFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters pass, otherwise false + + + + Checks whether the AndFilter is matched by a test + + The test to be matched + True if all the component filters match, otherwise false + + + + 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 + + + + Gets the element name + + Element name + + + + CategoryFilter is able to select or exclude tests + based on their categories. + + + + + + Construct a CategoryFilter using a single category name + + A category name + + + + Check whether the filter matches a test + + The test to be matched + + + + + Gets the element name + + Element name + + + + ClassName filter selects tests based on the class FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + A base class for multi-part filters + + + + + Constructs an empty CompositeFilter + + + + + Constructs a CompositeFilter from an array of filters + + + + + + Adds a filter to the list of filters + + The filter to be added + + + + Return a list of the composing filters. + + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is matched by a test. + + The test to be matched + + + + Checks whether the CompositeFilter is explicit matched by a test. + + The test to be matched + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a FullNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + IdFilter selects tests based on their id + + + + + Construct an IdFilter for a single value + + The id the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + FullName filter selects tests based on their FullName + + + + + Construct a MethodNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + NotFilter negates the operation of another filter + + + + + Construct a not filter on another filter + + The filter to be negated + + + + Gets the base filter + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + Check whether the filter matches a test + + The test to be matched + True if it matches, otherwise false + + + + 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 + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Combines multiple filters so that a test must pass one + of them in order to pass this filter. + + + + + Constructs an empty OrFilter + + + + + Constructs an AndFilter from an array of filters + + + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters pass, otherwise false + + + + Checks whether the OrFilter is matched by a test + + The test to be matched + True if any of the component filters match, otherwise false + + + + Checks whether the OrFilter is explicit matched by a test + + The test to be matched + True if any of the component filters explicit match, otherwise false + + + + Gets the element name + + Element name + + + + PropertyFilter is able to select or exclude tests + based on their properties. + + + + + + Construct a PropertyFilter using a property name and expected value + + A property name + The expected value of the property + + + + Check whether the filter matches a test + + The test to be matched + + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + TestName filter selects tests based on their Name + + + + + Construct a TestNameFilter for a single name + + The name the filter will recognize. + + + + Match a test against a single value. + + + + + Gets the element name + + Element name + + + + 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 + + + + + Indicates whether the value is a regular expression + + + + + Construct a ValueMatchFilter for a single value. + + The value to be included. + + + + Match the input provided by the derived class + + The value to be matchedT + True for a match, false otherwise. + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + Gets the element name + + Element name + + + + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. + + + + + Construct a GenericMethodHelper for a method + + MethodInfo for the method to examine + + + + Return the type argments for the method, deducing them + from the arguments actually provided. + + The arguments to the method + An array of type arguments. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner. + + + + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. + + + + + Construct a MethodWrapper for a Type and a MethodInfo. + + + + + Construct a MethodInfo for a given Type and method name. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + + + + + 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 + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + + + + Initializes a new instance of the class. + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. + + + + + Construct a ParameterWrapper for a given method and parameter + + + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter. + + + + + Gets the underlying ParameterInfo + + + + + Gets the Type of the parameter + + + + + Returns an array of custom attributes of the specified type applied to this method + + + + + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + + + + + 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. + + + + + Adds a key/value pair to the property set + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + + + 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 + + + + + Gets a collection containing all the keys in the property set + + + + + + Gets or sets the list of _values for a particular key + + + + + Returns an XmlNode representating the current PropertyBag. + + Not used + An XmlNode representing the PropertyBag + + + + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + + The parent node. + Not used + + + + + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. + + + + + The FriendlyName of the AppDomain in which the assembly is running + + + + + The selected strategy for joining parameter data into test cases + + + + + The process ID of the executing assembly + + + + + The stack trace from any data provider that threw + an exception. + + + + + The reason a test was not run + + + + + The author of the tests + + + + + The ApartmentState required for running the test + + + + + The categories applying to a test + + + + + The Description of a test + + + + + The number of threads to be used in running tests + + + + + The maximum time in ms, above which the test is considered to have failed + + + + + The ParallelScope associated with a test + + + + + The number of times the test should be repeated + + + + + Indicates that the test should be run on a separate thread + + + + + The culture to be set for a test + + + + + The UI culture to be set for a test + + + + + The type that is under test + + + + + The timeout value for the test + + + + + The test will be ignored until the given date + + + + + The optional Order the test will run in + + + + + 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. + + + 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. + + + + + Initial seed used to create randomizers for this run + + + + + 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. + + + + + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + + + + + + Default constructor + + + + + Construct based on seed value + + + + + + Returns a random unsigned int. + + + + + Returns a random unsigned int less than the specified maximum. + + + + + Returns a random unsigned int within a specified range. + + + + + Returns a non-negative random short. + + + + + Returns a non-negative random short less than the specified maximum. + + + + + Returns a non-negative random short within a specified range. + + + + + Returns a random unsigned short. + + + + + Returns a random unsigned short less than the specified maximum. + + + + + Returns a random unsigned short within a specified range. + + + + + Returns a random long. + + + + + Returns a random long less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random ulong. + + + + + Returns a random ulong less than the specified maximum. + + + + + Returns a non-negative random long within a specified range. + + + + + Returns a random Byte + + + + + Returns a random Byte less than the specified maximum. + + + + + Returns a random Byte within a specified range + + + + + Returns a random SByte + + + + + Returns a random sbyte less than the specified maximum. + + + + + Returns a random sbyte within a specified range + + + + + Returns a random bool + + + + + Returns a random bool based on the probablility a true result + + + + + Returns a random double between 0.0 and the specified maximum. + + + + + Returns a random double within a specified range. + + + + + Returns a random float. + + + + + Returns a random float between 0.0 and the specified maximum. + + + + + Returns a random float within a specified range. + + + + + Returns a random enum value of the specified Type as an object. + + + + + Returns a random enum value of the specified Type. + + + + + Default characters for random functions. + + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length + + + + Generate a random string based on the characters from the input string. + + desired length of output string. + A random string of arbitrary length + Uses DefaultStringChars as the input character set + + + + Generate a random string based on the characters from the input string. + + A random string of the default length + Uses DefaultStringChars as the input character set + + + + Returns a random decimal. + + + + + Returns a random decimal between positive zero and the specified maximum. + + + + + Returns a random decimal within a specified range, which is not + permitted to exceed decimal.MaxVal in the current implementation. + + + A limitation of this implementation is that the range from min + to max must not exceed decimal.MaxVal. + + + + + 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. + + + + + Examine a fixture type and return an array of methods having a + particular attribute. The array is order with base methods first. + + The type to examine + The attribute Type to look for + Specifies whether to search the fixture type inheritance chain + The array of methods found + + + + Examine a fixture type and return true if it has a method with + a particular attribute. + + The type to examine + The attribute Type to look for + True if found, otherwise false + + + + Invoke the default constructor on a Type + + The Type to be constructed + An instance of the Type + + + + Invoke a constructor on a Type with arguments + + The Type to be constructed + Arguments to the constructor + An instance of the Type + + + + Returns an array of types from an array of objects. + Used because the compact framework doesn't support + Type.GetTypeArray() + + An array of objects + An array of Types + + + + Invoke a parameterless method returning void on an object. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + + + + Invoke a method, converting any TargetInvocationException to an NUnitException. + + A MethodInfo for the method to be invoked + The object on which to invoke the method + The argument list for the method + The return value from the invoked method + + + + Represents the result of running a single test case. + + + + + Construct a TestCaseResult based on a TestMethod + + A TestMethod to which the result applies. + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + The TestResult class represents the result of a test. + + + + + Error message for when child tests have errors + + + + + Error message for when child tests are ignored + + + + + The minimum duration for tests + + + + + Aggregate assertion count + + + + + Construct a test result given a Test + + The test to be used + + + + Gets the test with which this result is associated. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets or sets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets or sets the count of asserts executed + when running the test. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Gets a TextWriter, which will write output to be included in the result. + + + + + Gets any text output written to this result. + + + + + Returns the Xml representation of the result. + + If true, descendant results are included + An XmlNode representing the result + + + + Adds the XML representation of the result as a child of the + supplied parent node.. + + The parent node. + If true, descendant results are included + + + + + Set the result of the test + + The ResultState to use in the result + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + + + + Set the result of the test + + The ResultState to use in the result + A message associated with the result state + Stack trace giving the location of the command + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + + + + Set the test result based on the type of exception thrown + + The exception that was thrown + THe FailureSite to use in the result + + + + RecordTearDownException appends the message and stacktrace + from an exception arising during teardown of the test + to any previously recorded information, so that any + earlier failure information is not lost. Note that + calling Assert.Ignore, Assert.Inconclusive, etc. during + teardown is treated as an error. If the current result + represents a suite, it may show a teardown error even + though all contained tests passed. + + The Exception to be recorded + + + + Adds a reason element to a node and returns it. + + The target node. + The new reason element. + + + + Adds a failure element to a node and returns it. + + The target node. + The new failure element. + + + + Represents the result of running a test suite + + + + + Construct a TestSuiteResult base on a TestSuite + + The TestSuite to which the result applies + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + + + + + Gets the collection of child results. + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. + + + + + Filters a raw stack trace and returns the result. + + The original stack trace + A filtered stack trace + + + + Provides methods to support legacy string comparison methods. + + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if + strB is sorted first + + + + Compares two strings for equality, ignoring case if requested. + + The first string. + The second string.. + if set to true, the case of the letters in the strings is ignored. + True if the strings are equivalent, false if not. + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + The expected result to be returned + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + The expected result of the test, which + must match the method return type. + + + + + Gets a value indicating whether an expected result was specified. + + + + + Helper class used to save and restore certain static or + singleton settings in the environment that affect tests + or which might be changed by the user tests. + + An internal class is used to hold settings and a stack + of these objects is pushed and popped as Save and Restore + are called. + + + + + Link to a prior saved context + + + + + Indicates that a stop has been requested + + + + + The event listener currently receiving notifications + + + + + The number of assertions for the current test + + + + + The current culture + + + + + The current UI culture + + + + + The current test result + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + An existing instance of TestExecutionContext. + + + + Gets and sets the current context. + + + + + 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 time the current test started execution + + + + + The time the current test started in Ticks + + + + + Gets or sets the current test result + + + + + Gets a TextWriter that will send output to the current test result. + + + + + The current test object - that is the user fixture + object on which tests are being executed. + + + + + Get or set the working directory + + + + + Get or set indicator that run should stop on the first error + + + + + Gets an enum indicating whether a stop has been requested. + + + + + The current test event listener + + + + + The current WorkItemDispatcher. Made public for + use by nunitlite.tests + + + + + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. + + + + + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. + + + + + Gets the RandomGenerator specific to this Test + + + + + Gets the assert count. + + The assert count. + + + + Gets or sets the test case timeout value + + + + + Gets a list of ITestActions set by upstream tests + + + + + Saves or restores the CurrentCulture + + + + + Saves or restores the CurrentUICulture + + + + + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter + + + + + If true, all tests must run on the same thread. No new thread may be spawned. + + + + + 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. + + + + + 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. + + + + + Increments the assert count by one. + + + + + Increments the assert count by a specified amount. + + + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + + + + Enumeration indicating whether the tests are + running normally or being cancelled. + + + + + Running normally with no stop requested + + + + + A graceful stop has been requested + + + + + A forced stop has been requested + + + + + 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. + + + + + Unique Empty filter. + + + + + Indicates whether this is the EmptyFilter + + + + + Indicates whether this is a top-level filter, + not contained in any other filter. + + + + + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + + The test to which the filter is applied + True if the test passes the filter, otherwise false + + + + 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 + + + + 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 test to which the filter is applied + True if the filter matches the any parent of the test + + + + Determine whether any ancestor of the test matches the filter criteria + + The test to which the filter is applied + True if the filter matches the an ancestor of the test + + + + Determine whether any descendant of the test matches the filter criteria. + + The test to be matched + True if at least one descendant matches the filter criteria + + + + Create a TestFilter instance from an xml representation. + + + + + Create a TestFilter from it's TNode representation + + + + + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. + + + + + Adds an XML node + + True if recursive + The added XML node + + + + Adds an XML node + + Parent node + True if recursive + The added XML node + + + + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a ParameterSet from an object implementing ITestCaseData + + + + + + Type arguments used to create a generic fixture instance + + + + + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test case has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Construct a new TestListener - private so it may not be used. + + + + + Get a listener that does nothing + + + + + TestNameGenerator is able to create test names according to + a coded pattern. + + + + + Default pattern used to generate names + + + + + Construct a TestNameGenerator + + + + + Construct a TestNameGenerator + + The pattern used by this generator. + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + The display name + + + + Get the display name for a TestMethod and it's arguments + + A TestMethod + Arguments to be used + The display name + + + + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. + + + + + Default Constructor creates an empty parameter set + + + + + Construct a parameter set with a list of arguments + + + + + + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. + + + + + Construct a ParameterSet from an object implementing ITestData + + + + + + The RunState for this set of parameters. + + + + + The arguments to be used in running the test, + which must match the method signature. + + + + + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. + + + + + Gets the property dictionary for this test + + + + + Applies ParameterSet _values to the test itself. + + A test. + + + + The original arguments provided by the user, + used for display purposes. + + + + + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. + + + + + Initializes a new instance of the class. + + The callback handler to be used for reporting progress. + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished. Sends a result summary to the callback. + to + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + Returns the parent test item for the targer test item if it exists + + + parent test item + + + + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + + The string to be used + A new string with the _values replaced + + + + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. + + + + + Initializes a new instance of the class. + + The ITypeInfo for the type that represents the suite. + + + + Gets a string representing the type of test + + + + + + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. + + + + + Construct from a MethodInfo + + + + + + Gets a string representing the type of test + + + + + + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. + + + + + Initializes a new instance of the class. + + The type. + + + + The Test abstract class represents a test within the framework. + + + + + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. + + + + + The SetUp methods. + + + + + The teardown methods + + + + + Used to cache the declaring type for this MethodInfo + + + + + Method property backing field + + + + + Constructs a test given its name + + The name of the test + + + + Constructs a test given the path through the + test hierarchy to its parent and a name. + + The parent tests full name + The name of the test + + + + TODO: Documentation needed for constructor + + + + + + Construct a test from a MethodInfo + + + + + + Gets or sets the id of the test + + + + + + Gets or sets the name of the test + + + + + Gets or sets the fully qualified name of the test + + + + + + Gets the name of the class where this test was declared. + Returns null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. + + + + + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Whether or not the test should be run + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + 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. + + + + + Gets a count of test cases represented by + or contained under this test. + + + + + Gets the properties for this test + + + + + Returns true if this is a TestSuite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the parent as a Test object. + Used by the core to set the parent. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets or sets a fixture object for running this test. + + + + + Static prefix used for ids in this AppDomain. + Set by FrameworkController. + + + + + Gets or Sets the Int value representing the seed for the RandomGenerator + + + + + + Creates a TestResult for this test. + + A TestResult suitable for this type of test. + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object deriving from MemberInfo + + + + Modify a newly constructed test by applying any of NUnit's common + attributes, based on a supplied ICustomAttributeProvider, which is + usually the reflection element from which the test was constructed, + but may not be in some instances. The attributes retrieved are + saved for use in subsequent operations. + + An object deriving from MemberInfo + + + + Add standard attributes and members to a test node. + + + + + + + Returns the Xml representation of the test + + If true, include child tests recursively + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Compares this test to another test for sorting purposes + + 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 + + + + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. + + + + + Initializes a new instance of the class + specifying the Assembly and the path from which it was loaded. + + The assembly this test represents. + The path used to load the assembly. + + + + Initializes a new instance of the class + for a path which could not be loaded. + + The path used to load the assembly. + + + + Gets the Assembly represented by this instance. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. + + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + The TestMethod class represents a Test implemented as a method. + + + + + The ParameterSet used to create this test method + + + + + Initializes a new instance of the class. + + The method to be used as a test. + + + + Initializes a new instance of the class. + + The method to be used as a test. + The suite or fixture to which the new test will be added + + + + Overridden to return a TestCaseResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Returns a TNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Gets this test's child tests + + A list of child tests + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns the name of the method + + + + + TestSuite represents a composite test, which contains other tests. + + + + + Our collection of child tests + + + + + Initializes a new instance of the class. + + The name of the suite. + + + + Initializes a new instance of the class. + + Name of the parent suite. + The name of the suite. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Initializes a new instance of the class. + + Type of the fixture. + + + + Sorts tests under this suite. + + + + + Adds a test to the suite. + + The test. + + + + Gets this test's child tests + + The list of child tests + + + + Gets a count of test cases represented by + or contained under this test. + + + + + + The arguments to use in creating the fixture + + + + + Set to true to suppress sorting this suite's contents + + + + + Overridden to return a TestSuiteResult. + + A TestResult for this test. + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets the name used for the top-level element in the + XML representation of this test + + + + + Returns an XmlNode representing the current result after + adding it as a child of the supplied parent node. + + The parent node. + If true, descendant results are included + + + + + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. + + The attribute type to check for + + + + TypeHelper provides static methods that operate on Types. + + + + + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. + + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The display name for the Type + + + + Gets the display name for a Type as used by NUnit. + + The Type for which a display name is needed. + The arglist provided. + The display name for the Type + + + + Returns the best fit for a common type to be used in + matching actual arguments to a methods Type parameters. + + The first type. + The second type. + Either type1 or type2, depending on which is more general. + + + + Determines whether the specified type is numeric. + + The type to be examined. + + true if the specified type is numeric; otherwise, false. + + + + + Convert an argument list to the required parameter types. + Currently, only widening numeric conversions are performed. + + An array of args to be converted + A ParameterInfo[] whose types will be used as targets + + + + Determines whether this instance can deduce type args for a generic type from the supplied arguments. + + The type to be examined. + The arglist. + The type args to be used. + + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. + + + + + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. + + + + + + + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + + + + + + The TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. + + + + + Construct a TypeWrapper for a specified Type. + + + + + Gets the underlying Type on which this TypeWrapper is based. + + + + + Gets the base type of this type as an ITypeInfo + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Returns true if the Type wrapped is T + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type represents a static class. + + + + + Get the display name for this type + + + + + Get the display name for an object of this type, constructed with the specified args. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns an array of custom attributes of the specified type applied to this type + + + + + Returns a value indicating whether the type has an attribute of the specified type. + + + + + + + + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + Override ToString() so that error messages in NUnit's own tests make sense + + + + + The different targets a test action attribute can be applied to + + + + + Default target, which is determined by where the action attribute is attached + + + + + Target a individual test case + + + + + Target a suite of test cases + + + + + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. + + + + + The default suite builder used by the test assembly builder. + + + + + Initializes a new instance of the class. + + + + + 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 + + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + + + + + 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. + + + + + 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 + + + + 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 + + + + 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 + + + + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. + + 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 + + + + Gets the ITestAssemblyBuilder used by this controller instance. + + The builder. + + + + Gets the ITestAssemblyRunner used by this controller instance. + + The runner. + + + + Gets the AssemblyName or the path for which this FrameworkController was created + + + + + Gets the Assembly for which this + + + + + Gets a dictionary of settings for the FrameworkController + + + + + Loads the tests in the assembly + + + + + + 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 + + + + Runs the tests in an assembly + + A string containing the XML representation of the filter to use + The XML result of the test run + + + + 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 + + + + Runs the tests in an assembly asyncronously reporting back the test results through the callback + + The callback that receives the test results + A string containing the XML representation of the filter to use + + + + Stops the test run + + True to force the stop, false for a cooperative stop + + + + 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 + + + + Inserts settings element + + Target node + Settings dictionary + The new node + + + + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. + + + + + LoadTestsAction loads a test into the FrameworkController + + + + + LoadTestsAction loads the tests in an assembly. + + The controller. + The callback handler. + + + + ExploreTestsAction returns info about the tests in an assembly + + + + + 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. + + + + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. + + + + + 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 + + + + RunTestsAction runs the loaded TestSuite held by the FrameworkController. + + + + + 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 + + + + RunAsyncAction initiates an asynchronous test run, returning immediately + + + + + 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 + + + + StopRunAction stops an ongoing run. + + + + + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. + + 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. + + + + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. + + + + + 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 + + + + Build a suite of tests given the filename of an assembly + + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly + + + + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. + + + + + Gets the tree of loaded tests, or null if + no tests have been loaded. + + + + + Gets the tree of test results, if the test + run is completed, otherwise null. + + + + + Indicates whether a test has been loaded + + + + + Indicates whether a test is currently running + + + + + Indicates whether a test run is complete + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + 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 + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Implementation of ITestAssemblyRunner + + + + + Initializes a new instance of the class. + + The builder. + + + + The tree of tests that was loaded by the builder + + + + + The test result, if a run has completed + + + + + Indicates whether a test is loaded + + + + + Indicates whether a test is running + + + + + Indicates whether a test run is complete + + + + + Our settings, specified when loading the assembly + + + + + The top level WorkItem created for the assembly as a whole + + + + + The TestExecutionContext for the top level WorkItem + + + + + 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 + + + + 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 + + + + Count Test Cases using a filter + + The filter to apply + The number of test cases found + + + + 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 + + + + + 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. + + + + + Wait for the ongoing run to complete. + + Time to wait in milliseconds + True if the run completed, otherwise false + + + + 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 + + + + Initiate the test run. + + + + + Create the initial TestExecutionContext used to run tests + + The ITestListener specified in the RunAsync call + + + + Handle the the Completed event for the top level work item + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + 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 + The message to display in case of failure + Array of objects to be used in formatting the message + + + + 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 + + + + 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 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 + + + + 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 . + + 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 + + + + 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 + + + + 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 + + + + 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 + + + + 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. + + 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. + + + 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 + + + + 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. + + + + + + + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException 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 InconclusiveException 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 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 . + + 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 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. + + 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 InconclusiveException 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 + + + + 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 + + + + + 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 + + + + 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 + + + + + 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. + + + + 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. + + + + + 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 + + + + 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 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. + + + + + 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. + + + + + + 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. + + + + + 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 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 actual value falls + within a specified range. + + + + + 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 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 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 + + + + 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 + + + + 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. + + + + + 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 + + + + 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 . + + + + + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. + + + + + Construct an ExactCountConstraint on top of an existing constraint + + + + + + + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. + + + + + + + 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 + + + + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. + + + + + Constructs an ExceptionTypeConstraint + + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + 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 + + + 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 + + + + 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 + + + + + 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 the specified + count of members of a collection match a base constraint. + + + + + Construct an ExactCountOperator for a specified count + + The expected count + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + 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 + + + + 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. + + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + Resolve the current expression to a Constraint + + + + + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. + + + + + Construct a ReusableConstraint from a constraint expression + + The expression to be resolved and reused + + + + Converts a constraint to a ReusableConstraint + + The constraint to be converted + A ReusableConstraint + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Return the top-level constraint for this expression + + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + 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. + + + + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Description of this constraint + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Constructs a StringConstraint without an expected value + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by a given string + + The string to be tested + True for success, false for failure + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + Gets text describing a constraint + + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. This override only handles the special message + used when an exception is expected but none is thrown. + + The writer on which the actual value is displayed + + + + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Executes the code and returns success if an exception is thrown. + + A delegate representing the code to be tested + True if an exception is thrown, otherwise false + + + + Returns the ActualValueDelegate itself as the value to be tested. + + A delegate representing the code to be tested + The delegate itself + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Gets text describing a constraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Applies the constraint to an ActualValueDelegate that returns + the value to be tested. The default implementation simply evaluates + the delegate but derived classes may override it to provide for + delayed processing. + + An ActualValueDelegate + A ConstraintResult + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. + + + + + Constructs a linear tolerance of a specified amount + + + + + Constructs a tolerance given an amount and + + + + + Gets the for the current Tolerance + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance has not been set or is using the . + + + + + Modes in which the tolerance value for a comparison can be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. + + + + + Compares two _values based in their distance in + representable numbers. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + The type of the actual argument to which the constraint was applied + + + + + Construct a TypeConstraint for a given Type + + The expected type for the constraint + Prefix used in forming the constraint description + + + + Applies the constraint to an actual value, returning a ConstraintResult. + + The value to be tested + A ConstraintResult + + + + Apply the constraint to an actual value, returning true if it succeeds + + The actual argument + True if the constraint succeeds, otherwise false. + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. + + + + + Check that all items are unique. + + + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. + + + + + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + 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 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 starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. + + + + + Thrown when an assertion failed. + + + + 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 ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + Thrown when a test executes inconclusively. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + Abstract base for Exceptions that terminate a test and provide a ResultState. + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Gets the ResultState provided by this exception + + + + + 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. + + + + + Default tolerance for floating point equality + + + + + 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 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 new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. + + + + + Apply changes to the execution context + + The execution context + + + + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. + + + + + Modifies a test as defined for the specific attribute. + + The test to modify + + + + 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. + + + + + Gets the test cases generated by the CombiningStrategy. + + The test cases. + + + + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. + + + Attributes or other objects should implement one of the + derived interfaces, rather than this one, since they + indicate in which part of the command chain the wrapper + should be applied. + + + + + Wrap a command and return the result. + + The command to be wrapped + The wrapped command + + + + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. + + + + + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. + + + + + Any ITest that implements this interface is at a level that the implementing + class should be disposed at the end of the test run + + + + + 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. + + + + + 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. + + + + 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. + + + + + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. + + + + + Gets the Type from which this method was reflected. + + + + + Gets the MethodInfo for this method. + + + + + Gets the name of the method. + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is public. + + + + + Gets a value indicating whether the method contains unassigned generic type parameters. + + + + + Gets a value indicating whether the method is a generic method. + + + + + Gets a value indicating whether the MethodInfo represents the definition of a generic method. + + + + + Gets the return Type of the method. + + + + + Gets the parameters of the method. + + + + + + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + + + + + 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 + + + + 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 IDataPointProvider interface is used by extensions + that provide data for a single test parameter. + + + + + 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. + + + + 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 + + + + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. + + + + + 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 + + + + The IParameterInfo interface is an abstraction of a .NET parameter. + + + + + Gets a value indicating whether the parameter is optional + + + + + Gets an IMethodInfo representing the method for which this is a parameter + + + + + Gets the underlying .NET ParameterInfo + + + + + Gets the Type of the parameter + + + + + 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")); + + + + + Adds a key/value pair to the property bag + + The key + The value + + + + Sets the value for a key, removing any other + _values that are already in the property set. + + + + + + + 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. + + + + + 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 + + + + Gets or sets the list of _values for a particular key + + The key for which the _values are to be retrieved or set + + + + Gets a collection containing all the keys in the property set + + + + + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + + + + + Returns an array of custom attributes of the specified type applied to this object + + + + + Returns a value indicating whether an attribute of the specified type is defined on this object. + + + + + 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. + + + + + Build a TestMethod from the provided MethodInfo. + + The method to be used as a test + The TestSuite to which the method will be added + A TestMethod object + + + + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. + + + + + Examine the type and determine if it is suitable for + this builder to use in building a TestSuite. + + Note that returning false will cause the type to be ignored + in loading the tests. If it is desired to load the suite + but label it as non-runnable, ignored, etc., then this + method must return true. + + The type of the fixture to be used + True if the type can be used to build a TestSuite + + + + Build a TestSuite from type provided. + + The type of the fixture to be used + A TestSuite + + + + 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. + + + + + Gets the id of the test + + + + + Gets the name of the test + + + + + Gets the fully qualified name of the test + + + + + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. + + + + + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. + + + + + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. + + + + + Gets the RunState of the test, indicating whether it can be run. + + + + + Count of the test cases ( 1 if this is a test case ) + + + + + Gets the properties of the test + + + + + Gets the parent test, if any. + + The parent test or null if none exists. + + + + Returns true if this is a test suite + + + + + Gets a bool indicating whether the current test + has any descendant tests. + + + + + Gets this test's child tests + + A list of child tests + + + + Gets a fixture object for running this test. + + + + + 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. + + + + + 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 + + + + 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. + + + + + 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 test method to examine + The suite being populated + True is the builder can use this method + + + + 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 + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + + + + Gets the expected result of the test case + + + + + Returns true if an expected result has been set + + + + + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. + + + + + Gets the name to be used for the test + + + + + Gets the RunState for this test case. + + + + + Gets the argument list to be provided to the test + + + + + Gets the property dictionary for the test case + + + + + 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. + + + + + 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 + + + + 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 + + + + 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. + + + + + Get the TypeArgs if separately set + + + + + 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. + + + + + Called when a test has just started + + The test that is starting + + + + Called when a test has finished + + The result of the test + + + + Called when a test produces output for immediate display + + A TestOutput object containing the text to display + + + + The ITestResult interface represents the result of a test. + + + + + Gets the ResultState of the test result, which + indicates the success or failure of the test. + + + + + Gets the name of the test result + + + + + Gets the full name of the test result + + + + + Gets the elapsed time for running the test in seconds + + + + + Gets or sets the time the test started running. + + + + + Gets or sets the time the test finished running. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. + + + + + Gets the number of asserts executed + when running the test and all its children. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. + + + + + Gets the the collection of child results. + + + + + Gets the Test to which this result applies. + + + + + Gets any text output written to this result. + + + + + The ITypeInfo interface is an abstraction of a .NET Type + + + + + Gets the underlying Type on which this ITypeInfo is based + + + + + Gets the base type of this type as an ITypeInfo + + + + + Returns true if the Type wrapped is equal to the argument + + + + + Gets the Name of the Type + + + + + Gets the FullName of the Type + + + + + Gets the assembly in which the type is declared + + + + + Gets the Namespace of the Type + + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the Type is a generic Type + + + + + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + + + + + Gets a value indicating whether the Type is a generic Type definition + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets a value indicating whether this type is a static class. + + + + + Get the display name for this typeInfo. + + + + + Get the display name for an oject of this type, constructed with specific arguments + + + + + Returns a Type representing a generic type definition from which this Type can be constructed. + + + + + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + + + + + Returns a value indicating whether this type has a method with a specified public attribute + + + + + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. + + + + + Gets the public constructor taking the specified argument Types + + + + + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + + + + + Construct an object of this Type, using the specified arguments. + + + + + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. + + + + + Returns a TNode representing the current object. + + If true, children are included where applicable + A TNode representing the result + + + + 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 + + + + + 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. + + + + + Initializes a new instance of the class. + + The TestStatus. + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + + + + Initializes a new instance of the class. + + The TestStatus. + The stage at which the result was produced + + + + Initializes a new instance of the class. + + The TestStatus. + The label. + The stage at which the result was produced + + + + The result is inconclusive + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test was skipped because it is explicit + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The test was not runnable. + + + + + A suite failed because one or more child tests failed or had errors + + + + + A suite failed in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeSetUp + + + + + A suite had an unexpected exception in its OneTimeDown + + + + + Gets the TestStatus for the test. + + The status. + + + + Gets the label under which this test result is + categorized, if any. + + + + + Gets the stage of test execution in which + the failure or other result took place. + + + + + 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 + + + + 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 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 that represents this instance. + + + A that represents this instance. + + + + + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. + + + + + Failure in the test itself + + + + + Failure in the SetUp method + + + + + Failure in the TearDown method + + + + + Failure of a parent test + + + + + Failure of a child test + + + + + The RunState enum indicates whether a test can be executed. + + + + + The test is not runnable. + + + + + The test is runnable. + + + + + The test can only be run explicitly + + + + + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. + + + + + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. + + + + + The TestOutput class holds a unit of output from + a test to a specific output stream + + + + + 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 + + + + Return string representation of the object for debugging + + + + + + Get the text + + + + + Get the output type + + + + + Get the name of the test that created the output + + + + + Convert the TestOutput object to an XML string + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + 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. + + + + + Constructs a new instance of TNode + + The name of the node + + + + Constructs a new instance of TNode with a value + + The name of the node + The text content of the node + + + + 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 + + + + Gets the name of the node + + + + + Gets the value of the node + + + + + Gets a flag indicating whether the value should be output using CDATA. + + + + + Gets the dictionary of attributes + + + + + Gets a list of child nodes + + + + + Gets the first ChildNode + + + + + Gets the XML representation of this node. + + + + + Create a TNode from it's XML text representation + + The XML text to be parsed + A TNode + + + + Adds a new element as a child of the current node and returns it. + + The element name. + The newly created child element + + + + 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 + + + + 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 + + + + Adds an attribute with a specified name and value to the XmlNode. + + The name of the attribute. + The value of the attribute. + + + + 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. + + + + + + + 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. + + + + + Writes the XML representation of the node to an XmlWriter + + + + + + Class used to represent a list of XmlResults + + + + + Class used to represent the attributes of a node + + + + + 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 + + + + 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 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 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 to the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable to 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 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 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 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. + + + + + When implemented by an attribute, this interface implemented to 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 + + The target for the action attribute + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the _values of a property + + The collection of property _values + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + 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 a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + 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 + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + 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 + 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 TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It is derived from TestCaseParameters and adds a + fluent syntax for use in initializing the test case. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Marks the test case as explicit. + + + + + Marks the test case as explicit, specifying the reason. + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Provide the context information of the current test. + This is an adapter for the internal ExecutionContext + class, hiding the internals from the user test. + + + + + Construct a TestContext for an ExecutionContext + + The ExecutionContext to adapt + + + + 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 a TextWriter that will send output to the current test result. + + + + + TestParameters object holds parameters for the test run, if any are specified + + + + + Get a representation of the current test. + + + + + Gets a Representation of the TestResult for the current test. + + + + + Gets the unique name of the Worker that is executing this test. + + + + + Gets the directory to be used for outputting files created + by this test run. + + + + + Gets the random generator. + + + The random generator. + + + + Write the string representation of a boolean value to the current result + + + Write a char to the current result + + + Write a char array to the current result + + + Write the string representation of a double to the current result + + + Write the string representation of an Int32 value to the current result + + + Write the string representation of an Int64 value to the current result + + + Write the string representation of a decimal value to the current result + + + Write the string representation of an object to the current result + + + Write the string representation of a Single value to the current result + + + Write a string to the current result + + + Write the string representation of a UInt32 value to the current result + + + Write the string representation of a UInt64 value to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a formatted string to the current result + + + Write a line terminator to the current result + + + Write the string representation of a boolean value to the current result followed by a line terminator + + + Write a char to the current result followed by a line terminator + + + Write a char array to the current result followed by a line terminator + + + Write the string representation of a double to the current result followed by a line terminator + + + Write the string representation of an Int32 value to the current result followed by a line terminator + + + Write the string representation of an Int64 value to the current result followed by a line terminator + + + Write the string representation of a decimal value to the current result followed by a line terminator + + + Write the string representation of an object to the current result followed by a line terminator + + + Write the string representation of a Single value to the current result followed by a line terminator + + + Write a string to the current result followed by a line terminator + + + Write the string representation of a UInt32 value to the current result followed by a line terminator + + + Write the string representation of a UInt64 value to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + Write a formatted string to the current result followed by a line terminator + + + + 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 factory delegate + + + + 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 + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + Construct a TestAdapter for a Test + + The Test to be adapted + + + + Gets the unique Id of a test + + + + + The name of the test, which may or may not be + the same as the method name. + + + + + The name of the method representing the test. + + + + + The FullName of the test + + + + + The ClassName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + Gets a ResultState representing the outcome of the test. + + + + + Gets the message associated with a test + failure or with not running the test + + + + + Gets any stacktrace associated with an + error or failure. + + + + + Gets the number of test cases that failed + when running the test and all its children. + + + + + Gets the number of test cases that passed + when running the test and all its children. + + + + + Gets the number of test cases that were skipped + when running the test and all its children. + + + + + Gets the number of test cases that were inconclusive + when running the test and all its children. + + + + + 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. + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Marks the test fixture as explicit. + + + + + Marks the test fixture as explicit, specifying the reason. + + + + + Ignores this TestFixture, specifying the reason. + + The reason. + + + + + TestParameters class holds any named parameters supplied to the test run + + + + + Gets the number of test parameters + + + + + Gets a collection of the test parameter names + + + + + Gets a flag indicating whether a parameter with the specified name exists.N + + Name of the parameter + True if it exists, otherwise false + + + + Indexer provides access to the internal dictionary + + Name of the parameter + Value of the parameter or null if not present + + + + Get method is a simple alternative to the indexer + + Name of the paramter + Value of the parameter or null if not present + + + + 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 + + + + 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 + + + + Adds a parameter to the list + + Name of the parameter + Value of the parameter + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected ArgumentException + + + + + Creates a constraint specifying an expected ArgumentNUllException + + + + + Creates a constraint specifying an expected InvalidOperationException + + + + + Creates a constraint specifying that no exception is thrown + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Env is a static class that provides some of the features of + System.Environment that are not available under all runtimes + + + + + The newline sequence in the current environment. + + + + + Path to the 'My Documents' folder + + + + + Directory used for file output if not specified on commandline. + + + + + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. + + + + + Throws an exception if an argument is null + + The value to be tested + The name of the argument + + + + Throws an exception if a string argument is null or empty + + The value to be tested + The name of the argument + + + + Throws an ArgumentOutOfRangeException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an ArgumentException if the specified condition is not met. + + The condition that must be met + The exception message to be used + The name of the argument + + + + Throws an InvalidOperationException if the specified condition is not met. + + The condition that must be met + The exception message to be used + + + + PackageSettings is a static class containing constant values that + are used as keys in setting up a TestPackage. These values are used in + the engine and framework. Setting values may be a string, int or bool. + + + + + Flag (bool) indicating whether tests are being debugged. + + + + + Flag (bool) indicating whether to pause execution of tests to allow + the user to attache a debugger. + + + + + The InternalTraceLevel for this run. Values are: "Default", + "Off", "Error", "Warning", "Info", "Debug", "Verbose". + Default is "Off". "Debug" and "Verbose" are synonyms. + + + + + Full path of the directory to be used for work and result files. + This path is provided to tests by the frameowrk TestContext. + + + + + The name of the config to use in loading a project. + If not specified, the first config found is used. + + + + + Bool indicating whether the engine should determine the private + bin path by examining the paths to all the tests. Defaults to + true unless PrivateBinPath is specified. + + + + + The ApplicationBase to use in loading the tests. If not + specified, and each assembly has its own process, then the + location of the assembly is used. For multiple assemblies + in a single process, the closest common root directory is used. + + + + + Path to the config file to use in running the tests. + + + + + Bool flag indicating whether a debugger should be launched at agent + startup. Used only for debugging NUnit itself. + + + + + Indicates how to load tests across AppDomains. Values are: + "Default", "None", "Single", "Multiple". Default is "Multiple" + if more than one assembly is loaded in a process. Otherwise, + it is "Single". + + + + + The private binpath used to locate assemblies. Directory paths + is separated by a semicolon. It's an error to specify this and + also set AutoBinPath to true. + + + + + The maximum number of test agents permitted to run simultneously. + Ignored if the ProcessModel is not set or defaulted to Multiple. + + + + + Indicates how to allocate assemblies to processes. Values are: + "Default", "Single", "Separate", "Multiple". Default is "Multiple" + for more than one assembly, "Separate" for a single assembly. + + + + + Indicates the desired runtime to use for the tests. Values + are strings like "net-4.5", "mono-4.0", etc. Default is to + use the target framework for which an assembly was built. + + + + + Bool flag indicating that the test should be run in a 32-bit process + on a 64-bit system. By default, NUNit runs in a 64-bit process on + a 64-bit system. Ignored if set on a 32-bit system. + + + + + Indicates that test runners should be disposed after the tests are executed + + + + + Bool flag indicating that the test assemblies should be shadow copied. + Defaults to false. + + + + + Bool flag indicating that user profile should be loaded on test runner processes + + + + + 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. + + + + + A TextWriter to which the internal trace will be sent. + + + + + A list of tests to be loaded. + + + + + 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 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. + + + + + If true, execution stops after the first error or failure. + + + + + If true, use of the event queue is suppressed and test events are synchronous. + + + + + The default naming pattern used in generating test names + + + + + Parameters to be passed on to the test + + + + + If the package represents an assembly, then this is the CLR version + stored in the assembly image. If it represents a project or other + group of assemblies, it is the maximum version for all the assemblies. + + + + + True if any assembly in the package requires running as a 32-bit + process when on a 64-bit system. + + + + + True if any assembly in the package requires a special assembly resolution hook + in the default AppDomain in order to find dependent assemblies. + + + + + The FrameworkName specified on a TargetFrameworkAttribute for the assembly + + + + + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. + + + + + 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. + + + + Specifies flags that control binding and the way in which the search for members + and types is conducted by reflection. + + + + + Specifies no binding flag. + + + + + Specifies that only members declared at the level of the supplied type's hierarchy + should be considered. Inherited members are not considered. + + + + + Specifies that instance members are to be included in the search. + + + + + Specifies that static members are to be included in the search. + + + + + Specifies that public members are to be included in the search. + + + + + Specifies that non-public members are to be included in the search. + + + + + Specifies that public and protected static members up the hierarchy should be + returned. Private static members in inherited classes are not returned. Static + members include fields, methods, events, and properties. Nested types are not + returned. + + + + + A MarshalByRefObject that lives forever + + + + + Some path based methods that we need even in the Portable framework which + does not have the System.IO.Path class + + + + + Windows directory separator + + + + + Alternate directory separator + + + + + A volume separator character. + + + + + Get the file name and extension of the specified path string. + + The path string from which to obtain the file name and extension. + The filename as a . If the last character of is a directory or volume separator character, this method returns . If is null, this method returns null. + + + + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks + + + This version of the class allows direct calls on Type on + those platforms that would normally require use of + GetTypeInfo(). + + + + + Returns an array of generic arguments for the give type + + + + + + + Gets the constructor with the given parameter types + + + + + + + + Gets the constructors for a type + + + + + + + + + + + + + + + + + + + + + + + Gets declared or inherited interfaces on this type + + + + + + + Gets the member on a given type by name. BindingFlags ARE IGNORED. + + + + + + + + + Gets all members on a given type. BindingFlags ARE IGNORED. + + + + + + + + Gets field of the given name on the type + + + + + + + + Gets property of the given name on the type + + + + + + + + Gets property of the given name on the type + + + + + + + + + Gets the method with the given name and parameter list + + + + + + + + Gets the method with the given name and parameter list + + + + + + + + + Gets the method with the given name and parameter list + + + + + + + + + Gets public methods on the given type + + + + + + + Gets methods on a type + + + + + + + + Extensions to the various MemberInfo derived classes + + + + + Returns the get method for the given property + + + + + + + + Returns an array of custom attributes of the specified type applied to this member + + Portable throws an argument exception if T does not + derive from Attribute. NUnit uses interfaces to find attributes, thus + this method + + + + Returns an array of custom attributes of the specified type applied to this parameter + + + + + Returns an array of custom attributes of the specified type applied to this assembly + + + + + Extensions for Assembly that are not available in portable + + + + + DNX does not have a version of GetCustomAttributes on Assembly that takes an inherit + parameter since it doesn't make sense on Assemblies. This version just ignores the + inherit parameter. + + The assembly + The type of attribute you are looking for + Ignored + + + + + Gets the types in a given assembly + + + + + + + Type extensions that apply to all target frameworks + + + + + Determines if the given array is castable/matches the array. + + + + + + + + Determines if one type can be implicitly converted from another + + + + + + + + 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. + + + + + A shim of the .NET interface for platforms that do not support it. + Used to indicate that a control can be the target of a callback event on the server. + + + + + Processes a callback event that targets a control. + + + + + + Returns the results of a callback event that targets a control. + + + + + + A shim of the .NET attribute for platforms that do not support it. + + + + diff --git a/python/Exercism.python.pyproj b/python/Exercism.python.pyproj new file mode 100644 index 0000000..ebccb21 --- /dev/null +++ b/python/Exercism.python.pyproj @@ -0,0 +1,46 @@ + + + + Debug + 2.0 + 1b5fba75-26dd-4737-9104-5b485db26457 + + + example\example_test.py + + + . + . + Exercism.python + python + + + true + false + + + true + false + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + + + + + + + + + \ No newline at end of file diff --git a/python/example/example.py b/python/example/example.py new file mode 100644 index 0000000..7f7bccf --- /dev/null +++ b/python/example/example.py @@ -0,0 +1,2 @@ +def add(x, y): + return x + y diff --git a/python/example/example_test.py b/python/example/example_test.py new file mode 100644 index 0000000..d04dbb8 --- /dev/null +++ b/python/example/example_test.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals +import unittest + +import example + + +class ExampleTests(unittest.TestCase): + + def test_add_2_and_2(self): + self.assertEqual( + 4, + example.add(2, 2) + ) + + def test_add_12_and_24(self): + self.assertEqual( + 36, + example.add(12, 24) + ) + + def test_add_100_and_1(self): + self.assertEqual( + 101, + example.add(100, 1) + ) + + def test_add_2_and_minus_2(self): + self.assertEqual( + 0, + example.add(2, -2) + ) + +if __name__ == '__main__': + unittest.main()