diff options
author | Alan McGovern <alan@xamarin.com> | 2013-07-25 09:19:47 +0400 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2013-07-25 09:21:04 +0400 |
commit | b2d7d05a8d90addc10a145856a48d436b1311769 (patch) | |
tree | 8f780e5dfac05de3fea10eead90cdaca17c8a6bf | |
parent | 97af9dfa56abab8ca512ac408a30f605cc452956 (diff) |
Do not inherit from ILogicalThreadAffinative and add more helpers
TestContext does not actually support this. If the assembly under test
spins up any appdomains we blow up as TestContext is not serializable,
neither are many of it's members. As such implementing this interface
is pointless.
Also i'm ok with not allowing people run tests from the non-root
domain ;)
-rw-r--r-- | src/framework/GuiUnit/AdditionalAsserts.cs | 59 | ||||
-rwxr-xr-x | src/framework/Internal/TestExecutionContext.cs | 2 |
2 files changed, 60 insertions, 1 deletions
diff --git a/src/framework/GuiUnit/AdditionalAsserts.cs b/src/framework/GuiUnit/AdditionalAsserts.cs index e999a2c..f09f614 100644 --- a/src/framework/GuiUnit/AdditionalAsserts.cs +++ b/src/framework/GuiUnit/AdditionalAsserts.cs @@ -6,6 +6,7 @@ namespace NUnit.Framework { #region Greater + #region int public static void Greater(int expected, int actual, string message, params object[] args) { Assert.That(expected, Is.GreaterThan (actual), message, args); @@ -20,6 +21,64 @@ namespace NUnit.Framework { Assert.That(expected, Is.GreaterThan (actual)); } + #endregion + + #region double + + public static void Greater(double expected, double actual, string message, params object[] args) + { + Assert.That(expected, Is.GreaterThan (actual), message, args); + } + + public static void Greater(double expected, double actual, string message) + { + Assert.That(expected, Is.GreaterThan (actual), message, null); + } + + public static void Greater(double expected, double actual) + { + Assert.That(expected, Is.GreaterThan (actual)); + } + #endregion + + #endregion + + #region Less + + #region int + public static void Less(int expected, int actual, string message, params object[] args) + { + Assert.That(expected, Is.LessThan (actual), message, args); + } + + public static void Less(int expected, int actual, string message) + { + Assert.That(expected, Is.LessThan (actual), message, null); + } + + public static void Less(int expected, int actual) + { + Assert.That(expected, Is.LessThan (actual)); + } + #endregion + + #region double + + public static void Less(double expected, double actual, string message, params object[] args) + { + Assert.That(expected, Is.LessThan (actual), message, args); + } + + public static void Less(double expected, double actual, string message) + { + Assert.That(expected, Is.LessThan (actual), message, null); + } + + public static void Less(double expected, double actual) + { + Assert.That(expected, Is.LessThan (actual)); + } + #endregion #endregion diff --git a/src/framework/Internal/TestExecutionContext.cs b/src/framework/Internal/TestExecutionContext.cs index 19671be..9796cdc 100755 --- a/src/framework/Internal/TestExecutionContext.cs +++ b/src/framework/Internal/TestExecutionContext.cs @@ -54,7 +54,7 @@ namespace NUnit.Framework.Internal /// </summary>
public class TestExecutionContext
#if !SILVERLIGHT && !NETCF
- : ILogicalThreadAffinative
+ //: ILogicalThreadAffinative
#endif
{
#region Instance Fields
|