Make System.Drawing unit tests use Assert.Throws instead of [ExpectedException] ...
[mono.git] / mcs / class / System.Drawing / Test / System.Drawing / TestBrushes.cs
index 6b922e2a719b5d228e05d0807c669ca62c7d3e93..4eb5b5b79c4a2831f602830ef4d8c5f23494b239 100644 (file)
@@ -48,12 +48,11 @@ namespace MonoTests.System.Drawing {
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentException))]
                public void Dispose ()
                {
                        Brushes.YellowGreen.Dispose ();
                        // a "normal" SolidBrush would throw an ArgumentException here
-                       Brushes.YellowGreen.Clone ();
+                       Assert.Throws<ArgumentException> (() => Brushes.YellowGreen.Clone ());
                        // and it is! so watch your brushes ;-)
                }