diff --git a/dotnet/test/chrome/WebDriver.Chrome.Tests.csproj b/dotnet/test/chrome/WebDriver.Chrome.Tests.csproj index 0cf6309d49425..29223ec305dd3 100644 --- a/dotnet/test/chrome/WebDriver.Chrome.Tests.csproj +++ b/dotnet/test/chrome/WebDriver.Chrome.Tests.csproj @@ -53,9 +53,9 @@ AllRules.ruleset - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/chrome/build.desc b/dotnet/test/chrome/build.desc index 10246fa56ed6e..36b67a429bad3 100644 --- a/dotnet/test/chrome/build.desc +++ b/dotnet/test/chrome/build.desc @@ -8,7 +8,7 @@ dotnet_test(name = "chrome", "System.Xml.dll", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll" + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll" ], out = "WebDriver.Chrome.Tests.dll", files = [ diff --git a/dotnet/test/common/WebDriver.Common.Tests.csproj b/dotnet/test/common/WebDriver.Common.Tests.csproj index 7232aa11caaca..fe92dea926e16 100644 --- a/dotnet/test/common/WebDriver.Common.Tests.csproj +++ b/dotnet/test/common/WebDriver.Common.Tests.csproj @@ -58,17 +58,17 @@ False ..\..\..\third_party\dotnet\nmock-2.0.0.44\NMock2.dll - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\addins\nunit.core.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\addins\nunit.core.dll - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\addins\nunit.core.interfaces.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\addins\nunit.core.interfaces.dll - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/common/build.desc b/dotnet/test/common/build.desc index 0eb890a6450c9..c6d412a6db9c4 100644 --- a/dotnet/test/common/build.desc +++ b/dotnet/test/common/build.desc @@ -11,9 +11,9 @@ dotnet_library(name = "common", "System.Drawing.dll", "System.Xml.dll", "//dotnet/src/webdriver:webdriver", - "third_party/dotnet/nunit-3.0.1/addins/nunit.core.dll", - "third_party/dotnet/nunit-3.0.1/addins/nunit.core.interfaces.dll", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll", + "third_party/dotnet/nunit-3.2.1/addins/nunit.core.dll", + "third_party/dotnet/nunit-3.2.1/addins/nunit.core.interfaces.dll", + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll", "third_party/dotnet/nmock-2.0.0.44/NMock2.dll" ], out = "WebDriver.Common.Tests.dll", diff --git a/dotnet/test/core/Selenium.Core.Tests.csproj b/dotnet/test/core/Selenium.Core.Tests.csproj index 1fa9cbe1a44f4..b06195e315110 100644 --- a/dotnet/test/core/Selenium.Core.Tests.csproj +++ b/dotnet/test/core/Selenium.Core.Tests.csproj @@ -87,9 +87,9 @@ False ..\..\..\third_party\nmock\nmock.dll - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll System diff --git a/dotnet/test/core/build.desc b/dotnet/test/core/build.desc index 8ded207773e1e..8537e26189c4b 100644 --- a/dotnet/test/core/build.desc +++ b/dotnet/test/core/build.desc @@ -7,7 +7,7 @@ dotnet_test(name = "core", "System.Xml.dll", "System.Web.dll", "//dotnet/src/core:core", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll", + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll", "third_party/nmock/nmock.dll" ], out = "Selenium.Core.Tests.dll", diff --git a/dotnet/test/edge/WebDriver.Edge.Tests.csproj b/dotnet/test/edge/WebDriver.Edge.Tests.csproj index 023f5f87399e8..945ddbcbb4ad3 100644 --- a/dotnet/test/edge/WebDriver.Edge.Tests.csproj +++ b/dotnet/test/edge/WebDriver.Edge.Tests.csproj @@ -31,9 +31,9 @@ 4 - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/firefox/WebDriver.Firefox.Tests.csproj b/dotnet/test/firefox/WebDriver.Firefox.Tests.csproj index 1e13fc2a23531..ddb10e1416815 100644 --- a/dotnet/test/firefox/WebDriver.Firefox.Tests.csproj +++ b/dotnet/test/firefox/WebDriver.Firefox.Tests.csproj @@ -53,9 +53,9 @@ AllRules.ruleset - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/firefox/build.desc b/dotnet/test/firefox/build.desc index 7a31a09cc52a4..a1385d7c2e7c1 100644 --- a/dotnet/test/firefox/build.desc +++ b/dotnet/test/firefox/build.desc @@ -8,7 +8,7 @@ dotnet_test(name = "firefox", "System.Xml.dll", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll" + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll" ], out = "WebDriver.Firefox.Tests.dll", files = [ diff --git a/dotnet/test/ie/WebDriver.IE.Tests.csproj b/dotnet/test/ie/WebDriver.IE.Tests.csproj index 40b49e532915c..a8f9da7cd1608 100644 --- a/dotnet/test/ie/WebDriver.IE.Tests.csproj +++ b/dotnet/test/ie/WebDriver.IE.Tests.csproj @@ -55,9 +55,9 @@ AllRules.ruleset - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/ie/build.desc b/dotnet/test/ie/build.desc index 5c95a3a1e36e0..1c75d939d42c5 100644 --- a/dotnet/test/ie/build.desc +++ b/dotnet/test/ie/build.desc @@ -8,7 +8,7 @@ dotnet_test(name = "ie", "System.Xml.dll", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll" + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll" ], out = "WebDriver.IE.Tests.dll", files = [ diff --git a/dotnet/test/phantomjs/WebDriver.PhantomJS.Tests.csproj b/dotnet/test/phantomjs/WebDriver.PhantomJS.Tests.csproj index e0fa9d3e9f8db..8cc9c3667641b 100644 --- a/dotnet/test/phantomjs/WebDriver.PhantomJS.Tests.csproj +++ b/dotnet/test/phantomjs/WebDriver.PhantomJS.Tests.csproj @@ -39,9 +39,9 @@ False ..\..\..\third_party\dotnet\json-net-6.0r2\Net40\Newtonsoft.Json.dll - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/phantomjs/build.desc b/dotnet/test/phantomjs/build.desc index 368357ff8189a..ae3670cf9d6d7 100644 --- a/dotnet/test/phantomjs/build.desc +++ b/dotnet/test/phantomjs/build.desc @@ -9,7 +9,7 @@ dotnet_test(name = "phantomjs", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", "third_party/dotnet/json-net-4.5r11/Net40/Newtonsoft.Json.dll", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll" + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll" ], out = "WebDriver.PhantomJS.Tests.dll", files = [ diff --git a/dotnet/test/remote/WebDriver.Remote.Tests.csproj b/dotnet/test/remote/WebDriver.Remote.Tests.csproj index 5b5a0d365798a..934a98441386e 100644 --- a/dotnet/test/remote/WebDriver.Remote.Tests.csproj +++ b/dotnet/test/remote/WebDriver.Remote.Tests.csproj @@ -53,9 +53,9 @@ AllRules.ruleset - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/remote/build.desc b/dotnet/test/remote/build.desc index 220ffe2cfa69c..f2ec7b252477a 100644 --- a/dotnet/test/remote/build.desc +++ b/dotnet/test/remote/build.desc @@ -11,7 +11,7 @@ dotnet_test(name = "remote", "System.Xml.dll", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll" + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll" ], out = "WebDriver.Remote.Tests.dll", files = [ diff --git a/dotnet/test/safari/build.desc b/dotnet/test/safari/build.desc index 91061483be1fd..ee447bcdb4e31 100644 --- a/dotnet/test/safari/build.desc +++ b/dotnet/test/safari/build.desc @@ -7,7 +7,7 @@ dotnet_test(name = "safari", "System.Xml.dll", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll" + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll" ], out = "WebDriver.Safari.Tests.dll", files = [ diff --git a/dotnet/test/support/WebDriver.Support.Tests.csproj b/dotnet/test/support/WebDriver.Support.Tests.csproj index 1f13df8fe85f3..21d1c9ac3b0e7 100644 --- a/dotnet/test/support/WebDriver.Support.Tests.csproj +++ b/dotnet/test/support/WebDriver.Support.Tests.csproj @@ -65,9 +65,9 @@ False ..\..\..\third_party\dotnet\nmock-2.0.0.44\NMock2.dll - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/support/build.desc b/dotnet/test/support/build.desc index 040bd42aa8b62..9ec53324c1850 100644 --- a/dotnet/test/support/build.desc +++ b/dotnet/test/support/build.desc @@ -9,7 +9,7 @@ dotnet_test(name = "support", "//dotnet/src/support:support", "//dotnet/src/webdriver:webdriver", "//dotnet/test/common:common", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll", + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll", "third_party/dotnet/nmock-2.0.0.44/NMock2.dll" ], out = "WebDriver.Support.Tests.dll", diff --git a/dotnet/test/webdriverbackedselenium/Selenium.WebDriverBackedSelenium.Tests.csproj b/dotnet/test/webdriverbackedselenium/Selenium.WebDriverBackedSelenium.Tests.csproj index 0e20f0c917f68..756ec9a7e81f3 100644 --- a/dotnet/test/webdriverbackedselenium/Selenium.WebDriverBackedSelenium.Tests.csproj +++ b/dotnet/test/webdriverbackedselenium/Selenium.WebDriverBackedSelenium.Tests.csproj @@ -53,9 +53,9 @@ AllRules.ruleset - + False - ..\..\..\third_party\dotnet\nunit-3.0.1\nunit.framework.dll + ..\..\..\third_party\dotnet\nunit-3.2.1\nunit.framework.dll diff --git a/dotnet/test/webdriverbackedselenium/build.desc b/dotnet/test/webdriverbackedselenium/build.desc index b56081c5dee76..ec7da63b7397a 100644 --- a/dotnet/test/webdriverbackedselenium/build.desc +++ b/dotnet/test/webdriverbackedselenium/build.desc @@ -14,7 +14,7 @@ dotnet_test(name = "webdriverbackedselenium", "//dotnet/src/webdriver:webdriver", "//dotnet/src/core:core", "//dotnet/src/webdriverbackedselenium:webdriverbackedselenium", - "third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll", + "third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll", ], out = "Selenium.WebDriverBackedSelenium.Tests.dll", files = [ diff --git a/third_party/dotnet/nunit-3.0.1/addins/nunit-project-loader.dll b/third_party/dotnet/nunit-3.0.1/addins/nunit-project-loader.dll deleted file mode 100644 index 1835de3b2c2c9..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/nunit-project-loader.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/nunit-v2-result-writer.dll b/third_party/dotnet/nunit-3.0.1/addins/nunit-v2-result-writer.dll deleted file mode 100644 index 6ec21aa14df51..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/nunit-v2-result-writer.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/nunit.v2.driver.dll b/third_party/dotnet/nunit-3.0.1/addins/nunit.v2.driver.dll deleted file mode 100644 index 2a6573db29248..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/nunit.v2.driver.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit-project-loader.dll b/third_party/dotnet/nunit-3.0.1/addins/tests/nunit-project-loader.dll deleted file mode 100644 index 1835de3b2c2c9..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit-project-loader.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.engine.api.dll b/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.engine.api.dll deleted file mode 100644 index cb182645337f4..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.engine.api.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.framework.dll b/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.framework.dll deleted file mode 100644 index 3151a93fa006f..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.framework.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/vs-project-loader.dll b/third_party/dotnet/nunit-3.0.1/addins/tests/vs-project-loader.dll deleted file mode 100644 index 5628187ddb82e..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/tests/vs-project-loader.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/vs-project-loader.dll b/third_party/dotnet/nunit-3.0.1/addins/vs-project-loader.dll deleted file mode 100644 index 5628187ddb82e..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/addins/vs-project-loader.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.dll b/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.dll deleted file mode 100644 index 3151a93fa006f..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.tests.dll deleted file mode 100644 index bfecaca9760f0..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.testdata.dll b/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.testdata.dll deleted file mode 100644 index 2977c47a087de..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.testdata.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/nunitlite.dll b/third_party/dotnet/nunit-3.0.1/net-2.0/nunitlite.dll deleted file mode 100644 index f6dfca8619dc2..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/nunitlite.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/nunitlite.tests.exe b/third_party/dotnet/nunit-3.0.1/net-2.0/nunitlite.tests.exe deleted file mode 100644 index 6d77366739c1a..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/nunitlite.tests.exe and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.0.1/net-2.0/slow-nunit-tests.dll deleted file mode 100644 index 993f552384025..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/slow-nunit-tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll b/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll deleted file mode 100644 index c52b02df2cd3b..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.tests.dll deleted file mode 100644 index 8390fae8179cd..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.tests.dll.config b/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.tests.dll.config deleted file mode 100644 index 28796cc2b0ef2..0000000000000 --- a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.tests.dll.config +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.testdata.dll b/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.testdata.dll deleted file mode 100644 index 3cc1a13abefc0..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.testdata.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.testdata.dll.config b/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.testdata.dll.config deleted file mode 100644 index 00e7eac74b75b..0000000000000 --- a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.testdata.dll.config +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunitlite.dll b/third_party/dotnet/nunit-3.0.1/net-4.0/nunitlite.dll deleted file mode 100644 index 71213854d4252..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/nunitlite.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunitlite.tests.exe b/third_party/dotnet/nunit-3.0.1/net-4.0/nunitlite.tests.exe deleted file mode 100644 index d57fe7f167f1d..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/nunitlite.tests.exe and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.0.1/net-4.0/slow-nunit-tests.dll deleted file mode 100644 index e34e9224b9f32..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/slow-nunit-tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.dll b/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.dll deleted file mode 100644 index cd864b1c4205a..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.tests.dll deleted file mode 100644 index 5544253e83601..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.testdata.dll b/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.testdata.dll deleted file mode 100644 index 31134e1714b43..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.testdata.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/nunitlite.dll b/third_party/dotnet/nunit-3.0.1/net-4.5/nunitlite.dll deleted file mode 100644 index 940eda01ea699..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/nunitlite.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/nunitlite.tests.exe b/third_party/dotnet/nunit-3.0.1/net-4.5/nunitlite.tests.exe deleted file mode 100644 index 398b8fd531ca9..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/nunitlite.tests.exe and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.0.1/net-4.5/slow-nunit-tests.dll deleted file mode 100644 index cd866f4211e7d..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/slow-nunit-tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.addin.xml b/third_party/dotnet/nunit-3.0.1/nunit.engine.addin.xml deleted file mode 100644 index 486fc9e2111f5..0000000000000 --- a/third_party/dotnet/nunit-3.0.1/nunit.engine.addin.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.api.dll b/third_party/dotnet/nunit-3.0.1/nunit.engine.api.dll deleted file mode 100644 index cb182645337f4..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/nunit.engine.api.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.dll b/third_party/dotnet/nunit-3.0.1/nunit.engine.dll deleted file mode 100644 index 6ca13669a3e5e..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/nunit.engine.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.tests.dll b/third_party/dotnet/nunit-3.0.1/nunit.engine.tests.dll deleted file mode 100644 index 3341068ab74ba..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/nunit.engine.tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.framework.dll b/third_party/dotnet/nunit-3.0.1/nunit.framework.dll deleted file mode 100644 index 3151a93fa006f..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/nunit.framework.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit3-console.tests.dll b/third_party/dotnet/nunit-3.0.1/nunit3-console.tests.dll deleted file mode 100644 index 4c2f483b25a45..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/nunit3-console.tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/nunitlite.dll b/third_party/dotnet/nunit-3.0.1/nunitlite.dll deleted file mode 100644 index f6dfca8619dc2..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/nunitlite.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/mock-nunit-assembly.dll b/third_party/dotnet/nunit-3.0.1/portable/mock-nunit-assembly.dll deleted file mode 100644 index 45c1ee6ad9fbf..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/mock-nunit-assembly.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.dll b/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.dll deleted file mode 100644 index e110b17367f51..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.tests.dll deleted file mode 100644 index 7b559b9877047..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.tests.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.tests.dll.config b/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.tests.dll.config deleted file mode 100644 index e03ea0a5f088e..0000000000000 --- a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.tests.dll.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.portable.tests.exe b/third_party/dotnet/nunit-3.0.1/portable/nunit.portable.tests.exe deleted file mode 100644 index 73114247c86d9..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/nunit.portable.tests.exe and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.portable.tests.exe.config b/third_party/dotnet/nunit-3.0.1/portable/nunit.portable.tests.exe.config deleted file mode 100644 index 8e15646352ec1..0000000000000 --- a/third_party/dotnet/nunit-3.0.1/portable/nunit.portable.tests.exe.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.testdata.dll b/third_party/dotnet/nunit-3.0.1/portable/nunit.testdata.dll deleted file mode 100644 index 3ad1cd48a63a7..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/nunit.testdata.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunitlite.dll b/third_party/dotnet/nunit-3.0.1/portable/nunitlite.dll deleted file mode 100644 index 0942a111b1981..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/nunitlite.dll and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunitlite.tests.exe b/third_party/dotnet/nunit-3.0.1/portable/nunitlite.tests.exe deleted file mode 100644 index 3148a6015f571..0000000000000 Binary files a/third_party/dotnet/nunit-3.0.1/portable/nunitlite.tests.exe and /dev/null differ diff --git a/third_party/dotnet/nunit-3.0.1/ConsoleTests.nunit b/third_party/dotnet/nunit-3.2.1/ConsoleTests.nunit similarity index 100% rename from third_party/dotnet/nunit-3.0.1/ConsoleTests.nunit rename to third_party/dotnet/nunit-3.2.1/ConsoleTests.nunit diff --git a/third_party/dotnet/nunit-3.0.1/EngineTests.nunit b/third_party/dotnet/nunit-3.2.1/EngineTests.nunit similarity index 100% rename from third_party/dotnet/nunit-3.0.1/EngineTests.nunit rename to third_party/dotnet/nunit-3.2.1/EngineTests.nunit diff --git a/third_party/dotnet/nunit-3.0.1/Mono.Cecil.dll b/third_party/dotnet/nunit-3.2.1/Mono.Cecil.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/Mono.Cecil.dll rename to third_party/dotnet/nunit-3.2.1/Mono.Cecil.dll diff --git a/third_party/dotnet/nunit-3.0.1/NUnit2TestResult.xsd b/third_party/dotnet/nunit-3.2.1/NUnit2TestResult.xsd similarity index 100% rename from third_party/dotnet/nunit-3.0.1/NUnit2TestResult.xsd rename to third_party/dotnet/nunit-3.2.1/NUnit2TestResult.xsd diff --git a/third_party/dotnet/nunit-3.0.1/TextSummary.xslt b/third_party/dotnet/nunit-3.2.1/TextSummary.xslt similarity index 100% rename from third_party/dotnet/nunit-3.0.1/TextSummary.xslt rename to third_party/dotnet/nunit-3.2.1/TextSummary.xslt diff --git a/third_party/dotnet/nunit-3.2.1/addins/nunit-project-loader.dll b/third_party/dotnet/nunit-3.2.1/addins/nunit-project-loader.dll new file mode 100644 index 0000000000000..a587c2bdaf2ec Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/nunit-project-loader.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/addins/nunit-v2-result-writer.dll b/third_party/dotnet/nunit-3.2.1/addins/nunit-v2-result-writer.dll new file mode 100644 index 0000000000000..fd0b8008bc40a Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/nunit-v2-result-writer.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/nunit.core.dll b/third_party/dotnet/nunit-3.2.1/addins/nunit.core.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/addins/nunit.core.dll rename to third_party/dotnet/nunit-3.2.1/addins/nunit.core.dll diff --git a/third_party/dotnet/nunit-3.0.1/addins/nunit.core.interfaces.dll b/third_party/dotnet/nunit-3.2.1/addins/nunit.core.interfaces.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/addins/nunit.core.interfaces.dll rename to third_party/dotnet/nunit-3.2.1/addins/nunit.core.interfaces.dll diff --git a/third_party/dotnet/nunit-3.2.1/addins/nunit.v2.driver.dll b/third_party/dotnet/nunit-3.2.1/addins/nunit.v2.driver.dll new file mode 100644 index 0000000000000..59e22fa2d6a70 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/nunit.v2.driver.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/addin-tests.dll b/third_party/dotnet/nunit-3.2.1/addins/tests/addin-tests.dll similarity index 80% rename from third_party/dotnet/nunit-3.0.1/addins/tests/addin-tests.dll rename to third_party/dotnet/nunit-3.2.1/addins/tests/addin-tests.dll index 1cdf195de8cc4..7e5de2ee80a42 100644 Binary files a/third_party/dotnet/nunit-3.0.1/addins/tests/addin-tests.dll and b/third_party/dotnet/nunit-3.2.1/addins/tests/addin-tests.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/addins/tests/nunit-project-loader.dll b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit-project-loader.dll new file mode 100644 index 0000000000000..a587c2bdaf2ec Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit-project-loader.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.engine.api.dll b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.engine.api.dll new file mode 100644 index 0000000000000..a49e1513b890a Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.engine.api.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.engine.api.xml b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.engine.api.xml similarity index 96% rename from third_party/dotnet/nunit-3.0.1/addins/tests/nunit.engine.api.xml rename to third_party/dotnet/nunit-3.2.1/addins/tests/nunit.engine.api.xml index bb37ad15f7d1f..d51826a5911fe 100644 --- a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.engine.api.xml +++ b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.engine.api.xml @@ -383,6 +383,49 @@ If true, cancel any ongoing test threads, otherwise wait for them to complete. + + + Interface implemented by objects representing a runtime framework. + + + + + Gets the inique Id for this runtime, such as "net-4.5" + + + + + Gets the display name of the framework, such as ".NET 4.5" + + + + + Gets the framework version: usually contains two components, Major + and Minor, which match the corresponding CLR components, but not always. + + + + + Gets the Version of the CLR for this framework + + + + + Gets a string representing the particular profile installed, + or null if there is no profile. Currently. the only defined + values are Full and Client. + + + + + Interface that returns a list of available runtime frameworks. + + + + + Gets a list of available runtime frameworks. + + IResultWriterService provides result writers for a specified diff --git a/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.framework.dll new file mode 100644 index 0000000000000..2b1f03dcc5308 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.framework.xml similarity index 97% rename from third_party/dotnet/nunit-3.0.1/addins/tests/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/addins/tests/nunit.framework.xml index 5d48d532a4719..cd4caf682a96a 100644 --- a/third_party/dotnet/nunit-3.0.1/addins/tests/nunit.framework.xml +++ b/third_party/dotnet/nunit-3.2.1/addins/tests/nunit.framework.xml @@ -20,6 +20,8 @@ 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. @@ -871,6 +873,24 @@ 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 @@ -1082,6 +1102,13 @@ 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 @@ -1195,6 +1222,13 @@ 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 @@ -1915,11 +1949,12 @@ 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 @@ -1939,11 +1974,12 @@ The item to dispatch - + - Cancel the ongoing run completely. + 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 @@ -1984,21 +2020,21 @@ 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. + + 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. - + 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. + @@ -2059,10 +2095,11 @@ Shut down the shift. - + - Cancel the shift without completing all work + 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 @@ -2071,6 +2108,16 @@ 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 @@ -2086,6 +2133,26 @@ 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 @@ -2426,7 +2493,7 @@ Indicates whether the worker thread is running - + Our ThreadProc, which pulls and runs tests in a loop @@ -2436,23 +2503,24 @@ 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 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. - + 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. + @@ -2501,6 +2569,11 @@ The execution context + + + The unique id of the worker executing this item. + + The test actions to be performed before and after this test @@ -2522,6 +2595,12 @@ 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 @@ -2558,7 +2637,7 @@ The item to dispatch - + Cancel the ongoing run completely. If no run is in process, the call has no effect. @@ -3381,6 +3460,11 @@ 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 @@ -3434,6 +3518,12 @@ 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 @@ -4516,6 +4606,12 @@ 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 @@ -4552,6 +4648,16 @@ 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 @@ -4576,6 +4682,12 @@ Increments the assert count by a specified amount. + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + Obtain lifetime service object @@ -5382,6 +5494,72 @@ The child result to be added + + + 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 + + + + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. + + Class used to guard against unexpected argument values @@ -5527,6 +5705,39 @@ 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 @@ -5743,7 +5954,7 @@ 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 + If true, kill any tests that are currently running @@ -5815,7 +6026,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. File name of the assembly to load @@ -5824,7 +6035,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. The assembly to load @@ -5972,6 +6183,51 @@ 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 @@ -6184,59 +6440,6 @@ The type that is being tested. - - - 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. - - - - - - - This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, - it replicates the functionality at the resolution supported. - - CollectionSupersetConstraint is used to determine whether @@ -6263,6 +6466,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + DictionaryContainsValueConstraint is used to test whether a dictionary @@ -6345,6 +6555,19 @@ 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 @@ -6537,6 +6760,13 @@ 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 @@ -6798,6 +7028,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionEquivalentConstraint is used to determine whether two @@ -6823,6 +7060,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionItemsEqualConstraint is the abstract base class for all @@ -6973,6 +7217,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionTally counts (tallies) the number of @@ -7222,6 +7473,15 @@ 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 @@ -7604,6 +7864,11 @@ 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 @@ -7990,6 +8255,11 @@ 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 @@ -8718,6 +8988,26 @@ 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. @@ -9195,6 +9485,21 @@ 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 @@ -9210,6 +9515,17 @@ 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. @@ -12080,7 +12396,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -12088,7 +12404,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -13496,7 +13812,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13504,7 +13820,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -13806,7 +14122,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13814,7 +14130,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -14751,6 +15067,15 @@ 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 @@ -14764,6 +15089,12 @@ 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 @@ -15055,7 +15386,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15063,7 +15394,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15513,7 +15844,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15521,7 +15852,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15708,8 +16039,10 @@ - GlobalSettings is a place for setting default _values used - by the framework in performing asserts. + 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. @@ -15850,6 +16183,11 @@ 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 @@ -16104,7 +16442,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -16112,7 +16450,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -16419,6 +16757,11 @@ 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. @@ -16537,6 +16880,25 @@ 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 @@ -16874,6 +17236,41 @@ If true, use of the event queue is suppressed and test events are synchronous. + + + 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 + + + + + Allows us to use Func when compiling against .NET 2.0 + + + + + + + + Enables compiling extension methods in .NET 2.0 diff --git a/third_party/dotnet/nunit-3.2.1/addins/tests/vs-project-loader.dll b/third_party/dotnet/nunit-3.2.1/addins/tests/vs-project-loader.dll new file mode 100644 index 0000000000000..c0ee882476de5 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/tests/vs-project-loader.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.framework.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.framework.dll rename to third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.framework.dll diff --git a/third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.framework.xml similarity index 100% rename from third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.framework.xml diff --git a/third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.v2.driver.tests.dll b/third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.v2.driver.tests.dll similarity index 99% rename from third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.v2.driver.tests.dll rename to third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.v2.driver.tests.dll index b5e7e4c7ba3bb..746a957887b00 100644 Binary files a/third_party/dotnet/nunit-3.0.1/addins/v2-tests/nunit.v2.driver.tests.dll and b/third_party/dotnet/nunit-3.2.1/addins/v2-tests/nunit.v2.driver.tests.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/addins/vs-project-loader.dll b/third_party/dotnet/nunit-3.2.1/addins/vs-project-loader.dll new file mode 100644 index 0000000000000..c0ee882476de5 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/addins/vs-project-loader.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/mock-nunit-assembly.exe b/third_party/dotnet/nunit-3.2.1/mock-assembly.exe similarity index 59% rename from third_party/dotnet/nunit-3.0.1/net-2.0/mock-nunit-assembly.exe rename to third_party/dotnet/nunit-3.2.1/mock-assembly.exe index 9adf8e1368ec3..3696af4917e56 100644 Binary files a/third_party/dotnet/nunit-3.0.1/net-2.0/mock-nunit-assembly.exe and b/third_party/dotnet/nunit-3.2.1/mock-assembly.exe differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/mock-nunit-assembly.exe b/third_party/dotnet/nunit-3.2.1/net-2.0/mock-assembly.exe similarity index 59% rename from third_party/dotnet/nunit-3.0.1/net-4.5/mock-nunit-assembly.exe rename to third_party/dotnet/nunit-3.2.1/net-2.0/mock-assembly.exe index f96db3284d5e8..3696af4917e56 100644 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.5/mock-nunit-assembly.exe and b/third_party/dotnet/nunit-3.2.1/net-2.0/mock-assembly.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.dll new file mode 100644 index 0000000000000..2b1f03dcc5308 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.tests.dll new file mode 100644 index 0000000000000..fb6f7db019752 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.xml similarity index 97% rename from third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.xml index 5d48d532a4719..cd4caf682a96a 100644 --- a/third_party/dotnet/nunit-3.0.1/net-2.0/nunit.framework.xml +++ b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.framework.xml @@ -20,6 +20,8 @@ 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. @@ -871,6 +873,24 @@ 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 @@ -1082,6 +1102,13 @@ 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 @@ -1195,6 +1222,13 @@ 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 @@ -1915,11 +1949,12 @@ 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 @@ -1939,11 +1974,12 @@ The item to dispatch - + - Cancel the ongoing run completely. + 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 @@ -1984,21 +2020,21 @@ 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. + + 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. - + 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. + @@ -2059,10 +2095,11 @@ Shut down the shift. - + - Cancel the shift without completing all work + 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 @@ -2071,6 +2108,16 @@ 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 @@ -2086,6 +2133,26 @@ 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 @@ -2426,7 +2493,7 @@ Indicates whether the worker thread is running - + Our ThreadProc, which pulls and runs tests in a loop @@ -2436,23 +2503,24 @@ 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 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. - + 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. + @@ -2501,6 +2569,11 @@ The execution context + + + The unique id of the worker executing this item. + + The test actions to be performed before and after this test @@ -2522,6 +2595,12 @@ 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 @@ -2558,7 +2637,7 @@ The item to dispatch - + Cancel the ongoing run completely. If no run is in process, the call has no effect. @@ -3381,6 +3460,11 @@ 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 @@ -3434,6 +3518,12 @@ 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 @@ -4516,6 +4606,12 @@ 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 @@ -4552,6 +4648,16 @@ 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 @@ -4576,6 +4682,12 @@ Increments the assert count by a specified amount. + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + Obtain lifetime service object @@ -5382,6 +5494,72 @@ The child result to be added + + + 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 + + + + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. + + Class used to guard against unexpected argument values @@ -5527,6 +5705,39 @@ 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 @@ -5743,7 +5954,7 @@ 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 + If true, kill any tests that are currently running @@ -5815,7 +6026,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. File name of the assembly to load @@ -5824,7 +6035,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. The assembly to load @@ -5972,6 +6183,51 @@ 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 @@ -6184,59 +6440,6 @@ The type that is being tested. - - - 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. - - - - - - - This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, - it replicates the functionality at the resolution supported. - - CollectionSupersetConstraint is used to determine whether @@ -6263,6 +6466,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + DictionaryContainsValueConstraint is used to test whether a dictionary @@ -6345,6 +6555,19 @@ 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 @@ -6537,6 +6760,13 @@ 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 @@ -6798,6 +7028,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionEquivalentConstraint is used to determine whether two @@ -6823,6 +7060,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionItemsEqualConstraint is the abstract base class for all @@ -6973,6 +7217,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionTally counts (tallies) the number of @@ -7222,6 +7473,15 @@ 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 @@ -7604,6 +7864,11 @@ 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 @@ -7990,6 +8255,11 @@ 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 @@ -8718,6 +8988,26 @@ 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. @@ -9195,6 +9485,21 @@ 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 @@ -9210,6 +9515,17 @@ 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. @@ -12080,7 +12396,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -12088,7 +12404,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -13496,7 +13812,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13504,7 +13820,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -13806,7 +14122,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13814,7 +14130,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -14751,6 +15067,15 @@ 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 @@ -14764,6 +15089,12 @@ 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 @@ -15055,7 +15386,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15063,7 +15394,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15513,7 +15844,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15521,7 +15852,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15708,8 +16039,10 @@ - GlobalSettings is a place for setting default _values used - by the framework in performing asserts. + 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. @@ -15850,6 +16183,11 @@ 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 @@ -16104,7 +16442,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -16112,7 +16450,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -16419,6 +16757,11 @@ 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. @@ -16537,6 +16880,25 @@ 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 @@ -16874,6 +17236,41 @@ If true, use of the event queue is suppressed and test events are synchronous. + + + 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 + + + + + Allows us to use Func when compiling against .NET 2.0 + + + + + + + + Enables compiling extension methods in .NET 2.0 diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.testdata.dll b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.testdata.dll new file mode 100644 index 0000000000000..4fc38d013a980 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/nunit.testdata.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite-runner.exe b/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite-runner.exe new file mode 100644 index 0000000000000..b85e9cf83d7bf Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite-runner.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite.dll b/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite.dll new file mode 100644 index 0000000000000..5150bf2713d63 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite.tests.exe b/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite.tests.exe new file mode 100644 index 0000000000000..c0c8757c14212 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/nunitlite.tests.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-2.0/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.2.1/net-2.0/slow-nunit-tests.dll new file mode 100644 index 0000000000000..5c10cd0686f37 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-2.0/slow-nunit-tests.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/mock-assembly.exe b/third_party/dotnet/nunit-3.2.1/net-3.5/mock-assembly.exe new file mode 100644 index 0000000000000..741d93ff4a438 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/mock-assembly.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.dll new file mode 100644 index 0000000000000..32c20ccc2e831 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.tests.dll new file mode 100644 index 0000000000000..bbb3e14fb17b6 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.xml similarity index 96% rename from third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.xml index 44c50e5e2b32a..6ff446bee61ca 100644 --- a/third_party/dotnet/nunit-3.0.1/net-4.0/nunit.framework.xml +++ b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.framework.xml @@ -20,6 +20,8 @@ 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. @@ -319,13 +321,150 @@ 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. + + - Waits for pending asynchronous operations to complete, if appropriate, - and returns a proper result of the invocation by unwrapping task results + 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 raw result of the method invocation - The unwrapped result, if necessary + The fixture to be added. @@ -450,90 +589,6 @@ 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 @@ -586,64 +641,31 @@ The test suite being built. A newly constructed Test - + - Built-in SuiteBuilder for all types of test classes. + 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 + + - + - 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 + FleaRand is a pseudo-random number generator developed by Bob Jenkins: + http://burtleburtle.net/bob/rand/talksmall.html#flea @@ -784,34 +806,6 @@ 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 @@ -852,3152 +846,3032 @@ 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. + A base class for multi-part filters - + - 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. + Constructs an empty CompositeFilter - - 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. + Constructs a CompositeFilter from an array of filters + - + - Make adjustments needed before and after running - the raw test - that is, after any SetUp has run - and before TearDown. + Adds a filter to the list of filters + The filter to be added - + - Run SetUp and TearDown for the test. This stage is used - internally by NUnit and should not normally appear - in user-defined decorators. + Return a list of the composing filters. - + - Make adjustments needed before and after running - the entire test - including SetUp and TearDown. + Checks whether the CompositeFilter is matched by a test. + The test to be matched - + - TODO: Documentation needed for class + Checks whether the CompositeFilter is matched by a test. + The test to be matched - - TODO: Documentation needed for field - - + - TODO: Documentation needed for constructor + Checks whether the CompositeFilter is explicit matched by a test. - + The test to be matched - + - TODO: Documentation needed for class + Adds an XML node + Parent node + True if recursive + The added XML node - + - Initializes a new instance of the class. + Gets the element name - The inner command. - The max time allowed in milliseconds + Element name - + - Runs the test, saving a TestResult in the supplied TestExecutionContext + PropertyFilter is able to select or exclude tests + based on their properties. - 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. + Construct a PropertyFilter using a property name and expected value + A property name + The expected value of the property - + - Constructs a OneTimeSetUpCommand for a suite + Check whether the filter matches a test - The suite to which the command applies - A SetUpTearDownList for use by the command - A List of TestActionItems to be run after Setup + The test to be matched + - + - Overridden to run the one-time setup for a suite. + Adds an XML node - The TestExecutionContext to be used. - A TestResult + Parent node + True if recursive + The added XML node - + - OneTimeTearDownCommand performs any teardown actions - specified for a suite and calls Dispose on the user - test object, if any. + Gets the element name + Element name - + - Construct a OneTimeTearDownCommand + TestName filter selects tests based on their Name - 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. + Construct a TestNameFilter for a single name - The TestExecutionContext to be used. - A TestResult + The name the filter will recognize. - + - SetUpTearDownCommand runs any SetUp methods for a suite, - runs the test and then runs any TearDown methods. + Match a test against a single value. - + - Initializes a new instance of the class. + Gets the element name - The inner command. + Element name - + - Runs the test, saving a TestResult in the supplied TestExecutionContext. + ClassName filter selects tests based on the class FullName - 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 FullNameFilter for a single name + The name the filter will recognize. - + - Construct a SetUpTearDownNode + Match a test against a single value. - 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. + Gets the element name + Element name - + - Run SetUp on this level. + FullName filter selects tests based on their FullName - The execution context to use for running. - + - Run TearDown for this level. + Construct a MethodNameFilter for a single name - + The name the filter will recognize. - + - TODO: Documentation needed for class + Match a test against a single value. - + - Initializes a new instance of the class. + Gets the element name - The test being skipped. + Element name - + - Overridden to simply set the CurrentResult to the - appropriate Skipped state. + IdFilter selects tests based on their id - 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. + Construct an IdFilter for a single value + The id the filter will recognize. - + - Initializes a new instance of the class. + Match a test against a single value. - The inner command. - + - Runs the test, saving a TestResult in the supplied TestExecutionContext. + Gets the element name - The context in which the test should run. - A TestResult + Element name - + - 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. + ValueMatchFilter selects tests based on some value, which + is expected to be contained in the test. - + - Construct a TestActionItem + Returns the value matched by the filter - used for testing - The ITestAction to be included - + - Run the BeforeTest method of the action and remember that it has been run. + Indicates whether the value is a regular expression - The test to which the action applies - + - Run the AfterTest action, but only if the BeforeTest - action was actually run. + Construct a ValueMatchFilter for a single value. - The test to which the action applies + The value to be included. - + - 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. + Match the input provided by the derived class + The value to be matchedT + True for a match, false otherwise. - + - Construct a TestCommand for a test. + Adds an XML node - The test to be executed + Parent node + True if recursive + The added XML node - + - Gets the test associated with this command. + Gets the element name + Element name - + - Runs the test in a specified context, returning a TestResult. + Combines multiple filters so that a test must pass all + of them in order to pass this filter. - The TestExecutionContext to be used for running the test. - A TestResult - + - TestMethodCommand is the lowest level concrete command - used to run actual test cases. + Constructs an empty AndFilter - + - Initializes a new instance of the class. + Constructs an AndFilter from an array of filters - 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. + Checks whether the AndFilter is matched by a test - The execution context + The test to be matched + True if all the component filters pass, otherwise false - + - TheoryResultCommand adjusts the result of a Theory so that - it fails if all the results were inconclusive. + Checks whether the AndFilter is matched by a test + The test to be matched + True if all the component filters match, otherwise false - + - Constructs a TheoryResultCommand + Checks whether the AndFilter is explicit matched by a test. - The command to be wrapped by this one + The test to be matched + True if all the component filters explicit match, otherwise false - + - Overridden to call the inner command and adjust the result - in case all chlid results were inconclusive. + Gets the element name - - + Element name - + - CultureDetector is a helper class used by NUnit to determine - whether a test should be run based on the current culture. + CategoryFilter is able to select or exclude tests + based on their categories. + - + - Default constructor uses the current culture. + Construct a CategoryFilter using a single category name + A category name - + - Construct a CultureDetector for a particular culture for testing. + Check whether the filter matches a test - The culture to be used + The test to be matched + - + - Test to determine if one of a collection of cultures - is being used currently. + Gets the element name - - + Element name - + - Tests to determine if the current culture is supported - based on a culture attribute. + NotFilter negates the operation of another filter - The attribute to examine - - + - Test to determine if the a particular culture or comma- - delimited set of cultures is in use. + Construct a not filter on another filter - Name of the culture or comma-separated list of culture ids - True if the culture is in use on the system + The filter to be negated - + - Return the last failure reason. Results are not - defined if called before IsSupported( Attribute ) - is called. + Gets the base filter - + - ExceptionHelper provides static methods for working with exceptions + 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 - + - Builds up a message, using the Message field of the specified exception - as well as any InnerExceptions. + Check whether the filter matches a test - The exception. - A combined message string. + The test to be matched + True if it matches, otherwise false - + - Builds up a message, using the Message field of the specified exception - as well as any InnerExceptions. + 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 exception. - A combined stack trace. + The test to which the filter is applied + True if the test matches the filter explicityly, otherwise false - + - Gets the stack trace of the exception. + Adds an XML node - The exception. - A string representation of the stack trace. + Parent node + True if recursive + The added XML node - + - A utility class to create TestCommands + Combines multiple filters so that a test must pass one + of them in order to pass this filter. - + - Gets the command to be executed before any of - the child tests are run. + Constructs an empty OrFilter - A TestCommand - + - Gets the command to be executed after all of the - child tests are run. + Constructs an AndFilter from an array of filters - A TestCommand + - + - Creates a test command for use in running this test. + Checks whether the OrFilter is matched by a test - + The test to be matched + True if any of the component filters pass, otherwise false - + - Creates a command for skipping a test. The result returned will - depend on the test RunState. + Checks whether the OrFilter is matched by a test + The test to be matched + True if any of the component filters match, otherwise false - + - Builds the set up tear down list. + Checks whether the OrFilter is explicit matched by a test - Type of the fixture. - Type of the set up attribute. - Type of the tear down attribute. - A list of SetUpTearDownItems + The test to be matched + True if any of the component filters explicit match, otherwise false - + - A CompositeWorkItem represents a test suite and - encapsulates the execution of the suite as well - as all its child tests. + Gets the element name + Element name - + - Construct a CompositeWorkItem for executing a test suite - using a filter to select child tests. + FullName filter selects tests based on their FullName - 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. + Construct a FullNameFilter for a single name + The name the filter will recognize. - + - The EventPumpState enum represents the state of an - EventPump. + Match a test against a single value. - + - The pump is stopped + Gets the element name + Element name - + - The pump is pumping events with no stop requested + The MethodWrapper class wraps a MethodInfo so that it may + be used in a platform-independent manner. - + - The pump is pumping events but a stop has been requested + Construct a MethodWrapper for a Type and a MethodInfo. - + - 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. + Construct a MethodInfo for a given Type and method name. - + - The handle on which a thread enqueuing an event with == true - waits, until the EventPump has sent the event to its listeners. + Gets the Type from which this method was reflected. - + - The downstream listener to which we send events + Gets the MethodInfo for this method. - + - The queue that holds our events + Gets the name of the method. - + - Thread to do the pumping + Gets a value indicating whether the method is abstract. - + - The current state of the eventpump + Gets a value indicating whether the method is public. - + - Constructor + Gets a value indicating whether the method contains unassigned generic type parameters. - The EventListener to receive events - The event queue to pull events from - + - Gets or sets the current state of the pump + Gets a value indicating whether the method is a generic method. - - On volatile and , see - "http://www.albahari.com/threading/part4.aspx". - - + - Gets or sets the name of this EventPump - (used only internally and for testing). + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - + - Dispose stops the pump - Disposes the used WaitHandle, too. + Gets the return Type of the method. - + - Start the pump + Gets the parameters of the method. + - + - Tell the pump to stop after emptying the queue. + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - 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. + 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 - + - 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. + Returns an array of custom attributes of the specified type applied to this method - + - The Send method is implemented by derived classes to send the event to the specified listener. + Gets a value indicating whether one or more attributes of the spcified type are defined on the method. - The listener. - + - Gets a value indicating whether this event is delivered synchronously by the NUnit . - - If true, and if has been used to - set a WaitHandle, blocks its calling thread until the - thread has delivered the event and sets the WaitHandle. - + 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 - + - TestStartedEvent holds information needed to call the TestStarted method. + Override ToString() so that error messages in NUnit's own tests make sense - + - Initializes a new instance of the class. + The ParameterWrapper class wraps a ParameterInfo so that it may + be used in a platform-independent manner. - The test. - + - Calls TestStarted on the specified listener. + Construct a ParameterWrapper for a given method and parameter - The listener. + + - + - TestFinishedEvent holds information needed to call the TestFinished method. + Gets a value indicating whether the parameter is optional - + - Initializes a new instance of the class. + Gets an IMethodInfo representing the method for which this is a parameter. - The result. - + - Calls TestFinished on the specified listener. + Gets the underlying ParameterInfo - The listener. - + - Implements a queue of work items each of which - is queued as a WaitCallback. + Gets the Type of the parameter - + - Construct a new EventQueue + Returns an array of custom attributes of the specified type applied to this method - + - WaitHandle for synchronous event delivery in . - - Having just one handle for the whole implies that - there may be only one producer (the test thread) for synchronous events. - If there can be multiple producers for synchronous events, one would have - to introduce one WaitHandle per event. - + Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. - + - Gets the count of items in the queue. + TestNameGenerator is able to create test names according to + a coded pattern. - + - Sets a handle on which to wait, when is called - for an with == true. + Construct a TestNameGenerator - - The wait handle on which to wait, when is called - for an with == true. - The caller is responsible for disposing this wait handle. - + The pattern used by this generator. - + - Enqueues the specified event + Get the display name for a TestMethod and it's arguments - The event to enqueue. + A TestMethod + The display name - + - Removes the first element from the queue and returns it (or null). + Get the display name for a TestMethod and it's arguments - - 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. - - - + A TestMethod + Arguments to be used + The display name - + - Stop processing of the queue + Get the display name for a MethodInfo + A MethodInfo + The display name - + - An IWorkItemDispatcher handles execution of work items. + Get the display name for a method with args + A MethodInfo + Argument list for the method + The display name - + - 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 TypeWrapper class wraps a Type so it may be used in + a platform-independent manner. - The item to dispatch - + - Cancel the ongoing run completely. - If no run is in process, the call has no effect. + Construct a TypeWrapper for a specified Type. - + - ParallelWorkItemDispatcher handles execution of work items by - queuing them for worker threads to process. + Gets the underlying Type on which this TypeWrapper is based. - + - Construct a ParallelWorkItemDispatcher + Gets the base type of this type as an ITypeInfo - Number of workers to use - + - Enumerates all the shifts supported by the dispatcher + Gets the Name of the Type - + - 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. + Gets the FullName of the Type - The item to dispatch - + - Cancel the ongoing run completely. - If no run is in process, the call has no effect. + Gets the assembly in which the type is declared - + - QueuingEventListener uses an EventQueue to store any - events received on its EventListener interface. + Gets the namespace of the Type - + - The EvenQueue created and filled by this listener + Gets a value indicating whether the type is abstract. - + - A test has started + Gets a value indicating whether the Type is a generic Type - The test that is starting - + - A test case finished + Returns true if the Type wrapped is T - Result of the test case - + - A SimpleWorkItem represents a single test case and is - marked as completed immediately upon execution. This - class is also used for skipped or ignored test suites. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - + - Construct a simple work item for a test. + Gets a value indicating whether the Type is a generic Type definition - The test to be executed - The filter used to select this test - + - Method that performs actually performs the work. + Gets a value indicating whether the type is sealed. - + - SimpleWorkItemDispatcher handles execution of WorkItems by - directly executing them. It is provided so that a dispatcher - is always available in the context, thereby simplifying the - code needed to run child tests. + Gets a value indicating whether this type represents a static class. - + - 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. + Get the display name for this type - The item to dispatch - + - Cancel the ongoing run completely. - If no run is in process, the call has no effect. + Get the display name for an object of this type, constructed with the specified args. - + - A TestWorker pulls work items from a queue - and executes them. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - + - Event signaled immediately before executing a WorkItem + Returns a Type representing a generic type definition from which this Type can be constructed. - + - Event signaled immediately after executing a WorkItem + Returns an array of custom attributes of the specified type applied to this type - + - Construct a new TestWorker. + Returns a value indicating whether the type has an attribute of the specified type. - 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 + Returns a flag indicating whether this type has a method with an attribute of the specified type. + + - + - Indicates whether the worker thread is running + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - + - Our ThreadProc, which pulls and runs tests in a loop + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - + - Start processing work items. + Construct an object of this Type, using the specified arguments. - + - Stop the thread, either immediately or after finishing the current WorkItem + Override ToString() so that error messages in NUnit's own tests make sense - + - 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. + SetUpTearDownItem holds the setup and teardown methods + for a single level of the inheritance hierarchy. - + - Construct a TextCapture object + Construct a SetUpTearDownNode - The default destination for non-intercepted output + A list of setup methods for this level + A list teardown methods for this level - + - Gets the Encoding in use by this TextWriter + Returns true if this level has any methods at all. + This flag is used to discard levels that do nothing. - + - Writes a single character + Run SetUp on this level. - The char to write + The execution context to use for running. - + - Writes a string + Run TearDown for this level. - The string to write + - + - Writes a string followed by a line terminator + TestActionCommand runs the BeforeTest actions for a test, + then runs the test and finally runs the AfterTestActions. - 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. + Initializes a new instance of the class. + The inner command. - + - Creates a work item. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The test for which this WorkItem is being created. - The filter to be used in selecting any child Tests. - + The context in which the test should run. + A TestResult - + - Construct a WorkItem for a particular test. + TestActionItem represents a single execution of an + ITestAction. It is used to track whether the BeforeTest + method has been called and suppress calling the + AfterTest method if it has not. - The test that the WorkItem will run - + - Initialize the TestExecutionContext. This must be done - before executing the WorkItem. + Construct a TestActionItem - - Originally, the context was provided in the constructor - but delaying initialization of the context until the item - is about to be dispatched allows changes in the parent - context during OneTimeSetUp to be reflected in the child. - - The TestExecutionContext to use + The ITestAction to be included - + - Event triggered when the item is complete + Run the BeforeTest method of the action and remember that it has been run. + The test to which the action applies - + - Gets the current state of the WorkItem + Run the AfterTest action, but only if the BeforeTest + action was actually run. + The test to which the action applies - + - The test being executed by the work item + 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 execution context + TODO: Documentation needed for class - + + TODO: Documentation needed for field + + - The test actions to be performed before and after this test + TODO: Documentation needed for constructor + - + - Indicates whether this WorkItem may be run in parallel + TODO: Documentation needed for class - + - The test result + Initializes a new instance of the class. + The inner command. + The max time allowed in milliseconds - + - Execute the current work item, including any - child work items. + Runs the test, saving a TestResult in the supplied TestExecutionContext + The context in which the test should run. + A TestResult - + - Method that performs actually performs the work. It should - set the State to WorkItemState.Complete when done. + OneTimeSetUpCommand runs any one-time setup methods for a suite, + constructing the user test object if necessary. - + - Method called by the derived class when all work is complete + 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 - + - WorkItemQueueState indicates the current state of a WorkItemQueue + Overridden to run the one-time setup for a suite. + The TestExecutionContext to be used. + A TestResult - + - The queue is paused + OneTimeTearDownCommand performs any teardown actions + specified for a suite and calls Dispose on the user + test object, if any. - + - The queue is running + 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. - + - The queue is stopped + Overridden to run the teardown methods specified on the test. + The TestExecutionContext to be used. + A TestResult - + - A WorkItemQueue holds work items that are ready to - be run, either initially or after some dependency - has been satisfied. + SetUpTearDownCommand runs any SetUp methods for a suite, + runs the test and then runs any TearDown methods. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The name of the queue. + The inner command. - + - Gets the name of the work item queue. + Runs the test, saving a TestResult in the supplied TestExecutionContext. + The context in which the test should run. + A TestResult - + - Gets the total number of items processed so far + TODO: Documentation needed for class - + - Gets the maximum number of work items. + Initializes a new instance of the class. + The test being skipped. - + - Gets the current state of the queue + Overridden to simply set the CurrentResult to the + appropriate Skipped state. + The execution context for the test + A TestResult - + - Get a bool indicating whether the queue is empty. + 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. - + - Enqueue a WorkItem to be processed + Construct a TestCommand for a test. - The WorkItem to process + The test to be executed - + - Dequeue a WorkItem for processing + Gets the test associated with this command. - A WorkItem or null if the queue has stopped - + - Start or restart processing of items from the queue + Runs the test in a specified context, returning a TestResult. + The TestExecutionContext to be used for running the test. + A TestResult - + - Signal the queue to stop + TestMethodCommand is the lowest level concrete command + used to run actual test cases. - + - Pause the queue for restarting later + Initializes a new instance of the class. + The test. - + - The current state of a work item + 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 - + - Ready to run or continue + TheoryResultCommand adjusts the result of a Theory so that + it fails if all the results were inconclusive. - + - Work Item is executing + Constructs a TheoryResultCommand + The command to be wrapped by this one - + - Complete + Overridden to call the inner command and adjust the result + in case all chlid results were inconclusive. + + - + - 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. + 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. + - + - Construct a WorkShift + Use an application-defined default value. - + - Event that fires when the shift has ended + Make adjustments needed before and after running + the raw test - that is, after any SetUp has run + and before TearDown. - + - Gets a flag indicating whether the shift is currently active + Run SetUp and TearDown for the test. This stage is used + internally by NUnit and should not normally appear + in user-defined decorators. - + - Gets a list of the queues associated with this shift. + Make adjustments needed before and after running + the entire test - including SetUp and TearDown. - Used for testing - + - Gets the list of workers associated with this shift. + A utility class to create TestCommands - + - Gets a bool indicating whether this shift has any work to do + Gets the command to be executed before any of + the child tests are run. + A TestCommand - + - Add a WorkItemQueue to the shift, starting it if the - shift is currently active. + Gets the command to be executed after all of the + child tests are run. + A TestCommand - + - Assign a worker to the shift. + Creates a test command for use in running this test. - + - + - Start or restart processing for the shift + Creates a command for skipping a test. The result returned will + depend on the test RunState. - + - End the shift, pausing all queues and raising - the EndOfShift event. + 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 - + - Shut down the shift. + An IWorkItemDispatcher handles execution of work items. - + - Cancel the shift without completing all work + 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 - + - 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. + 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 - + - Prefix used for the expected value line of a message + 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. - + - Prefix used for the actual value line of a message + 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 - + - Length of a message prefix + 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 - + - Construct a TextMessageWriter + 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 TextMessageWriter, specifying a user message - and optional formatting arguments. + Construct a TextCapture object - - + The default destination for non-intercepted output - + - Gets or sets the maximum line length for this writer + Gets the Encoding in use by this TextWriter - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a given - indentation level. + Writes a single character - The indentation level of the message - The message to be written - Any arguments used in formatting the message + The char to write - + - 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. + Writes a string - The result of the constraint that failed + The string to write - + - 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. + Writes a string followed by a line terminator - The expected value - The actual value causing the failure + 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. + + + - Display Expected and Actual lines for given _values, including - a tolerance value on the expected line. + Construct a WorkShift - 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. + Event that fires when the shift has ended - 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. + Gets a flag indicating whether the shift is currently active - The actual value. - + - Writes the text for a generalized value. + Gets a list of the queues associated with this shift. - The value. + Used for testing - + - Writes the text for a collection value, - starting at a particular point, to a max length + Gets the list of workers associated with this shift. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - + - Write the generic 'Expected' line for a constraint + Gets a bool indicating whether this shift has any work to do - The constraint that failed - + - Write the generic 'Expected' line for a given value + Add a WorkItemQueue to the shift, starting it if the + shift is currently active. - The expected value - + - Write the generic 'Expected' line for a given value - and tolerance. + Assign a worker to the shift. - The expected value - The tolerance within which the test was made + - + - Write the generic 'Actual' line for a constraint + Start or restart processing for the shift - The ConstraintResult for which the actual value is to be written - + - Write the generic 'Actual' line for a given value + End the shift, pausing all queues and raising + the EndOfShift event. - The actual value causing a failure - + - Combines multiple filters so that a test must pass all - of them in order to pass this filter. + Shut down the shift. - + - Constructs an empty AndFilter + 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 - + - Constructs an AndFilter from an array of filters + A CompositeWorkItem represents a test suite and + encapsulates the execution of the suite as well + as all its child tests. - - + - Checks whether the AndFilter is matched by a test + List of Child WorkItems - The test to be matched - True if all the component filters pass, otherwise false - + - Checks whether the AndFilter is matched by a test + A count of how many tests in the work item have a value for the Order Property - The test to be matched - True if all the component filters match, otherwise false - + - Gets the element name + Construct a CompositeWorkItem for executing a test suite + using a filter to select child tests. - Element name + The TestSuite to be executed + A filter used to select child tests - + - CategoryFilter is able to select or exclude tests - based on their categories. + Method that actually performs the work. Overridden + in CompositeWorkItem to do setup, run all child + items and then do teardown. - - + - Construct a CategoryFilter using a single category name + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. - A category name + + 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. - + - Check whether the filter matches a test + Sorts tests under this suite. - The test to be matched - - + - Gets the element name + Cancel (abort or stop) a CompositeWorkItem and all of its children - Element name + true if the CompositeWorkItem and all of its children should be aborted, false if it should allow all currently running tests to complete - + - ClassName filter selects tests based on the class FullName + A simplified implementation of .NET 4 CountdownEvent + for use in earlier versions of .NET. Only the methods + used by NUnit are implemented. - + - Construct a FullNameFilter for a single name + Construct a CountdownEvent - The name the filter will recognize. + The initial count - + - Match a test against a single value. + Gets the initial count established for the CountdownEvent - + - Gets the element name + Gets the current count remaining for the CountdownEvent - Element name - + - A base class for multi-part filters + Decrement the count by one - + - Constructs an empty CompositeFilter + Block the thread until the count reaches zero - + - Constructs a CompositeFilter from an array of filters + The EventPumpState enum represents the state of an + EventPump. - - + - Adds a filter to the list of filters + The pump is stopped - The filter to be added - + - Return a list of the composing filters. + The pump is pumping events with no stop requested - + - Adds an XML node + The pump is pumping events but a stop has been requested - Parent node - True if recursive - The added XML node - + - Gets the element name + 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. - Element name - + - FullName filter selects tests based on their FullName + The handle on which a thread enqueuing an event with == true + waits, until the EventPump has sent the event to its listeners. - + - Construct a FullNameFilter for a single name + The downstream listener to which we send events - The name the filter will recognize. - + - Match a test against a single value. + The queue that holds our events - + - Gets the element name + Thread to do the pumping - Element name - + - IdFilter selects tests based on their id + The current state of the eventpump - + - Construct an IdFilter for a single value + Constructor - The id the filter will recognize. + The EventListener to receive events + The event queue to pull events from - + - Match a test against a single value. + Gets or sets the current state of the pump + + On volatile and , see + "http://www.albahari.com/threading/part4.aspx". + - + - Gets the element name + Gets or sets the name of this EventPump + (used only internally and for testing). - Element name - + - FullName filter selects tests based on their FullName + Dispose stops the pump + Disposes the used WaitHandle, too. - + - Construct a MethodNameFilter for a single name + Start the pump - The name the filter will recognize. - + - Match a test against a single value. + Tell the pump to stop after emptying the queue. - + - Gets the element name + 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. - Element name - + - NotFilter negates the operation of another filter + 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. - + - Construct a not filter on another filter + The Send method is implemented by derived classes to send the event to the specified listener. - The filter to be negated + The listener. - + - Gets the base filter + Gets a value indicating whether this event is delivered synchronously by the NUnit . + + If true, and if has been used to + set a WaitHandle, blocks its calling thread until the + thread has delivered the event and sets the WaitHandle. + - + - 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. + TestStartedEvent holds information needed to call the TestStarted method. - The test to which the filter is applied - True if the test passes the filter, otherwise false - + - Check whether the filter matches a test + Initializes a new instance of the class. - The test to be matched - True if it matches, otherwise false + The test. - + - 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. + Calls TestStarted on the specified listener. - The test to which the filter is applied - True if the test matches the filter explicityly, otherwise false + The listener. - + - Adds an XML node + TestFinishedEvent holds information needed to call the TestFinished method. - 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. + Initializes a new instance of the class. + The result. - + - Constructs an empty OrFilter + Calls TestFinished on the specified listener. + The listener. - + - Constructs an AndFilter from an array of filters + Implements a queue of work items each of which + is queued as a WaitCallback. - - + - Checks whether the OrFilter is matched by a test + Construct a new EventQueue - The test to be matched - True if any of the component filters pass, otherwise false - + - Checks whether the OrFilter is matched by a test + WaitHandle for synchronous event delivery in . + + Having just one handle for the whole implies that + there may be only one producer (the test thread) for synchronous events. + If there can be multiple producers for synchronous events, one would have + to introduce one WaitHandle per event. + - The test to be matched - True if any of the component filters match, otherwise false - + - Gets the element name + Gets the count of items in the queue. - Element name - + - PropertyFilter is able to select or exclude tests - based on their properties. + Sets a handle on which to wait, when is called + for an with == true. - + + The wait handle on which to wait, when is called + for an with == true. + The caller is responsible for disposing this wait handle. + - + - Construct a PropertyFilter using a property name and expected value + Enqueues the specified event - A property name - The expected value of the property + The event to enqueue. - + - Check whether the filter matches a test + Removes the first element from the queue and returns it (or null). - The test to be matched - + + 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. + + + - + - Adds an XML node + Stop processing of the queue - Parent node - True if recursive - The added XML node - + - Gets the element name + QueuingEventListener uses an EventQueue to store any + events received on its EventListener interface. - Element name - + - TestName filter selects tests based on their Name + The EvenQueue created and filled by this listener - + - Construct a TestNameFilter for a single name + A test has started - The name the filter will recognize. + The test that is starting - + - Match a test against a single value. + A test case finished + Result of the test case - + - Gets the element name + 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. - Element name - + - ValueMatchFilter selects tests based on some value, which - is expected to be contained in the test. + Construct a simple work item for a test. + The test to be executed + The filter used to select this test - + - Returns the value matched by the filter - used for testing + Method that performs actually performs the work. - + - Indicates whether the value is a regular expression + A TestWorker pulls work items from a queue + and executes them. - + - Construct a ValueMatchFilter for a single value. + Event signaled immediately before executing a WorkItem - The value to be included. - + - Match the input provided by the derived class + Event signaled immediately after executing a WorkItem - The value to be matchedT - True for a match, false otherwise. - + - Adds an XML node + Construct a new TestWorker. - Parent node - True if recursive - The added XML node + The queue from which to pull work items + The name of this worker + The apartment state to use for running tests - + - Gets the element name + The name of this worker - also used for the thread - Element name - + - GenericMethodHelper is able to deduce the Type arguments for - a generic method from the actual arguments provided. + Indicates whether the worker thread is running - + - Construct a GenericMethodHelper for a method + Our ThreadProc, which pulls and runs tests in a loop - MethodInfo for the method to examine - + - Return the type argments for the method, deducing them - from the arguments actually provided. + Start processing work items. - 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. + 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. + + + - Initializes a new instance of the class. + Creates a work item. + The test for which this WorkItem is being created. + The filter to be used in selecting any child Tests. + - + - Initializes a new instance of the class. + Construct a WorkItem for a particular test. - The message. + The test that the WorkItem will run - + - Initializes a new instance of the class. - - The message. - The inner. + 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 - + - Serialization Constructor + Event triggered when the item is complete - + - InvalidTestFixtureException is thrown when an appropriate test - fixture constructor using the provided arguments cannot be found. + Gets the current state of the WorkItem - + - Initializes a new instance of the class. + The test being executed by the work item - + - Initializes a new instance of the class. + The execution context - The message. - + - Initializes a new instance of the class. + The unique id of the worker executing this item. - The message. - The inner. - + - Serialization Constructor + The test actions to be performed before and after this test - + - The MethodWrapper class wraps a MethodInfo so that it may - be used in a platform-independent manner. + Indicates whether this WorkItem may be run in parallel - + - Construct a MethodWrapper for a Type and a MethodInfo. + The test result - + - Construct a MethodInfo for a given Type and method name. + Execute the current work item, including any + child work items. - + - Gets the Type from which this method was reflected. + Cancel (abort or stop) a WorkItem + true if the WorkItem should be aborted, false if it should run to completion - + - Gets the MethodInfo for this method. + Method that performs actually performs the work. It should + set the State to WorkItemState.Complete when done. - + - Gets the name of the method. + Method called by the derived class when all work is complete - + - Gets a value indicating whether the method is abstract. + ParallelWorkItemDispatcher handles execution of work items by + queuing them for worker threads to process. - + - Gets a value indicating whether the method is public. + Construct a ParallelWorkItemDispatcher + Number of workers to use - + - Gets a value indicating whether the method contains unassigned generic type parameters. + Enumerates all the shifts supported by the dispatcher - + - Gets a value indicating whether the method is a generic method. + Dispatch a single work item for execution. The first + work item dispatched is saved as the top-level + work item and used when stopping the run. + The item to dispatch - + - Gets a value indicating whether the MethodInfo represents the definition of a generic method. + Cancel the ongoing run completely. + If no run is in process, the call has no effect. - + - Gets the return Type of the method. + WorkItemQueueState indicates the current state of a WorkItemQueue - + - Gets the parameters of the method. + The queue is paused - - + - Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + The queue is running - + - Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. + The queue is stopped - 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 + A WorkItemQueue holds work items that are ready to + be run, either initially or after some dependency + has been satisfied. - + - Gets a value indicating whether one or more attributes of the spcified type are defined on the method. + Initializes a new instance of the class. + The name of the queue. - + - Invokes the method, converting any TargetInvocationException to an NUnitException. + Gets the name of the work item queue. - 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 + Gets the total number of items processed so far - + - Thrown when an assertion failed. Here to preserve the inner - exception and hence its stack trace. + Gets the maximum number of work items. - + - Initializes a new instance of the class. + Gets the current state of the queue - + - Initializes a new instance of the class. + Get a bool indicating whether the queue is empty. - The error message that explains - the reason for the exception - + - Initializes a new instance of the class. + Enqueue a WorkItem to be processed - The error message that explains - the reason for the exception - The exception that caused the - current exception + The WorkItem to process - + - Serialization Constructor + Dequeue a WorkItem for processing + A WorkItem or null if the queue has stopped - + - OSPlatform represents a particular operating system platform + Start or restart processing of items from the queue - + - Platform ID for Unix as defined by Microsoft .NET 2.0 and greater + Signal the queue to stop - + - Platform ID for Unix as defined by Mono + Pause the queue for restarting later - + - Platform ID for XBox as defined by .NET and Mono, but not CF + The current state of a work item - + - Platform ID for MacOSX as defined by .NET and Mono, but not CF + Ready to run or continue - + - Get the OSPlatform under which we are currently running + Work Item is executing - + - Gets the actual OS Version, not the incorrect value that might be - returned for Win 8.1 and Win 10 + Complete - - 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 + 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. - + - Product type is unknown or unspecified + Prefix used for the expected value line of a message - + - Product type is Workstation + Prefix used for the actual value line of a message - + - Product type is Domain Controller + Length of a message prefix - + - Product type is Server + Construct a TextMessageWriter - + - Construct from a platform ID and version + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + - + - Construct from a platform ID, version and product type + Gets or sets the maximum line length for this writer - + - Get the platform ID of this instance + 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 - + - Get the Version of this instance + 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 - + - Get the Product Type of this instance + 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 - + - Return true if this is a windows platform + 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 - + - Return true if this is a Unix or Linux platform + 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 - + - Return true if the platform is Win32S + Writes the text for an actual value. + The actual value. - + - Return true if the platform is Win32Windows + Writes the text for a generalized value. + The value. - + - Return true if the platform is Win32NT + 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 - + - Return true if the platform is Windows CE + Write the generic 'Expected' line for a constraint + The constraint that failed - + - Return true if the platform is Xbox + Write the generic 'Expected' line for a given value + The expected value - + - Return true if the platform is MacOSX + Write the generic 'Expected' line for a given value + and tolerance. + The expected value + The tolerance within which the test was made - + - Return true if the platform is Windows 95 + Write the generic 'Actual' line for a constraint + The ConstraintResult for which the actual value is to be written - + - Return true if the platform is Windows 98 + Write the generic 'Actual' line for a given value + The actual value causing a failure - + - Return true if the platform is Windows ME + GenericMethodHelper is able to deduce the Type arguments for + a generic method from the actual arguments provided. - + - Return true if the platform is NT 3 + Construct a GenericMethodHelper for a method + MethodInfo for the method to examine - + - Return true if the platform is NT 4 + Return the type argments for the method, deducing them + from the arguments actually provided. + The arguments to the method + An array of type arguments. - + - Return true if the platform is NT 5 + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - + - Return true if the platform is Windows 2000 + Initializes a new instance of the class. - + - Return true if the platform is Windows XP + Initializes a new instance of the class. + The message. - + - Return true if the platform is Windows 2003 Server + Initializes a new instance of the class. + The message. + The inner. - + - Return true if the platform is NT 6 + Serialization Constructor - + - Return true if the platform is NT 6.0 + 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. + - + - Return true if the platform is NT 6.1 + Initial seed used to create randomizers for this run - + - Return true if the platform is NT 6.2 + Get a Randomizer for a particular member, returning + one that has already been created if it exists. + This ensures that the same _values are generated + each time the tests are reloaded. - + - Return true if the platform is NT 6.3 + 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. - + - Return true if the platform is Vista + Create a new Randomizer using the next seed + available to ensure that each randomizer gives + a unique sequence of values. + - + - Return true if the platform is Windows 2008 Server (original or R2) + Default constructor - + - Return true if the platform is Windows 2008 Server (original) + Construct based on seed value + - + - Return true if the platform is Windows 2008 Server R2 + Returns a random unsigned int. - + - Return true if the platform is Windows 2012 Server (original or R2) + Returns a random unsigned int less than the specified maximum. - + - Return true if the platform is Windows 2012 Server (original) + Returns a random unsigned int within a specified range. - + - Return true if the platform is Windows 2012 Server R2 + Returns a non-negative random short. - + - Return true if the platform is Windows 7 + Returns a non-negative random short less than the specified maximum. - + - Return true if the platform is Windows 8 + Returns a non-negative random short within a specified range. - + - Return true if the platform is Windows 8.1 + Returns a random unsigned short. - + - Return true if the platform is Windows 10 + Returns a random unsigned short less than the specified maximum. - + - Return true if the platform is Windows Server. This is named Windows - Server 10 to distinguish it from previous versions of Windows Server. + Returns a random unsigned short within a specified range. - + - The ParameterWrapper class wraps a ParameterInfo so that it may - be used in a platform-independent manner. + Returns a random long. - + - Construct a ParameterWrapper for a given method and parameter + Returns a random long less than the specified maximum. - - - + - Gets a value indicating whether the parameter is optional + Returns a non-negative random long within a specified range. - + - Gets an IMethodInfo representing the method for which this is a parameter. + Returns a random ulong. - + - Gets the underlying ParameterInfo + Returns a random ulong less than the specified maximum. - + - Gets the Type of the parameter + Returns a non-negative random long within a specified range. - + - Returns an array of custom attributes of the specified type applied to this method + Returns a random Byte - + - Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. + Returns a random Byte less than the specified maximum. - + - PlatformHelper class is used by the PlatformAttribute class to - determine whether a platform is supported. + Returns a random Byte within a specified range - + - Comma-delimited list of all supported OS platform constants + Returns a random SByte - + - Comma-delimited list of all supported Runtime platform constants + Returns a random sbyte less than the specified maximum. - + - Default constructor uses the operating system and - common language runtime of the system. + Returns a random sbyte within a specified range - + - Construct a PlatformHelper for a particular operating - system and common language runtime. Used in testing. + Returns a random bool - OperatingSystem to be used - RuntimeFramework to be used - + - Test to determine if one of a collection of platforms - is being used currently. + Returns a random bool based on the probablility a true result - - - + - Tests to determine if the current platform is supported - based on a platform attribute. + Returns a random double between 0.0 and the specified maximum. - The attribute to examine - - + - Tests to determine if the current platform is supported - based on a platform attribute. + Returns a random double within a specified range. - The attribute to examine - - + - Test to determine if the a particular platform or comma- - delimited set of platforms is in use. + Returns a random float. - 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. + Returns a random float between 0.0 and the specified maximum. - + - 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. + Returns a random float within a specified range. - + - Adds a key/value pair to the property set + Returns a random enum value of the specified Type as an object. - The key - The value - + - Sets the value for a key, removing any other - _values that are already in the property set. + Returns a random enum value of the specified Type. - - - + - Gets a single value for a key, using the first - one if multiple _values are present and returning - null if the value is not found. + Default characters for random functions. - - + Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore - + - Gets a flag indicating whether the specified key has - any entries in the property set. + Generate a random string based on the characters from the input string. - The key to be checked - - True if their are _values present, otherwise false - + desired length of output string. + string representing the set of characters from which to construct the resulting string + A random string of arbitrary length - + - Gets a collection containing all the keys in the property set + 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 - + - Gets or sets the list of _values for a particular key + 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 an XmlNode representating the current PropertyBag. + Returns a random decimal. - Not used - An XmlNode representing the PropertyBag - + - Returns an XmlNode representing the PropertyBag after - adding it as a child of the supplied parent node. + Returns a random decimal between positive zero and the specified maximum. - The parent node. - Not used - - + - The PropertyNames class provides static constants for the - standard property ids that NUnit uses on tests. + 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. + - + - The FriendlyName of the AppDomain in which the assembly is running + StackFilter class is used to remove internal NUnit + entries from a stack trace so that the resulting + trace provides better information about the test. - + - The selected strategy for joining parameter data into test cases + Filters a raw stack trace and returns the result. + The original stack trace + A filtered stack trace - + - The process ID of the executing assembly + Provides methods to support legacy string comparison methods. - + - The stack trace from any data provider that threw - an exception. + 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 - + - The reason a test was not run + 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 author of the tests + The TestCaseParameters class encapsulates method arguments and + other selected parameters needed for constructing + a parameterized test case. - + - The ApartmentState required for running the test + Default Constructor creates an empty parameter set - + - The categories applying to a test + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - + - The Description of a test + Construct a parameter set with a list of arguments + - + - The number of threads to be used in running tests + Construct a ParameterSet from an object implementing ITestCaseData + - + - The maximum time in ms, above which the test is considered to have failed + Type arguments used to create a generic fixture instance - + - The ParallelScope associated with a test + TestParameters is the abstract base class for all classes + that know how to provide data for constructing a test. - + - The number of times the test should be repeated + Default Constructor creates an empty parameter set - + - Indicates that the test should be run on a separate thread + Construct a parameter set with a list of arguments + - + - The culture to be set for a test + Construct a non-runnable ParameterSet, specifying + the provider exception that made it invalid. - + - The UI culture to be set for a test + Construct a ParameterSet from an object implementing ITestData + - + - The type that is under test + The RunState for this set of parameters. - + - The timeout value for the test + The arguments to be used in running the test, + which must match the method signature. - + - The test will be ignored until the given date + A name to be used for this test case in lieu + of the standard generated name containing + the argument list. - + - 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. + Gets the property dictionary for this test - - 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 + Applies ParameterSet _values to the test itself. + A test. - + - Get a Randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same _values are generated - each time the tests are reloaded. + The original arguments provided by the user, + used for display purposes. - + - 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. + Enumeration indicating whether the tests are + running normally or being cancelled. - + - Create a new Randomizer using the next seed - available to ensure that each randomizer gives - a unique sequence of values. + Running normally with no stop requested - - + - Default constructor + A graceful stop has been requested - + - Construct based on seed value + A forced stop has been requested - - + - Returns a random unsigned int. + The PropertyNames class provides static constants for the + standard property ids that NUnit uses on tests. - + - Returns a random unsigned int less than the specified maximum. + The FriendlyName of the AppDomain in which the assembly is running - + - Returns a random unsigned int within a specified range. + The selected strategy for joining parameter data into test cases - + - Returns a non-negative random short. + The process ID of the executing assembly - + - Returns a non-negative random short less than the specified maximum. + The stack trace from any data provider that threw + an exception. - + - Returns a non-negative random short within a specified range. + The reason a test was not run - + - Returns a random unsigned short. + The author of the tests - + - Returns a random unsigned short less than the specified maximum. + The ApartmentState required for running the test - + - Returns a random unsigned short within a specified range. + The categories applying to a test - + - Returns a random long. + The Description of a test - + - Returns a random long less than the specified maximum. + The number of threads to be used in running tests - + - Returns a non-negative random long within a specified range. + The maximum time in ms, above which the test is considered to have failed - + - Returns a random ulong. + The ParallelScope associated with a test - + - Returns a random ulong less than the specified maximum. + The number of times the test should be repeated - + - Returns a non-negative random long within a specified range. + Indicates that the test should be run on a separate thread - + - Returns a random Byte + The culture to be set for a test - + - Returns a random Byte less than the specified maximum. + The UI culture to be set for a test - + - Returns a random Byte within a specified range + The type that is under test - + - Returns a random SByte + The timeout value for the test - + - Returns a random sbyte less than the specified maximum. + The test will be ignored until the given date - + - Returns a random sbyte within a specified range + The optional Order the test will run in - + - Returns a random bool + CultureDetector is a helper class used by NUnit to determine + whether a test should be run based on the current culture. - + - Returns a random bool based on the probablility a true result + Default constructor uses the current culture. - + - Returns a random double between 0.0 and the specified maximum. + Construct a CultureDetector for a particular culture for testing. + The culture to be used - + - Returns a random double within a specified range. + Test to determine if one of a collection of cultures + is being used currently. + + - + - Returns a random float. + Tests to determine if the current culture is supported + based on a culture attribute. + The attribute to examine + - + - Returns a random float between 0.0 and the specified maximum. + 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 - + - Returns a random float within a specified range. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - + - Returns a random enum value of the specified Type as an object. + ExceptionHelper provides static methods for working with exceptions - + - Returns a random enum value of the specified Type. + Rethrows an exception, preserving its stack trace + The exception to rethrow - + - Default characters for random functions. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. - Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore + The exception. + A combined message string. - + - Generate a random string based on the characters from the input string. + Builds up a message, using the Message field of the specified exception + as well as any InnerExceptions. - desired length of output string. - string representing the set of characters from which to construct the resulting string - A random string of arbitrary length + The exception. + A combined stack trace. - + - Generate a random string based on the characters from the input string. + Gets the stack trace of the exception. - desired length of output string. - A random string of arbitrary length - Uses DefaultStringChars as the input character set + The exception. + A string representation of the stack trace. - + - Generate a random string based on the characters from the input string. + InvalidTestFixtureException is thrown when an appropriate test + fixture constructor using the provided arguments cannot be found. - A random string of the default length - Uses DefaultStringChars as the input character set - + - Returns a random decimal. + Initializes a new instance of the class. - + - Returns a random decimal between positive zero and the specified maximum. + Initializes a new instance of the class. + The message. - + - Returns a random decimal within a specified range, which is not - permitted to exceed decimal.MaxVal in the current implementation. + Initializes a new instance of the class. - - A limitation of this implementation is that the range from min - to max must not exceed decimal.MaxVal. - + The message. + The inner. - + - 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. + Serialization Constructor - + - Examine a fixture type and return an array of methods having a - particular attribute. The array is order with base methods first. + Thrown when an assertion failed. Here to preserve the inner + exception and hence its stack trace. - 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. + Initializes a new instance of the class. - The type to examine - The attribute Type to look for - True if found, otherwise false - + - Invoke the default constructor on a Type + Initializes a new instance of the class. - The Type to be constructed - An instance of the Type + The error message that explains + the reason for the exception - + - Invoke a constructor on a Type with arguments + Initializes a new instance of the class. - The Type to be constructed - Arguments to the constructor - An instance of the Type + The error message that explains + the reason for the exception + The exception that caused the + current exception - + - Returns an array of types from an array of objects. - Used because the compact framework doesn't support - Type.GetTypeArray() + Serialization Constructor - An array of objects - An array of Types - + - Invoke a parameterless method returning void on an object. + OSPlatform represents a particular operating system platform - 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. + Platform ID for Unix as defined by Microsoft .NET 2.0 and greater - 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. + Platform ID for Unix as defined by Mono - + - Error message for when child tests have errors + Platform ID for XBox as defined by .NET and Mono, but not CF - + - Error message for when child tests are ignored + Platform ID for MacOSX as defined by .NET and Mono, but not CF - + - The minimum duration for tests + Get the OSPlatform under which we are currently running - + - List of child results + 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 - + - Construct a test result given a Test + Product Type Enumeration used for Windows - The test to be used - + - Gets the test with which this result is associated. + Product type is unknown or unspecified - + - Gets the ResultState of the test result, which - indicates the success or failure of the test. + Product type is Workstation - + - Gets the name of the test result + Product type is Domain Controller - + - Gets the full name of the test result + Product type is Server - + - Gets or sets the elapsed time for running the test in seconds + Construct from a platform ID and version - + - Gets or sets the time the test started running. + Construct from a platform ID, version and product type - + - Gets or sets the time the test finished running. + Get the platform ID of this instance - + - Gets the message associated with a test - failure or with not running the test + Get the Version of this instance - + - Gets any stacktrace associated with an - error or failure. + Get the Product Type of this instance - + - Gets or sets the count of asserts executed - when running the test. + Return true if this is a windows platform - + - Gets the number of test cases that failed - when running the test and all its children. + Return true if this is a Unix or Linux platform - + - Gets the number of test cases that passed - when running the test and all its children. + Return true if the platform is Win32S - + - Gets the number of test cases that were skipped - when running the test and all its children. + Return true if the platform is Win32Windows - + - Gets the number of test cases that were inconclusive - when running the test and all its children. + Return true if the platform is Win32NT - + - Indicates whether this result has any child results. - Test HasChildren before accessing Children to avoid - the creation of an empty collection. + Return true if the platform is Windows CE - + - Gets the collection of child results. + Return true if the platform is Xbox - + - Gets a TextWriter, which will write output to be included in the result. + Return true if the platform is MacOSX - + - Gets any text output written to this result. + Return true if the platform is Windows 95 - + - Returns the Xml representation of the result. + Return true if the platform is Windows 98 - 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.. + Return true if the platform is Windows ME - The parent node. - If true, descendant results are included - - + - Adds a child result to this result, setting this result's - ResultState to Failure if the child result failed. + Return true if the platform is NT 3 - The result to be added - + - Set the result of the test + Return true if the platform is NT 4 - The ResultState to use in the result - + - Set the result of the test + Return true if the platform is NT 5 - The ResultState to use in the result - A message associated with the result state - + - Set the result of the test + Return true if the platform is Windows 2000 - 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 + Return true if the platform is Windows XP - The exception that was thrown - + - Set the test result based on the type of exception thrown + Return true if the platform is Windows 2003 Server - 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. + Return true if the platform is NT 6 - The Exception to be recorded - + - Adds a reason element to a node and returns it. + Return true if the platform is NT 6.0 - The target node. - The new reason element. - + - Adds a failure element to a node and returns it. + Return true if the platform is NT 6.1 - The target node. - The new failure element. - + - Enumeration identifying a common language - runtime implementation. + Return true if the platform is NT 6.2 - - 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. + Return true if the platform is NT 6.3 - + - DefaultVersion is an empty Version, used to indicate that - NUnit should select the CLR version to use for the test. + Return true if the platform is Vista - + - 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. + Return true if the platform is Windows 2008 Server (original or R2) - 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. + Return true if the platform is Windows 2008 Server (original) - + - Returns the Display name for this framework + Return true if the platform is Windows 2008 Server R2 - + - 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'. + Return true if the platform is Windows 2012 Server (original or R2) - - - + - Overridden to return the short name of the framework + Return true if the platform is Windows 2012 Server (original) - - + - 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. + Return true if the platform is Windows 2012 Server R2 - 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. + Return true if the platform is Windows 7 - + - Filters a raw stack trace and returns the result. + Return true if the platform is Windows 8 - The original stack trace - A filtered stack trace - + - Provides methods to support legacy string comparison methods. + Return true if the platform is Windows 8.1 - + - Compares two strings for equality, ignoring case if requested. + Return true if the platform is Windows 10 - 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. + Return true if the platform is Windows Server. This is named Windows + Server 10 to distinguish it from previous versions of Windows Server. - The first 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. @@ -4045,11398 +3919,11971 @@ 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 + PlatformHelper class is used by the PlatformAttribute class to + determine whether a platform is supported. - + - Indicates that a stop has been requested + Comma-delimited list of all supported OS platform constants - + - The event listener currently receiving notifications + Comma-delimited list of all supported Runtime platform constants - + - The number of assertions for the current test + Default constructor uses the operating system and + common language runtime of the system. - + - The current culture + Construct a PlatformHelper for a particular operating + system and common language runtime. Used in testing. + OperatingSystem to be used + RuntimeFramework to be used - + - The current UI culture + Test to determine if one of a collection of platforms + is being used currently. + + - + - The current test result + Tests to determine if the current platform is supported + based on a platform attribute. + The attribute to examine + - + - The current Principal. + Tests to determine if the current platform is supported + based on a platform attribute. + The attribute to examine + - + - Initializes a new instance of the class. + 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 - + - Initializes a new instance of the class. + Return the last failure reason. Results are not + defined if called before IsSupported( Attribute ) + is called. - An existing instance of TestExecutionContext. - + - The current context, head of the list of saved contexts. + 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. - + - Gets the current context. + Adds a key/value pair to the property set - The current context. + The key + The value - + - Get the current context or return null if none is found. + Sets the value for a key, removing any other + _values that are already in the property set. + + - + - Clear the current context. This is provided to - prevent "leakage" of the CallContext containing - the current context back to any runners. + 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 or sets the current test + 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 + - + - The time the current test started execution + Gets a collection containing all the keys in the property set + - + - The time the current test started in Ticks + Gets or sets the list of _values for a particular key - + - Gets or sets the current test result + Returns an XmlNode representating the current PropertyBag. + Not used + An XmlNode representing the PropertyBag - + - Gets a TextWriter that will send output to the current test result. + Returns an XmlNode representing the PropertyBag after + adding it as a child of the supplied parent node. + The parent node. + Not used + - + - The current test object - that is the user fixture - object on which tests are being executed. + 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. - + - Get or set the working directory + 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 - + - Get or set indicator that run should stop on the first error - - - - - Gets an enum indicating whether a stop has been requested. + 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 - + - The current test event listener + Invoke the default constructor on a Type + The Type to be constructed + An instance of the Type - + - The current WorkItemDispatcher + Invoke a constructor on a Type with arguments + The Type to be constructed + Arguments to the constructor + An instance of the Type - + - The ParallelScope to be used by tests running in this context. - For builds with out the parallel feature, it has no effect. + 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 - + - Gets the RandomGenerator specific to this Test + 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 - + - Gets the assert count. + Invoke a method, converting any TargetInvocationException to an NUnitException. - The assert count. + 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 - + - Gets or sets the test case timeout value + The TestResult class represents the result of a test. - + - Gets a list of ITestActions set by upstream tests + Error message for when child tests have errors - + - Saves or restores the CurrentCulture + Error message for when child tests are ignored - + - Saves or restores the CurrentUICulture + The minimum duration for tests - + - Gets or sets the current for the Thread. + List of child results - + - 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. + Construct a test result given a Test + The test to be used - + - 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. + Gets the test with which this result is associated. - + - Increments the assert count by one. + Gets the ResultState of the test result, which + indicates the success or failure of the test. - + - Increments the assert count by a specified amount. + Gets the name of the test result - + - Obtain lifetime service object + Gets the full name of the test result - - + - Enumeration indicating whether the tests are - running normally or being cancelled. + Gets or sets the elapsed time for running the test in seconds - + - Running normally with no stop requested + Gets or sets the time the test started running. - + - A graceful stop has been requested + Gets or sets the time the test finished running. - + - A forced stop has been requested + Gets the message associated with a test + failure or with not running the test - + - 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. + Gets any stacktrace associated with an + error or failure. - + - Unique Empty filter. + Gets or sets the count of asserts executed + when running the test. - + - Indicates whether this is the EmptyFilter + Gets the number of test cases that failed + when running the test and all its children. - + - Indicates whether this is a top-level filter, - not contained in any other filter. + Gets the number of test cases that passed + when running the test and all its children. - + - 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. + Gets the number of test cases that were skipped + when running the test and all its children. - 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. + Gets the number of test cases that were inconclusive + when running the test and all its 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. + Indicates whether this result has any child results. + Test HasChildren before accessing Children to avoid + the creation of an empty collection. - 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 + Gets the collection of child results. - 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. + Gets a TextWriter, which will write output to be included in the result. - The test to be matched - True if at least one descendant matches the filter criteria - + - Create a TestFilter instance from an xml representation. + Gets any text output written to this result. - + - Create a TestFilter from it's TNode representation + Returns the Xml representation of the result. + If true, descendant results are included + An XmlNode representing the result - + - Nested class provides an empty filter - one that always - returns true when called. It never matches explicitly. + Adds the XML representation of the result as a child of the + supplied parent node.. + The parent node. + If true, descendant results are included + - + - Adds an XML node + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. - True if recursive - The added XML node + The result to be added - + - Adds an XML node + Set the result of the test - Parent node - True if recursive - The added XML node + The ResultState to use in the result - + - The TestCaseParameters class encapsulates method arguments and - other selected parameters needed for constructing - a parameterized test case. + Set the result of the test + The ResultState to use in the result + A message associated with the result state - + - Default Constructor creates an empty parameter set + 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 - + - Construct a non-runnable ParameterSet, specifying - the provider exception that made it invalid. + Set the test result based on the type of exception thrown + The exception that was thrown - + - Construct a parameter set with a list of arguments + Set the test result based on the type of exception thrown - + The exception that was thrown + THe FailureSite to use in the result - + - Construct a ParameterSet from an object implementing ITestCaseData + 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 - + - Type arguments used to create a generic fixture instance + Adds a reason element to a node and returns it. + The target node. + The new reason element. - + - TestListener provides an implementation of ITestListener that - does nothing. It is used only through its NULL property. + Adds a failure element to a node and returns it. + The target node. + The new failure element. - + - Called when a test has just started + Enumeration identifying a common language + runtime implementation. - The test that is starting - - - Called when a test case has finished - - The result of the test + + Any supported runtime framework - + + Microsoft .NET Framework + + + Microsoft .NET Compact Framework + + + Microsoft Shared Source CLI + + + Mono + + + Silverlight + + + MonoTouch + + - Construct a new TestListener - private so it may not be used. + RuntimeFramework represents a particular version + of a common language runtime implementation. - + - Get a listener that does nothing + DefaultVersion is an empty Version, used to indicate that + NUnit should select the CLR version to use for the test. - + - TestNameGenerator is able to create test names according to - a coded pattern. + 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 - + - Construct a TestNameGenerator + Static method to return a RuntimeFramework object + for the framework that is currently in use. - The pattern used by this generator. - + - Get the display name for a TestMethod and it's arguments + The type of this runtime framework - A TestMethod - The display name - + - Get the display name for a TestMethod and it's arguments + The framework version for this runtime framework - A TestMethod - Arguments to be used - The display name - + - Get the display name for a MethodInfo + The CLR version for this runtime framework - A MethodInfo - The display name - + - Get the display name for a method with args + Return true if any CLR version may be used in + matching this RuntimeFramework object. - A MethodInfo - Argument list for the method - The display name - + - TestParameters is the abstract base class for all classes - that know how to provide data for constructing a test. + Returns the Display name for this framework - + - Default Constructor creates an empty parameter set + 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'. + + - + - Construct a parameter set with a list of arguments + Overridden to return the short name of the framework - + - + - Construct a non-runnable ParameterSet, specifying - the provider exception that made it invalid. + 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. + + + - Construct a ParameterSet from an object implementing ITestData + Link to a prior saved context - - + - The RunState for this set of parameters. + Indicates that a stop has been requested - + - The arguments to be used in running the test, - which must match the method signature. + The event listener currently receiving notifications - + - A name to be used for this test case in lieu - of the standard generated name containing - the argument list. + The number of assertions for the current test - + - Gets the property dictionary for this test + The current culture - + - Applies ParameterSet _values to the test itself. + The current UI culture - A test. - + - The original arguments provided by the user, - used for display purposes. + The current test result - + - TestProgressReporter translates ITestListener events into - the async callbacks that are used to inform the client - software about the progress of a test run. + The current Principal. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The callback handler to be used for reporting progress. - + - Called when a test has just started + Initializes a new instance of the class. - The test that is starting + An existing instance of TestExecutionContext. - + - Called when a test has finished. Sends a result summary to the callback. - to + The current context, head of the list of saved contexts. - The result of the test - + - Returns the parent test item for the targer test item if it exists + Gets the current context. - - parent test item + The current context. - + - Makes a string safe for use as an attribute, replacing - characters characters that can't be used with their - corresponding xml representations. + Get the current context or return null if none is found. - 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. + Clear the current context. This is provided to + prevent "leakage" of the CallContext containing + the current context back to any runners. - + - Initializes a new instance of the class. + Gets or sets the current test - The ITypeInfo for the type that represents the suite. - + - Gets a string representing the type of test + The time the current test started execution - - + - ParameterizedMethodSuite holds a collection of individual - TestMethods with their arguments applied. + The time the current test started in Ticks - + - Construct from a MethodInfo + Gets or sets the current test result - - + - Gets a string representing the type of test + Gets a TextWriter that will send output to the current test result. - - + - SetUpFixture extends TestSuite and supports - Setup and TearDown methods. + The current test object - that is the user fixture + object on which tests are being executed. - + - Initializes a new instance of the class. + Get or set the working directory - The type. - + - The Test abstract class represents a test within the framework. + Get or set indicator that run should stop on the first error - + - Static value to seed ids. It's started at 1000 so any - uninitialized ids will stand out. + Gets an enum indicating whether a stop has been requested. - + - The SetUp methods. + The current test event listener - + - The teardown methods + The current WorkItemDispatcher - + - Constructs a test given its name + The ParallelScope to be used by tests running in this context. + For builds with out the parallel feature, it has no effect. - The name of the test - + - Constructs a test given the path through the - test hierarchy to its parent and a name. + The unique name of the worker that spawned the context. + For builds with out the parallel feature, it is null. - The parent tests full name - The name of the test - + - TODO: Documentation needed for constructor + Gets the RandomGenerator specific to this Test - - + - Construct a test from a MethodInfo + Gets the assert count. - + The assert count. - + - Gets or sets the id of the test + Gets or sets the test case timeout value - - + - Gets or sets the name of the test + Gets a list of ITestActions set by upstream tests - + - Gets or sets the fully qualified name of the test + Saves or restores the CurrentCulture - - + - Gets the name of the class containing this test. Returns - null if the test is not associated with a class. + Saves or restores the CurrentUICulture - + - Gets the name of the method implementing this test. - Returns null if the test is not implemented as a method. + Gets or sets the current for the Thread. - + - Gets the TypeInfo of the fixture used in running this test - or null if no fixture type is associated with it. + The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter - + - Gets a MethodInfo for the method implementing this test. - Returns null if the test is not implemented as a method. + If true, all tests must run on the same thread. No new thread may be spawned. - + - Whether or not the test should be run + 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. - + - Gets the name used for the top-level element in the - XML representation of this test + 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. - + - 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. + Increments the assert count by one. - + - Gets a count of test cases represented by - or contained under this test. + Increments the assert count by a specified amount. - + - Gets the properties for this test + Adds a new ValueFormatterFactory to the chain of formatters + The new factory - + - Returns true if this is a TestSuite + Obtain lifetime service object + - + - Gets a bool indicating whether the current test - has any descendant tests. + 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. - + - Gets the parent as a Test object. - Used by the core to set the parent. + Unique Empty filter. - + - Gets this test's child tests + Indicates whether this is the EmptyFilter - A list of child tests - + - Gets or sets a fixture object for running this test. + Indicates whether this is a top-level filter, + not contained in any other filter. - + - Static prefix used for ids in this AppDomain. - Set by FrameworkController. + Determine if a particular test passes the filter criteria. The default + implementation checks the test itself, its parents and any descendants. + + Derived classes may override this method or any of the Match methods + to change the behavior of the filter. + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Gets or Sets the Int value representing the seed for the RandomGenerator + 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 - + - Creates a TestResult for this test. + 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. - A TestResult suitable for this type of test. + The test to which the filter is applied + True if the filter matches the any parent of the 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. + Determine whether any ancestor of the test matches the filter criteria - An object implementing ICustomAttributeProvider + The test to which the filter is applied + True if the filter matches the an ancestor of the test - + - Add standard attributes and members to a test node. + 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 - + - Returns the Xml representation of the test + Create a TestFilter instance from an xml representation. - If true, include child tests recursively - - + - Returns an XmlNode representing the current result after - adding it as a child of the supplied parent node. + Create a TestFilter from it's TNode representation - The parent node. - If true, descendant results are included - - + - Compares this test to another test for sorting purposes + Nested class provides an empty filter - one that always + returns true when called. It never matches explicitly. - 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. + Adds an XML node + True if recursive + The added XML node - + - Initializes a new instance of the class - specifying the Assembly and the path from which it was loaded. + Adds an XML node - The assembly this test represents. - The path used to load the assembly. + Parent node + True if recursive + The added XML node - + - Initializes a new instance of the class - for a path which could not be loaded. + TestListener provides an implementation of ITestListener that + does nothing. It is used only through its NULL property. - The path used to load the assembly. - + - Gets the Assembly represented by this instance. + Called when a test has just started + The test that is starting - + - Gets the name used for the top-level element in the - XML representation of this test + Called when a test case has finished + The result of the test - + - TestFixture is a surrogate for a user test fixture class, - containing one or more tests. + Construct a new TestListener - private so it may not be used. - + - Initializes a new instance of the class. + Get a listener that does nothing - Type of the fixture. - + - The TestMethod class represents a Test implemented as a method. + TestProgressReporter translates ITestListener events into + the async callbacks that are used to inform the client + software about the progress of a test run. - + - The ParameterSet used to create this test method + Initializes a new instance of the class. + The callback handler to be used for reporting progress. - + - Initializes a new instance of the class. + Called when a test has just started - The method to be used as a test. + The test that is starting - + - Initializes a new instance of the class. + Called when a test has finished. Sends a result summary to the callback. + to - The method to be used as a test. - The suite or fixture to which the new test will be added + The result of the test - + - Overridden to return a TestCaseResult. + Returns the parent test item for the targer test item if it exists - A TestResult for this test. + + parent test item - + - Gets a bool indicating whether the current test - has any descendant tests. + Makes a string safe for use as an attribute, replacing + characters characters that can't be used with their + corresponding xml representations. + The string to be used + A new string with the _values replaced - + - Returns a TNode representing the current result after - adding it as a child of the supplied parent node. + ParameterizedFixtureSuite serves as a container for the set of test + fixtures created from a given Type using various parameters. - The parent node. - If true, descendant results are included - - + - Gets this test's child tests + Initializes a new instance of the class. - A list of child tests + The ITypeInfo for the type that represents the suite. - + - Gets the name used for the top-level element in the - XML representation of this test + Gets a string representing the type of test + - + - Returns the name of the method + ParameterizedMethodSuite holds a collection of individual + TestMethods with their arguments applied. - + - TestSuite represents a composite test, which contains other tests. + Construct from a MethodInfo + - + - Our collection of child tests + Gets a string representing the type of test + - + - Initializes a new instance of the class. + SetUpFixture extends TestSuite and supports + Setup and TearDown methods. - The name of the suite. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - Name of the parent suite. - The name of the suite. + The type. - + - Initializes a new instance of the class. + The Test abstract class represents a test within the framework. - Type of the fixture. - + - Initializes a new instance of the class. + Static value to seed ids. It's started at 1000 so any + uninitialized ids will stand out. - Type of the fixture. - + - Sorts tests under this suite. + The SetUp methods. - + - Adds a test to the suite. + The teardown methods - The test. - + - Gets this test's child tests + Constructs a test given its name - The list of child tests + The name of the test - + - Gets a count of test cases represented by - or contained under this 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 - + - The arguments to use in creating the fixture + TODO: Documentation needed for constructor + - + - Set to true to suppress sorting this suite's contents + Construct a test from a MethodInfo + - + - Overridden to return a TestSuiteResult. + Gets or sets the id of the test - A TestResult for this test. + - + - Gets a bool indicating whether the current test - has any descendant tests. + Gets or sets the name of the test - + - Gets the name used for the top-level element in the - XML representation of this test + Gets or sets the fully qualified name of the test + - + - Returns an XmlNode representing the current result after - adding it as a child of the supplied parent node. + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. - 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. + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. - The attribute type to check for - + - ThreadUtility provides a set of static methods convenient - for working with threads. + Gets the TypeInfo of the fixture used in running this test + or null if no fixture type is associated with it. - + - Do our best to Kill a thread + Gets a MethodInfo for the method implementing this test. + Returns null if the test is not implemented as a method. - The thread to kill - + - Do our best to kill a thread, passing state info + Whether or not the test should be run - The thread to kill - Info for the ThreadAbortException handler - + - TypeHelper provides static methods that operate on Types. + Gets the name used for the top-level element in the + XML representation of this test - + - A special value, which is used to indicate that BestCommonType() method - was unable to find a common type for the specified arguments. + 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 the display name for a Type as used by NUnit. + Gets a count of test cases represented by + or contained under this test. - 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. + Gets the properties for this test - 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. + Returns true if this is a TestSuite - The first type. - The second type. - Either type1 or type2, depending on which is more general. - + - Determines whether the specified type is numeric. + Gets a bool indicating whether the current test + has any descendant tests. - 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. + Gets the parent as a Test object. + Used by the core to set the parent. - 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. + Gets this test's child tests - 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. - + A list of child tests - + - Gets the _values for an enumeration, using Enum.GetTypes - where available, otherwise through reflection. + Gets or sets a fixture object for running this test. - - - + - Gets the ids of the _values for an enumeration, - using Enum.GetNames where available, otherwise - through reflection. + Static prefix used for ids in this AppDomain. + Set by FrameworkController. - - - + - The TypeWrapper class wraps a Type so it may be used in - a platform-independent manner. + Gets or Sets the Int value representing the seed for the RandomGenerator + - + - Construct a TypeWrapper for a specified Type. + Creates a TestResult for this test. + A TestResult suitable for this type of test. - + - Gets the underlying Type on which this TypeWrapper is based. + 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 - + - Gets the base type of this type as an ITypeInfo + Add standard attributes and members to a test node. + + - + - Gets the Name of the Type + Returns the Xml representation of the test + If true, include child tests recursively + - + - Gets the FullName of the Type + 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 + - + - Gets the assembly in which the type is declared + 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 - + - Gets the namespace of the Type + TestAssembly is a TestSuite that represents the execution + of tests in a managed assembly. - + - Gets a value indicating whether the type is abstract. + 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. - + - Gets a value indicating whether the Type is a generic Type + Initializes a new instance of the class + for a path which could not be loaded. + The path used to load the assembly. - + - Returns true if the Type wrapped is T + Gets the Assembly represented by this instance. - + - Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + Gets the name used for the top-level element in the + XML representation of this test - + - Gets a value indicating whether the Type is a generic Type definition + TestFixture is a surrogate for a user test fixture class, + containing one or more tests. - + - Gets a value indicating whether the type is sealed. + Initializes a new instance of the class. + Type of the fixture. - + - Gets a value indicating whether this type represents a static class. + The TestMethod class represents a Test implemented as a method. - + - Get the display name for this type + The ParameterSet used to create this test method - + - Get the display name for an object of this type, constructed with the specified args. + Initializes a new instance of the class. + The method to be used as a test. - + - Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + 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 - + - Returns a Type representing a generic type definition from which this Type can be constructed. + Overridden to return a TestCaseResult. + A TestResult for this test. - + - Returns an array of custom attributes of the specified type applied to this type + Gets a bool indicating whether the current test + has any descendant tests. - + - Returns a value indicating whether the type has an attribute of the specified type. + 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 - + - Returns a flag indicating whether this type has a method with an attribute of the specified type. + Gets this test's child tests - - + A list of child tests - + - Returns an array of IMethodInfos for methods of this Type - that match the specified flags. + Gets the name used for the top-level element in the + XML representation of this test - + - Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + Returns the name of the method - + - Construct an object of this Type, using the specified arguments. + TestSuite represents a composite test, which contains other tests. - + - Override ToString() so that error messages in NUnit's own tests make sense + Our collection of child tests - + - Represents the result of running a single test case. + Initializes a new instance of the class. + The name of the suite. - + - Construct a TestCaseResult based on a TestMethod + Initializes a new instance of the class. - A TestMethod to which the result applies. + Name of the parent suite. + The name of the suite. - + - Gets the number of test cases that failed - when running the test and all its children. + Initializes a new instance of the class. + Type of the fixture. - + - Gets the number of test cases that passed - when running the test and all its children. + Initializes a new instance of the class. + Type of the fixture. - + - Gets the number of test cases that were skipped - when running the test and all its children. + Sorts tests under this suite. - + - Gets the number of test cases that were inconclusive - when running the test and all its children. + Adds a test to the suite. + The test. - + - Represents the result of running a test suite + Gets this test's child tests + The list of child tests - + - Construct a TestSuiteResult base on a TestSuite + Gets a count of test cases represented by + or contained under this test. - The TestSuite to which the result applies + - + - Gets the number of test cases that failed - when running the test and all its children. + The arguments to use in creating the fixture - + - Gets the number of test cases that passed - when running the test and all its children. + Set to true to suppress sorting this suite's contents - + - Gets the number of test cases that were skipped - when running the test and all its children. + Overridden to return a TestSuiteResult. + A TestResult for this test. - + - Gets the number of test cases that were inconclusive - when running the test and all its children. + Gets a bool indicating whether the current test + has any descendant tests. - + - Add a child result + Gets the name used for the top-level element in the + XML representation of this test - The child result to be added - + - Class used to guard against unexpected argument values - or operations by throwing an appropriate exception. + 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 + - + - Throws an exception if an argument is null + Check that setup and teardown methods marked by certain attributes + meet NUnit's requirements and mark the tests not runnable otherwise. - The value to be tested - The name of the argument + The attribute type to check for - + - Throws an exception if a string argument is null or empty + ThreadUtility provides a set of static methods convenient + for working with threads. - The value to be tested - The name of the argument - + - Throws an ArgumentOutOfRangeException if the specified condition is not met. + Do our best to Kill a thread - The condition that must be met - The exception message to be used - The name of the argument + The thread to kill - + - Throws an ArgumentException if the specified condition is not met. + Do our best to kill a thread, passing state info - The condition that must be met - The exception message to be used - The name of the argument + The thread to kill + Info for the ThreadAbortException handler - + - Throws an InvalidOperationException if the specified condition is not met. + TypeHelper provides static methods that operate on Types. - The condition that must be met - The exception message to be used - + - The different targets a test action attribute can be applied to + A special value, which is used to indicate that BestCommonType() method + was unable to find a common type for the specified arguments. - + - Default target, which is determined by where the action attribute is attached - - - - - Target a individual test case + 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 - + - Target a suite of test cases + 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 - + - DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite - containing test fixtures present in the assembly. + 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. - + - The default suite builder used by the test assembly builder. + Determines whether the specified type is numeric. + The type to be examined. + + true if the specified type is numeric; otherwise, false. + - + - Initializes a new instance of the class. + 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 - + - Build a suite of tests from a provided assembly + Determines whether this instance can deduce type args for a generic type from the supplied arguments. - The assembly from which tests are to be built - A dictionary of options to use in building the suite + The type to be examined. + The arglist. + The type args to be used. - A TestSuite containing the tests found in the assembly + true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. - + - Build a suite of tests given the filename of an assembly + Gets the _values for an enumeration, using Enum.GetTypes + where available, otherwise through reflection. - 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. + Gets the ids of the _values for an enumeration, + using Enum.GetNames where available, otherwise + through reflection. + + - + - Construct a FrameworkController using the default builder and runner. + Represents the result of running a single test case. - 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. + Construct a TestCaseResult based on a TestMethod - 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 + A TestMethod to which the result applies. - + - Construct a FrameworkController, specifying the types to be used - for the runner and builder. This constructor is provided for - purposes of development. + Gets the number of test cases that failed + when running the test and all its children. - 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. + Gets the number of test cases that passed + when running the test and all its children. - 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. + Gets the number of test cases that were skipped + when running the test and all its children. - The builder. - + - Gets the ITestAssemblyRunner used by this controller instance. + Gets the number of test cases that were inconclusive + when running the test and all its children. - The runner. - + - Gets the AssemblyName or the path for which this FrameworkController was created + Represents the result of running a test suite - + - Gets the Assembly for which this + Construct a TestSuiteResult base on a TestSuite + The TestSuite to which the result applies - + - Gets a dictionary of settings for the FrameworkController + Gets the number of test cases that failed + when running the test and all its children. - + - Inserts environment element + Gets the number of test cases that passed + when running the test and all its children. - Target node - The new node - + - Inserts settings element + Gets the number of test cases that were skipped + when running the test and all its children. - Target node - Settings dictionary - The new node - + - FrameworkControllerAction is the base class for all actions - performed against a FrameworkController. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - LoadTestsAction loads a test into the FrameworkController + Add a child result + The child result to be added - + - LoadTestsAction loads the tests in an assembly. + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. - The controller. - The callback handler. - + - ExploreTestsAction returns info about the tests in an assembly + 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. - + - Initializes a new instance of the class. + A MarshalByRefObject that lives forever - 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. + Obtains a lifetime service object to control the lifetime policy for this instance. - + - Construct a CountsTestAction and perform the count of test cases. + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks - 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 + + This version of the class supplies GetTypeInfo() on platforms + that don't support it. + - + - RunTestsAction runs the loaded TestSuite held by the FrameworkController. + 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. + + - + - Construct a RunTestsAction and run all tests in the loaded TestSuite. + Extensions for Assembly that are not available in pre-4.5 .NET releases - 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 + An easy way to get a single custom attribute from an assembly + The attribute Type + The assembly + An attribute of Type T - + - Construct a RunAsyncAction and run all tests in the loaded TestSuite. + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. - 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. + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. - + - Construct a StopRunAction and stop any ongoing run. If no - run is in process, no error is raised. + Throws an exception if an argument is null - 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 value to be tested + The name of the argument - + - The ITestAssemblyBuilder interface is implemented by a class - that is able to build a suite of tests given an assembly or - an assembly filename. + Throws an exception if a string argument is null or empty + The value to be tested + The name of the argument - + - Build a suite of tests from a provided assembly + Throws an ArgumentOutOfRangeException if the specified condition is not met. - 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 condition that must be met + The exception message to be used + The name of the argument - + - Build a suite of tests given the filename of an assembly + Throws an ArgumentException if the specified condition is not met. - 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 condition that must be met + The exception message to be used + The name of the argument - + - The ITestAssemblyRunner interface is implemented by classes - that are able to execute a suite of tests loaded - from an assembly. + Throws an InvalidOperationException if the specified condition is not met. + The condition that must be met + The exception message to be used - + - Gets the tree of loaded tests, or null if - no tests have been loaded. + The different targets a test action attribute can be applied to - + - Gets the tree of test results, if the test - run is completed, otherwise null. + Default target, which is determined by where the action attribute is attached - + - Indicates whether a test has been loaded + Target a individual test case - + - Indicates whether a test is currently running + Target a suite of test cases - + - Indicates whether a test run is complete + 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. - + - Loads the tests found in an Assembly, returning an - indication of whether or not the load succeeded. + Construct a FrameworkController using the default builder and runner. - File name of the assembly to load - Dictionary of options to use in loading the test - An ITest representing the loaded tests + 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 - + - Loads the tests found in an Assembly, returning an - indication of whether or not the load succeeded. + Construct a FrameworkController using the default builder and runner. - The assembly to load - Dictionary of options to use in loading the test - An ITest representing the loaded tests + 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 - + - Count Test Cases using a filter + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - The filter to apply - The number of test cases found + 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 - + - Run selected tests and return a test result. The test is run synchronously, - and the listener interface is notified as it progresses. + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - Interface to receive ITestListener notifications. - A test filter used to select tests to be run + 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 - + - Run selected tests asynchronously, notifying the listener interface as it progresses. + Gets the ITestAssemblyBuilder used by this controller instance. - Interface to receive EventListener notifications. - A test filter used to select tests to be run + The builder. - + - Wait for the ongoing run to complete. + Gets the ITestAssemblyRunner used by this controller instance. - Time to wait in milliseconds - True if the run completed, otherwise false + The runner. - + - Signal any test run that is in process to stop. Return without error if no test is running. + Gets the AssemblyName or the path for which this FrameworkController was created - If true, kill any test-running threads - + - Implementation of ITestAssemblyRunner + Gets the Assembly for which this - + - Initializes a new instance of the class. + Gets a dictionary of settings for the FrameworkController - The builder. - + - Gets the default level of parallel execution (worker threads) + Loads the tests in the assembly + - + - The tree of tests that was loaded by the builder + 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 - + - The test result, if a run has completed + Runs the tests in an assembly + A string containing the XML representation of the filter to use + The XML result of the test run - + - Indicates whether a test is loaded + 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 - + - Indicates whether a test is running + 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 - + - Indicates whether a test run is complete + Stops the test run + True to force the stop, false for a cooperative stop - + - Our settings, specified when loading the assembly + 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 - + - The top level WorkItem created for the assembly as a whole + Inserts environment element + Target node + The new node - + - The TestExecutionContext for the top level WorkItem + Inserts settings element + Target node + Settings dictionary + The new node - + - Loads the tests found in an Assembly + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. - 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 + LoadTestsAction loads a test into the FrameworkController - The assembly to load - Dictionary of option settings for loading the assembly - True if the load was successful - + - Count Test Cases using a filter + LoadTestsAction loads the tests in an assembly. - The filter to apply - The number of test cases found + The controller. + The callback handler. - + - Run selected tests and return a test result. The test is run synchronously, - and the listener interface is notified as it progresses. + ExploreTestsAction returns info about the tests in an assembly - 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. + Initializes a new instance of the class. - 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. - + The controller for which this action is being performed. + Filter used to control which tests are included (NYI) + The callback handler. - + - Wait for the ongoing run to complete. + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. - Time to wait in milliseconds - True if the run completed, otherwise false - + - Initiate the test run. + 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 - + - Signal any test run that is in process to stop. Return without error if no test is running. + RunTestsAction runs the loaded TestSuite held by the FrameworkController. - If true, kill any test-running threads - + - Create the initial TestExecutionContext used to run tests + Construct a RunTestsAction and run all tests in the loaded TestSuite. - The ITestListener specified in the RunAsync call + 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 - + - Handle the the Completed event for the top level work item + RunAsyncAction initiates an asynchronous test run, returning immediately - + - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. + 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 - + - Verifies that the first int is greater than the second - int. If it is not, then an - is thrown. + StopRunAction stops an ongoing run. - The first value, expected to be greater - The 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. + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. - The first value, expected to be greater - The second value, expected to be less + The FrameworkController for which a run is to be stopped. + True the stop should be forced, false for a cooperative stop. + >A callback handler used to report results + A forced stop will cause threads and processes to be killed as needed. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Implementation of ITestAssemblyRunner - The first value, expected to be greater - The 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. + Initializes a new instance of the class. - The first value, expected to be greater - The second value, expected to be less + The builder. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Gets the default level of parallel execution (worker threads) - The first value, expected to be greater - The 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 tree of tests that was loaded by the builder - 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 test result, if a run has completed - The first value, expected to be greater - The 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. + Indicates whether a test is loaded - 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. + Indicates whether a test is running - The first value, expected to be greater - The 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. + Indicates whether a test run is complete - 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. + Our settings, specified when loading the assembly - The first value, expected to be greater - The 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 top level WorkItem created for the assembly as a whole - 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 TestExecutionContext for the top level WorkItem - The first value, expected to be greater - The 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. + Loads the tests found in an Assembly - The first value, expected to be greater - The second value, expected to be less + File name of the assembly to load + Dictionary of option settings for loading the assembly + True if the load was successful - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Loads the tests found in an Assembly - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The assembly to load + Dictionary of option settings for loading the assembly + True if the load was successful - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Count Test Cases using a filter - The first value, expected to be greater - The second value, expected to be less + The filter to apply + The number of test cases found - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + Interface to receive EventListener notifications. + A test filter used to select tests to be run + - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Run selected tests asynchronously, notifying the listener interface as it progresses. - The first value, expected to be less - The second value, expected to be greater + Interface to receive EventListener notifications. + A test filter used to select tests to be run + + RunAsync is a template method, calling various abstract and + virtual methods to be overridden by derived classes. + - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Wait for the ongoing run to complete. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + Time to wait in milliseconds + True if the run completed, otherwise false - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Initiate the test run. - 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. + Signal any test run that is in process to stop. Return without error if no test is running. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + If true, kill any tests that are currently running - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Create the initial TestExecutionContext used to run tests - The first value, expected to be less - The second value, expected to be greater + The ITestListener specified in the RunAsync call - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Handle the the Completed event for the top level work item - The first value, expected to be less - The 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 ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. - 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. + Build a suite of tests from a provided assembly - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Build a suite of tests given the filename of an assembly - The first value, expected to be less - The second value, expected to be greater + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets the tree of loaded tests, or null if + no tests have been loaded. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets the tree of test results, if the test + run is completed, otherwise null. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Indicates whether a test has been loaded - 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. + Indicates whether a test is currently running - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Indicates whether a test run is complete - 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. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + File name of the assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. - The first value, expected to be greater - The second value, expected to be less + The assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Count Test Cases using a filter - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The filter to apply + The number of test cases found - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Run selected tests and return a test result. The test is run synchronously, + and the listener interface is notified as it progresses. - The first value, expected to be greater - The second value, expected to be less + Interface to receive ITestListener notifications. + A test filter used to select tests to be run - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Run selected tests asynchronously, notifying the listener interface as it progresses. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + Interface to receive EventListener notifications. + A test filter used to select tests to be run - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Wait for the ongoing run to complete. - The first value, expected to be greater - The second value, expected to be less + Time to wait in milliseconds + True if the run completed, otherwise false - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Signal any test run that is in process to stop. Return without error if no test is running. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + If true, kill any test-running threads - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. - 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 default suite builder used by the test assembly builder. - The first value, expected to be greater - The 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. + Initializes a new instance of the class. - 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. + Build a suite of tests from a provided assembly - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Build a suite of tests given the filename of an assembly - The first value, expected to be greater - The second value, expected to be less + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + + A TestSuite containing the tests found in the assembly + - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Marks a test that must run in a particular threading apartment state, causing it + to run in a separate thread if necessary. - The first value, expected to be greater - The 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. + Construct an ApartmentAttribute - The first value, expected to be greater - The second value, expected to be less + The apartment state that this test must be run under. You must pass in a valid apartment state. - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Provides the Author of a test or test fixture. - The first value, expected to be greater - The 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. + Initializes a new instance of the class. - The first value, expected to be greater - The second value, expected to be less + The name of the author. - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The name of the author. + The email address of the author. - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Marks a test to use a particular CombiningStrategy to join + any parameter data provided. Since this is the default, the + attribute is optional. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Construct a CombiningStrategyAttribute incorporating an + ICombiningStrategy and an IParamterDataProvider. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + Combining strategy to be used in combining data + An IParameterDataProvider to supply data - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Construct a CombiningStrategyAttribute incorporating an object + that implements ICombiningStrategy and an IParameterDataProvider. + This constructor is provided for CLS compliance. - The first value, expected to be less - The second value, expected to be greater + Combining strategy to be used in combining data + An IParameterDataProvider to supply data - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Construct one or more TestMethods from a given MethodInfo, + using available parameter data. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The MethodInfo for which tests are to be constructed. + The suite to which the tests will be added. + One or more TestMethods - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Modify the test by adding the name of the combining strategy + to the properties. - The first value, expected to be less - The second value, expected to be greater + The test to modify - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + 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. - The first value, expected to be less - The 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. + Apply changes to the TestExecutionContext - The first value, expected to be less - The second value, expected to be greater + The TestExecutionContext - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + 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. - The first value, expected to be less - The 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. + Defines the order that the test will run in - 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. + Defines the order that the test will run in - The first value, expected to be less - The 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. + Defines the order that the test will run in - 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. + Modifies a test as defined for the specific attribute. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The test to modify - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + RepeatAttribute may be applied to test case in order + to run it multiple times. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Construct a RepeatAttribute - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The number of times to run the test - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Wrap a command and return the result. - The first value, expected to be less - The second value, expected to be greater + The command to be wrapped + The wrapped command - + - Asserts that a condition is true. If the condition is false the method throws - an . + The test command for the RetryAttribute - 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 . + Initializes a new instance of the class. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The inner command. + The number of repetitions - + - Asserts that a condition is true. If the condition is false the method throws - an . + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The evaluated condition + The context in which the test should run. + A TestResult - + - Asserts that a condition is true. If the condition is false the method throws - an . + 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. - The evaluated condition - + - Asserts that a condition is true. If the condition is false the method throws - an . + Attribute used to identify a method that is called once + to perform setup before any child tests are run. - 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 . + LevelOfParallelismAttribute is used to set the number of worker threads + that may be allocated by the framework for running tests. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . + Construct a LevelOfParallelismAttribute. - The evaluated condition + The number of worker threads to be created by the framework. - + - Asserts that a condition is true. If the condition is false the method throws - an . + ParallelizableAttribute is used to mark tests that may be run in parallel. - 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 + Construct a ParallelizableAttribute using default ParallelScope.Self. + - + - 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 + Construct a ParallelizableAttribute with a specified scope. + + The ParallelScope associated with this attribute. - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Modify the context to be used for child tests + + The current TestExecutionContext - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + The ParallelScope enumeration permits specifying the degree to + which a test and its descendants may be run in parallel. + - + - 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 + No Parallelism is permitted + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The test itself may be run in parallel with others at the same level + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Descendants of the test may be run in parallel with one another + - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Descendants of the test down to the level of TestFixtures may be run in parallel + - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Provide actions to execute before and after tests. - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Executed before each test is run - The object that is to be tested + The test that is going to be run. - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Executed after each test is run - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The test that has just been run. - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Provides the target for the action attribute - 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. + TestCaseSourceAttribute indicates the source to be used to + provide test fixture instances for a test class. - 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. + Error message string is public so the tests can use it - 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. + Construct with the name of the method, property or field that will provide data - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The name of a static method, property or field that will provide data. - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Construct with a Type and name - The object that is to be tested + The Type that will provide data + The name of a static method, property or field that will provide data. - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Construct with a Type - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The type that will provide data - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The name of a the method, property or fiend to be used as a source - 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. + A Type to be used as a source - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Gets or sets the category associated with every fixture created from + this attribute. May be a single category or a comma-separated list. - The value that is to be tested - + - Assert that a string is empty - that is equal to string.Empty + Construct one or more TestFixtures from a given Type, + using available parameter data. - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The TypeInfo for which fixures are to be constructed. + One or more TestFixtures as TestSuite - + - Assert that a string is empty - that is equal to string.Empty + Returns a set of ITestFixtureData items for use as arguments + to a parameterized test fixture. - The string to be tested + The type for which data is needed. + - + - Assert that an array, list or other collection is empty + Indicates which class the test or test fixture is testing - 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 + Initializes a new instance of the class. - An array, list or other collection implementing ICollection + The type that is being tested. - + - Assert that a string is not empty - that is not equal to string.Empty + Initializes a new instance of the class. - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The type that is being tested. - + - Assert that a string is not empty - that is not equal to string.Empty + CollectionSupersetConstraint is used to determine whether + one collection is a superset of another - The string to be tested - + - Assert that an array, list or other collection is not empty + Construct a CollectionSupersetConstraint - 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 + The collection that the actual value is expected to be a superset of - + - Assert that an array, list or other collection is not empty + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Test whether the actual collection is a superset of + the expected collection provided. + + - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Flag the constraint to use the supplied predicate function - - + The comparison function to use. + Self. - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + DictionaryContainsValueConstraint is used to test whether a dictionary + contains an expected object as a value. - - - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + Construct a DictionaryContainsValueConstraint - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Test whether the expected value is contained in the dictionary - + - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. + The EqualConstraintResult class is tailored for formatting + and displaying the result of an EqualConstraint. - 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. + Construct an EqualConstraintResult - The message to initialize the with. - + - Throws an . - This is used by the other Assert functions. + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + The MessageWriter to write to - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. + Display the failure information for two collections that did not match. - The message to initialize the with. - Arguments to be used in formatting the message + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections - + - Throws an with the message that is - passed in. This causes the test to be reported as ignored. + 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 message to initialize the with. + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line - + - Throws an . - This causes the test to be reported as ignored. + 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 - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. + Display the failure information for two IEnumerables that did not match. - The message to initialize the with. - Arguments to be used in formatting the message + The MessageWriter on which to display + The expected enumeration. + The actual enumeration + The depth of this failure in a set of nested collections - + - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - The message to initialize the with. - + - Throws an . - This causes the test to be reported as Inconclusive. + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - Asserts that an object is contained in a list. + FileExistsConstraint is used to determine if a file exists - 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. + Initializes a new instance of the class. - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + FileOrDirectoryExistsConstraint is used to determine if a file or directory exists - 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. + If true, the constraint will only check if files exist, not directories - 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. + If true, the constraint will only check if directories exist, not files - 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. + Initializes a new instance of the class that + will check files and directories. - 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. + Initializes a new instance of the class that + will only check files if ignoreDirectories is true. - The value that is expected - The actual value + if set to true [ignore directories]. - + - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Applies the constraint to an actual value, returning a ConstraintResult. - The value that is expected - The actual value + The value to be tested + A ConstraintResult - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Interface for all constraints - 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 display name of this Constraint for use by ToString(). - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Arguments provided to this Constraint, for use in + formatting the description. - The expected object - The actual object - + - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. + The ConstraintBuilder holding this constraint - 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 a delegate throws a particular exception when called. + Applies the constraint to an actual value, returning a ConstraintResult. - 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 + The value to be tested + A ConstraintResult - + - Verifies that a delegate throws a particular exception when called. + 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. - A constraint to be satisfied by the exception - A TestSnippet delegate + An ActualValueDelegate + A ConstraintResult - + - Verifies that a delegate throws a particular exception when called. + 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. - The exception Type expected - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + A reference to the value to be tested + A ConstraintResult - + - Verifies that a delegate throws a particular exception when called. + Represents a constraint that succeeds if all the + members of a collection match a base constraint. - The exception Type expected - A TestDelegate - + - Verifies that a delegate throws a particular exception when called. + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + they all succeed. - 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. + Represents a constraint that succeeds if none of the + members of a collection match a base constraint. - Type of the expected exception - A TestDelegate - + - Verifies that a delegate throws an exception when called - and returns it. + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. - 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. + Represents a constraint that succeeds if any of the + members of a collection match a base constraint. - A TestDelegate - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + any of them succeed. - 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. + SubPathConstraint tests that the actual path is under the expected path - 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. + Initializes a new instance of the class. - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The expected path - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - A TestDelegate - + - Verifies that a delegate does not throw an exception + Test whether the constraint is satisfied by a given value - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The value to be tested + True for success, false for failure - + - Verifies that a delegate does not throw an exception. + ThrowsExceptionConstraint tests that an exception has + been thrown, without any further tests. - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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 + 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 - + - Asserts that a condition is true. If the condition is false the method throws - an . + Returns the ActualValueDelegate itself as the value to be tested. - A lambda that returns a Boolean + A delegate representing the code to be tested + The delegate itself - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. - 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. + Construct an AllItemsConstraint on top of an existing constraint - 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. + Apply the item constraint to each item in the collection, + failing if any item fails. - 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. + AndConstraint succeeds only if both members succeed. - 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. + Create an AndConstraint from two other constraints - A Constraint to be applied - The actual value to test + The first constraint + The second constraint - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Gets text describing a constraint - 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. + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. - A Constraint to be applied - The actual value to test + The actual value + True if the constraints both succeeded - + - 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. + 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. - - 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 + The writer on which the actual value is displayed - + - Asserts that an object may be assigned a value of a given Type. + AssignableFromConstraint is used to test that an object + can be assigned from 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. + Construct an AssignableFromConstraint for the type provided - The expected Type. - The object under examination + - + - Asserts that an object may be assigned a value of a given Type. + Apply the constraint to an actual value, returning true if it succeeds - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message + The actual argument + True if the constraint succeeds, otherwise false. - + - Asserts that an object may be assigned a value of a given Type. + AssignableToConstraint is used to test that an object + can be assigned to a given Type. - The expected Type. - The object under examination - + - Asserts that an object may not be assigned a value of a given Type. + Construct an AssignableToConstraint for the type provided - 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. + Apply the constraint to an actual value, returning true if it succeeds - The expected Type. - The object under examination + The actual argument + True if the constraint succeeds, otherwise false. - + - Asserts that an object may not be assigned a value of a given Type. + 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. - 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. + Constructs an AttributeConstraint for a specified attribute + Type and base constraint. - The expected Type. - The object under examination + + - + - Asserts that an object is an instance of a given type. + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object is an instance of a given type. + Returns a string representation of the constraint. - The expected Type - The object being examined - + - Asserts that an object is an instance of a given type. + AttributeExistsConstraint tests for the presence of a + specified attribute on a 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. + Constructs an AttributeExistsConstraint for a specific attribute Type - The expected Type - The object being examined + - + - Asserts that an object is not an instance of a given type. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Tests whether the object provides the expected attribute. - The expected Type - The object being examined + A Type, MethodInfo, or other ICustomAttributeProvider + True if the expected attribute is present, otherwise false - + - Asserts that an object is not an instance of a given type. + BinaryConstraint is the abstract base of all constraints + that combine two other constraints in some fashion. - 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 first constraint being combined - The expected Type - The object being examined - + - Delegate used by tests that execute code and - capture any thrown exception. + The second constraint being combined - + - 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. + Construct a BinaryConstraint from two other constraints + The first constraint + The second constraint - + - 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 + BinarySerializableConstraint tests whether + an object is serializable in binary format. + - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to . + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - The evaluated condition - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Test whether the constraint is satisfied by a given value - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + The value to be tested + True for success, false for failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns the string representation - 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. + CollectionConstraint is the abstract base class for + constraints that operate on collections. - 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. + Construct an empty CollectionConstraint - A Constraint to be applied - The actual value to test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a CollectionConstraint - 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. + Determines whether the specified enumerable is empty. - The original collection - + The enumerable. + + true if the specified enumerable is empty; otherwise, false. + - + - 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. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Protected method to be implemented by derived classes - - + + - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + CollectionContainsConstraint is used to test whether a collection + contains an expected object as a member. - - - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Construct a CollectionContainsConstraint - 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. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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 + Gets the expected object + - + - Asserts that a condition is true. If the condition is false the - method throws an . + Test whether the expected item is contained in the collection - 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 + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. - + - Asserts that a condition is true. If the condition is false the method throws - an . + CollectionEquivalentConstraint is used to determine whether two + collections are equivalent. - A lambda that returns a Boolean - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Construct a CollectionEquivalentConstraint - A TestDelegate to be executed - A ThrowsConstraint used in the test + - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Test whether two collections are equivalent - 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. + Flag the constraint to use the supplied predicate function + The comparison function to use. + Self. - + - Construct an ApartmentAttribute + CollectionItemsEqualConstraint is the abstract base class for all + collection constraints that apply some notion of item equality + as a part of their operation. - 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. + Construct an empty CollectionConstraint - + - Initializes a new instance of the class. + Construct a CollectionConstraint - The name of the author. + - + - Initializes a new instance of the class. + Flag the constraint to ignore case and return self. - The name of the author. - The email address of the author. - + - Attribute used to apply a category to a test + Flag the constraint to use the supplied IComparer object. + The IComparer object to use. + Self. - + - The name of the category + Flag the constraint to use the supplied IComparer object. + The IComparer object to use. + Self. - + - 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. + Flag the constraint to use the supplied Comparison object. - The name of the category + The IComparer object to use. + Self. - + - Protected constructor uses the Type name as the name - of the category. + Flag the constraint to use the supplied IEqualityComparer object. + The IComparer object to use. + Self. - + - The name of the category + Flag the constraint to use the supplied IEqualityComparer object. + The IComparer object to use. + Self. - + - Modifies a test by adding a category to it. + Compares two collection members for equality - 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. + Return a new CollectionTally for use in making tests + The collection to be included in the tally - + - Default constructor + CollectionOrderedConstraint is used to test whether a collection is ordered. - + - 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 CollectionOrderedConstraint - + - Construct a CombiningStrategyAttribute incorporating an - ICombiningStrategy and an IParamterDataProvider. + If used performs a reverse comparison - 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. + Modifies the constraint to use an and returns self. - 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. + Modifies the constraint to use an and returns self. - 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. + Modifies the constraint to use a and returns self. - The test to modify - + - LevelOfParallelismAttribute is used to set the number of worker threads - that may be allocated by the framework for running tests. + Modifies the constraint to test ordering by the value of + a specified property and returns self. - + - Construct a LevelOfParallelismAttribute. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Test whether the collection is ordered + + - + - 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. + Returns the string representation of the constraint. + - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + CollectionSubsetConstraint is used to determine whether + one collection is a subset of another - + - Construct a RepeatAttribute + Construct a CollectionSubsetConstraint - The number of times to run the test + The collection that the actual value is expected to be a subset of - + - Wrap a command and return the result. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - The command to be wrapped - The wrapped command - + - The test command for the RetryAttribute + Test whether the actual collection is a subset of + the expected collection provided. + + - + - Initializes a new instance of the class. + Flag the constraint to use the supplied predicate function - The inner command. - The number of repetitions + The comparison function to use. + Self. - + - Runs the test, saving a TestResult in the supplied TestExecutionContext. + CollectionTally counts (tallies) the number of + occurrences of each object in one or more enumerations. - The context in which the test should run. - A TestResult - + - Provide actions to execute before and after tests. + Construct a CollectionTally object from a comparer and a collection - + - Executed before each test is run + The number of objects remaining in the tally - The test that is going to be run. - + - Executed after each test is run + Try to remove an object from the tally - The test that has just been run. + The object to remove + True if successful, false if the object was not found - + - Provides the target for the action attribute + Try to remove a set of objects from the tally + The objects to remove + True if successful, false if any object was not found - + - ParallelizableAttribute is used to mark tests that may be run in parallel. + ComparisonAdapter class centralizes all comparisons of + _values in NUnit, adapting to the use of any provided + , + or . - + - Construct a ParallelizableAttribute using default ParallelScope.Self. + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. - + - Construct a ParallelizableAttribute with a specified scope. + Returns a ComparisonAdapter that wraps an - The ParallelScope associated with this attribute. - + - Modify the context to be used for child tests + Returns a ComparisonAdapter that wraps an - The current TestExecutionContext - + - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. + Returns a ComparisonAdapter that wraps a - + - Constructor with no cultures specified, for use - with named property syntax. + Compares two objects - + - Constructor taking one or more cultures + Construct a default ComparisonAdapter - Comma-deliminted list of cultures - + - Causes a test to be skipped if this CultureAttribute is not satisfied. + Construct a ComparisonAdapter for an - The test to modify - + - Tests to determine if the current culture is supported - based on the properties of this attribute. + Compares two objects - True, if the current culture is supported + + + - + - Test to determine if the a particular culture or comma- - delimited set of cultures is in use. + ComparerAdapter extends and + allows use of an or + to actually perform the comparison. - 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. + Construct a ComparisonAdapter for an - - - + - The abstract base class for all data-providing attributes - defined by NUnit. Used to select all data sources for a - method, class or parameter. + Compare a Type T to an object - + - Default constructor + Construct a ComparisonAdapter for a - + - 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. + Compare a Type T to an object - + - 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. + Abstract base class for constraints that compare _values to + determine if one is greater than, equal to or less than + the other. - + - 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. + The value against which a comparison is to be made - + - Attribute used to provide descriptive text about a - test case or fixture. + If true, less than returns success - + - Construct a description Attribute + if true, equal returns success - 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. + if true, greater than returns success - + - Default constructor + ComparisonAdapter to be used in making the comparison - + - Constructor with a reason + Initializes a new instance of the class. - The reason test is marked explicit + 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. - + - Modifies a test by marking it as explicit. + Test whether the constraint is satisfied by a given value - The test to modify + The value to be tested + True for success, false for failure - + - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. + Modifies the constraint to use an and returns self + The comparer used for comparison tests + A constraint modified to use the given comparer - + - Constructs the attribute giving a reason for ignoring the test + Modifies the constraint to use an and returns self - The reason for ignoring the test + The comparer used for comparison tests + A constraint modified to use the given comparer - + - 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. + Modifies the constraint to use a and returns self - - 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. + The comparer used for comparison tests + A constraint modified to use the given comparer - + - Modifies a test by marking it as Ignored. + Delegate used to delay evaluation of the actual value + to be used in evaluating a constraint - The test to modify - + - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. - + - Constructor with no included items specified, for use - with named property syntax. + Construct a constraint with optional arguments + Arguments to be saved - + - Constructor taking one or more included items + 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. - 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. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Name of the item to be excluded. Multiple items - may be given, separated by a comma. + Arguments provided to this Constraint, for use in + formatting the description. - + - The reason for including or excluding the test + The ConstraintBuilder holding this constraint - + - Summary description for MaxTimeAttribute. + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - Construct a MaxTimeAttribute, given a time in milliseconds. + 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. - The maximum elapsed time in milliseconds + An ActualValueDelegate + A ConstraintResult - + - The abstract base class for all custom attributes defined by NUnit. + 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 - + - Default constructor + 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 - + - 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 override of ToString returns the constraint DisplayName + followed by any arguments within angle brackets. + - + - Default constructor + Returns the string representation of this constraint - + - The ParallelScope enumeration permits specifying the degree to - which a test and its descendants may be run in parallel. + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. - + - No Parallelism is permitted + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. - + - The test itself may be run in parallel with others at the same level + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. - + - Descendants of the test may be run in parallel with one another + Returns a ConstraintExpression by appending And + to the current constraint. - + - Descendants of the test down to the level of TestFixtures may be run in parallel + Returns a ConstraintExpression by appending And + to the current constraint. - + - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. + Returns a ConstraintExpression by appending Or + to the current constraint. - + - Constructor with no platforms specified, for use - with named property syntax. + Returns a DelayedConstraint with the specified delay time. + The delay in milliseconds. + - + - Constructor taking one or more platforms + Returns a DelayedConstraint with the specified delay time + and polling interval. - Comma-delimited list of platforms + The delay in milliseconds. + The interval at which to test the constraint. + - + - Causes a test to be skipped if this PlatformAttribute is not satisfied. + Resolves any pending operators and returns the resolved constraint. - The test to modify - + - PropertyAttribute is used to attach information to a test as a name/value pair.. + 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. - + - Construct a PropertyAttribute with a name and string value + OperatorStack is a type-safe stack for holding ConstraintOperators - The name of the property - The property value - + - Construct a PropertyAttribute with a name and int value + Initializes a new instance of the class. - The name of the property - The property value + The ConstraintBuilder using this stack. - + - Construct a PropertyAttribute with a name and double value + Gets a value indicating whether this is empty. - The name of the property - The property value + true if empty; otherwise, false. - + - Constructor for derived classes that set the - property dictionary directly. + Gets the topmost operator without modifying the stack. - + - 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. + Pushes the specified operator onto the stack. + The operator to put onto the stack. - + - Gets the property dictionary for this attribute + Pops the topmost operator from the stack. + The topmost operator on the stack - + - Modifies a test by adding properties to it. + ConstraintStack is a type-safe stack for holding Constraints - The test to modify - + - RandomAttribute is used to supply a set of random _values - to a single parameter of a parameterized test. + Initializes a new instance of the class. + The ConstraintBuilder using this stack. - + - Construct a random set of values appropriate for the Type of the - parameter on which the attribute appears, specifying only the count. + Gets a value indicating whether this is empty. - + true if empty; otherwise, false. - + - Construct a set of ints within a specified range + 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 - + - Construct a set of unsigned ints within a specified range + 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 - + - Construct a set of longs within a specified range + Initializes a new instance of the class. - + - Construct a set of unsigned longs within a specified range + 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. - + - Construct a set of shorts within a specified range + Appends the specified constraint to the expression by pushing + it on the constraint stack. + The constraint to push. - + - Construct a set of unsigned shorts within a specified range + Sets the top operator right context. + The right context. - + - Construct a set of doubles within a specified range + Reduces the operator stack until the topmost item + precedence is greater than or equal to the target precedence. + The target precedence. - + - Construct a set of floats within a specified range + Resolves this instance, returning a Constraint. If the Builder + is not currently in a resolvable state, an exception is thrown. + The resolved constraint - + - Construct a set of bytes within a specified range + Gets a value indicating whether this instance is resolvable. + + true if this instance is resolvable; otherwise, false. + - + - Construct a set of sbytes within a specified range + 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. - + - Get the collection of _values to be used as arguments. + The ConstraintBuilder holding the elements recognized so far - + - RangeAttribute is used to supply a range of _values to an - individual parameter of a parameterized test. + Initializes a new instance of the class. - + - Construct a range of ints using default step of 1 + Initializes a new instance of the + class passing in a ConstraintBuilder, which may be pre-populated. - - + The builder. - + - Construct a range of ints specifying the step size + 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. - - - + - + - Construct a range of unsigned ints using default step of 1 + Appends an operator to the expression and returns the + resulting expression itself. - - - + - Construct a range of unsigned ints specifying the step size + Appends a self-resolving operator to the expression and + returns a new ResolvableConstraintExpression. - - - - + - Construct a range of longs using a default step of 1 + 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. - - - + - Construct a range of longs + Returns a ConstraintExpression that negates any + following constraint. - - - - + - Construct a range of unsigned longs using default step of 1 + Returns a ConstraintExpression that negates any + following constraint. - - - + - Construct a range of unsigned longs specifying the step size + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - - - - + - Construct a range of doubles + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - - - - + - Construct a range of floats + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - - - - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - + - Construct a RepeatAttribute + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. - The number of times to run the test - + - Wrap a command and return the result. + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - The command to be wrapped - The wrapped command - + - The test command for the RepeatAttribute + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - + - Initializes a new instance of the class. + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - The inner command. - The number of repetitions - + - Runs the test, saving a TestResult in the supplied TestExecutionContext. + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - 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. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - + - Construct a RequiresMTAAttribute + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - + - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. + With is currently a NOP - reserved for future use. - + - Construct a RequiresSTAAttribute + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. - + - Marks a test that must run on a separate thread. + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. - + - Construct a RequiresThreadAttribute + Returns a constraint that tests for null - + - Construct a RequiresThreadAttribute, specifying the apartment + Returns a constraint that tests for True - + - 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. + Returns a constraint that tests for False - + - Default constructor + Returns a constraint that tests for a positive value - + - Summary description for SetCultureAttribute. + Returns a constraint that tests for a negative value - + - Construct given the name of a culture + Returns a constraint that tests if item is equal to zero - - + - Summary description for SetUICultureAttribute. + Returns a constraint that tests for NaN - + - Construct given the name of a culture + Returns a constraint that tests for empty - - + - 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. + Returns a constraint that tests whether a collection + contains all unique items. - + - 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. + Returns a constraint that tests whether an object graph is serializable in binary format. - + - 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. + Returns a constraint that tests whether an object graph is serializable in xml format. - + - SetUpFixtureAttribute is used to identify a SetUpFixture + Returns a constraint that tests two items for equality - + - Build a SetUpFixture from type provided. Normally called for a Type - on which the attribute has been placed. + Returns a constraint that tests that two references are the same object - 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. + Returns a constraint that tests whether the + actual value is greater than the supplied argument - + - 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. + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - public void TestDescriptionMethod() - {} - } - - - + - Descriptive text for this test + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument - + - The author of this test + Returns a constraint that tests whether the + actual value is less than the supplied argument - + - The type that this test is testing + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument - + - Modifies a test by adding a description, if not already set. + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument - The test to modify - + - Gets or sets the expected result. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The result. - + - Returns true if an expected result has been set + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - + - Construct a TestMethod from a given method. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - 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. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - + - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - - + - Construct a TestCaseAttribute with a single argument + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - - + - Construct a TestCaseAttribute with a two arguments + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - - - + - Construct a TestCaseAttribute with a three arguments + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - - - - + - Gets or sets the name of the test. + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. - The name of the test. - + - Gets or sets the RunState of this test case. + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. - + - Gets the list of arguments to a test case + Returns a constraint that tests whether the actual value + is a superset of the collection supplied as an argument. - + - Gets the properties of the test case + Returns a constraint that tests whether a collection is ordered - + - Gets or sets the expected result. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - The result. - + - Returns true if the expected result has been set + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Gets or sets the description. + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. - The description. - + - The author of this test + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. - + - The type that this test is testing + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Gets or sets the reason for ignoring the test + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Gets or sets a value indicating whether this is explicit. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - - true if explicit; otherwise, false. - - + - Gets or sets the reason for not running the test. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - The reason. - + - Gets or sets the ignore reason. When set to a non-null - non-empty value, the test is marked as ignored. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - The ignore reason. - + - Comma-delimited list of platforms to run the test for + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - Comma-delimited list of platforms to not run the test for + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - Gets and sets the category for this test case. - May be a comma-separated list of categories. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - 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. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - The arguments to be converted - The ParameterInfo array for the method - + - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - 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. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Construct with the name of the method, property or field that will provide data + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. - The name of a static method, property or field that will provide data. - + - Construct with a Type and name + Returns a constraint that tests whether the path provided + is the a subpath of the expected path after canonicalization. - The Type that will provide data - The name of a static method, property or field that will provide data. - + - Construct with a Type + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - The type that will provide data - + - The name of a the method, property or fiend to be used as a source + Returns a constraint that tests whether the actual value falls + within a specified range. - + - A Type to be used as a source + Returns a constraint that succeeds if the value + is a file or directory and it exists. - + - Gets or sets the category associated with every fixture created from - this attribute. May be a single category or a comma-separated list. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. + Returns a ConstraintExpression that negates any + following constraint. - 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. + Returns a ConstraintExpression that negates any + following constraint. - The method for which data is needed. - - + - TestFixtureAttribute is used to mark a class that represents a TestFixture. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - + - Default constructor + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - + - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - - + - Gets or sets the name of the test. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - The name of the test. - + - Gets or sets the RunState of this test fixture. + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. - + - The arguments originally provided to the attribute + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - + - Properties pertaining to this fixture + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - + - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - + - Descriptive text for this fixture + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - + - The author of this fixture + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - + - The type that this fixture is testing + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - + - Gets or sets the ignore reason. May set RunState as a side effect. + Returns a constraint that tests for null - The ignore reason. - + - Gets or sets the reason for not running the fixture. + Returns a constraint that tests for True - The reason. - + - Gets or sets the ignore reason. When set to a non-null - non-empty value, the test is marked as ignored. + Returns a constraint that tests for False - The ignore reason. - + - Gets or sets a value indicating whether this is explicit. + Returns a constraint that tests for a positive value - - true if explicit; otherwise, false. - - + - Gets and sets the category for this fixture. - May be a comma-separated list of categories. + Returns a constraint that tests for a negative value - + - Build a fixture from type provided. Normally called for a Type - on which the attribute has been placed. + Returns a constraint that tests for equality with zero - 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. + Returns a constraint that tests for NaN - + - TestCaseSourceAttribute indicates the source to be used to - provide test fixture instances for a test class. + Returns a constraint that tests for empty - + - Error message string is public so the tests can use it + Returns a constraint that tests whether a collection + contains all unique items. - + - Construct with the name of the method, property or field that will provide data + Returns a constraint that tests whether an object graph is serializable in binary format. - The name of a static method, property or field that will provide data. - + - Construct with a Type and name + Returns a constraint that tests whether an object graph is serializable in xml format. - The Type that will provide data - The name of a static method, property or field that will provide data. - + - Construct with a Type + Returns a constraint that tests two items for equality - The type that will provide data - + - The name of a the method, property or fiend to be used as a source + Returns a constraint that tests that two references are the same object - + - A Type to be used as a source + Returns a constraint that tests whether the + actual value is greater than the supplied argument - + - Gets or sets the category associated with every fixture created from - this attribute. May be a single category or a comma-separated list. + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument - + - Construct one or more TestFixtures from a given Type, - using available parameter data. + Returns a constraint that tests whether the + actual value is greater than or equal to the supplied argument - 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. + Returns a constraint that tests whether the + actual value is less than the supplied argument - 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. + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument - + - Indicates which class the test or test fixture is testing + Returns a constraint that tests whether the + actual value is less than or equal to the supplied argument - + - Initializes a new instance of the class. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The type that is being tested. - + - Initializes a new instance of the class. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - 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. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - - - [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. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - + - 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. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - + - Construct a TimeoutAttribute given a time in milliseconds + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The timeout value in milliseconds - + - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - + - 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 + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - + - Constructs for use with an Enum parameter. Will pass every enum - value in to the test. + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. - + - Construct with one argument + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. - - + - Construct with two arguments + Returns a constraint that tests whether the actual value + is a superset of the collection supplied as an argument. - - - + - Construct with three arguments + Returns a constraint that tests whether a collection is ordered - - - - + - Construct with an array of arguments + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - - + - Get the collection of _values to be used as arguments + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - 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. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - 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 + Returns a constraint that fails if the actual + value contains the substring supplied as an argument. - + - A Type to be used as a source + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - Gets an enumeration of data items for use as arguments - for a test method parameter. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - The parameter for which data is needed - - An enumeration containing individual data items - - + - A set of Assert methods operating on one or more collections + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Returns a constraint that fails if the actual + value starts with the substring supplied as an argument. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - - - + - Asserts that all items contained in collection are of the type specified by expectedType. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - 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. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - 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. + Returns a constraint that fails if the actual + value ends with the substring supplied as an argument. - IEnumerable containing objects to be considered - + - Asserts that all items contained in collection are not equal to null. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - 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. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - IEnumerable of objects to be considered - + - Ensures that every object contained in collection exists within the collection - once and only once. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - 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. + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. - 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. + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. - 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. + Returns a constraint that tests whether the path provided + is a subpath of the expected path after canonicalization. - 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. + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - 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. + Returns a constraint that tests whether the actual value falls + within a specified range. - 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. + ContainsConstraint tests a whether a string contains a substring + or a collection contains an object. It postpones the decision of + which test to use until the type of the actual argument is known. + This allows testing whether a string is contained in a collection + or as a substring of another string using the same syntax. - The 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. + Initializes a new instance of the class. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered + The _expected. - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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. + Flag the constraint to ignore case and return self. - 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. + Test whether the constraint is satisfied by a given value - 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 + The value to be tested + True for success, false for failure - + - Asserts that expected and actual are not equivalent. + Applies a delay to the match so that a match can be evaluated in the future. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - + - Asserts that expected and actual are not equivalent. + Creates a new DelayedConstraint - 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 + The inner constraint to decorate + The time interval after which the match is performed + If the value of is less than 0 - + - Asserts that collection contains actual as an item. + Creates a new DelayedConstraint - IEnumerable of objects to be considered - Object to be found within collection + 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 - + - Asserts that collection contains actual as an item. + Gets text describing a constraint - 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. + Test whether the constraint is satisfied by a given value - IEnumerable of objects to be considered - Object that cannot exist within collection + The value to be tested + True for if the base constraint fails, false if it succeeds - + - Asserts that collection does not contain actual as an item. + Test whether the constraint is satisfied by a delegate - 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 + The delegate whose value is to be tested + A ConstraintResult - + - Asserts that the superset does not contain the subset + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. - The IEnumerable subset to be considered - The IEnumerable superset to be considered + A reference to the value to be tested + True for success, false for failure - + - Asserts that the superset does not contain the subset + Returns the string representation of the constraint. - 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. + Adjusts a Timestamp by a given TimeSpan - The IEnumerable subset to be considered - The IEnumerable superset to be considered + + + - + - Asserts that the superset contains the subset. + Returns the difference between two Timestamps as a TimeSpan - 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 + DictionaryContainsKeyConstraint is used to test whether a dictionary + contains an expected object as a key. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that the subset does not contain the superset + Construct a DictionaryContainsKeyConstraint - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that the subset contains the superset. + Test whether the expected key is contained in the dictionary - 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 + EmptyCollectionConstraint tests whether a 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 + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is empty + Check that the 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 + 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. - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is ordered + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - 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 + Test whether the constraint is satisfied by a given value - An array, list or other collection implementing IEnumerable + The value to be tested + True for success, false for failure - + - Assert that an array, list or other collection is ordered + EmptyDirectoryConstraint is used to test that a directory is empty - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message - + - Assert that an array, list or other collection is ordered + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - + - Provides a platform-independent methods for getting attributes - for use by AttributeConstraint and AttributeExistsConstraint. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Gets the custom attributes from the given object. + EmptyStringConstraint tests whether a string is empty. - 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 + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Obtains a lifetime service object to control the lifetime policy for this instance. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Provides NUnit specific extensions to aid in Reflection - across multiple frameworks + EndsWithConstraint can test whether a string ends + with an expected substring. - - 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. + Initializes a new instance of the class. - - + The expected string - + - This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, - it replicates the functionality at the resolution supported. + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + - + - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. + 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. - + - Construct an AllItemsConstraint on top of an existing constraint + NUnitEqualityComparer used to test equality. - - + - Apply the item constraint to each item in the collection, - failing if any item fails. + Initializes a new instance of the class. - - + The expected value. - + - AndConstraint succeeds only if both members succeed. + Gets the tolerance for this comparison. + + The tolerance. + - + - Create an AndConstraint from two other constraints + Gets a value indicating whether to compare case insensitive. - The first constraint - The second constraint + + true if comparing case insensitive; otherwise, false. + - + - Gets text describing a constraint + Gets a value indicating whether or not to clip strings. + + true if set to clip strings otherwise, false. + - + - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. + Gets the failure points. - The actual value - True if the constraints both succeeded + + The failure points. + - + - 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. + Flag the constraint to ignore case and return self. - The writer on which the actual value is displayed - + - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. + Flag the constraint to suppress string clipping + and return self. - + - Construct an AssignableFromConstraint for the type provided + Flag the constraint to compare arrays as collections + and return self. - - + - Apply the constraint to an actual value, returning true if it succeeds + Flag the constraint to use a tolerance when determining equality. - The actual argument - True if the constraint succeeds, otherwise false. + Tolerance value to be used + Self. - + - AssignableToConstraint is used to test that an object - can be assigned to a given Type. + Flags the constraint to include + property in comparison of two values. + + Using this modifier does not allow to use the + constraint modifier. + - + - Construct an AssignableToConstraint for the type provided + 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. + - + - Apply the constraint to an actual value, returning true if it succeeds + Switches the .Within() modifier to interpret its tolerance as + a percentage that the actual _values is allowed to deviate from + the expected value. - The actual argument - True if the constraint succeeds, otherwise false. + Self - + - 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. + Causes the tolerance to be interpreted as a TimeSpan in days. + Self - + - Constructs an AttributeConstraint for a specified attribute - Type and base constraint. + Causes the tolerance to be interpreted as a TimeSpan in hours. - - + Self - + - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. + Causes the tolerance to be interpreted as a TimeSpan in minutes. + Self - + - Returns a string representation of the constraint. + Causes the tolerance to be interpreted as a TimeSpan in seconds. + Self - + - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. + Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + Self - + - Constructs an AttributeExistsConstraint for a specific attribute Type + Causes the tolerance to be interpreted as a TimeSpan in clock ticks. - + Self - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Flag the constraint to use the supplied IComparer object. + The IComparer object to use. + Self. - + - 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 + Flag the constraint to use the supplied IComparer object. + The IComparer object to use. + Self. - + - Construct a BinaryConstraint from two other constraints + Flag the constraint to use the supplied Comparison object. - The first constraint - The second constraint + The IComparer object to use. + Self. - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Flag the constraint to use the supplied IEqualityComparer object. + The IComparer object to use. + Self. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 - - - 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 Description of what this constraint tests, for + use in messages and in the ConstraintResult. - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - - + - Test whether the constraint is satisfied by a given value + EqualityAdapter class handles all equality comparisons + that use an , + or a . - The value to be tested - True for success, false for failure - + - Protected method to be implemented by derived classes + Compares two objects, returning true if they are equal - - - + - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. + Returns true if the two objects can be compared by this adapter. + The base adapter cannot handle IEnumerables except for strings. - + - Construct a CollectionContainsConstraint + Returns an that wraps an . - - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + that wraps an . - + - Gets the expected object + Returns an that wraps an . - + - Test whether the expected item is contained in the collection + Returns an EqualityAdapter that uses a predicate function for items comparison. - + + + - + - CollectionEquivalentConstraint is used to determine whether two - collections are equivalent. + Returns true if the two objects can be compared by this adapter. + The base adapter cannot handle IEnumerables except for strings. - + - Construct a CollectionEquivalentConstraint + Compares two objects, returning true if they are equal - - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. - + - Test whether two collections are equivalent + Returns an that wraps an . - - - + - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. + Returns an that wraps an . - + - Construct an empty CollectionConstraint + that wraps an . - + - Construct a CollectionConstraint + Returns an that wraps a . - - + - Flag the constraint to ignore case and return self. + ExactTypeConstraint is used to test that an object + is of the exact type provided in the constructor - + - Flag the constraint to use the supplied IComparer object. + Construct an ExactTypeConstraint for a given Type - The IComparer object to use. - Self. + The expected Type. - + - Flag the constraint to use the supplied IComparer object. + Apply the constraint to an actual value, returning true if it succeeds - The IComparer object to use. - Self. + The actual argument + True if the constraint succeeds, otherwise false. - + - Flag the constraint to use the supplied Comparison object. + FalseConstraint tests that the actual value is false - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Initializes a new instance of the class. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Test whether the constraint is satisfied by a given value - The IComparer object to use. - Self. + The value to be tested + True for success, false for failure - - - Compares two collection members for equality - + + 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. + + - - - Return a new CollectionTally for use in making tests - - The collection to be included in the tally + + Union of a floating point variable and an integer - - - CollectionOrderedConstraint is used to test whether a collection is ordered. - + + The union's value as a floating point variable - - - Construct a CollectionOrderedConstraint - + + The union's value as an integer - - - If used performs a reverse comparison - + + The union's value as an unsigned integer - - - Modifies the constraint to use an and returns self. - + + Union of a double precision floating point variable and a long - - - Modifies the constraint to use an and returns self. - + + The union's value as a double precision floating point variable - - - Modifies the constraint to use a and returns self. - + + The union's value as a long - - - Modifies the constraint to test ordering by the value of - a specified property and returns self. - + + 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/ + + + + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 + - + - Test whether the collection is ordered + 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 + - + - Returns the string representation of the constraint. + 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 + - + - CollectionSupersetConstraint is used to determine whether - one collection is a superset of another + 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 + - + - Construct a CollectionSupersetConstraint + Tests whether a value is greater than the value supplied to its constructor - The collection that the actual value is expected to be a superset of - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Initializes a new instance of the class. + The expected value. - + - Test whether the actual collection is a superset of - the expected collection provided. + Tests whether a value is greater than or equal to the value supplied to its constructor - - - + - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another + Initializes a new instance of the class. + The expected value. - + - Construct a CollectionSubsetConstraint + ConstraintStatus represents the status of a ConstraintResult + returned by a Constraint being applied to an actual value. - The collection that the actual value is expected to be a subset of - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + The status has not yet been set - + - Test whether the actual collection is a subset of - the expected collection provided. + The constraint succeeded - - - + - CollectionTally counts (tallies) the number of - occurrences of each object in one or more enumerations. + The constraint failed - + - Construct a CollectionTally object from a comparer and a collection + An error occured in applying the constraint (reserved for future use) - + - The number of objects remaining in the tally + Contain the result of matching a against an actual value. - + - Try to remove an object from the tally + Constructs a for a particular . - The object to remove - True if successful, false if the object was not found + The Constraint to which this result applies. + The actual value to which the Constraint was applied. - + - Try to remove a set of objects from the tally + Constructs a for a particular . - The objects to remove - True if successful, false if any object was not found + The Constraint to which this result applies. + The actual value to which the Constraint was applied. + The status of the new ConstraintResult. - + - ComparisonAdapter class centralizes all comparisons of - _values in NUnit, adapting to the use of any provided - , - or . + 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. - + - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. + The actual value that was passed to the method. - + - Returns a ComparisonAdapter that wraps an + Gets and sets the ResultStatus for this result. - + - Returns a ComparisonAdapter that wraps an + True if actual value meets the Constraint criteria otherwise false. - + - Returns a ComparisonAdapter that wraps a + Display friendly name of the constraint. - + - Compares two objects + Description of the constraint may be affected by the state the constraint had + when was performed against the actual value. - + - Construct a default ComparisonAdapter + 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 - + - Construct a ComparisonAdapter for an + 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 - + - Compares two objects + InstanceOfTypeConstraint is used to test that an object + is of the same type provided or derived from it. - - - - + - ComparerAdapter extends and - allows use of an or - to actually perform the comparison. + Construct an InstanceOfTypeConstraint for the type provided + The expected Type - + - Construct a ComparisonAdapter for an + Apply the constraint to an actual value, returning true if it succeeds + The actual argument + True if the constraint succeeds, otherwise false. - + - Compare a Type T to an object + The IResolveConstraint interface is implemented by all + complete and resolvable constraints and expressions. - + - Construct a ComparisonAdapter for a + Return the top-level constraint for this expression + - + - Compare a Type T to an object + Tests whether a value is less than the value supplied to its constructor - + - Abstract base class for constraints that compare _values to - determine if one is greater than, equal to or less than - the other. + Initializes a new instance of the class. + The expected value. - + - The value against which a comparison is to be made + Tests whether a value is less than or equal to the value supplied to its constructor - + - If true, less than returns success + Initializes a new instance of the class. + The expected value. - + - if true, equal returns success + 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. - + - if true, greater than returns success + Construct a MessageWriter given a culture - + - ComparisonAdapter to be used in making the comparison + Abstract method to get the max line length - + - Initializes a new instance of the class. + Method to write single line message with optional args, usually + written to precede the general failure message. - 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. + The message to be written + Any arguments used in formatting the message - + - Test whether the constraint is satisfied by a given value + Method to write single line message with optional args, usually + written to precede the general failure message, at a givel + indentation level. - The value to be tested - True for success, false for failure + The indentation level of the message + The message to be written + Any arguments used in formatting the message - + - Modifies the constraint to use an and returns self + 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 comparer used for comparison tests - A constraint modified to use the given comparer + The failing constraint result - + - Modifies the constraint to use an and returns self + 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 comparer used for comparison tests - A constraint modified to use the given comparer + The expected value + The actual value causing the failure - + - Modifies the constraint to use a and returns self + Display Expected and Actual lines for given _values, including + a tolerance value on the Expected line. - The comparer used for comparison tests - A constraint modified to use the given comparer + The expected value + The actual value causing the failure + The tolerance within which the test was made - + - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint + 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 - + - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. + Writes the text for an actual value. + The actual value. - + - Construct a constraint with optional arguments + Writes the text for a generalized value. - Arguments to be saved + The value. - + - 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. + 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 - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Custom value formatter function + The value + - + - Arguments provided to this Constraint, for use in - formatting the description. + 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 - + - The ConstraintBuilder holding this constraint + Static methods used in creating messages - + - Applies the constraint to an actual value, returning a ConstraintResult. + Static string used when strings are clipped - 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. + Formatting strings used for expected and actual _values - 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. + Current head of chain of value formatters. Public for testing. - A reference to the value to be tested - A ConstraintResult - + - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. + Add a formatter to the chain of responsibility. - + - + - Returns the string representation of this constraint + Formats text to represent a generalized value. + The value + The formatted text - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + 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 - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + 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. + + - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + Converts any control characters in a string + to their escaped representation. + The string to be converted + The converted string - + - Returns a ConstraintExpression by appending And - to the current constraint. + Return the a string representation for a set of indices into an array + Array of indices for which a string is needed - + - Returns a ConstraintExpression by appending And - to the current constraint. + 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 - + - Returns a ConstraintExpression by appending Or - to the current constraint. + 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 - + - Returns a DelayedConstraint with the specified delay time. + Clip the expected and actual strings in a coordinated fashion, + so that they may be displayed together. - The delay in milliseconds. - + + + + - + - Returns a DelayedConstraint with the specified delay time - and polling interval. + Shows the position two strings start to differ. Comparison + starts at the start index. - The delay in milliseconds. - The interval at which to test the constraint. - + 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 - + - Resolves any pending operators and returns the resolved constraint. + NaNConstraint tests that the actual value is a double or float NaN - + - 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. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - OperatorStack is a type-safe stack for holding ConstraintOperators + Test that the actual value is an NaN + + - + - Initializes a new instance of the class. + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. - The ConstraintBuilder using this stack. - + - Gets a value indicating whether this is empty. + Construct a SomeItemsConstraint on top of an existing constraint - true if empty; otherwise, false. + - + - Gets the topmost operator without modifying the stack. + Apply the item constraint to each item in the collection, + failing if any item fails. + + - + - Pushes the specified operator onto the stack. + NotConstraint negates the effect of some other constraint - The operator to put onto the stack. - + - Pops the topmost operator from the stack. + Initializes a new instance of the class. - The topmost operator on the stack + The base constraint to be negated. - + - ConstraintStack is a type-safe stack for holding Constraints + 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 - + - Initializes a new instance of the class. + NullConstraint tests that the actual value is null - The ConstraintBuilder using this stack. - + - Gets a value indicating whether this is empty. + Initializes a new instance of the class. - 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. + Applies the constraint to an actual value, returning a ConstraintResult. - The constraint to put onto the stack + The value to be tested + A ConstraintResult - + - Pops this topmost constraint from the stack. - As a side effect, the constraint's Builder - field is set to null. + The Numerics class contains common operations on numeric _values. - The topmost contraint on the stack - + - Initializes a new instance of the class. + 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 - + - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. + Checks the type of the object, returning true if + the object is a floating point numeric type. - The operator to push. + The object to check + true if the object is a floating point numeric type - + - Appends the specified constraint to the expression by pushing - it on the constraint stack. + Checks the type of the object, returning true if + the object is a fixed point numeric type. - The constraint to push. + The object to check + true if the object is a fixed point numeric type - + - Sets the top operator right context. + 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 right context. + The expected value + The actual value + A reference to the tolerance in effect + True if the _values are equal - + - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. + Compare two numeric _values, performing the usual numeric conversions. - The target precedence. + The expected value + The actual value + The relationship of the _values to each other - + - Resolves this instance, returning a Constraint. If the Builder - is not currently in a resolvable state, an exception is thrown. + NUnitComparer encapsulates NUnit's default behavior + in comparing two objects. - The resolved constraint - + - Gets a value indicating whether this instance is resolvable. + Returns the default NUnitComparer. - - 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. + Compares two objects + + + - + - The ConstraintBuilder holding the elements recognized so far + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. - + - Initializes a new instance of the class. + If true, all string comparisons will ignore case - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + If true, arrays will be treated as collections, allowing + those of different dimensions to be compared - 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. + Comparison objects used in comparisons for some constraints. - - + - Appends an operator to the expression and returns the - resulting expression itself. + List of points at which a failure occurred. - + - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. + Returns the default NUnitEqualityComparer - + - 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. + Gets and sets a flag indicating whether case should + be ignored in determining equality. - + - Returns a ConstraintExpression that negates any - following constraint. + Gets and sets a flag indicating that arrays should be + compared as collections, without regard to their shape. - + - Returns a ConstraintExpression that negates any - following constraint. + 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. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + 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. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Flags the comparer to include + property in comparison of two values. + + Using this modifier does not allow to use the + modifier. + - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Compares two objects for equality within a tolerance. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + Helper method to compare two arrays - + - 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. + Method to compare two DirectoryInfo objects + first directory to compare + second directory to compare + true if equivalent, false if not - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + FailurePoint class represents one point of failure + in an equality test. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + The location of the failure - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + The expected value - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + The actual value - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Indicates whether the expected value is valid - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Indicates whether the actual value is valid - + - With is currently a NOP - reserved for future use. + Operator that requires both it's arguments to succeed - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Construct an AndOperator - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Apply the operator to produce an AndConstraint - + - Returns a constraint that tests for null + Operator that tests for the presence of a particular attribute + on a type and optionally applies further tests to the attribute. - + - Returns a constraint that tests for True + Construct an AttributeOperator for a particular Type + The Type of attribute tested - + - Returns a constraint that tests for False + 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 a constraint that tests for a positive value + Abstract base class for all binary operators - + - Returns a constraint that tests for a negative value + 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 a constraint that tests for NaN + Gets the left precedence of the operator - + - Returns a constraint that tests for empty + Gets the right precedence of the operator - + - Returns a constraint that tests whether a collection - contains all unique items. + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Abstract base for operators that indicate how to + apply a constraint to items in a collection. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Constructs a CollectionOperator - + - Returns a constraint that tests two items for equality + 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. - + - Returns a constraint that tests that two references are the same object + The precedence value used when the operator + is about to be pushed to the stack. - + - Returns a constraint that tests whether the - actual value is greater than the supplied argument + The precedence value used when the operator + is on the top of the stack. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument + The syntax element preceding this operator - + - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument + The syntax element following this operator - + - Returns a constraint that tests whether the - actual value is less than the supplied argument + The precedence value used when the operator + is about to be pushed to the stack. - + - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument + The precedence value used when the operator + is on the top of the stack. - + - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument + 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 a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Negates the test of the constraint it wraps. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Constructs a new NotOperator - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a NotConstraint applied to its argument. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Operator that requires at least one of it's arguments to succeed - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Construct an OrOperator - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Apply the operator to produce an OrConstraint - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + PrefixOperator takes a single constraint and modifies + it's action in some way. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + 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 a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Returns the constraint created by applying this + prefix to another constraint. + + - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + 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. - + - Returns a constraint that tests whether the actual value - is a superset of the collection supplied as an argument. + Gets the name of the property to which the operator applies - + - Returns a constraint that tests whether a collection is ordered + Constructs a PropOperator for a particular named property - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + 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 a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. - + - 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. + Operator that tests that an exception is thrown and + optionally applies further tests to the exception. - + - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. + Construct a ThrowsOperator - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + 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 a constraint that succeeds if the actual - value contains the substring supplied as an argument. + 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. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Constructor for the WithOperator - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Returns a constraint that wraps its argument - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + OrConstraint succeeds if either member succeeds - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Create an OrConstraint from two other constraints + The first constraint + The second constraint - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets text describing a constraint - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + 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 - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Construct a PathConstraint for a give expected path + The expected path - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Modifies the current instance to be case-sensitive + and returns it. - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Returns the string representation of this constraint - + - Returns a constraint that tests whether the path provided - is the a subpath of the expected path after canonicalization. + Canonicalize the provided path + + The path in standardized form - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + 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 + - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. - + - Returns a constraint that succeeds if the value - is a file or directory and it exists. + Construct a PredicateConstraint from a predicate - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Gets text describing a constraint - + - Returns a ConstraintExpression that negates any - following constraint. + Determines whether the predicate succeeds when applied + to the actual value. - + - Returns a ConstraintExpression that negates any - following constraint. + Abstract base class used for prefixes - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + The base constraint - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Prefix used in forming the constraint description - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Construct given a base constraint + - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - 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. + PropertyConstraint extracts a named property and uses + its value as the actual value for a chained constraint. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Initializes a new instance of the class. + The name. + The constraint to apply to the property. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Returns the string representation of the constraint. + - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + 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. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Initializes a new instance of the class. + The name of the property. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Returns a constraint that tests for null + Test whether the property exists for a given object + The object to be tested + True for success, false for failure - + - Returns a constraint that tests for True + Returns the string representation of the constraint. + - + - Returns a constraint that tests for False + RangeConstraint tests whether two _values are within a + specified range. - + - Returns a constraint that tests for a positive value + 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. - + - Returns a constraint that tests for a negative value + Gets text describing a constraint - + - Returns a constraint that tests for NaN + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a constraint that tests for empty + Modifies the constraint to use an and returns self. - + - Returns a constraint that tests whether a collection - contains all unique items. + Modifies the constraint to use an and returns self. - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Modifies the constraint to use a and returns self. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + RegexConstraint can test whether a string matches + the pattern provided. - + - Returns a constraint that tests two items for equality + Initializes a new instance of the class. + The pattern. - + - Returns a constraint that tests that two references are the same object + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a constraint that tests whether the - actual value is greater than the supplied argument + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument + Create a new instance of ResolvableConstraintExpression - + - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + - + - Returns a constraint that tests whether the - actual value is less than the supplied argument + Appends an And Operator to the expression - + - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument + Appends an Or operator to the expression. - + - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument + Resolve the current expression to a Constraint - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Construct a ReusableConstraint from a constraint expression + The expression to be resolved and reused - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Converts a constraint to a ReusableConstraint + The constraint to be converted + A ReusableConstraint - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a that represents this instance. + + A that represents this instance. + - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Return the top-level constraint for this expression + - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + SameAsConstraint tests whether an object is identical to + the object passed to its constructor - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Initializes a new instance of the class. + The expected object. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Summary description for SamePathConstraint. - + - Returns a constraint that tests whether the actual value - is a superset of the collection supplied as an argument. + Initializes a new instance of the class. + The expected path - + - Returns a constraint that tests whether a collection is ordered + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + SamePathOrUnderConstraint tests that one path is under another - + - 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. + Initializes a new instance of the class. + The expected path - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Construct a SomeItemsConstraint on top of an existing constraint + - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + StartsWithConstraint can test whether a string starts + with an expected substring. - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + Initializes a new instance of the class. + The expected string - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + The expected value - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Indicates whether tests should be case-insensitive - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Description of this constraint - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + The Description of what this constraint tests, for + use in messages and in the ConstraintResult. - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Constructs a StringConstraint without an expected value - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Constructs a StringConstraint given an expected value + The expected value - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Modify the constraint to ignore case in matching. - + - Returns a constraint that tests whether the path provided - is a subpath of the expected path after canonicalization. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Test whether the constraint is satisfied by a given string + The string to be tested + True for success, false for failure - + - Returns a constraint that tests whether the actual value falls - within a specified range. + SubstringConstraint can test whether a string contains + the expected substring. - + - ConstraintStatus represents the status of a ConstraintResult - returned by a Constraint being applied to an actual value. + Initializes a new instance of the class. + The expected. - + - The status has not yet been set + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - The constraint succeeded + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. - + - The constraint failed + Initializes a new instance of the class, + using a constraint to be applied to the exception. + A constraint to apply to the caught exception. - + - An error occured in applying the constraint (reserved for future use) + Get the actual exception thrown - used by Assert.Throws. - + - Contain the result of matching a against an actual value. + Gets text describing a constraint - + - Constructs a for a particular . + 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. - The Constraint to which this result applies. - The actual value to which the Constraint was applied. + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false - + - Constructs a for a particular . + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. - 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 . + 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 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 writer on which the actual value is displayed - + - The actual value that was passed to the method. + ThrowsNothingConstraint tests that a delegate does not + throw an exception. - + - Gets and sets the ResultStatus for this result. + Gets text describing a constraint - + - True if actual value meets the Constraint criteria otherwise false. + Test whether the constraint is satisfied by a given value + The value to be tested + True if no exception is thrown, otherwise false - + - Display friendly name of the constraint. + 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 - + - Description of the constraint may be affected by the state the constraint had - when was performed against the actual value. + 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. - + - 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. + Returns a default Tolerance object, equivalent to + specifying an exact match unless + is set, in which case, the + will be used. - 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. + Returns an empty Tolerance object, equivalent to + specifying an exact match even if + is set. - 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. + Constructs a linear tolerance of a specified amount - + - Initializes a new instance of the class. + Constructs a tolerance given an amount and - The _expected. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Gets the for the current Tolerance - + - Flag the constraint to ignore case and return self. + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. - + - Test whether the constraint is satisfied by a given value + Gets the value of the current Tolerance instance. - 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. + Returns a new tolerance, using the current amount as a percentage. - + - Creates a new DelayedConstraint + Returns a new tolerance, using the current amount in Ulps - 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 + Returns a new tolerance with a as the amount, using + the current amount as a number of days. - 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 + Returns a new tolerance with a as the amount, using + the current amount as a number of hours. - + - Test whether the constraint is satisfied by a given value + Returns a new tolerance with a as the amount, using + the current amount as a number of minutes. - 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 + Returns a new tolerance with a as the amount, using + the current amount as a number of seconds. - 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. + Returns a new tolerance with a as the amount, using + the current amount as a number of milliseconds. - A reference to the value to be tested - True for success, false for failure - + - Returns the string representation of the constraint. + Returns a new tolerance with a as the amount, using + the current amount as a number of clock ticks. - + - Adjusts a Timestamp by a given TimeSpan + Returns true if the current tolerance has not been set or is using the . - - - - + - Returns the difference between two Timestamps as a TimeSpan + Modes in which the tolerance value for a comparison can be interpreted. - - - - + - DictionaryContainsKeyConstraint is used to test whether a dictionary - contains an expected object as a key. + 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. - + - Construct a DictionaryContainsKeyConstraint + The tolerance is used as a numeric range within which + two compared _values are considered to be equal. - - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Interprets the tolerance as the percentage by which + the two compared _values my deviate from each other. - + - Test whether the expected key is contained in the dictionary + Compares two _values based in their distance in + representable numbers. - + - DictionaryContainsValueConstraint is used to test whether a dictionary - contains an expected object as a value. + TrueConstraint tests that the actual value is true - + - Construct a DictionaryContainsValueConstraint + Initializes a new instance of the class. - - + - 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 - + - Test whether the expected value is contained in the dictionary + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. - + - EmptyCollectionConstraint tests whether a collection is empty. + The expected Type used by the constraint - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + The type of the actual argument to which the constraint was applied - + - Check that the collection is empty + Construct a TypeConstraint for a given Type - - + The expected type for the constraint + Prefix used in forming the constraint description - - - 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. + Applies the constraint to an actual value, returning a ConstraintResult. + The value to be tested + A ConstraintResult - + - Test whether the constraint is satisfied by a given value + Apply the constraint to an actual value, returning true if it succeeds - The value to be tested - True for success, false for failure + The actual argument + True if the constraint succeeds, otherwise false. - + - EmptyDirectoryConstraint is used to test that a directory is empty + 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. - + - Test whether the constraint is satisfied by a given value + Check that all items are unique. - The value to be tested - True for success, false for failure + + - + - EmptyStringConstraint tests whether a string is empty. + XmlSerializableConstraint tests whether + an object is serializable in xml format. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 - + - EndsWithConstraint can test whether a string ends - with an expected substring. + Returns the string representation of this constraint - + - Initializes a new instance of the class. + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. - 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. + 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. - + - 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. + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. - + - NUnitEqualityComparer used to test equality. + Construct an ExactCountOperator for a specified count + The expected count - + - Initializes a new instance of the class. + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. - The expected value. - + - Gets the tolerance for this comparison. + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. - - The tolerance. - - + - Gets a value indicating whether to compare case insensitive. + Constructs an ExceptionTypeConstraint - - true if comparing case insensitive; otherwise, false. - - + - Gets a value indicating whether or not to clip strings. + Applies the constraint to an actual value, returning a ConstraintResult. - - true if set to clip strings otherwise, false. - + The value to be tested + A ConstraintResult - + - Gets the failure points. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - - The failure points. - - + - Flag the constraint to ignore case and return self. + 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 - + - Flag the constraint to suppress string clipping - and return self. + Verifies that a delegate throws a particular exception when called. + A constraint to be satisfied by the exception + A TestSnippet delegate - + - Flag the constraint to compare arrays as collections - and return self. + 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 - + - Flag the constraint to use a tolerance when determining equality. + Verifies that a delegate throws a particular exception when called. - Tolerance value to be used - Self. + The exception Type expected + A TestDelegate - + - Flags the constraint to include - property in comparison of two values. + Verifies that a delegate throws a particular exception when called. - - Using this modifier does not allow to use the - constraint modifier. - + Type of the expected exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Switches the .Within() modifier to interpret its tolerance as - a distance in representable _values (see remarks). + Verifies that a delegate throws a particular exception when called. - 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. - + Type of the expected exception + A TestDelegate - + - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual _values is allowed to deviate from - the expected value. + Verifies that a delegate throws an exception when called + and returns it. - Self + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Causes the tolerance to be interpreted as a TimeSpan in days. + Verifies that a delegate throws an exception when called + and returns it. - Self + A TestDelegate - + - Causes the tolerance to be interpreted as a TimeSpan in hours. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. - Self + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Causes the tolerance to be interpreted as a TimeSpan in minutes. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. - Self + The expected Exception Type + A TestDelegate - + - Causes the tolerance to be interpreted as a TimeSpan in seconds. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. - Self + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. - Self + A TestDelegate - + - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + Verifies that a delegate does not throw an exception - Self + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Flag the constraint to use the supplied IComparer object. + Verifies that a delegate does not throw an exception. - The IComparer object to use. - Self. + A TestDelegate - + - Flag the constraint to use the supplied IComparer object. + 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 IComparer object to use. - Self. + 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 - + - Flag the constraint to use the supplied Comparison object. + 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 IComparer object to use. - Self. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - Flag the constraint to use the supplied IEqualityComparer object. + 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 IComparer object to use. - Self. + 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 - + - Flag the constraint to use the supplied IEqualityComparer object. + 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 IComparer object to use. - Self. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - Test whether the constraint is satisfied by a given value + 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 to be tested - True for success, false for failure + The value that is expected + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 - + - EqualityAdapter class handles all equality comparisons - that use an , - or a . + 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 - + - Compares two objects, returning true if they are equal + 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 - + - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. + 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 - + - Returns an that wraps an . + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + The expected object + The actual object - + - that wraps an . + 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 - + - Returns an that wraps an . + 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 - + - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. + 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 - + - Returns an that wraps an . + 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 - + - Returns an that wraps an . + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination - + - that wraps an . + 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 - + - Returns an that wraps a . + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination - + - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor + 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 - + - Construct an ExactTypeConstraint for a given Type + Asserts that an object may not be assigned a value of a given Type. - The expected Type. + The expected Type. + The object under examination - + - Apply the constraint to an actual value, returning true if it succeeds + Asserts that an object may not be assigned a value of a given Type. - The actual argument - True if the constraint succeeds, otherwise false. + 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 - + - FalseConstraint tests that the actual value is false + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination - + - Initializes a new instance of the class. + 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 - + - Test whether the constraint is satisfied by a given value + Asserts that an object is an instance of a given type. - The value to be tested - True for success, false for failure + The expected Type + The object being examined - + - FileExistsConstraint is used to determine if a file exists + 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 - + - Initializes a new instance of the class. + Asserts that an object is an instance of a given type. + The expected Type + The object being examined - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 - + - FileOrDirectoryExistsConstraint is used to determine if a file or directory exists + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined - + - If true, the constraint will only check if files exist, not directories + 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 + + - If true, the constraint will only check if directories exist, not files + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined - + - Initializes a new instance of the class that - will check files and directories. + 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 - + - Initializes a new instance of the class that - will only check files if ignoreDirectories is true. + 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 . - if set to true [ignore directories]. + A lambda that returns a Boolean - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 - + - Applies the constraint to an actual value, returning a ConstraintResult. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The value to be tested - A ConstraintResult + 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 - - Helper routines for working with floating point numbers + + + 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. + - - 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. - + 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 - - Union of a floating point variable and an integer + + + 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 - - The union's value as a floating point variable + + + 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 union's value as an integer + + + 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 - - The union's value as an unsigned integer + + + 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 - - Union of a double precision floating point variable and a long + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition - - The union's value as a double precision floating point variable + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - - The union's value as a long + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - - The union's value as an unsigned long + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - - 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/ - - + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - - 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/ - - + + + 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 - + - 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 - + 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 - + - 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 - + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - 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 - + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - Reinterprets the memory contents of an integer value as a double precision - floating point value + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - + 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 - + - Tests whether a value is greater than the value supplied to its constructor + 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 - + - Initializes a new instance of the class. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The expected value. + 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 - + - Tests whether a value is greater than or equal to the value supplied to its constructor + 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 - + - Initializes a new instance of the class. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected value. + 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 - + - Interface for all constraints + 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 display name of this Constraint for use by ToString(). + 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 - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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 - + - Arguments provided to this Constraint, for use in - formatting the description. + 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 - + - The ConstraintBuilder holding this constraint + 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 - + - Applies the constraint to an actual value, returning a ConstraintResult. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The value to be tested - A ConstraintResult + 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 - + - 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. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - An ActualValueDelegate - A ConstraintResult + The value that is to be tested - + - 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. + Assert that a string is empty - that is equal to string.Empty - A reference to the value to be tested - A ConstraintResult + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. + Assert that a string is empty - that is equal to string.Empty + The string to be tested - + - Construct an InstanceOfTypeConstraint for the type provided + Assert that an array, list or other collection is empty - The expected Type + 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 - + - Apply the constraint to an actual value, returning true if it succeeds + Assert that an array, list or other collection is empty - The actual argument - True if the constraint succeeds, otherwise false. + An array, list or other collection implementing ICollection - + - The IResolveConstraint interface is implemented by all - complete and resolvable constraints and expressions. + 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 - + - Return the top-level constraint for this expression + Assert that a string is not empty - that is not equal to string.Empty - + The string to be tested - + - Tests whether a value is less than the value supplied to its constructor + 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 - + - Initializes a new instance of the class. + Assert that an array, list or other collection is not empty - The expected value. + An array, list or other collection implementing ICollection - + - Tests whether a value is less than or equal to the value supplied to its constructor + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. - + - Initializes a new instance of the class. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - 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. + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Construct a MessageWriter given a culture + 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 - + - Abstract method to get the max line length + 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. - + - Method to write single line message with optional args, usually - written to precede the general failure 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 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. + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. - The indentation level of the message - The message to be written - Any arguments used in formatting the message + The message to initialize the with. + Arguments to be 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. + Throws an with the message that is + passed in. This is used by the other Assert functions. - The failing constraint result + The message to initialize the with. - + - 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. + Throws an . + This is used by the other Assert functions. - 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. + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. - The expected value - The actual value causing the failure - The tolerance within which the test was made + The message to initialize the with. + Arguments to be used in formatting the message - + - 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. + Throws an with the message that is + passed in. This causes the test to be reported as ignored. - 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 + The message to initialize the with. - + - Writes the text for an actual value. + Throws an . + This causes the test to be reported as ignored. - The actual value. - + - Writes the text for a generalized value. + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. - The value. + The message to initialize the with. + Arguments to be used in formatting the message - + - Writes the text for a collection value, - starting at a particular point, to a max length + Throws an with the message that is + passed in. This causes the test to be reported as inconclusive. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write + The message to initialize the with. - + - Static methods used in creating messages + Throws an . + This causes the test to be reported as Inconclusive. - + - Static string used when strings are clipped + 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 - + - Formatting strings used for expected and actual _values + Asserts that an object is contained in a list. + The expected object + The list to be examined - + - Formats text to represent a generalized value. + 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 value - The formatted text - + - Formats text for a collection value, - starting at a particular point, to a max length + The IMethodInfo class is used to encapsulate information + about a method in a platform-independent manner. - 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. + Gets the Type from which this method was reflected. - - - + - Converts any control characters in a string - to their escaped representation. + Gets the MethodInfo for this method. - The string to be converted - The converted string - + - Return the a string representation for a set of indices into an array + Gets the name of the method. - 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. + Gets a value indicating whether the method is abstract. - 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 + Gets a value indicating whether the method is public. - 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. + Gets a value indicating whether the method contains unassigned generic type parameters. - - - - - + - Shows the position two strings start to differ. Comparison - starts at the start index. + Gets a value indicating whether the method is a generic method. - The expected string - The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found - + - NaNConstraint tests that the actual value is a double or float NaN + Gets a value indicating whether the MethodInfo represents the definition of a generic method. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Gets the return Type of the method. - + - Test that the actual value is an NaN + Gets the parameters of the method. - - + - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. + Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - + - Construct a SomeItemsConstraint on top of an existing constraint + 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 - + - Apply the item constraint to each item in the collection, - failing if any item fails. + 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 - + - NotConstraint negates the effect of some other constraint + The IParameterInfo interface is an abstraction of a .NET parameter. - + - Initializes a new instance of the class. + Gets a value indicating whether the parameter is optional - The base constraint to be negated. - + - Test whether the constraint is satisfied by a given value + Gets an IMethodInfo representing the method for which this is a parameter - The value to be tested - True for if the base constraint fails, false if it succeeds - + - NullConstraint tests that the actual value is null + Gets the underlying .NET ParameterInfo - + - Initializes a new instance of the class. + Gets the Type of the parameter - + - Applies the constraint to an actual value, returning a ConstraintResult. + The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. - The value to be tested - A ConstraintResult - + - The Numerics class contains common operations on numeric _values. + Returns an array of custom attributes of the specified type applied to this object - + - Checks the type of the object, returning true if - the object is a numeric type. + Returns a value indicating whether an attribute of the specified type is defined on this object. - 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 ITypeInfo interface is an abstraction of a .NET Type - The object to check - true if the object is a floating point numeric type - + - Checks the type of the object, returning true if - the object is a fixed point numeric type. + Gets the underlying Type on which this ITypeInfo is based - The object to check - true if the object is a fixed point numeric type - + - Test two numeric _values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. + Gets the base type of this type as an ITypeInfo - 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. + Returns true if the Type wrapped is equal to the argument - The expected value - The actual value - The relationship of the _values to each other - + - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. + Gets the Name of the Type - + - Returns the default NUnitComparer. + Gets the FullName of the Type - + - Compares two objects + Gets the assembly in which the type is declared - - - - + - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. + Gets the Namespace of the Type - + - If true, all string comparisons will ignore case + Gets a value indicating whether the type is abstract. - + - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared + Gets a value indicating whether the Type is a generic Type - + - Comparison objects used in comparisons for some constraints. + Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - + - List of points at which a failure occurred. + Gets a value indicating whether the Type is a generic Type definition - + - Returns the default NUnitEqualityComparer + Gets a value indicating whether the type is sealed. - + - Gets and sets a flag indicating whether case should - be ignored in determining equality. + Gets a value indicating whether this type is a static class. - + - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. + Get the display name for this typeInfo. - + - 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. + Get the display name for an oject of this type, constructed with specific arguments - + - 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. + Returns a Type representing a generic type definition from which this Type can be constructed. - + - Flags the comparer to include - property in comparison of two values. + Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - - Using this modifier does not allow to use the - modifier. - - + - Compares two objects for equality within a tolerance. + Returns a value indicating whether this type has a method with a specified public attribute - + - Helper method to compare two arrays + Returns an array of IMethodInfos for methods of this Type + that match the specified flags. - + - Method to compare two DirectoryInfo objects + Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - 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. + Construct an object of this Type, using the specified arguments. - + - The location of the failure + CombiningStrategy is the abstract base for classes that + know how to combine values provided for individual test + parameters to create a set of test cases. - + - The expected value + Gets the test cases generated by the CombiningStrategy. + The test cases. - + - The actual value + 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. - + - Indicates whether the expected value is valid + 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. - + - Indicates whether the actual value is valid + 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 - + - Represents a constraint that succeeds if all the - members of a collection match a base constraint. + The IDataPointProvider interface is used by extensions + that provide data for a single test parameter. - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. + 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. - + - Operator that requires both it's arguments to succeed + 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 - + - Construct an AndOperator + The IParameterDataSource interface is implemented by types + that can provide data for a test method parameter. - + - Apply the operator to produce an AndConstraint + 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 - + - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. + 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")); - + - Construct an AttributeOperator for a particular Type + Adds a key/value pair to the property bag - The Type of attribute tested + The key + The value - + - 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. + Sets the value for a key, removing any other + _values that are already in the property set. + + - + - Abstract base class for all binary operators + 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. - + - 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 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 the left precedence of the operator + Gets or sets the list of _values for a particular key + The key for which the _values are to be retrieved or set - + - Gets the right precedence of the operator + Gets a collection containing all the keys in the property set - + - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. + 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. - + - Abstract base for operators that indicate how to - apply a constraint to items in a collection. + Gets the id of the test - + - Constructs a CollectionOperator + Gets the name of the test - + - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - _values to determine whether the top operator on the - stack should be reduced before pushing a new operator. + Gets the fully qualified name of the test - + - The precedence value used when the operator - is about to be pushed to the stack. + Gets the name of the class containing this test. Returns + null if the test is not associated with a class. - + - The precedence value used when the operator - is on the top of the stack. + Gets the name of the method implementing this test. + Returns null if the test is not implemented as a method. - + - The syntax element preceding this operator + Gets the Type of the test fixture, if applicable, or + null if no fixture type is associated with this test. - + - The syntax element following this operator + Gets an IMethod for the method implementing this test. + Returns null if the test is not implemented as a method. - + - The precedence value used when the operator - is about to be pushed to the stack. + Gets the RunState of the test, indicating whether it can be run. - + - The precedence value used when the operator - is on the top of the stack. + Count of the test cases ( 1 if this is a test case ) - + - 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 properties of the test - - + - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. + Gets the parent test, if any. + The parent test or null if none exists. - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Returns true if this is a test suite - + - Negates the test of the constraint it wraps. + Gets a bool indicating whether the current test + has any descendant tests. - + - Constructs a new NotOperator + Gets this test's child tests + A list of child tests - + - Returns a NotConstraint applied to its argument. + Gets a fixture object for running this test. - + - Operator that requires at least one of it's arguments to succeed + The ITestData interface is implemented by a class that + represents a single instance of a parameterized test. - + - Construct an OrOperator + Gets the name to be used for the test - + - Apply the operator to produce an OrConstraint + Gets the RunState for this test case. - + - PrefixOperator takes a single constraint and modifies - it's action in some way. + Gets the argument list to be provided to the test - + - 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 property dictionary for the test case - - + - Returns the constraint created by applying this - prefix to another constraint. + 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. - - - - - 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. + + + Get the TypeArgs if separately set - + - Gets the name of the property to which the operator applies + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. - + - Constructs a PropOperator for a particular named property + Gets the expected result of the test case - + - 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 true if an expected result has been set - - + - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. + 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. - + - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. + Determine if a particular test passes the filter criteria. Pass + may examine the parents and/or descendants of a test, depending + on the semantics of the particular filter + The test to which the filter is applied + True if the test passes the filter, otherwise false - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. + 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 - + - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. + 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. - + - Construct a ThrowsOperator + Called when a test has just started + The test that is starting - + - 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. + Called when a test has finished + The result of the test - + - 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. + The ITestResult interface represents the result of a test. - + - Constructor for the WithOperator + Gets the ResultState of the test result, which + indicates the success or failure of the test. - + - Returns a constraint that wraps its argument + Gets the name of the test result - + - OrConstraint succeeds if either member succeeds + Gets the full name of the test result - + - Create an OrConstraint from two other constraints + Gets the elapsed time for running the test in seconds - The first constraint - The second constraint - + - Gets text describing a constraint + Gets or sets the time the test started running. - + - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. + Gets or sets the time the test finished running. - 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. + Gets the message associated with a test + failure or with not running the test - + - Construct a PathConstraint for a give expected path + Gets any stacktrace associated with an + error or failure. Not available in + the Compact Framework 1.0. - The expected path - + - Modifies the current instance to be case-sensitive - and returns it. + Gets the number of asserts executed + when running the test and all its children. - + - Returns the string representation of this constraint + Gets the number of test cases that failed + when running the test and all its children. - + - Canonicalize the provided path + Gets the number of test cases that passed + when running the test and all its children. - - The path in standardized form - + - Test whether one path in canonical form is a subpath of another path + Gets the number of test cases that were skipped + when running the test and all its children. - 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. + Gets the number of test cases that were inconclusive + when running the test and all its children. - + - Construct a PredicateConstraint from a predicate + Indicates whether this result has any child results. + Accessing HasChildren should not force creation of the + Children collection in classes implementing this interface. - + - Gets text describing a constraint + Gets the the collection of child results. - + - Determines whether the predicate succeeds when applied - to the actual value. + Gets the Test to which this result applies. - + - Abstract base class used for prefixes + Gets any text output written to this result. - + - The base constraint + An object implementing IXmlNodeBuilder is able to build + an XML representation of itself and any children. - + - Prefix used in forming the constraint description + Returns a TNode representing the current object. + If true, children are included where applicable + A TNode representing the result - + - Construct given a base constraint + 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 Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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. - + - 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 TestStatus. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The name. - The constraint to apply to the property. + The TestStatus. + The label. - + - Test whether the constraint is satisfied by a given value + Initializes a new instance of the class. - The value to be tested - True for success, false for failure + The TestStatus. + The stage at which the result was produced - + - Returns the string representation of the constraint. + Initializes a new instance of the class. - + The TestStatus. + The label. + The stage at which the result was produced - + - 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. + The result is inconclusive - + - Initializes a new instance of the class. + The test has been skipped. - The name of the property. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + The test has been ignored. - + - Test whether the property exists for a given object + The test was skipped because it is explicit - The object to be tested - True for success, false for failure - + - Returns the string representation of the constraint. + The test succeeded - - + - RangeConstraint tests whether two _values are within a - specified range. + The test failed - + - Initializes a new instance of the class. + The test encountered an unexpected exception - 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 + The test was cancelled by the user - + - Test whether the constraint is satisfied by a given value + The test was not runnable. - The value to be tested - True for success, false for failure - + - Modifies the constraint to use an and returns self. + A suite failed because one or more child tests failed or had errors - + - Modifies the constraint to use an and returns self. + A suite failed in its OneTimeSetUp - + - Modifies the constraint to use a and returns self. + A suite had an unexpected exception in its OneTimeSetUp - + - RegexConstraint can test whether a string matches - the pattern provided. + A suite had an unexpected exception in its OneTimeDown - + - Initializes a new instance of the class. + Gets the TestStatus for the test. - The pattern. + The status. - + - Test whether the constraint is satisfied by a given value + Gets the label under which this test result is + categorized, if any. - 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. + Gets the stage of test execution in which + the failure or other result took place. - + - Create a new instance of ResolvableConstraintExpression + 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 - + - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. + 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. + - + - Appends an And Operator to the expression + 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. + - + - Appends an Or operator to the expression. + Returns a that represents this instance. + + A that represents this instance. + - + - Resolve the current expression to a Constraint + The FailureSite enum indicates the stage of a test + in which an error or failure occurred. - + - ReusableConstraint wraps a constraint expression after - resolving it so that it can be reused consistently. + Failure in the test itself - + - Construct a ReusableConstraint from a constraint expression + Failure in the SetUp method - The expression to be resolved and reused - + - Converts a constraint to a ReusableConstraint + Failure in the TearDown method - The constraint to be converted - A ReusableConstraint - + - Returns a that represents this instance. + Failure of a parent test - - A that represents this instance. - - + - Return the top-level constraint for this expression + Failure of a child test - - + - SameAsConstraint tests whether an object is identical to - the object passed to its constructor + The RunState enum indicates whether a test can be executed. - + - Initializes a new instance of the class. + The test is not runnable. - The expected object. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + The test is runnable. - + - Test whether the constraint is satisfied by a given value + The test can only be run explicitly - The value to be tested - True for success, false for failure - + - Summary description for SamePathConstraint. + The test has been skipped. This value may + appear on a Test when certain attributes + are used to skip the test. - + - Initializes a new instance of the class. + The test has been ignored. May appear on + a Test, when the IgnoreAttribute is used. - The expected path - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + The TestStatus enum indicates the result of running a test - + - Test whether the constraint is satisfied by a given value + The test was inconclusive - The value to be tested - True for success, false for failure - + - SamePathOrUnderConstraint tests that one path is under another + The test has skipped - + - Initializes a new instance of the class. + The test succeeded - The expected path - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + The test failed - + - Test whether the constraint is satisfied by a given value + 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. - 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. + Constructs a new instance of TNode + The name of the node - + - Construct a SomeItemsConstraint on top of an existing constraint + Constructs a new instance of TNode with a value - + The name of the node + The text content of the node - + - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. + Constructs a new instance of TNode with a value - - + The name of the node + The text content of the node + Flag indicating whether to use CDATA when writing the text - + - The EqualConstraintResult class is tailored for formatting - and displaying the result of an EqualConstraint. + Gets the name of the node - + - Construct an EqualConstraintResult + Gets the value of the node - + - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. + Gets a flag indicating whether the value should be output using CDATA. - The MessageWriter to write to - + - Display the failure information for two collections that did not match. + Gets the dictionary of attributes - 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. + Gets a list of child nodes - 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. + Gets the first ChildNode - 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. + Gets the XML representation of this node. - 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. + Create a TNode from it's XML text representation + The XML text to be parsed + A TNode - + - Initializes a new instance of the class. + Adds a new element as a child of the current node and returns it. - The expected string + The element name. + The newly created child element - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + 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 - + - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. + 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 - + - The expected value + Adds an attribute with a specified name and value to the XmlNode. + The name of the attribute. + The value of the attribute. - + - Indicates whether tests should be case-insensitive + 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. + + - + - Description of this constraint + Finds all descendants of this node matching an xpath + specification. The format of the specification is + limited to what is needed by NUnit and its tests. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Writes the XML representation of the node to an XmlWriter + - + - Constructs a StringConstraint without an expected value + Class used to represent a list of XmlResults - + - Constructs a StringConstraint given an expected value + Class used to represent the attributes of a node - The expected value - + - Modify the constraint to ignore case in matching. + 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 - + - Test whether the constraint is satisfied by a given value + 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. - The value to be tested - True for success, false for failure - + - Test whether the constraint is satisfied by a given string + 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 string to be tested - True for success, false for failure + The type info of the fixture to be used. + A TestSuite object or one derived from TestSuite. - + - SubPathConstraint tests that the actual path is under the expected path + 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. - + - Initializes a new instance of the class. + The IApplyToContext interface is implemented by attributes + that want to make changes to the execution context before + a test is run. - The expected path - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Apply changes to the execution context + The execution context - + - Test whether the constraint is satisfied by a given value + The IApplyToTest interface is implemented by self-applying + attributes that modify the state of a test in some way. - The value to be tested - True for success, false for failure - + - SubstringConstraint can test whether a string contains - the expected substring. + Modifies a test as defined for the specific attribute. + The test to modify - + - Initializes a new instance of the class. + The ISuiteBuilder interface is exposed by a class that knows how to + build a suite from one or more Types. - The expected. - + - Test whether the constraint is satisfied by a given value + 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 value to be tested - True for success, false for failure + The type of the fixture to be used + True if the type can be used to build a TestSuite - + - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. + Build a TestSuite from type provided. + The type of the fixture to be used + A TestSuite - + - Initializes a new instance of the class, - using a constraint to be applied to the exception. + The ITestCaseBuilder interface is exposed by a class that knows how to + build a test case from certain methods. - A constraint to apply to the caught exception. + + 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. + - + - Get the actual exception thrown - used by Assert.Throws. + 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 - + - Gets text describing a constraint + 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 - + - 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. + ICommandWrapper is implemented by attributes and other + objects able to wrap a TestCommand with another command. - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false + + 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. + - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Wrap a command and return the result. - - + The command to be wrapped + The wrapped command - + - 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. + Objects implementing this interface are used to wrap + the TestMethodCommand itself. They apply after SetUp + has been run and before TearDown. - The writer on which the actual value is displayed - + - ThrowsExceptionConstraint tests that an exception has - been thrown, without any further tests. + Objects implementing this interface are used to wrap + the entire test, including SetUp and TearDown. - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + 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. - + - Executes the code and returns success if an exception is thrown. + Initializes a new instance of the class. - A delegate representing the code to be tested - True if an exception is thrown, otherwise false + The arguments. - + - ThrowsNothingConstraint tests that a delegate does not - throw an exception. + Initializes a new instance of the class. + The argument. - + - Gets text describing a constraint + Initializes a new instance of the class. + The first argument. + The second argument. - + - Test whether the constraint is satisfied by a given value + Initializes a new instance of the class. - The value to be tested - True if no exception is thrown, otherwise false + The first argument. + The second argument. + The third argument. - + - 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. + Marks the test fixture as explicit. - 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. + Marks the test fixture as explicit, specifying the reason. - + - Returns a default Tolerance object, equivalent to - specifying an exact match unless - is set, in which case, the - will be used. + Ignores this TestFixture, specifying the reason. + The reason. + - + - Returns an empty Tolerance object, equivalent to - specifying an exact match even if - is set. + Asserts on Directories - + - Constructs a linear tolerance of a specified amount + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + - + - Constructs a tolerance given an amount and + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Gets the for the current Tolerance + 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 - + - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. + 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 - + - Gets the value of the current Tolerance instance. + 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 - + - Returns a new tolerance, using the current amount as a percentage. + 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 - + - Returns a new tolerance, using the current amount in Ulps + Asserts that the directory exists. If it does not exist + an is thrown. + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Returns a new tolerance with a as the amount, using - the current amount as a number of days. + Asserts that the directory exists. If it does not exist + an is thrown. + A directory containing the actual value - + - Returns a new tolerance with a as the amount, using - the current amount as a number of hours. + 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 - + - Returns a new tolerance with a as the amount, using - the current amount as a number of minutes. + Asserts that the directory exists. If it does not exist + an is thrown. + The path to a directory containing the actual value - + - Returns a new tolerance with a as the amount, using - the current amount as a number of seconds. + Asserts that the directory does not exist. If it does exist + an is thrown. + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Returns a new tolerance with a as the amount, using - the current amount as a number of milliseconds. + Asserts that the directory does not exist. If it does exist + an is thrown. + A directory containing the actual value - + - Returns a new tolerance with a as the amount, using - the current amount as a number of clock ticks. + 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 - + - Returns true if the current tolerance has not been set or is using the . + Asserts that the directory does not exist. If it does exist + an is thrown. + The path to a directory containing the actual value - + - Modes in which the tolerance value for a comparison can be interpreted. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - 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. + Returns a ConstraintExpression that negates any + following constraint. - + - The tolerance is used as a numeric range within which - two compared _values are considered to be equal. + Returns a constraint that succeeds if the value + is a file or directory and it exists. - + - Interprets the tolerance as the percentage by which - the two compared _values my deviate from each other. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Compares two _values based in their distance in - representable numbers. + 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. - + - TrueConstraint tests that the actual value is true + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - Initializes a new instance of the class. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - Test whether the constraint is satisfied by a given value + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - 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. + 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 + + - The expected Type used by the constraint + Serialization Constructor - + - The type of the actual argument to which the constraint was applied + Gets the ResultState provided by this exception - + - Construct a TypeConstraint for a given Type + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - The expected type for the constraint - Prefix used in forming the constraint description - + - Applies the constraint to an actual value, returning a ConstraintResult. + Executed before each test is run - The value to be tested - A ConstraintResult + The test that is going to be run. - + - Apply the constraint to an actual value, returning true if it succeeds + Executed after each test is run - The actual argument - True if the constraint succeeds, otherwise false. + The test that has just been run. - + - UniqueItemsConstraint tests whether all the items in a - collection are unique. + Provides the target for the action attribute + The target for the action attribute - + - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. + Delegate used by tests that execute code and + capture any thrown exception. - + - Check that all items are unique. + 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. - - - + - XmlSerializableConstraint tests whether - an object is serializable in xml format. + 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 - + - Gets text describing a constraint + 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 - + - Test whether the constraint is satisfied by a given value + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The value to be tested - True for success, false for 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 - + - Returns the string representation of this constraint + 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 - + - ExactCountConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. + 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 - + - Construct an ExactCountConstraint on top of an existing constraint + 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 the item constraint to each item in the collection, - succeeding only if the expected number of items pass. + Returns a ListMapper based on a collection. - + The original collection - + - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. + 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. - + - Construct an ExactCountOperator for a specified count + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - The expected count + + - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. + 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 - + - Constructs an ExceptionTypeConstraint + 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 - + - Applies the constraint to an actual value, returning a ConstraintResult. + 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 value to be tested - A ConstraintResult + The evaluated condition - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + 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 - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + 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 new DictionaryContainsKeyConstraint checking for the - presence of a particular key in the dictionary. + 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 - + - Returns a new DictionaryContainsValueConstraint checking for the - presence of a particular value in the dictionary. + 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 - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Attribute used to apply a category to a test - + - Asserts on Directories + The name of the category - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + 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 - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Protected constructor uses the Type name as the name + of the category. - - - + - 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. + The name of the category - 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. + Modifies a test by adding a category to it. - A directory containing the value that is expected - A directory containing the actual value + The test to modify - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Marks a test to use a combinatorial join of any argument + data provided. Since this is the default, the attribute is + optional. - 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. + Default constructor - 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. + CultureAttribute is used to mark a test fixture or an + individual method as applying to a particular Culture only. - 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. + Constructor with no cultures specified, for use + with named property syntax. - A directory containing the actual value - + - Asserts that the directory exists. If it does not exist - an is thrown. + Constructor taking one or more cultures - 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 + Comma-deliminted list of cultures - + - Asserts that the directory exists. If it does not exist - an is thrown. + Causes a test to be skipped if this CultureAttribute is not satisfied. - The path to a directory containing the actual value + The test to modify - + - Asserts that the directory does not exist. If it does exist - an is thrown. + Tests to determine if the current culture is supported + based on the properties of this attribute. - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message + True, if the current culture is supported - + - Asserts that the directory does not exist. If it does exist - an is thrown. + Test to determine if the a particular culture or comma- + delimited set of cultures is in use. - A directory containing the actual value + Name of the culture or comma-separated list of culture ids + True if the culture is in use on the system - + - Asserts that the directory does not exist. If it does exist - an is thrown. + Test to determine if one of a collection of cultures + is being used currently. - 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 abstract base class for all data-providing attributes + defined by NUnit. Used to select all data sources for a + method, class or parameter. - The path to a directory containing the actual value - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Default constructor - + - Returns a ConstraintExpression that negates any - following constraint. + 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. - + - Returns a constraint that succeeds if the value - is a file or directory and it exists. + 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. - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + 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. - + - 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. + Attribute used to provide descriptive text about a + test case or fixture. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Construct a description Attribute + The text of the description - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + 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. - + - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. + Default constructor - + - Thrown when an assertion failed. + Constructor with a reason + The reason test is marked explicit - - 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 + Modifies a test by marking it as explicit. + The test to modify - + - Gets the ResultState provided by this exception + Attribute used to mark a test that is to be ignored. + Ignored tests result in a warning message when the + tests are run. - + - Thrown when an assertion failed. + Constructs the attribute giving a reason for ignoring the test + The reason for ignoring the test - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + 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. - + - Gets the ResultState provided by this exception + Modifies a test by marking it as Ignored. + The test to modify - + - Thrown when a test executes inconclusively. + Abstract base for Attributes that are used to include tests + in the test run based on environmental settings. - - 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 + + + Constructor with no included items specified, for use + with named property syntax. + - + - Serialization Constructor + Constructor taking one or more included items + Comma-delimited list of included items - + - Gets the ResultState provided by this exception + Name of the item that is needed in order for + a test to run. Multiple items may be given, + separated by a comma. - + - Abstract base for Exceptions that terminate a test and provide a ResultState. + Name of the item to be excluded. Multiple items + may be given, separated by a comma. - - The error message that explains - the reason for the exception + + + The reason for including or excluding the test + - - The error message that explains - the reason for the exception - The exception that caused the - current exception + + + Summary description for MaxTimeAttribute. + - + - Serialization Constructor + Construct a MaxTimeAttribute, given a time in milliseconds. + The maximum elapsed time in milliseconds - + - Gets the ResultState provided by this exception + The abstract base class for all custom attributes defined by NUnit. - + - Thrown when an assertion failed. + Default constructor - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization 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. - + - Gets the ResultState provided by this exception + Default constructor - + - The IApplyToContext interface is implemented by attributes - that want to make changes to the execution context before - a test is run. + PlatformAttribute is used to mark a test fixture or an + individual method as applying to a particular platform only. - + - Apply changes to the execution context + Constructor with no platforms specified, for use + with named property syntax. - The execution context - + - The IApplyToTest interface is implemented by self-applying - attributes that modify the state of a test in some way. + Constructor taking one or more platforms + Comma-delimited list of platforms - + - Modifies a test as defined for the specific attribute. + Causes a test to be skipped if this PlatformAttribute is not satisfied. 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. + PropertyAttribute is used to attach information to a test as a name/value pair.. - + - Gets the test cases generated by the CombiningStrategy. + Construct a PropertyAttribute with a name and string value - The test cases. + The name of the property + The property value - + - ICommandWrapper is implemented by attributes and other - objects able to wrap a TestCommand with another command. + Construct a PropertyAttribute with a name and int value - - 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. - + The name of the property + The property value - + - Wrap a command and return the result. + Construct a PropertyAttribute with a name and double value - The command to be wrapped - The wrapped command + The name of the property + The property value - + - Objects implementing this interface are used to wrap - the TestMethodCommand itself. They apply after SetUp - has been run and before TearDown. + Constructor for derived classes that set the + property dictionary directly. - + - Objects implementing this interface are used to wrap - the entire test, including SetUp and TearDown. + 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. - + - Any ITest that implements this interface is at a level that the implementing - class should be disposed at the end of the test run + Gets the property dictionary for this attribute - + - The IFixtureBuilder interface is exposed by a class that knows how to - build a TestFixture from one or more Types. In general, it is exposed - by an attribute, but may be implemented in a helper class used by the - attribute in some cases. + Modifies a test by adding properties to it. + The test to modify - + - 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. + RandomAttribute is used to supply a set of random _values + to a single parameter of a parameterized test. - 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. + Construct a random set of values appropriate for the Type of the + parameter on which the attribute appears, specifying only the count. + - + - The IMethodInfo class is used to encapsulate information - about a method in a platform-independent manner. + Construct a set of ints within a specified range - + - Gets the Type from which this method was reflected. + Construct a set of unsigned ints within a specified range - + - Gets the MethodInfo for this method. + Construct a set of longs within a specified range - + - Gets the name of the method. + Construct a set of unsigned longs within a specified range - + - Gets a value indicating whether the method is abstract. + Construct a set of shorts within a specified range - + - Gets a value indicating whether the method is public. + Construct a set of unsigned shorts within a specified range - + - Gets a value indicating whether the method contains unassigned generic type parameters. + Construct a set of doubles within a specified range - + - Gets a value indicating whether the method is a generic method. + Construct a set of floats within a specified range - + - Gets a value indicating whether the MethodInfo represents the definition of a generic method. + Construct a set of bytes within a specified range - + - Gets the return Type of the method. + Construct a set of sbytes within a specified range - + - Gets the parameters of the method. + Get the collection of _values to be used as arguments. - - + - Returns the Type arguments of a generic method or the Type parameters of a generic method definition. + RangeAttribute is used to supply a range of _values to an + individual parameter of a parameterized test. - + - Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. + Construct a range of ints using default step of 1 - The type arguments to be used - A new IMethodInfo with the type arguments replaced + + - + - Invokes the method, converting any TargetInvocationException to an NUnitException. + Construct a range of ints specifying the step size - 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. + Construct a range of unsigned ints using default step of 1 + + - + - Determine whether any data is available for a parameter. + Construct a range of unsigned ints specifying the step size - 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. + Construct a range of longs using a default step of 1 - 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. + Construct a range of longs + + + - + - Gets an enumeration of data items for use as arguments - for a test method parameter. + Construct a range of unsigned longs using default step of 1 - The parameter for which data is needed - An enumeration containing individual data items + + - + + + Construct a range of unsigned longs specifying the step size + + + + + + - The IParameterInfo interface is an abstraction of a .NET parameter. + Construct a range of doubles + + + - + - Gets a value indicating whether the parameter is optional + Construct a range of floats + + + - + - Gets an IMethodInfo representing the method for which this is a parameter + RepeatAttribute may be applied to test case in order + to run it multiple times. - + - Gets the underlying .NET ParameterInfo + Construct a RepeatAttribute + The number of times to run the test - + - Gets the Type of the parameter + Wrap a command and return the result. + The command to be wrapped + The wrapped command - + - 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")); + The test command for the RepeatAttribute - + - Adds a key/value pair to the property bag + Initializes a new instance of the class. - The key - The value + The inner command. + The number of repetitions - + - Sets the value for a key, removing any other - _values that are already in the property set. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - - + The context in which the test should run. + A TestResult - + - 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. + 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. - + - Gets a flag indicating whether the specified key has - any entries in the property set. + Construct a RequiresMTAAttribute - The key to be checked - True if their are _values present, otherwise false - + - Gets or sets the list of _values for a particular key + Marks a test that must run in the STA, causing it + to run in a separate thread if necessary. - The key for which the _values are to be retrieved or set - + - Gets a collection containing all the keys in the property set + Construct a RequiresSTAAttribute - + - The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. + Marks a test that must run on a separate thread. - + - Returns an array of custom attributes of the specified type applied to this object + Construct a RequiresThreadAttribute - + - Returns a value indicating whether an attribute of the specified type is defined on this object. + Construct a RequiresThreadAttribute, specifying the apartment - + - 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. + 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. - + - Build a TestMethod from the provided MethodInfo. + Default constructor - 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. + Summary description for SetCultureAttribute. - + - 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. + Construct given the name of a culture - 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. + Summary description for SetUICultureAttribute. - 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. + Construct given the name of a culture + - + - Gets the id of the test + 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. - + - Gets the name of the test + 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. - + - Gets the fully qualified name of the test + 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. - + - Gets the name of the class containing this test. Returns - null if the test is not associated with a class. + SetUpFixtureAttribute is used to identify a SetUpFixture - + - Gets the name of the method implementing this test. - Returns null if the test is not implemented as a method. + 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. - + - Gets the Type of the test fixture, if applicable, or - null if no fixture type is associated with this test. + 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. - + - Gets an IMethod for the method implementing this test. - Returns null if the test is not implemented as a method. + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + public void TestDescriptionMethod() + {} + } + + - + - Gets the RunState of the test, indicating whether it can be run. + Descriptive text for this test - + - Count of the test cases ( 1 if this is a test case ) + The author of this test - + - Gets the properties of the test + The type that this test is testing - + - Gets the parent test, if any. + Modifies a test by adding a description, if not already set. - The parent test or null if none exists. + The test to modify - + - Returns true if this is a test suite + Gets or sets the expected result. + The result. - + - Gets a bool indicating whether the current test - has any descendant tests. + Returns true if an expected result has been set - + - Gets this test's child tests + Construct a TestMethod from a given method. - A list of child tests + The method for which a test is to be constructed. + The suite to which the test will be added. + A TestMethod - + - Gets a fixture object for running this test. + TestCaseAttribute is used to mark parameterized test cases + and provide them with their arguments. - + - 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. + Construct a TestCaseAttribute with a list of arguments. + This constructor is not CLS-Compliant + - + - Build one or more TestMethods from the provided MethodInfo. + Construct a TestCaseAttribute with a single argument - 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. + Construct a TestCaseAttribute with a two arguments - - 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. + Construct a TestCaseAttribute with a three arguments - 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. + Gets or sets the name of the test. - The method to be used as a test case - The test suite being populated, or null - A TestCase or null + The name of the test. - + - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. + Gets or sets the RunState of this test case. - + - Gets the expected result of the test case + Gets the list of arguments to a test case - + - Returns true if an expected result has been set + Gets the properties of the test case - + - The ITestData interface is implemented by a class that - represents a single instance of a parameterized test. + Gets or sets the expected result. + The result. - + - Gets the name to be used for the test + Returns true if the expected result has been set - + - Gets the RunState for this test case. + Gets or sets the description. + The description. - + - Gets the argument list to be provided to the test + The author of this test - + - Gets the property dictionary for the test case + The type that this test is testing - + - 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. + Gets or sets the reason for ignoring the test - + - 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 + Gets or sets a value indicating whether this is explicit. - The test to which the filter is applied - True if the test passes the filter, otherwise false + + true if explicit; 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. + Gets or sets the reason for not running the test. - The test to which the filter is applied - True if the test matches the filter explicityly, otherwise false + The reason. - + - 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. + Gets or sets the ignore reason. When set to a non-null + non-empty value, the test is marked as ignored. + The ignore reason. - + - Get the TypeArgs if separately set + Comma-delimited list of platforms to run the test for - + - 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. + Comma-delimited list of platforms to not run the test for - + - Called when a test has just started + Gets and sets the category for this test case. + May be a comma-separated list of categories. - The test that is starting - + - Called when a test has finished + 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 result of the test + The arguments to be converted + The ParameterInfo array for the method - + - The ITestResult interface represents the result of a test. + 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 - + - Gets the ResultState of the test result, which - indicates the success or failure of the test. + TestCaseSourceAttribute indicates the source to be used to + provide test cases for a test method. - + - Gets the name of the test result + 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. - + - Gets the full name of the test result + 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. - + - Gets the elapsed time for running the test in seconds + 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. - + - Gets or sets the time the test started running. + Construct with a Type + The type that will provide data - + - Gets or sets the time the test finished running. + 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. - + - Gets the message associated with a test - failure or with not running the test + The name of a the method, property or fiend to be used as a source - + - Gets any stacktrace associated with an - error or failure. Not available in - the Compact Framework 1.0. + A Type to be used as a source - + - Gets the number of asserts executed - when running the test and all its children. + Gets or sets the category associated with every fixture created from + this attribute. May be a single category or a comma-separated list. - + - Gets the number of test cases that failed - when running the test and all its children. + 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 - + - Gets the number of test cases that passed - when running the test and all its children. + Returns a set of ITestCaseDataItems for use as arguments + to a parameterized test method. + The method for which data is needed. + - + - Gets the number of test cases that were skipped - when running the test and all its children. + TestFixtureAttribute is used to mark a class that represents a TestFixture. - + - Gets the number of test cases that were inconclusive - when running the test and all its children. + Default constructor - + - Indicates whether this result has any child results. - Accessing HasChildren should not force creation of the - Children collection in classes implementing this interface. + 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 the the collection of child results. + Gets or sets the name of the test. + The name of the test. - + - Gets the Test to which this result applies. + Gets or sets the RunState of this test fixture. - + - Gets any text output written to this result. + The arguments originally provided to the attribute - + - The ITypeInfo interface is an abstraction of a .NET Type + Properties pertaining to this fixture - + - Gets the underlying Type on which this ITypeInfo is based + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. - + - Gets the base type of this type as an ITypeInfo + Descriptive text for this fixture - + - Returns true if the Type wrapped is equal to the argument + The author of this fixture - + - Gets the Name of the Type + The type that this fixture is testing - + - Gets the FullName of the Type + Gets or sets the ignore reason. May set RunState as a side effect. + The ignore reason. - + - Gets the assembly in which the type is declared + Gets or sets the reason for not running the fixture. + The reason. - + - Gets the Namespace of the Type + 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 a value indicating whether the type is abstract. + Gets or sets a value indicating whether this is explicit. + + true if explicit; otherwise, false. + - + - Gets a value indicating whether the Type is a generic Type + Gets and sets the category for this fixture. + May be a comma-separated list of categories. - + - Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. + 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. - + - Gets a value indicating whether the Type is a generic Type definition + Attribute used to identify a method that is + called before any tests in a fixture are run. - + - Gets a value indicating whether the type is sealed. + Attribute used to identify a method that is called after + all the tests in a fixture have run. The method is + guaranteed to be called, even if an exception is thrown. - + - Gets a value indicating whether this type is a static class. + 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() + {} + } + + - + - Get the display name for this typeInfo. + Construct the attribute, specifying a combining strategy and source of parameter data. - + - Get the display name for an oject of this type, constructed with specific arguments + 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. - + - Returns a Type representing a generic type definition from which this Type can be constructed. + Construct a TimeoutAttribute given a time in milliseconds + The timeout value in milliseconds - + - Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. - + - Returns a value indicating whether this type has a method with a specified public attribute + 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 - + - Returns an array of IMethodInfos for methods of this Type - that match the specified flags. + Constructs for use with an Enum parameter. Will pass every enum + value in to the test. - + - Returns a value indicating whether this Type has a public constructor taking the specified argument Types. + Construct with one argument + - + - Construct an object of this Type, using the specified arguments. + Construct with two arguments + + - + - An object implementing IXmlNodeBuilder is able to build - an XML representation of itself and any children. + Construct with three arguments + + + - + - Returns a TNode representing the current object. + Construct with an array of arguments - 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. + Get the collection of _values to be used as arguments - 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. + ValueSourceAttribute indicates the source to be used to + provide data for one parameter of a test method. - + - Initializes a new instance of the class. + Construct with the name of the factory - for use with languages + that don't support params arrays. - The TestStatus. + The name of a static method, property or field that will provide data. - + - Initializes a new instance of the class. + Construct with a Type and name - for use with languages + that don't support params arrays. - The TestStatus. - The label. + The Type that will provide data + The name of a static method, property or field that will provide data. - + - Initializes a new instance of the class. + The name of a the method, property or fiend to be used as a source - The TestStatus. - The stage at which the result was produced - + - Initializes a new instance of the class. + A Type to be used as a source - The TestStatus. - The label. - The stage at which the result was produced - + - The result is inconclusive + 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 test has been skipped. + A set of Assert methods operating on one or more collections - + - The test has been ignored. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + - + - The test was skipped because it is explicit + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - The test succeeded + 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 test failed + 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 - + - The test encountered an unexpected exception + Asserts that all items contained in collection are not equal to null. + IEnumerable containing objects to be considered - + - The test was cancelled by the user + 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 - + - The test was not runnable. + Ensures that every object contained in collection exists within the collection + once and only once. + IEnumerable of objects to be considered - + - A suite failed because one or more child tests failed or had errors + 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 - + - A suite failed in its OneTimeSetUp + 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 - + - A suite had an unexpected exception in its OneTimeSetUp + 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 - + - A suite had an unexpected exception in its OneTimeDown + 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 - + - Gets the TestStatus for the test. + 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 status. + 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 - + - Gets the label under which this test result is - categorized, if any. + 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 - + - Gets the stage of test execution in which - the failure or other result took place. + 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 - + - Get a new ResultState, which is the same as the current - one but with the FailureSite set to the specified value. + Asserts that expected and actual are not exactly equal. - The FailureSite to use - A new ResultState + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Determines whether the specified , is equal to this instance. + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - + 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 - + - Returns a hash code for this instance. + Asserts that expected and actual are not exactly equal. - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - + 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 - + - Returns a that represents this instance. + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. - - A that represents this instance. - + 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 - + - The FailureSite enum indicates the stage of a test - in which an error or failure occurred. + Asserts that expected and actual are not equivalent. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Failure in the test itself + 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 - + - Failure in the SetUp method + Asserts that collection contains actual as an item. + IEnumerable of objects to be considered + Object to be found within collection - + - Failure in the TearDown method + 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 - + - Failure of a parent test + Asserts that collection does not contain actual as an item. + IEnumerable of objects to be considered + Object that cannot exist within collection - + - Failure of a child test + 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 - + - The RunState enum indicates whether a test can be executed. + Asserts that the superset does not contain the subset + The IEnumerable subset to be considered + The IEnumerable superset to be considered - + - The test is not runnable. + 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 - + - The test is runnable. + Asserts that the superset contains the subset. + The IEnumerable subset to be considered + The IEnumerable superset to be considered - + - The test can only be run explicitly + 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 - + - The test has been skipped. This value may - appear on a Test when certain attributes - are used to skip the test. + Asserts that the subset does not contain the superset + The IEnumerable superset to be considered + The IEnumerable subset to be considered - + - The test has been ignored. May appear on - a Test, when the IgnoreAttribute is used. + 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 - + - The TestStatus enum indicates the result of running a test + Asserts that the subset contains the superset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered - + - The test was inconclusive + 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 - + - The test has skipped + 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 - + - The test succeeded + Assert that an array,list or other collection is empty + An array, list or other collection implementing IEnumerable - + - The test failed + 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 - + - 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. + Assert that an array,list or other collection is empty + An array, list or other collection implementing IEnumerable - + - Constructs a new instance of TNode + Assert that an array, list or other collection is ordered - The name of the node + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message - + - Constructs a new instance of TNode with a value + Assert that an array, list or other collection is ordered - The name of the node - The text content of the node + An array, list or other collection implementing IEnumerable - + - Constructs a new instance of TNode with a value + Assert that an array, list or other collection is ordered - The name of the node - The text content of the node - Flag indicating whether to use CDATA when writing the text + 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 - + - Gets the name of the node + 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 - + - Gets the value of the node + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Gets a flag indicating whether the value should be output using CDATA. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Gets the dictionary of attributes + Returns a new DictionaryContainsKeyConstraint checking for the + presence of a particular key in the dictionary. - + - Gets a list of child nodes + Returns a new DictionaryContainsValueConstraint checking for the + presence of a particular value in the dictionary. - + - Gets the first ChildNode + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Gets the XML representation of this node. + 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 + + - Create a TNode from it's XML text representation + Serialization Constructor - The XML text to be parsed - A TNode - + - Adds a new element as a child of the current node and returns it. + Gets the ResultState provided by this exception - 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. + Thrown when an assertion failed. - The element name - The text content of the new element - The newly created child element - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - 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. + Serialization Constructor - 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. + Gets the ResultState provided by this exception - 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. + 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 + + - 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. + Serialization Constructor - + - Writes the XML representation of the node to an XmlWriter + Gets the ResultState provided by this exception - - + - Class used to represent a list of XmlResults + Thrown when an assertion failed. - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Class used to represent the attributes of a node + Serialization Constructor - + - Gets or sets the value associated with the specified key. - Overridden to return null if attribute is not found. + Gets the ResultState provided by this exception - The key. - Value of the attribute or null @@ -15445,7 +15892,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15453,7 +15900,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15640,8 +16087,10 @@ - GlobalSettings is a place for setting default _values used - by the framework in performing asserts. + 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. @@ -15782,6 +16231,11 @@ 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 @@ -15978,29 +16432,6 @@ 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, @@ -16059,7 +16490,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -16067,7 +16498,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -16374,6 +16805,11 @@ 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. @@ -16492,6 +16928,25 @@ 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 @@ -16588,58 +17043,6 @@ 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. - - Helper class with properties and methods that supply @@ -16881,5 +17284,29 @@ If true, use of the event queue is suppressed and test events are synchronous. + + + 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 + + diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.testdata.dll b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.testdata.dll new file mode 100644 index 0000000000000..4c17453ca5c73 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/nunit.testdata.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite-runner.exe b/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite-runner.exe new file mode 100644 index 0000000000000..b85e9cf83d7bf Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite-runner.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite.dll b/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite.dll new file mode 100644 index 0000000000000..2499da0fe1163 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite.tests.exe b/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite.tests.exe new file mode 100644 index 0000000000000..e31ad2e302555 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/nunitlite.tests.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-3.5/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.2.1/net-3.5/slow-nunit-tests.dll new file mode 100644 index 0000000000000..924f783a7fefd Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-3.5/slow-nunit-tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/Microsoft.Threading.Tasks.Extensions.Desktop.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/Microsoft.Threading.Tasks.Extensions.Desktop.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/net-4.0/Microsoft.Threading.Tasks.Extensions.Desktop.dll rename to third_party/dotnet/nunit-3.2.1/net-4.0/Microsoft.Threading.Tasks.Extensions.Desktop.dll diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/Microsoft.Threading.Tasks.Extensions.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/Microsoft.Threading.Tasks.Extensions.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/net-4.0/Microsoft.Threading.Tasks.Extensions.dll rename to third_party/dotnet/nunit-3.2.1/net-4.0/Microsoft.Threading.Tasks.Extensions.dll diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/Microsoft.Threading.Tasks.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/Microsoft.Threading.Tasks.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/net-4.0/Microsoft.Threading.Tasks.dll rename to third_party/dotnet/nunit-3.2.1/net-4.0/Microsoft.Threading.Tasks.dll diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/System.IO.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/System.IO.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/net-4.0/System.IO.dll rename to third_party/dotnet/nunit-3.2.1/net-4.0/System.IO.dll diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/System.Runtime.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/System.Runtime.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/net-4.0/System.Runtime.dll rename to third_party/dotnet/nunit-3.2.1/net-4.0/System.Runtime.dll diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/System.Threading.Tasks.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/System.Threading.Tasks.dll similarity index 100% rename from third_party/dotnet/nunit-3.0.1/net-4.0/System.Threading.Tasks.dll rename to third_party/dotnet/nunit-3.2.1/net-4.0/System.Threading.Tasks.dll diff --git a/third_party/dotnet/nunit-3.0.1/net-4.0/mock-nunit-assembly.exe b/third_party/dotnet/nunit-3.2.1/net-4.0/mock-assembly.exe similarity index 60% rename from third_party/dotnet/nunit-3.0.1/net-4.0/mock-nunit-assembly.exe rename to third_party/dotnet/nunit-3.2.1/net-4.0/mock-assembly.exe index 4e2b9ae7ba354..48c82e340dd4e 100644 Binary files a/third_party/dotnet/nunit-3.0.1/net-4.0/mock-nunit-assembly.exe and b/third_party/dotnet/nunit-3.2.1/net-4.0/mock-assembly.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll new file mode 100644 index 0000000000000..102641ed7817f Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.tests.dll new file mode 100644 index 0000000000000..ef817bb92824c Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.tests.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.xml new file mode 100644 index 0000000000000..8ae07c42b31a4 --- /dev/null +++ b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.framework.xml @@ -0,0 +1,17405 @@ + + + + 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 + + + + 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 handle on which a thread enqueuing an event with == true + waits, until the EventPump has sent the event to its listeners. + + + + + 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 + + + On volatile and , see + "http://www.albahari.com/threading/part4.aspx". + + + + + 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. + + + + Gets a value indicating whether this event is delivered synchronously by the NUnit . + + If true, and if has been used to + set a WaitHandle, blocks its calling thread until the + thread has delivered the event and sets the WaitHandle. + + + + + + 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. + + + + Implements a queue of work items each of which + is queued as a WaitCallback. + + + + + Construct a new EventQueue + + + + + WaitHandle for synchronous event delivery in . + + Having just one handle for the whole implies that + there may be only one producer (the test thread) for synchronous events. + If there can be multiple producers for synchronous events, one would have + to introduce one WaitHandle per event. + + + + + + Gets the count of items in the queue. + + + + + Sets a handle on which to wait, when is called + for an with == true. + + + The wait handle on which to wait, when is called + for an with == true. + The caller is responsible for disposing this wait handle. + + + + + 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 EvenQueue created and filled by this listener + + + + + A test has started + + The test that is starting + + + + A test case finished + + Result of the test case + + + + 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 + + + + + List of child results + + + + + 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. + Test HasChildren before accessing Children to avoid + the creation of an empty collection. + + + + + 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 + + + + + Adds a child result to this result, setting this result's + ResultState to Failure if the child result failed. + + The result to be added + + + + 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. + + + + The current context, head of the list of saved contexts. + + + + + Gets the current context. + + 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 + + + + + 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 + + + + 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. + + + + + 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 + + + + Get the display name for a MethodInfo + + A MethodInfo + The display name + + + + Get the display name for a method with args + + A MethodInfo + Argument list for the method + 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 + + + + 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 + + + + + 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 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 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. + + + + + 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. + + + + + 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. + + + + + Add a child result + + The child result to be added + + + + 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 + + + + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. + + + + + 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 + + + + 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 + + + + Initiate the test run. + + + + + 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 + + + + 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 + + + + + + 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 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 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 + + + + + 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 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 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 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 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. + + + + 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 + + + + 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 + + + + + + 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 + + + + + + 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 + + + + 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. + + + + + 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 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. + + + + + 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. + + + + + 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. + + + + + 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. + + + + + 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. + + + + + 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 + + + + diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.testdata.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.testdata.dll new file mode 100644 index 0000000000000..b74dd40378baa Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/nunit.testdata.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite-runner.exe b/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite-runner.exe new file mode 100644 index 0000000000000..5658759cbab81 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite-runner.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite.dll new file mode 100644 index 0000000000000..73ccd3b193246 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite.tests.exe b/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite.tests.exe new file mode 100644 index 0000000000000..bd099434fcdf0 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/nunitlite.tests.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.0/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.2.1/net-4.0/slow-nunit-tests.dll new file mode 100644 index 0000000000000..f748c07952f57 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.0/slow-nunit-tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/mock-nunit-assembly.exe b/third_party/dotnet/nunit-3.2.1/net-4.5/mock-assembly.exe similarity index 60% rename from third_party/dotnet/nunit-3.0.1/mock-nunit-assembly.exe rename to third_party/dotnet/nunit-3.2.1/net-4.5/mock-assembly.exe index 9adf8e1368ec3..7420f85d72b8a 100644 Binary files a/third_party/dotnet/nunit-3.0.1/mock-nunit-assembly.exe and b/third_party/dotnet/nunit-3.2.1/net-4.5/mock-assembly.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.dll new file mode 100644 index 0000000000000..97db58905e2d0 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.tests.dll new file mode 100644 index 0000000000000..35113eaa798bf Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.xml similarity index 96% rename from third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.xml index 77a12e8d2b250..f76a8894af42b 100644 --- a/third_party/dotnet/nunit-3.0.1/net-4.5/nunit.framework.xml +++ b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.framework.xml @@ -20,6 +20,8 @@ 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. @@ -1216,6 +1218,24 @@ 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 @@ -1362,6 +1382,13 @@ 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 @@ -1497,6 +1524,13 @@ 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 @@ -1648,6 +1682,12 @@ 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 @@ -1718,6 +1758,16 @@ 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 @@ -1733,6 +1783,26 @@ 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 @@ -1977,11 +2047,12 @@ 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 @@ -2008,7 +2079,7 @@ The item to dispatch - + Cancel the ongoing run completely. If no run is in process, the call has no effect. @@ -2074,11 +2145,12 @@ The item to dispatch - + - Cancel the ongoing run completely. + 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 @@ -2114,7 +2186,7 @@ Indicates whether the worker thread is running - + Our ThreadProc, which pulls and runs tests in a loop @@ -2124,10 +2196,11 @@ 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 @@ -2168,17 +2241,17 @@ 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 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. - + 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. + @@ -2227,6 +2300,11 @@ The execution context + + + The unique id of the worker executing this item. + + The test actions to be performed before and after this test @@ -2248,6 +2326,12 @@ 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 @@ -2365,21 +2449,21 @@ - - 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. + + 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. - + 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. + @@ -2440,10 +2524,11 @@ Shut down the shift. - + - Cancel the shift without completing all work + 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 @@ -3301,6 +3386,11 @@ 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 @@ -4192,6 +4282,12 @@ 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 @@ -4228,6 +4324,16 @@ 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 @@ -4252,6 +4358,12 @@ Increments the assert count by a specified amount. + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + Obtain lifetime service object @@ -5357,6 +5469,39 @@ The child result to be added + + + 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. + + + + + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. + + Class used to guard against unexpected argument values @@ -5538,6 +5683,55 @@ 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 @@ -5698,7 +5892,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. File name of the assembly to load @@ -5707,7 +5901,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. The assembly to load @@ -5864,7 +6058,7 @@ 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 + If true, kill any tests that are currently running @@ -6824,7 +7018,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -6832,7 +7026,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -7086,6 +7280,118 @@ 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. @@ -7444,6 +7750,12 @@ 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, @@ -7531,7 +7843,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -7539,7 +7851,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -7932,6 +8244,29 @@ 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 @@ -7978,6 +8313,28 @@ 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 @@ -8695,6 +9052,15 @@ 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 @@ -8708,6 +9074,12 @@ 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 @@ -9078,7 +9450,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -9086,7 +9458,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -9401,39 +9773,6 @@ An array, list or other collection implementing IEnumerable A custom comparer to perform the comparisons - - - 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. - - - - - This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, - it replicates the functionality at the resolution supported. - - AllItemsConstraint applies another constraint to each @@ -9695,6 +10034,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionEquivalentConstraint is used to determine whether two @@ -9720,6 +10066,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionItemsEqualConstraint is the abstract base class for all @@ -9870,6 +10223,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionSupersetConstraint is used to determine whether @@ -9896,6 +10256,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionTally counts (tallies) the number of @@ -10145,6 +10512,15 @@ 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 @@ -10527,6 +10903,11 @@ 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 @@ -10913,6 +11294,11 @@ 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 @@ -11765,6 +12151,26 @@ 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. @@ -11810,6 +12216,19 @@ 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 @@ -12251,6 +12670,21 @@ 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 @@ -12266,6 +12700,17 @@ 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. @@ -13534,6 +13979,13 @@ 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 @@ -13887,7 +14339,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13895,7 +14347,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -14186,7 +14638,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -14194,7 +14646,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -14381,8 +14833,10 @@ - GlobalSettings is a place for setting default _values used - by the framework in performing asserts. + 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. @@ -15762,6 +16216,11 @@ 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 @@ -16039,7 +16498,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -16047,7 +16506,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -16354,6 +16813,11 @@ 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. @@ -16472,6 +16936,25 @@ 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 @@ -16861,5 +17344,29 @@ If true, use of the event queue is suppressed and test events are synchronous. + + + 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 + + diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.testdata.dll b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.testdata.dll new file mode 100644 index 0000000000000..6d47ea0573e34 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/nunit.testdata.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite-runner.exe b/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite-runner.exe new file mode 100644 index 0000000000000..151e45d133e2c Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite-runner.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite.dll b/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite.dll new file mode 100644 index 0000000000000..8ecd936edd6e0 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite.tests.exe b/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite.tests.exe new file mode 100644 index 0000000000000..0a57fa9c90875 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/nunitlite.tests.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/net-4.5/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.2.1/net-4.5/slow-nunit-tests.dll new file mode 100644 index 0000000000000..287592d7d54b6 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/net-4.5/slow-nunit-tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit-agent-x86.exe b/third_party/dotnet/nunit-3.2.1/nunit-agent-x86.exe similarity index 90% rename from third_party/dotnet/nunit-3.0.1/nunit-agent-x86.exe rename to third_party/dotnet/nunit-3.2.1/nunit-agent-x86.exe index 8e90435594c11..8bc07f39a9111 100644 Binary files a/third_party/dotnet/nunit-3.0.1/nunit-agent-x86.exe and b/third_party/dotnet/nunit-3.2.1/nunit-agent-x86.exe differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit-agent-x86.exe.config b/third_party/dotnet/nunit-3.2.1/nunit-agent-x86.exe.config similarity index 88% rename from third_party/dotnet/nunit-3.0.1/nunit-agent-x86.exe.config rename to third_party/dotnet/nunit-3.2.1/nunit-agent-x86.exe.config index 3031d0e2743f8..f2b6c6192d7e3 100644 --- a/third_party/dotnet/nunit-3.0.1/nunit-agent-x86.exe.config +++ b/third_party/dotnet/nunit-3.2.1/nunit-agent-x86.exe.config @@ -25,10 +25,6 @@ - - - - diff --git a/third_party/dotnet/nunit-3.0.1/nunit-agent.exe b/third_party/dotnet/nunit-3.2.1/nunit-agent.exe similarity index 90% rename from third_party/dotnet/nunit-3.0.1/nunit-agent.exe rename to third_party/dotnet/nunit-3.2.1/nunit-agent.exe index 459ba5798f698..178abe43d8503 100644 Binary files a/third_party/dotnet/nunit-3.0.1/nunit-agent.exe and b/third_party/dotnet/nunit-3.2.1/nunit-agent.exe differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit-agent.exe.config b/third_party/dotnet/nunit-3.2.1/nunit-agent.exe.config similarity index 88% rename from third_party/dotnet/nunit-3.0.1/nunit-agent.exe.config rename to third_party/dotnet/nunit-3.2.1/nunit-agent.exe.config index 3031d0e2743f8..f2b6c6192d7e3 100644 --- a/third_party/dotnet/nunit-3.0.1/nunit-agent.exe.config +++ b/third_party/dotnet/nunit-3.2.1/nunit-agent.exe.config @@ -25,10 +25,6 @@ - - - - diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.addins b/third_party/dotnet/nunit-3.2.1/nunit.engine.addins similarity index 100% rename from third_party/dotnet/nunit-3.0.1/nunit.engine.addins rename to third_party/dotnet/nunit-3.2.1/nunit.engine.addins diff --git a/third_party/dotnet/nunit-3.2.1/nunit.engine.api.dll b/third_party/dotnet/nunit-3.2.1/nunit.engine.api.dll new file mode 100644 index 0000000000000..a49e1513b890a Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/nunit.engine.api.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.api.xml b/third_party/dotnet/nunit-3.2.1/nunit.engine.api.xml similarity index 96% rename from third_party/dotnet/nunit-3.0.1/nunit.engine.api.xml rename to third_party/dotnet/nunit-3.2.1/nunit.engine.api.xml index bb37ad15f7d1f..d51826a5911fe 100644 --- a/third_party/dotnet/nunit-3.0.1/nunit.engine.api.xml +++ b/third_party/dotnet/nunit-3.2.1/nunit.engine.api.xml @@ -383,6 +383,49 @@ If true, cancel any ongoing test threads, otherwise wait for them to complete. + + + Interface implemented by objects representing a runtime framework. + + + + + Gets the inique Id for this runtime, such as "net-4.5" + + + + + Gets the display name of the framework, such as ".NET 4.5" + + + + + Gets the framework version: usually contains two components, Major + and Minor, which match the corresponding CLR components, but not always. + + + + + Gets the Version of the CLR for this framework + + + + + Gets a string representing the particular profile installed, + or null if there is no profile. Currently. the only defined + values are Full and Client. + + + + + Interface that returns a list of available runtime frameworks. + + + + + Gets a list of available runtime frameworks. + + IResultWriterService provides result writers for a specified diff --git a/third_party/dotnet/nunit-3.2.1/nunit.engine.dll b/third_party/dotnet/nunit-3.2.1/nunit.engine.dll new file mode 100644 index 0000000000000..8a26a341c91f5 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/nunit.engine.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/nunit.engine.tests.dll b/third_party/dotnet/nunit-3.2.1/nunit.engine.tests.dll new file mode 100644 index 0000000000000..2fba2db2ac5ef Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/nunit.engine.tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.engine.tests.dll.config b/third_party/dotnet/nunit-3.2.1/nunit.engine.tests.dll.config similarity index 100% rename from third_party/dotnet/nunit-3.0.1/nunit.engine.tests.dll.config rename to third_party/dotnet/nunit-3.2.1/nunit.engine.tests.dll.config diff --git a/third_party/dotnet/nunit-3.2.1/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/nunit.framework.dll new file mode 100644 index 0000000000000..2b1f03dcc5308 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/nunit.framework.xml similarity index 97% rename from third_party/dotnet/nunit-3.0.1/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/nunit.framework.xml index 5d48d532a4719..cd4caf682a96a 100644 --- a/third_party/dotnet/nunit-3.0.1/nunit.framework.xml +++ b/third_party/dotnet/nunit-3.2.1/nunit.framework.xml @@ -20,6 +20,8 @@ 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. @@ -871,6 +873,24 @@ 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 @@ -1082,6 +1102,13 @@ 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 @@ -1195,6 +1222,13 @@ 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 @@ -1915,11 +1949,12 @@ 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 @@ -1939,11 +1974,12 @@ The item to dispatch - + - Cancel the ongoing run completely. + 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 @@ -1984,21 +2020,21 @@ 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. + + 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. - + 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. + @@ -2059,10 +2095,11 @@ Shut down the shift. - + - Cancel the shift without completing all work + 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 @@ -2071,6 +2108,16 @@ 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 @@ -2086,6 +2133,26 @@ 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 @@ -2426,7 +2493,7 @@ Indicates whether the worker thread is running - + Our ThreadProc, which pulls and runs tests in a loop @@ -2436,23 +2503,24 @@ 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 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. - + 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. + @@ -2501,6 +2569,11 @@ The execution context + + + The unique id of the worker executing this item. + + The test actions to be performed before and after this test @@ -2522,6 +2595,12 @@ 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 @@ -2558,7 +2637,7 @@ The item to dispatch - + Cancel the ongoing run completely. If no run is in process, the call has no effect. @@ -3381,6 +3460,11 @@ 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 @@ -3434,6 +3518,12 @@ 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 @@ -4516,6 +4606,12 @@ 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 @@ -4552,6 +4648,16 @@ 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 @@ -4576,6 +4682,12 @@ Increments the assert count by a specified amount. + + + Adds a new ValueFormatterFactory to the chain of formatters + + The new factory + Obtain lifetime service object @@ -5382,6 +5494,72 @@ The child result to be added + + + 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 + + + + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. + + Class used to guard against unexpected argument values @@ -5527,6 +5705,39 @@ 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 @@ -5743,7 +5954,7 @@ 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 + If true, kill any tests that are currently running @@ -5815,7 +6026,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. File name of the assembly to load @@ -5824,7 +6035,7 @@ - Loads the tests found in an Assembly, returning an + Loads the tests found in an Assembly, returning an indication of whether or not the load succeeded. The assembly to load @@ -5972,6 +6183,51 @@ 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 @@ -6184,59 +6440,6 @@ The type that is being tested. - - - 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. - - - - - - - This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, - it replicates the functionality at the resolution supported. - - CollectionSupersetConstraint is used to determine whether @@ -6263,6 +6466,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + DictionaryContainsValueConstraint is used to test whether a dictionary @@ -6345,6 +6555,19 @@ 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 @@ -6537,6 +6760,13 @@ 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 @@ -6798,6 +7028,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionEquivalentConstraint is used to determine whether two @@ -6823,6 +7060,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionItemsEqualConstraint is the abstract base class for all @@ -6973,6 +7217,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionTally counts (tallies) the number of @@ -7222,6 +7473,15 @@ 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 @@ -7604,6 +7864,11 @@ 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 @@ -7990,6 +8255,11 @@ 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 @@ -8718,6 +8988,26 @@ 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. @@ -9195,6 +9485,21 @@ 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 @@ -9210,6 +9515,17 @@ 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. @@ -12080,7 +12396,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -12088,7 +12404,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -13496,7 +13812,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13504,7 +13820,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -13806,7 +14122,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -13814,7 +14130,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -14751,6 +15067,15 @@ 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 @@ -14764,6 +15089,12 @@ 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 @@ -15055,7 +15386,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15063,7 +15394,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15513,7 +15844,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -15521,7 +15852,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -15708,8 +16039,10 @@ - GlobalSettings is a place for setting default _values used - by the framework in performing asserts. + 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. @@ -15850,6 +16183,11 @@ 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 @@ -16104,7 +16442,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -16112,7 +16450,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -16419,6 +16757,11 @@ 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. @@ -16537,6 +16880,25 @@ 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 @@ -16874,6 +17236,41 @@ If true, use of the event queue is suppressed and test events are synchronous. + + + 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 + + + + + Allows us to use Func when compiling against .NET 2.0 + + + + + + + + Enables compiling extension methods in .NET 2.0 diff --git a/third_party/dotnet/nunit-3.0.1/nunit3-console.exe b/third_party/dotnet/nunit-3.2.1/nunit3-console.exe similarity index 54% rename from third_party/dotnet/nunit-3.0.1/nunit3-console.exe rename to third_party/dotnet/nunit-3.2.1/nunit3-console.exe index ed9b4542d220e..fc0a48b598979 100644 Binary files a/third_party/dotnet/nunit-3.0.1/nunit3-console.exe and b/third_party/dotnet/nunit-3.2.1/nunit3-console.exe differ diff --git a/third_party/dotnet/nunit-3.0.1/nunit3-console.exe.config b/third_party/dotnet/nunit-3.2.1/nunit3-console.exe.config similarity index 85% rename from third_party/dotnet/nunit-3.0.1/nunit3-console.exe.config rename to third_party/dotnet/nunit-3.2.1/nunit3-console.exe.config index 53c437177f683..64c6f93a11c74 100644 --- a/third_party/dotnet/nunit-3.0.1/nunit3-console.exe.config +++ b/third_party/dotnet/nunit-3.2.1/nunit3-console.exe.config @@ -18,10 +18,6 @@ - - - - diff --git a/third_party/dotnet/nunit-3.2.1/nunit3-console.tests.dll b/third_party/dotnet/nunit-3.2.1/nunit3-console.tests.dll new file mode 100644 index 0000000000000..6fae4d133c5c0 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/nunit3-console.tests.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/nunitlite.dll b/third_party/dotnet/nunit-3.2.1/nunitlite.dll new file mode 100644 index 0000000000000..5150bf2713d63 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/nunitlite.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/mock-assembly.dll b/third_party/dotnet/nunit-3.2.1/portable/mock-assembly.dll new file mode 100644 index 0000000000000..b598aa7de282d Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/mock-assembly.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.dll b/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.dll new file mode 100644 index 0000000000000..e0f3bd93f1c2d Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.tests.dll b/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.tests.dll new file mode 100644 index 0000000000000..3e1ffa9617b9c Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.tests.dll differ diff --git a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.xml b/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.xml similarity index 96% rename from third_party/dotnet/nunit-3.0.1/portable/nunit.framework.xml rename to third_party/dotnet/nunit-3.2.1/portable/nunit.framework.xml index 8e3254226ea29..b9181e6001d97 100644 --- a/third_party/dotnet/nunit-3.0.1/portable/nunit.framework.xml +++ b/third_party/dotnet/nunit-3.2.1/portable/nunit.framework.xml @@ -10,6 +10,22 @@ 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. @@ -1176,6 +1192,12 @@ 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 @@ -1246,6 +1268,16 @@ 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 @@ -1261,6 +1293,26 @@ 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 @@ -1307,11 +1359,12 @@ 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 @@ -1350,24 +1403,25 @@ The item to dispatch - + - Cancel the ongoing run completely. + 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 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. - + 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. + @@ -1416,6 +1470,11 @@ The execution context + + + The unique id of the worker executing this item. + + The test actions to be performed before and after this test @@ -1432,6 +1491,12 @@ 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 @@ -1637,6 +1702,13 @@ 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 @@ -1718,6 +1790,24 @@ 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 @@ -1879,6 +1969,13 @@ 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 @@ -2398,6 +2495,11 @@ 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 @@ -3246,6 +3348,12 @@ 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 @@ -3277,6 +3385,16 @@ 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 @@ -3301,6 +3419,12 @@ 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 @@ -4315,883 +4439,954 @@ Override ToString() so that error messages in NUnit's own tests make sense - + - Class used to guard against unexpected argument values - or operations by throwing an appropriate exception. + Provides a platform-independent methods for getting attributes + for use by AttributeConstraint and AttributeExistsConstraint. - + - Throws an exception if an argument is null + Gets the custom attributes from the given object. - The value to be tested - The name of the argument + 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. - + - Throws an exception if a string argument is null or empty + Specifies flags that control binding and the way in which the search for members + and types is conducted by reflection. - 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 + Specifies no binding flag. + - + - 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 + Specifies that only members declared at the level of the supplied type's hierarchy + should be considered. Inherited members are not considered. + - + - Throws an InvalidOperationException if the specified condition is not met. - - The condition that must be met - The exception message to be used + Specifies that instance members are to be included in the search. + - + - The different targets a test action attribute can be applied to - + Specifies that static members are to be included in the search. + - + - Default target, which is determined by where the action attribute is attached - + Specifies that public members are to be included in the search. + - + - Target a individual test case - + Specifies that non-public members are to be included in the search. + - + - Target a suite of test cases - + 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. + - + - DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite - containing test fixtures present in the assembly. + A MarshalByRefObject that lives forever - + - The default suite builder used by the test assembly builder. + Some path based methods that we need even in the Portable framework which + does not have the System.IO.Path class - + - Initializes a new instance of the class. + Windows directory separator - + - Build a suite of tests from a provided assembly + Alternate directory separator - 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 + A volume separator character. - 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. + 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. - + - Construct a FrameworkController using the default builder and runner. + Provides NUnit specific extensions to aid in Reflection + across multiple frameworks - 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 + + This version of the class allows direct calls on Type on + those platforms that would normally require use of + GetTypeInfo(). + - + - Construct a FrameworkController using the default builder and runner. + Returns an array of generic arguments for the give type - 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. + Gets the constructor with the given parameter types - 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. + Gets the constructors for a type - 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 declared or inherited interfaces on this type + + - + - Gets the Assembly for which this + Gets the member on a given type by name. BindingFlags ARE IGNORED. + + + + - + - Gets a dictionary of settings for the FrameworkController + Gets all members on a given type. BindingFlags ARE IGNORED. + + + - + - Inserts settings element + Gets field of the given name on the type - Target node - Settings dictionary - The new node + + + - + - FrameworkControllerAction is the base class for all actions - performed against a FrameworkController. + Gets property of the given name on the type + + + - + - LoadTestsAction loads a test into the FrameworkController + Gets property of the given name on the type + + + + - + - LoadTestsAction loads the tests in an assembly. + Gets the method with the given name and parameter list - The controller. - The callback handler. + + + - + - ExploreTestsAction returns info about the tests in an assembly + Gets the method with the given name and parameter list + + + + - + - Initializes a new instance of the class. + Gets the method with the given name and parameter list - 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. + Gets public methods on the given type + + - + - Construct a CountsTestAction and perform the count of test cases. + Gets methods on a type - 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. + Determines if one type can be implicitly converted from another + + + - + - Construct a RunTestsAction and run all tests in the loaded TestSuite. + Extensions to the various MemberInfo derived classes - 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 + Returns the get method for the given property + + + - + - Construct a RunAsyncAction and run all tests in the loaded TestSuite. + Returns an array of custom attributes of the specified type applied to this member - 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 + Portable throws an argument exception if T does not + derive from Attribute. NUnit uses interfaces to find attributes, thus + this method - + - StopRunAction stops an ongoing run. + Returns an array of custom attributes of the specified type applied to this parameter - + - Construct a StopRunAction and stop any ongoing run. If no - run is in process, no error is raised. + Returns an array of custom attributes of the specified type applied to this assembly - 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. + Extensions for Assembly that are not available in portable - + - Build a suite of tests from a provided assembly + 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 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 assembly + The type of attribute you are looking for + Ignored + - + - Build a suite of tests given the filename of an assembly + Gets the types in a given 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. + This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, + it replicates the functionality at the resolution supported. - + - Gets the tree of loaded tests, or null if - no tests have been loaded. + Gets the total elapsed time measured by the current instance, in milliseconds. - + - Gets the tree of test results, if the test - run is completed, otherwise null. + Gets a value indicating whether the Stopwatch timer is running. - + - Indicates whether a test has been loaded + Gets the current number of ticks in the timer mechanism. + + If the Stopwatch class uses a high-resolution performance counter, GetTimestamp returns the current + value of that counter. If the Stopwatch class uses the system timer, GetTimestamp returns the current + DateTime.Ticks property of the DateTime.Now instance. + + A long integer representing the tick counter value of the underlying timer mechanism. - + - Indicates whether a test is currently running + Stops time interval measurement and resets the elapsed time to zero. - + - Indicates whether a test run is complete + Starts, or resumes, measuring elapsed time for an interval. - + - Loads the tests found in an Assembly, returning an - indication of whether or not the load succeeded. + Initializes a new Stopwatch instance, sets the elapsed time property to zero, and starts measuring elapsed time. - File name of the assembly to load - Dictionary of options to use in loading the test - An ITest representing the loaded tests + A Stopwatch that has just begun measuring elapsed time. - + - Loads the tests found in an Assembly, returning an - indication of whether or not the load succeeded. + Stops measuring elapsed time for an interval. - 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 + Returns a string that represents the current object. - The filter to apply - The number of test cases found + + A string that represents the current object. + - + - Run selected tests and return a test result. The test is run synchronously, - and the listener interface is notified as it progresses. + Gets the frequency of the timer as the number of ticks per second. - 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. + Indicates whether the timer is based on a high-resolution performance counter. - Interface to receive EventListener notifications. - A test filter used to select tests to be run - + - Wait for the ongoing run to complete. + Class used to guard against unexpected argument values + or operations by throwing an appropriate exception. - 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. + Throws an exception if an argument is null - If true, kill any test-running threads + The value to be tested + The name of the argument - + - Implementation of ITestAssemblyRunner + Throws an exception if a string argument is null or empty + The value to be tested + The name of the argument - + - Initializes a new instance of the class. + Throws an ArgumentOutOfRangeException if the specified condition is not met. - The builder. + The condition that must be met + The exception message to be used + The name of the argument - + - The tree of tests that was loaded by the builder + 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 - + - The test result, if a run has completed + Throws an InvalidOperationException if the specified condition is not met. + The condition that must be met + The exception message to be used - + - Indicates whether a test is loaded + The different targets a test action attribute can be applied to - + - Indicates whether a test is running + Default target, which is determined by where the action attribute is attached - + - Indicates whether a test run is complete + Target a individual test case - + - Our settings, specified when loading the assembly + Target a suite of test cases - + - The top level WorkItem created for the assembly as a whole + DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite + containing test fixtures present in the assembly. - + - The TestExecutionContext for the top level WorkItem + The default suite builder used by the test assembly builder. - + - Loads the tests found in an Assembly + Initializes a new instance of the class. - 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 + Build a suite of tests from a provided assembly - The assembly to load - Dictionary of option settings for loading the assembly - True if the load was successful + 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 + - + - Count Test Cases using a filter + Build a suite of tests given the filename of an assembly - The filter to apply - The number of test cases found + 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 + - + - Run selected tests and return a test result. The test is run synchronously, - and the listener interface is notified as it progresses. + 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. - 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. + Construct a FrameworkController using the default builder and runner. - 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. - + 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 - + - Wait for the ongoing run to complete. + Construct a FrameworkController using the default builder and runner. - Time to wait in milliseconds - True if the run completed, otherwise false + 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 - + - Initiate the test run. + 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 - + - Signal any test run that is in process to stop. Return without error if no test is running. + Construct a FrameworkController, specifying the types to be used + for the runner and builder. This constructor is provided for + purposes of development. - If true, kill any test-running threads + 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 - + - Create the initial TestExecutionContext used to run tests + Gets the ITestAssemblyBuilder used by this controller instance. - The ITestListener specified in the RunAsync call + The builder. - + - Handle the the Completed event for the top level work item + Gets the ITestAssemblyRunner used by this controller instance. + The runner. - + - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. + Gets the AssemblyName or the path for which this FrameworkController was created - + - Verifies that the first int is greater than the second - int. If it is not, then an - is thrown. + Gets the Assembly for which this - The first value, expected to be greater - The 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. + Gets a dictionary of settings for the FrameworkController - 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. + Loads the tests in the assembly - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Returns info about the tests in an assembly - The first value, expected to be greater - The second value, expected to be less + A string containing the XML representation of the filter to use + The XML result of exploring the tests - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Runs the tests in an assembly - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + A string containing the XML representation of the filter to use + The XML result of the test run - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Runs the tests in an assembly syncronously reporting back the test results through the callback + or through the return value - The first value, expected to be greater - The second value, expected to be less + 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 - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Runs the tests in an assembly asyncronously reporting back the test results through the callback - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The callback that receives the test results + A string containing the XML representation of the filter to use - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Stops the test run - The first value, expected to be greater - The second value, expected to be less + True to force the stop, false for a cooperative stop - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Counts the number of test cases in the loaded TestSuite - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + A string containing the XML representation of the filter to use + The number of tests - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Inserts settings element - The first value, expected to be greater - The second value, expected to be less + Target node + Settings dictionary + The new node - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + FrameworkControllerAction is the base class for all actions + performed against a FrameworkController. - The first value, expected to be greater - The 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. + LoadTestsAction loads a test into the FrameworkController - 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. + LoadTestsAction loads the tests in an assembly. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The controller. + The callback handler. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + ExploreTestsAction returns info about the tests in an assembly - 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. + Initializes a new instance of the class. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The controller for which this action is being performed. + Filter used to control which tests are included (NYI) + The callback handler. - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + CountTestsAction counts the number of test cases in the loaded TestSuite + held by the FrameworkController. - 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. + Construct a CountsTestAction and perform the count of test cases. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + 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 - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + RunTestsAction runs the loaded TestSuite held by the FrameworkController. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Construct a RunTestsAction and run all tests in the loaded TestSuite. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + A FrameworkController holding the TestSuite to run + A string containing the XML representation of the filter to use + A callback handler used to report results - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + RunAsyncAction initiates an asynchronous test run, returning immediately - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Construct a RunAsyncAction and run all tests in the loaded TestSuite. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + A FrameworkController holding the TestSuite to run + A string containing the XML representation of the filter to use + A callback handler used to report results - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + StopRunAction stops an ongoing run. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Construct a StopRunAction and stop any ongoing run. If no + run is in process, no error is raised. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The FrameworkController for which a run is to be stopped. + True the stop should be forced, false for a cooperative stop. + >A callback handler used to report results + A forced stop will cause threads and processes to be killed as needed. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + The ITestAssemblyBuilder interface is implemented by a class + that is able to build a suite of tests given an assembly or + an assembly filename. - The 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. + Build a suite of tests from a provided assembly - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Build a suite of tests given the filename of an assembly - The first value, expected to be less - The second value, expected to be greater + The filename of the assembly from which tests are to be built + A dictionary of options to use in building the suite + A TestSuite containing the tests found in the assembly - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + The ITestAssemblyRunner interface is implemented by classes + that are able to execute a suite of tests loaded + from an assembly. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets the tree of loaded tests, or null if + no tests have been loaded. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets the tree of test results, if the test + run is completed, otherwise null. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Indicates whether a test has been loaded - 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. + Indicates whether a test is currently running - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Indicates whether a test run is complete - 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. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + File name of the assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + Loads the tests found in an Assembly, returning an + indication of whether or not the load succeeded. - The first value, expected to be greater - The second value, expected to be less + The assembly to load + Dictionary of options to use in loading the test + An ITest representing the loaded tests - + - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. + 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 + + + + Initiate the test run. + + + + + 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 + + + + 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 value is greater than or equal to the second - value. If it is not, then an + 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 or equal to the second + Verifies that the first value is greater than the second value. If it is not, then an is thrown. @@ -5200,18 +5395,18 @@ 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 + 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 or equal to the second + Verifies that the first value is greater than the second value. If it is not, then an is thrown. @@ -5220,18 +5415,18 @@ 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 + 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 or equal to the second + Verifies that the first value is greater than the second value. If it is not, then an is thrown. @@ -5240,18 +5435,18 @@ 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 + 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 or equal to the second + Verifies that the first value is greater than the second value. If it is not, then an is thrown. @@ -5260,18 +5455,18 @@ 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 + 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 or equal to the second + Verifies that the first value is greater than the second value. If it is not, then an is thrown. @@ -5280,18 +5475,18 @@ 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 + 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 or equal to the second + Verifies that the first value is greater than the second value. If it is not, then an is thrown. @@ -5300,38 +5495,38 @@ 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 + 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 or equal to the second + 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 less - The second value, expected to be greater + The first value, expected to be greater + The 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 less than or equal to the second + 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 less - The second value, expected to be greater + 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 + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5340,18 +5535,18 @@ 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 + 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 or equal to the second + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5360,18 +5555,18 @@ 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 + 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 or equal to the second + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5380,18 +5575,18 @@ 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 + 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 or equal to the second + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5400,18 +5595,18 @@ 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 + 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 or equal to the second + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5420,18 +5615,18 @@ 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 + 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 or equal to the second + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5440,18 +5635,18 @@ 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 + 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 or equal to the second + Verifies that the first value is less than the second value. If it is not, then an is thrown. @@ -5460,3132 +5655,3288 @@ 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 + 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 - + - Asserts that a condition is true. If the condition is false the method throws - an . + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The evaluated condition + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be less + The second value, expected to be greater - + - Asserts that a condition is true. If the condition is false the method throws - an . + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The evaluated condition + The first value, expected to be greater + The second value, expected to be less + 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 . + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The evaluated condition + The first value, expected to be greater + The second value, expected to be less - + - Asserts that a condition is true. If the condition is false the method throws - an . + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The evaluated condition + The first value, expected to be greater + The second value, expected to be less 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 . + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The first value, expected to be greater + The second value, expected to be less - + - Asserts that a condition is true. If the condition is false the method throws - an . + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The evaluated condition + The first value, expected to be greater + The second value, expected to be less + 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 . + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - 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 + The first value, expected to be greater + The second value, expected to be less - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + 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 - - - 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 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 - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + 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 - + - 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 + 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 - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + 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 - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + 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 object that is passed in is not equal to null - If the object is null then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be greater + The second value, expected to be less - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be greater + The second value, expected to be less The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Verifies that the first value is greater than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be greater + The second value, expected to be less - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be less + The second value, expected to be greater - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The object that is to be tested + The first value, expected to be less + The second value, expected to be greater - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The value that is to be tested + The first value, expected to be less + The second value, expected to be greater - + - Assert that a string is empty - that is equal to string.Empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The string to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that a string is empty - that is equal to string.Empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The string to be tested + The first value, expected to be less + The second value, expected to be greater - + - Assert that an array, list or other collection is empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - An array, list or other collection implementing ICollection + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that an array, list or other collection is empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - An array, list or other collection implementing ICollection + The first value, expected to be less + The second value, expected to be greater - + - Assert that a string is not empty - that is not equal to string.Empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The string to be tested + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that a string is not empty - that is not equal to string.Empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The string to be tested + The first value, expected to be less + The second value, expected to be greater - + - Assert that an array, list or other collection is not empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - An array, list or other collection implementing ICollection + The first value, expected to be less + The second value, expected to be greater The message to display in case of failure Array of objects to be used in formatting the message - + - Assert that an array, list or other collection is not empty + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - An array, list or other collection implementing ICollection + The first value, expected to be less + The second value, expected to be greater - + - 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. + 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 - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + 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 - + - 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 condition is true. If the condition is false the method throws + an . - - + The evaluated condition - + - 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. + Asserts that a condition is true. If the condition is false the method throws + an . - The message to initialize the with. - Arguments to be used in formatting the message + The evaluated condition - + - 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. + Asserts that a condition is true. If the condition is false the method throws + an . - The message to initialize the with. + The evaluated condition + The message to display in case of failure + Array of objects 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. + 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 - + - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. + Asserts that a condition is true. If the condition is false the method throws + an . - The message to initialize the with. - Arguments to be used in formatting the message + The evaluated condition - + - Throws an with the message that is - passed in. This is used by the other Assert functions. + Asserts that a condition is true. If the condition is false the method throws + an . - The message to initialize the with. + The evaluated condition - + - Throws an . - This is used by the other Assert functions. - + 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 - + - 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 + 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 - + - Throws an with the message that is - passed in. This causes the test to be reported as ignored. - - The message to initialize the with. + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition - + - Throws an . - This causes the test to be reported as ignored. + 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 - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The message to initialize the with. - Arguments to be used in formatting the message + The object that is to be tested - + - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - The message to initialize the with. + 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 - + - Throws an . - This causes the test to be reported as Inconclusive. + 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 - + - Asserts that an object is contained in a list. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected object - The list to be examined + The object that is to be tested The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that an object is contained in a list. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected object - The list to be examined + The object that is to be tested - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + 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 two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The object that is to be tested - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + 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 two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + The value that is to be tested - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The value that is expected - The actual value + 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 two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The value that is expected - The actual value + The value that is to be tested - + - 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. + Assert that a string is empty - that is equal to string.Empty - The value that is expected - The actual value + The string to be tested 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. + Assert that a string is empty - that is equal to string.Empty - The value that is expected - The actual value + The string to be tested - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Assert that an array, list or other collection is empty - The expected object - The actual object + An array, list or other collection implementing ICollection The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Assert that an array, list or other collection is empty - The expected object - The actual object + An array, list or other collection implementing ICollection - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Assert that a string is not empty - that is not equal to string.Empty - The expected object - The actual object + The string to be tested The message to display in case of failure Array of objects to be used in formatting the message - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Assert that a string is not empty - that is not equal to string.Empty - The expected object - The actual object + The string to be tested - + - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. + Assert that an array, list or other collection is not empty - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + 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 - + - Verifies that a delegate throws a particular exception when called. + Assert that an array, list or other collection is not empty - 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 + An array, list or other collection implementing ICollection - + - Verifies that a delegate throws a particular exception when called. + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. - A constraint to be satisfied by the exception - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - 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. + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - The exception Type expected - A TestDelegate + + - + - Verifies that a delegate throws a particular exception when called. + 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. - Type of the expected exception - A TestDelegate - The message that will be displayed on failure + The message to initialize the with. Arguments to be used in formatting the message - + - Verifies that a delegate throws a particular exception when called. + 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. - Type of the expected exception - A TestDelegate + The message to initialize the with. - + - Verifies that a delegate throws an exception when called - and returns it. + 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. - 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. + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. - A TestDelegate + The message to initialize the with. + 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. + Throws an with the message that is + passed in. This is used by the other Assert functions. - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The message to initialize the with. - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Throws an . + This is used by the other Assert functions. - 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. + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. - A TestDelegate - The message that will be displayed on failure + The message to initialize the with. 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. + Throws an with the message that is + passed in. This causes the test to be reported as ignored. - A TestDelegate + The message to initialize the with. - + - Verifies that a delegate does not throw an exception + Throws an . + This causes the test to be reported as ignored. - 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. + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. - 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 + The message to initialize the with. Arguments to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . + Throws an with the message that is + passed in. This causes the test to be reported as inconclusive. - 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 + The message to initialize the with. - + - Asserts that a condition is true. If the condition is false the method throws - an . + Throws an . + This causes the test to be reported as Inconclusive. - 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. + Asserts that an object is contained in a list. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + 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 - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Asserts that an object is contained in a list. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message + The expected object + The list to be examined - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + 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. - A TestDelegate to be executed - A ThrowsConstraint used in the test + 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 the code represented by a delegate throws an exception - that satisfies the constraint provided. + 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. - 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 + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on 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. - A Constraint to be applied - The actual value to test + 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 - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on 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. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - 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. + 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. - A Constraint to be applied - The actual value to test + 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 - + - 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. + 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. - - 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 + The value that is expected + The actual value - + - Asserts that an object may be assigned a value of a given Type. + 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 expected Type. - The object under examination + 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 - + - Asserts that an object may be assigned a value of a given Type. + 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 expected Type. - The object under examination + The value that is expected + The actual value - + - Asserts that an object may be assigned a value of a given Type. + Asserts that two objects refer to the same object. If they + are not the same an is thrown. - The expected Type. - The object under examination + 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 an object may be assigned a value of a given Type. + Asserts that two objects refer to the same object. If they + are not the same an is thrown. - The expected Type. - The object under examination + The expected object + The actual object - + - Asserts that an object may not be assigned a value of a given Type. + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. - The expected Type. - The object under examination + 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 an object may not be assigned a value of a given Type. + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. - The expected Type. - The object under examination + The expected object + The actual object - + - Asserts that an object may not be assigned a value of a given Type. + Helper for Assert.AreEqual(double expected, double actual, ...) + allowing code generation to work consistently. - The expected Type. - The object under examination + 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 not be assigned a value of a given Type. + Verifies that an async delegate throws a particular exception when called. - The expected Type. - The object under examination + 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 - + - Asserts that an object is an instance of a given type. + Verifies that an async delegate throws a particular exception when called. - 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 + A constraint to be satisfied by the exception + A TestSnippet delegate - + - Asserts that an object is an instance of a given type. + Verifies that an async delegate throws a particular exception when called. - The expected Type - The object being examined + The exception Type expected + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Asserts that an object is an instance of a given type. + Verifies that an async delegate throws a particular exception when called. - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The exception Type expected + A TestDelegate - + - Asserts that an object is an instance of a given type. + Verifies that an async delegate throws a particular exception when called. - The expected Type - The object being examined + Type of the expected exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Verifies that an async delegate throws a particular exception when called. - 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 + Type of the expected exception + A TestDelegate - + - Asserts that an object is not an instance of a given type. + Verifies that an async delegate throws an exception when called + and returns it. - The expected Type - The object being examined + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Asserts that an object is not an instance of a given type. + Verifies that an async delegate throws an exception when called + and returns it. - 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 + A TestDelegate - + - Asserts that an object is not an instance of a given type. + Verifies that an async delegate throws an exception of a certain Type + or one derived from it when called and returns it. - The expected Type - The object being examined + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Delegate used by tests that execute code and - capture any thrown exception. + 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 - + - 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. + 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 - + - 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 + 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 - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to . + Verifies that an async delegate does not throw an exception. - The evaluated condition + A TestDelegate - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Verifies that a delegate throws a particular exception when called. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + 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 - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Verifies that a delegate throws a particular exception when called. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied + The exception Type expected + A TestDelegate 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. + Verifies that a delegate throws a particular exception when called. - A TestDelegate to be executed - A ThrowsConstraint used in the test + The exception Type expected + A TestDelegate - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Verifies that a delegate throws a particular exception when called. - A Constraint to be applied - The actual value to test + Type of the expected exception + A TestDelegate + 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. + Verifies that a delegate throws a particular exception when called. - A Constraint expression to be applied - The actual value to test + 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 - + - Returns a ListMapper based on a collection. + Verifies that a delegate throws an exception when called + and returns it. - The original collection - + A TestDelegate - + - 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. + 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 - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + 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 - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + 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 - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + A TestDelegate - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Verifies that a delegate does not throw an exception - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied + 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 . + 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 . + 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 . + 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 . + 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. + is satisfied and throwing an assertion exception on failure. - A Constraint to be applied - The actual value to test + 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. + is satisfied and throwing an assertion exception on failure. - A Constraint expression to be applied - The actual value to test + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied The message that will be displayed on failure Arguments to be used in formatting the message - - - 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. + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. - The name of the author. - The email address of the author. + A TestDelegate to be executed + A ThrowsConstraint used in the test - + - Attribute used to apply a category to a 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 - + - The name of the category + 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 - + - 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. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The name of the category + 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 - + - Protected constructor uses the Type name as the name - of the category. + 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 - + - The name of the category + 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 - + - Modifies a test by adding a category to it. + Asserts that an object may be assigned a value of a given Type. - The test to modify + 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 - + - Marks a test to use a combinatorial join of any argument - data provided. Since this is the default, the attribute is - optional. + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination - + - Default constructor + 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 - + - Marks a test to use a particular CombiningStrategy to join - any parameter data provided. Since this is the default, the - attribute is optional. + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination - + - Construct a CombiningStrategyAttribute incorporating an - ICombiningStrategy and an IParamterDataProvider. + Asserts that an object may not be assigned a value of a given Type. - Combining strategy to be used in combining data - An IParameterDataProvider to supply data + 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 - + - Construct a CombiningStrategyAttribute incorporating an object - that implements ICombiningStrategy and an IParameterDataProvider. - This constructor is provided for CLS compliance. + Asserts that an object may not be assigned a value of a given Type. - Combining strategy to be used in combining data - An IParameterDataProvider to supply data + The expected Type. + The object under examination - + - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. + Asserts that an object may not be assigned a value of a given Type. - The MethodInfo for which tests are to be constructed. - The suite to which the tests will be added. - One or more TestMethods + 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 - + - Modify the test by adding the name of the combining strategy - to the properties. + Asserts that an object may not be assigned a value of a given Type. - The test to modify + The expected Type. + The object under examination - + - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. + 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 - + - Constructor with no cultures specified, for use - with named property syntax. + Asserts that an object is an instance of a given type. + The expected Type + The object being examined - + - Constructor taking one or more cultures + Asserts that an object is an instance of a given type. - Comma-deliminted list of cultures + 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 - + - Causes a test to be skipped if this CultureAttribute is not satisfied. + Asserts that an object is an instance of a given type. - The test to modify + The expected Type + The object being examined - + - Tests to determine if the current culture is supported - based on the properties of this attribute. + Asserts that an object is not an instance of a given type. - True, if the current culture is supported + 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 - + - Test to determine if the a particular culture or comma- - delimited set of cultures is in use. + Asserts that an object is not an instance of a given type. - Name of the culture or comma-separated list of culture ids - True if the culture is in use on the system + The expected Type + The object being examined - + - Test to determine if one of a collection of cultures - is being used currently. + 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 - + - The abstract base class for all data-providing attributes - defined by NUnit. Used to select all data sources for a - method, class or parameter. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined - + - Default constructor + Delegate used by tests that execute code and + capture any thrown exception. - + - 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. + Delegate used by tests that execute async code and + capture any thrown exception. - + - 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. + 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. - + - 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. - + 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 - + - Attribute used to provide descriptive text about a - test case or fixture. + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to . + The evaluated condition - + - Construct a description Attribute + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The text of the description + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested - + - 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. + 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 - + - Default constructor + 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 - + - Constructor with a reason + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The reason test is marked explicit + A Constraint to be applied + The actual value to test - + - Modifies a test by marking it as explicit. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The test to modify + 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 mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. + Returns a ListMapper based on a collection. + The original collection + - + - Constructs the attribute giving a reason for ignoring the test + 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 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. + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. - - 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. + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - The test to modify + + - + - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. + 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 - - - Constructor with no included items specified, for use - with named property syntax. + + + 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 - + - Constructor taking one or more included items - - Comma-delimited list of included items + 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 - + - Name of the item that is needed in order for - a test to run. Multiple items may be given, - separated by a comma. + Asserts that a condition is true. If the condition is false the + method throws an . + The evaluated condition - + - Name of the item to be excluded. Multiple items - may be given, separated by a comma. - + 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 - + - The reason for including or excluding the test + Asserts that a condition is true. If the condition is false the method throws + an . + A lambda that returns a Boolean - + - LevelOfParallelismAttribute is used to set the number of worker threads - that may be allocated by the framework for running tests. + 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 - + - Construct a LevelOfParallelismAttribute. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. - The number of worker threads to be created by the framework. + A Constraint to be applied + The actual value to test - + - Summary description for MaxTimeAttribute. + 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 - + - Construct a MaxTimeAttribute, given a time in milliseconds. + Provides the Author of a test or test fixture. - The maximum elapsed time in milliseconds - + - The abstract base class for all custom attributes defined by NUnit. + Initializes a new instance of the class. + The name of the author. - + - Default constructor + Initializes a new instance of the class. + The name of the author. + The email address of the author. - + - Attribute used to identify a method that is called once - to perform setup before any child tests are run. + Attribute used to apply a category to a test - + - 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. + The name of the category - + - 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. + 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 - + - Default constructor + Protected constructor uses the Type name as the name + of the category. - + - ParallelizableAttribute is used to mark tests that may be run in parallel. + The name of the category - + - Construct a ParallelizableAttribute using default ParallelScope.Self. + Modifies a test by adding a category to it. + The test to modify - + - Construct a ParallelizableAttribute with a specified scope. + Marks a test to use a combinatorial join of any argument + data provided. Since this is the default, the attribute is + optional. - The ParallelScope associated with this attribute. - + - Modify the context to be used for child tests + Default constructor - The current TestExecutionContext - + - The ParallelScope enumeration permits specifying the degree to - which a test and its descendants may be run in parallel. + Marks a test to use a particular CombiningStrategy to join + any parameter data provided. Since this is the default, the + attribute is optional. - + - No Parallelism is permitted + Construct a CombiningStrategyAttribute incorporating an + ICombiningStrategy and an IParamterDataProvider. + Combining strategy to be used in combining data + An IParameterDataProvider to supply data - + - The test itself may be run in parallel with others at the same level + 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 - + - Descendants of the test may be run in parallel with one another + 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 - + - Descendants of the test down to the level of TestFixtures may be run in parallel + Modify the test by adding the name of the combining strategy + to the properties. + The test to modify - + - PropertyAttribute is used to attach information to a test as a name/value pair.. + CultureAttribute is used to mark a test fixture or an + individual method as applying to a particular Culture only. - + - Construct a PropertyAttribute with a name and string value + Constructor with no cultures specified, for use + with named property syntax. - The name of the property - The property value - + - Construct a PropertyAttribute with a name and int value + Constructor taking one or more cultures - The name of the property - The property value + Comma-deliminted list of cultures - + - Construct a PropertyAttribute with a name and double value + Causes a test to be skipped if this CultureAttribute is not satisfied. - The name of the property - The property value + The test to modify - + - Constructor for derived classes that set the - property dictionary directly. + Tests to determine if the current culture is supported + based on the properties of this attribute. + True, if the current culture is supported - + - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. + Test to determine if the a particular culture or comma- + delimited set of cultures is in use. + Name of the culture or comma-separated list of culture ids + True if the culture is in use on the system - + - Gets the property dictionary for this attribute + Test to determine if one of a collection of cultures + is being used currently. + + - + - Modifies a test by adding properties to it. + The abstract base class for all data-providing attributes + defined by NUnit. Used to select all data sources for a + method, class or parameter. - The test to modify - + - RandomAttribute is used to supply a set of random _values - to a single parameter of a parameterized test. + Default constructor - + - Construct a random set of values appropriate for the Type of the - parameter on which the attribute appears, specifying only the count. + 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. - - + - Construct a set of ints within a specified range + 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. - + - Construct a set of unsigned ints within a specified range + 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. - + - Construct a set of longs within a specified range + Attribute used to provide descriptive text about a + test case or fixture. - + - Construct a set of unsigned longs within a specified range + Construct a description Attribute + The text of the description - + - Construct a set of shorts within a specified range + 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. - + - Construct a set of unsigned shorts within a specified range + Default constructor - + - Construct a set of doubles within a specified range + Constructor with a reason + The reason test is marked explicit - + - Construct a set of floats within a specified range + Modifies a test by marking it as explicit. + The test to modify - + - Construct a set of bytes within a specified range + Attribute used to mark a test that is to be ignored. + Ignored tests result in a warning message when the + tests are run. - + - Construct a set of sbytes within a specified range + Constructs the attribute giving a reason for ignoring the test + The reason for ignoring the test - + - Get the collection of _values to be used as arguments. + 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. - + - RangeAttribute is used to supply a range of _values to an - individual parameter of a parameterized test. + Modifies a test by marking it as Ignored. + The test to modify - + - Construct a range of ints using default step of 1 + Abstract base for Attributes that are used to include tests + in the test run based on environmental settings. - - - + - Construct a range of ints specifying the step size + Constructor with no included items specified, for use + with named property syntax. - - - - + - Construct a range of unsigned ints using default step of 1 + Constructor taking one or more included items - - + Comma-delimited list of included items - + - Construct a range of unsigned ints specifying the step size + Name of the item that is needed in order for + a test to run. Multiple items may be given, + separated by a comma. - - - - + - Construct a range of longs using a default step of 1 + Name of the item to be excluded. Multiple items + may be given, separated by a comma. - - - + - Construct a range of longs + The reason for including or excluding the test - - - - + - Construct a range of unsigned longs using default step of 1 + 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. - - - + - Construct a range of unsigned longs specifying the step size + Apply changes to the TestExecutionContext - - - + The TestExecutionContext - + - Construct a range of doubles + 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. - - - - + - Construct a range of floats + LevelOfParallelismAttribute is used to set the number of worker threads + that may be allocated by the framework for running tests. - - - - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + Construct a LevelOfParallelismAttribute. + The number of worker threads to be created by the framework. - + - Construct a RepeatAttribute + Summary description for MaxTimeAttribute. - The number of times to run the test - + - Wrap a command and return the result. + Construct a MaxTimeAttribute, given a time in milliseconds. - The command to be wrapped - The wrapped command + The maximum elapsed time in milliseconds - + - The test command for the RepeatAttribute + The abstract base class for all custom attributes defined by NUnit. - + - Initializes a new instance of the class. + Default constructor - The inner command. - The number of repetitions - + - Runs the test, saving a TestResult in the supplied TestExecutionContext. + Attribute used to identify a method that is called once + to perform setup before any child tests are run. - The context in which the test should run. - A TestResult - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + 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. - + - Construct a RepeatAttribute + Defines the order that the test will run in - The number of times to run the test - + - Wrap a command and return the result. + Defines the order that the test will run in - The command to be wrapped - The wrapped command - + - The test command for the RetryAttribute + Defines the order that the test will run in + - + - Initializes a new instance of the class. + Modifies a test as defined for the specific attribute. - The inner command. - The number of repetitions + The test to modify - + - Runs the test, saving a TestResult in the supplied TestExecutionContext. + 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. - 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 - + - Default constructor + ParallelizableAttribute is used to mark tests that may be run in parallel. - + - 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. + Construct a ParallelizableAttribute using default ParallelScope.Self. - + - 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. + Construct a ParallelizableAttribute with a specified scope. + The ParallelScope associated with this attribute. - + - 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. + Modify the context to be used for child tests + The current TestExecutionContext - + - SetUpFixtureAttribute is used to identify a SetUpFixture + The ParallelScope enumeration permits specifying the degree to + which a test and its descendants may be run in parallel. - + - Build a SetUpFixture from type provided. Normally called for a Type - on which the attribute has been placed. + No Parallelism is permitted - 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. + The test itself may be run in parallel with others at the same level - + - Provide actions to execute before and after tests. + Descendants of the test may be run in parallel with one another - + - Executed before each test is run + Descendants of the test down to the level of TestFixtures may be run in parallel - The test that is going to be run. - + - Executed after each test is run + PropertyAttribute is used to attach information to a test as a name/value pair.. - The test that has just been run. - + - Provides the target for the action attribute + Construct a PropertyAttribute with a name and string value + The name of the property + The property value - + - 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. + Construct a PropertyAttribute with a name and int value - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - public void TestDescriptionMethod() - {} - } - - + The name of the property + The property value - + - Descriptive text for this test + Construct a PropertyAttribute with a name and double value + The name of the property + The property value - + - The author of this test + Constructor for derived classes that set the + property dictionary directly. - + - The type that this test is testing + 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. - + - Modifies a test by adding a description, if not already set. + Gets the property dictionary for this attribute - The test to modify - + - Gets or sets the expected result. + Modifies a test by adding properties to it. - The result. + The test to modify - + - Returns true if an expected result has been set + RandomAttribute is used to supply a set of random _values + to a single parameter of a parameterized test. - + - Construct a TestMethod from a given method. + Construct a random set of values appropriate for the Type of the + parameter on which the attribute appears, specifying only the count. - 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 set of ints within a specified range - + - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant + Construct a set of unsigned ints within a specified range - - + - Construct a TestCaseAttribute with a single argument + Construct a set of longs within a specified range - - + - Construct a TestCaseAttribute with a two arguments + Construct a set of unsigned longs within a specified range - - - + - Construct a TestCaseAttribute with a three arguments + Construct a set of shorts within a specified range - - - - + - Gets or sets the name of the test. + Construct a set of unsigned shorts within a specified range - The name of the test. - + - Gets or sets the RunState of this test case. + Construct a set of doubles within a specified range - + - Gets the list of arguments to a test case + Construct a set of floats within a specified range - + - Gets the properties of the test case + Construct a set of bytes within a specified range - + - Gets or sets the expected result. + Construct a set of sbytes within a specified range - The result. - + - Returns true if the expected result has been set + Get the collection of _values to be used as arguments. - + - Gets or sets the description. + RangeAttribute is used to supply a range of _values to an + individual parameter of a parameterized test. - The description. - + - The author of this test + Construct a range of ints using default step of 1 + + - + - The type that this test is testing + Construct a range of ints specifying the step size + + + - + - Gets or sets the reason for ignoring the test + Construct a range of unsigned ints using default step of 1 + + - + - Gets or sets a value indicating whether this is explicit. + Construct a range of unsigned ints specifying the step size - - true if explicit; otherwise, false. - + + + - + - Gets or sets the reason for not running the test. + Construct a range of longs using a default step of 1 - The reason. + + - + - Gets or sets the ignore reason. When set to a non-null - non-empty value, the test is marked as ignored. + Construct a range of longs - The ignore reason. + + + - + - Gets and sets the category for this test case. - May be a comma-separated list of categories. + Construct a range of unsigned longs using default step of 1 + + - + - 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. + Construct a range of unsigned longs specifying the step size - The arguments to be converted - The ParameterInfo array for the method + + + - + - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. + Construct a range of doubles - 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 a range of floats + + + - + - Construct with the name of the method, property or field that will provide data + RepeatAttribute may be applied to test case in order + to run it multiple times. - The name of a static method, property or field that will provide data. - + - Construct with a Type and name + Construct a RepeatAttribute - The Type that will provide data - The name of a static method, property or field that will provide data. + The number of times to run the test - + - Construct with a Type + Wrap a command and return the result. - The type that will provide data + The command to be wrapped + The wrapped command - + - The name of a the method, property or fiend to be used as a source + The test command for the RepeatAttribute - + - A Type to be used as a source + Initializes a new instance of the class. + The inner command. + The number of repetitions - + - Gets or sets the category associated with every fixture created from - this attribute. May be a single category or a comma-separated list. + Runs the test, saving a TestResult in the supplied TestExecutionContext. + The context in which the test should run. + A TestResult - + - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. + RepeatAttribute may be applied to test case in order + to run it multiple times. - 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. + Construct a RepeatAttribute - The method for which data is needed. - + The number of times to run the test - + - TestFixtureAttribute is used to mark a class that represents a TestFixture. + Wrap a command and return the result. + The command to be wrapped + The wrapped command - + - Default constructor + The test command for the RetryAttribute - + - 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. + Initializes a new instance of the class. - + The inner command. + The number of repetitions - + - Gets or sets the name of the test. + Runs the test, saving a TestResult in the supplied TestExecutionContext. - The name of the test. + The context in which the test should run. + A TestResult - + - Gets or sets the RunState of this test fixture. + 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. - + - The arguments originally provided to the attribute + Default constructor - + - Properties pertaining to this fixture + 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. - + - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. + 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. - + - Descriptive text for this fixture + 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. - + - The author of this fixture + SetUpFixtureAttribute is used to identify a SetUpFixture - + - The type that this fixture is testing + 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. - + - Gets or sets the ignore reason. May set RunState as a side effect. + 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. - The ignore reason. - + - Gets or sets the reason for not running the fixture. + Provide actions to execute before and after tests. - The reason. - + - Gets or sets the ignore reason. When set to a non-null - non-empty value, the test is marked as ignored. + Executed before each test is run - The ignore reason. + The test that is going to be run. - + - Gets or sets a value indicating whether this is explicit. + Executed after each test is run - - true if explicit; otherwise, false. - + The test that has just been run. - + - Gets and sets the category for this fixture. - May be a comma-separated list of categories. + Provides the target for the action attribute - + - Build a fixture from type provided. Normally called for a Type - on which the attribute has been placed. + 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. - The type info of the fixture to be used. - A an IEnumerable holding one TestFixture object. + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + public void TestDescriptionMethod() + {} + } + + - + - Attribute used to identify a method that is - called before any tests in a fixture are run. + Descriptive text for this test - + - TestCaseSourceAttribute indicates the source to be used to - provide test fixture instances for a test class. + The author of this test - + - Error message string is public so the tests can use it + The type that this test is testing - + - Construct with the name of the method, property or field that will provide data + Modifies a test by adding a description, if not already set. - The name of a static method, property or field that will provide data. + The test to modify - + - Construct with a Type and name + Gets or sets the expected result. - The Type that will provide data - The name of a static method, property or field that will provide data. + The result. - + - Construct with a Type + Returns true if an expected result has been set - The type that will provide data - + - The name of a the method, property or fiend to be used as a source + 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 - + - A Type to be used as a source + TestCaseAttribute is used to mark parameterized test cases + and provide them with their arguments. - + - Gets or sets the category associated with every fixture created from - this attribute. May be a single category or a comma-separated list. + Construct a TestCaseAttribute with a list of arguments. + This constructor is not CLS-Compliant + - + - Construct one or more TestFixtures from a given Type, - using available parameter data. + Construct a TestCaseAttribute with a single argument - 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. + Construct a TestCaseAttribute with a two arguments - 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. + Construct a TestCaseAttribute with a three arguments + + + - + - Indicates which class the test or test fixture is testing + Gets or sets the name of the test. + The name of the test. - + - Initializes a new instance of the class. + Gets or sets the RunState of this test case. - The type that is being tested. - + - Initializes a new instance of the class. + Gets the list of arguments to a test case - 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. + Gets the properties of the test case - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - public void TestDescriptionMethod() - {} - } - - - + + + Gets or sets the expected result. + + The result. + + - Construct the attribute, specifying a combining strategy and source of parameter data. + Returns true if the expected result has been set - + - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. + Gets or sets the description. + The description. - + - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary + The author of this test - + - Constructs for use with an Enum parameter. Will pass every enum - value in to the test. + The type that this test is testing - + - Construct with one argument + Gets or sets the reason for ignoring the test - - + - Construct with two arguments + Gets or sets a value indicating whether this is explicit. - - + + true if explicit; otherwise, false. + - + - Construct with three arguments + Gets or sets the reason for not running the test. - - - + The reason. - + - Construct with an array of arguments + Gets or sets the ignore reason. When set to a non-null + non-empty value, the test is marked as ignored. - + The ignore reason. - + - Get the collection of _values to be used as arguments + Gets and sets the category for this test case. + May be a comma-separated list of categories. - + - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. + 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 with the name of the factory - for use with languages - that don't support params arrays. + Construct one or more TestMethods from a given MethodInfo, + using available parameter data. - The name of a static method, property or field that will provide data. + The MethodInfo for which tests are to be constructed. + The suite to which the tests will be added. + One or more TestMethods - + - Construct with a Type and name - for use with languages - that don't support params arrays. + 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 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 + 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. - + - A Type to be used as a source + 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. - + - Gets an enumeration of data items for use as arguments - for a test method parameter. + Construct with a Type - The parameter for which data is needed - - An enumeration containing individual data items - + The type that will provide data - + - A set of Assert methods operating on one or more collections + 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 Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + The name of a the method, property or fiend to be used as a source - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + A Type to be used as a source - - - + - Asserts that all items contained in collection are of the type specified by expectedType. + Gets or sets the category associated with every fixture created from + this attribute. May be a single category or a comma-separated list. - 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. + Construct one or more TestMethods from a given MethodInfo, + using available parameter data. - 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 + The IMethod for which tests are to be constructed. + The suite to which the tests will be added. + One or more TestMethods - + - Asserts that all items contained in collection are not equal to null. + Returns a set of ITestCaseDataItems for use as arguments + to a parameterized test method. - IEnumerable containing objects to be considered + The method for which data is needed. + - + - Asserts that all items contained in collection are not equal to null. + TestFixtureAttribute is used to mark a class that represents a TestFixture. - 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. + Default constructor - IEnumerable of objects to be considered - + - Ensures that every object contained in collection exists within the collection - once and only once. + 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. - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + Gets or sets the name of the test. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered + The name of the test. - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + Gets or sets the RunState of this test fixture. - 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 arguments originally provided to the attribute - 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. + Properties pertaining to this fixture - 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. + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. - 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. + Descriptive text for this fixture - 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 author of this fixture - 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 type that this fixture is testing - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - + - Asserts that expected and actual are not exactly equal. + Gets or sets the ignore reason. May set RunState as a side effect. - 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 + The ignore reason. - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Gets or sets the reason for not running the fixture. - 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 + The reason. - + - Asserts that expected and actual are not equivalent. + Gets or sets the ignore reason. When set to a non-null + non-empty value, the test is marked as ignored. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered + The ignore reason. - + - Asserts that expected and actual are not equivalent. + Gets or sets a value indicating whether this is explicit. - 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 + + true if explicit; otherwise, false. + - + - Asserts that collection contains actual as an item. + Gets and sets the category for this fixture. + May be a comma-separated list of categories. - IEnumerable of objects to be considered - Object to be found within collection - + - Asserts that collection contains actual as an item. + Build a fixture from type provided. Normally called for a Type + on which the attribute has been placed. - 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 + The type info of the fixture to be used. + A an IEnumerable holding one TestFixture object. - + - Asserts that collection does not contain actual as an item. + Attribute used to identify a method that is + called before any tests in a fixture are run. - IEnumerable of objects to be considered - Object that cannot exist within collection - + - Asserts that collection does not contain actual as an item. + TestCaseSourceAttribute indicates the source to be used to + provide test fixture instances for a test class. - 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 + Error message string is public so the tests can use it - The IEnumerable subset to be considered - The IEnumerable superset to be considered - + - Asserts that the superset does not contain the subset + Construct with the name of the method, property or field that will provide data - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The name of a static method, property or field that will provide data. - + - Asserts that the superset contains the subset. + Construct with a Type and name - The IEnumerable subset to be considered - The IEnumerable superset to be considered + The Type that will provide data + The name of a static method, property or field that will provide data. - + - Asserts that the superset contains the subset. + Construct with a Type - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The type that will provide data - + - Asserts that the subset does not contain the superset + The name of a the method, property or fiend to be used as a source - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that the subset does not contain the superset + A Type to be used as a source - 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. + Gets or sets the category associated with every fixture created from + this attribute. May be a single category or a comma-separated list. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that the subset contains the superset. + Construct one or more TestFixtures from a given Type, + using available parameter data. - 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 + The TypeInfo for which fixures are to be constructed. + One or more TestFixtures as TestSuite - + - Assert that an array, list or other collection is empty + Returns a set of ITestFixtureData items for use as arguments + to a parameterized test fixture. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The type for which data is needed. + - + - Assert that an array,list or other collection is empty + 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. - An array, list or other collection implementing IEnumerable - + - Assert that an array, list or other collection is empty + Indicates which class the test or test fixture is testing - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - + - Assert that an array,list or other collection is empty + Initializes a new instance of the class. - An array, list or other collection implementing IEnumerable + The type that is being tested. - + - Assert that an array, list or other collection is ordered + Initializes a new instance of the class. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The type that is being tested. - + - Assert that an array, list or other collection is ordered + 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. - An array, list or other collection implementing IEnumerable + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + public void TestDescriptionMethod() + {} + } + + - + - Assert that an array, list or other collection is ordered + Construct the attribute, specifying a combining strategy and source of parameter data. - 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 + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - + - Provides a platform-independent methods for getting attributes - for use by AttributeConstraint and AttributeExistsConstraint. + The collection of data to be returned. Must + be set by any derived attribute classes. + We use an object[] so that the individual + elements may have their type changed in GetData + if necessary - + - Gets the custom attributes from the given object. + Constructs for use with an Enum parameter. Will pass every enum + value in to the test. - 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. + Construct with one argument + - + - Specifies no binding flag. - + Construct with two arguments + + + - + - Specifies that only members declared at the level of the supplied type's hierarchy - should be considered. Inherited members are not considered. - + Construct with three arguments + + + + - + - Specifies that instance members are to be included in the search. - + Construct with an array of arguments + + + + + + Get the collection of _values to be used as arguments + - + - Specifies that static members are to be included in the search. - + ValueSourceAttribute indicates the source to be used to + provide data for one parameter of a test method. + - + - Specifies that public members are to be included in the search. - + 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. - + - Specifies that non-public members are to be included in the search. - + 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. - + - 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. - + The name of a the method, property or fiend to be used as a source + - + - A MarshalByRefObject that lives forever + A Type to be used as a source - + - Some path based methods that we need even in the Portable framework which - does not have the System.IO.Path class + 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 + - + - Windows directory separator + A set of Assert methods operating on one or more collections - + - Alternate directory separator + The Equals method throws an InvalidOperationException. This is done + to make sure there is no mistake by calling this function. + + - + - A volume separator character. + override the default ReferenceEquals to throw an InvalidOperationException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Get the file name and extension of the specified path string. + Asserts that all items contained in collection are of the type specified by expectedType. - 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. + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of - + - Provides NUnit specific extensions to aid in Reflection - across multiple frameworks + Asserts that all items contained in collection are of the type specified by expectedType. - - This version of the class allows direct calls on Type on - those platforms that would normally require use of - GetTypeInfo(). - + 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 - + - Returns an array of generic arguments for the give type + Asserts that all items contained in collection are not equal to null. - - + IEnumerable containing objects to be considered - + - Gets the constructor with the given parameter types + 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 - + - Gets the constructors for a type + 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 - + - Gets declared or inherited interfaces on this type + 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 - + - Gets the member on a given type by name. BindingFlags ARE IGNORED. + 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 - + - Gets all members on a given type. BindingFlags ARE IGNORED. + 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 - + - Gets field of the given name on the type + 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 - + - Gets property of the given name on the type + 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 - + - Gets property of the given name on the type + 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 - + - Gets the method with the given name and parameter list + 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 - + - Gets the method with the given name and parameter list + 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 - + - Gets the method with the given name and parameter list + 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 - + - Gets public methods on the given type + Asserts that expected and actual are not equivalent. - - + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Gets methods on a type + 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 - + - Determines if one type can be implicitly converted from another + Asserts that collection contains actual as an item. - - - + IEnumerable of objects to be considered + Object to be found within collection - + - Extensions to the various MemberInfo derived classes + 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 - + - Returns the get method for the given property + Asserts that collection does not contain actual as an item. - - - + IEnumerable of objects to be considered + Object that cannot exist within collection - + - Returns an array of custom attributes of the specified type applied to this member + Asserts that collection does not contain actual as an item. - Portable throws an argument exception if T does not - derive from Attribute. NUnit uses interfaces to find attributes, thus - this method + 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 - + - Returns an array of custom attributes of the specified type applied to this parameter + Asserts that the superset does not contain the subset + The IEnumerable subset to be considered + The IEnumerable superset to be considered - + - Returns an array of custom attributes of the specified type applied to this assembly + 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 - + - Extensions for Assembly that are not available in portable + Asserts that the superset contains the subset. + The IEnumerable subset to be considered + The IEnumerable superset to be considered - + - 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. + Asserts that the superset contains the subset. - The assembly - The type of attribute you are looking for - Ignored - + 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 - + - Gets the types in a given assembly + Asserts that the subset does not contain the superset - - + The IEnumerable superset to be considered + The IEnumerable subset to be considered - + - This class is a System.Diagnostics.Stopwatch on operating systems that support it. On those that don't, - it replicates the functionality at the resolution supported. + 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 - + - Gets the total elapsed time measured by the current instance, in milliseconds. + Asserts that the subset contains the superset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered - + - Gets a value indicating whether the Stopwatch timer is running. + 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 - + - Gets the current number of ticks in the timer mechanism. + Assert that an array, list or other collection is empty - - If the Stopwatch class uses a high-resolution performance counter, GetTimestamp returns the current - value of that counter. If the Stopwatch class uses the system timer, GetTimestamp returns the current - DateTime.Ticks property of the DateTime.Now instance. - - A long integer representing the tick counter value of the underlying timer mechanism. + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message - + - Stops time interval measurement and resets the elapsed time to zero. + Assert that an array,list or other collection is empty + An array, list or other collection implementing IEnumerable - + - Starts, or resumes, measuring elapsed time for an interval. + 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 - + - Initializes a new Stopwatch instance, sets the elapsed time property to zero, and starts measuring elapsed time. + Assert that an array,list or other collection is empty - A Stopwatch that has just begun measuring elapsed time. + An array, list or other collection implementing IEnumerable - + - Stops measuring elapsed time for an interval. + 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 - + - Returns a string that represents the current object. + Assert that an array, list or other collection is ordered - - A string that represents the current object. - + An array, list or other collection implementing IEnumerable - + - Gets the frequency of the timer as the number of ticks per second. + 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 - + - Indicates whether the timer is based on a high-resolution performance counter. + 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 @@ -8824,6 +9175,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionEquivalentConstraint is used to determine whether two @@ -8849,6 +9207,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionItemsEqualConstraint is the abstract base class for all @@ -8999,6 +9364,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionSupersetConstraint is used to determine whether @@ -9025,6 +9397,13 @@ + + + Flag the constraint to use the supplied predicate function + + The comparison function to use. + Self. + CollectionTally counts (tallies) the number of @@ -9274,6 +9653,15 @@ 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 @@ -9640,6 +10028,11 @@ 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 @@ -9992,6 +10385,11 @@ 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 @@ -10786,6 +11184,26 @@ 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. @@ -10853,6 +11271,19 @@ 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 @@ -11256,6 +11687,21 @@ 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 @@ -11271,6 +11717,17 @@ 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. @@ -12381,6 +12838,13 @@ 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 @@ -12790,8 +13254,10 @@ - GlobalSettings is a place for setting default _values used - by the framework in performing asserts. + 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. @@ -14171,6 +14637,11 @@ 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 @@ -14420,7 +14891,7 @@ - The Equals method throws an AssertionException. This is done + The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function. @@ -14428,7 +14899,7 @@ - override the default ReferenceEquals to throw an AssertionException. This + override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert. @@ -14735,6 +15206,11 @@ 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 @@ -14848,6 +15324,25 @@ 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 @@ -15237,6 +15732,30 @@ If true, use of the event queue is suppressed and test events are synchronous. + + + 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 + + A shim of the .NET interface for platforms that do not support it. diff --git a/third_party/dotnet/nunit-3.2.1/portable/nunit.testdata.dll b/third_party/dotnet/nunit-3.2.1/portable/nunit.testdata.dll new file mode 100644 index 0000000000000..9d3fbbfb86a60 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/nunit.testdata.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/nunitlite-runner.exe b/third_party/dotnet/nunit-3.2.1/portable/nunitlite-runner.exe new file mode 100644 index 0000000000000..d77b99868b8e0 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/nunitlite-runner.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/nunitlite.dll b/third_party/dotnet/nunit-3.2.1/portable/nunitlite.dll new file mode 100644 index 0000000000000..99dd199132679 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/nunitlite.dll differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/nunitlite.tests.exe b/third_party/dotnet/nunit-3.2.1/portable/nunitlite.tests.exe new file mode 100644 index 0000000000000..63b26b9bdc005 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/nunitlite.tests.exe differ diff --git a/third_party/dotnet/nunit-3.2.1/portable/slow-nunit-tests.dll b/third_party/dotnet/nunit-3.2.1/portable/slow-nunit-tests.dll new file mode 100644 index 0000000000000..6fa59ce850ab8 Binary files /dev/null and b/third_party/dotnet/nunit-3.2.1/portable/slow-nunit-tests.dll differ