Make System.Drawing unit tests use Assert.Throws instead of [ExpectedException] ...
[mono.git] / mcs / class / System.Drawing / Test / System.Drawing / TestPointConverter.cs
index 0a0a6d0914fc7c5eb57f621f819c3343e840b775..7b5ec27a8576b5ffeaf3e6bb851b6bcfde840684 100644 (file)
@@ -253,13 +253,12 @@ namespace MonoTests.System.Drawing
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentException))]
                public void TestCreateInstance_CaseSensitive ()
                {
                        Hashtable ht = new Hashtable ();
                        ht.Add ("x", 2);
                        ht.Add ("Y", 3);
-                       ptconv.CreateInstance (null, ht);
+                       Assert.Throws<ArgumentException> (() => ptconv.CreateInstance (null, ht));
                }
 
                [Test]
@@ -305,10 +304,9 @@ namespace MonoTests.System.Drawing
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentException))]
                public void ConvertFromInvariantString_string_exc_1 ()
                {
-                       ptconv.ConvertFromInvariantString ("1");
+                       Assert.Throws<ArgumentException> (() => ptconv.ConvertFromInvariantString ("1"));
                }
 
                [Test]
@@ -341,10 +339,9 @@ namespace MonoTests.System.Drawing
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentException))]
                public void ConvertFromString_string_exc_1 ()
                {
-                       ptconv.ConvertFromString ("1");
+                       Assert.Throws<ArgumentException> (() => ptconv.ConvertFromString ("1"));
                }
 
                [Test]