X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Drawing%2FTest%2FSystem.Drawing%2FTestPointConverter.cs;h=7b5ec27a8576b5ffeaf3e6bb851b6bcfde840684;hb=d1be740678b8f7a411518f7489e74178ac0a726a;hp=1732d02b6946086c010ef38f088dd9287eeab57c;hpb=c4a3b30460c7ea1a1fb3c97cfc8478555714af2f;p=mono.git diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs index 1732d02b694..7b5ec27a857 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs @@ -63,9 +63,6 @@ namespace MonoTests.System.Drawing } [Test] -#if TARGET_JVM - [NUnit.Framework.Category ("NotWorking")] -#endif public void TestCanConvertFrom () { Assert.IsTrue (ptconv.CanConvertFrom (typeof (String)), "CCF#1"); @@ -97,9 +94,6 @@ namespace MonoTests.System.Drawing } [Test] -#if TARGET_JVM - [NUnit.Framework.Category ("NotWorking")] -#endif public void TestConvertFrom () { Assert.AreEqual (pt, (Point) ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, @@ -224,6 +218,13 @@ namespace MonoTests.System.Drawing } catch (Exception e) { Assert.IsTrue (e is NotSupportedException, "CT#7"); } + + try { + // culture == null + ptconv.ConvertTo (null, null, pt, typeof (string)); + } catch (NullReferenceException e) { + Assert.Fail ("CT#8: must not throw NullReferenceException"); + } } [Test] @@ -252,17 +253,12 @@ namespace MonoTests.System.Drawing } [Test] -#if NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void TestCreateInstance_CaseSensitive () { Hashtable ht = new Hashtable (); ht.Add ("x", 2); ht.Add ("Y", 3); - ptconv.CreateInstance (null, ht); + Assert.Throws (() => ptconv.CreateInstance (null, ht)); } [Test] @@ -273,9 +269,6 @@ namespace MonoTests.System.Drawing } [Test] -#if TARGET_JVM - [NUnit.Framework.Category ("NotWorking")] -#endif public void TestGetProperties () { Attribute [] attrs; @@ -311,16 +304,12 @@ namespace MonoTests.System.Drawing } [Test] - [ExpectedException (typeof (ArgumentException))] public void ConvertFromInvariantString_string_exc_1 () { - ptconv.ConvertFromInvariantString ("1"); + Assert.Throws (() => ptconv.ConvertFromInvariantString ("1")); } [Test] -#if TARGET_JVM - [NUnit.Framework.Category ("NotWorking")] -#endif public void ConvertFromInvariantString_string_exc_2 () { try { @@ -334,9 +323,6 @@ namespace MonoTests.System.Drawing } [Test] -#if TARGET_JVM - [NUnit.Framework.Category ("NotWorking")] -#endif public void ConvertFromString_string () { // save current culture @@ -353,16 +339,12 @@ namespace MonoTests.System.Drawing } [Test] - [ExpectedException (typeof (ArgumentException))] public void ConvertFromString_string_exc_1 () { - ptconv.ConvertFromString ("1"); + Assert.Throws (() => ptconv.ConvertFromString ("1")); } [Test] -#if TARGET_JVM - [NUnit.Framework.Category ("NotWorking")] -#endif public void ConvertFromString_string_exc_2 () { try {