X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem.Threading%2FThreadLocalTests.cs;h=37683efb91e7a1d0c95291687fd4b7a1cbedf628;hb=055495c537473805859a4db627918347be547ee3;hp=e3692d003241557b5a18263559ad954f3825e2da;hpb=a779b309ab59e88b4f29666fab166916ad815622;p=mono.git diff --git a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs index e3692d00324..37683efb91e 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs @@ -29,8 +29,10 @@ using System; using System.Threading; using NUnit; -using NUnit.Core; using NUnit.Framework; +#if !MOBILE +using NUnit.Framework.SyntaxHelpers; +#endif namespace MonoTests.System.Threading { @@ -70,7 +72,6 @@ namespace MonoTests.System.Threading threadLocal = new ThreadLocal (() => { Interlocked.Increment (ref callTime); throw new ApplicationException ("foo"); - return 43; }); Exception exception = null; @@ -82,7 +83,7 @@ namespace MonoTests.System.Threading } Assert.IsNotNull (exception, "#1"); - Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#2"); + Assert.That (exception, Is.TypeOf (typeof (ApplicationException)), "#2"); Assert.AreEqual (1, callTime, "#3"); exception = null; @@ -94,7 +95,7 @@ namespace MonoTests.System.Threading } Assert.IsNotNull (exception, "#4"); - Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#5"); + Assert.That (exception, Is.TypeOf (typeof (ApplicationException)), "#5"); Assert.AreEqual (1, callTime, "#6"); } @@ -162,7 +163,7 @@ namespace MonoTests.System.Threading t.Join (); Assert.AreEqual (false, thread_value_created, "#4"); Assert.IsNotNull (exception, "#5"); - Assert.IsInstanceOfType (typeof (ApplicationException), exception, "#6"); + Assert.That (exception, Is.TypeOf (typeof (ApplicationException)), "#6"); } void AssertThreadLocal ()