Bring this test to the new NUnit syntax
authorMiguel de Icaza <miguel@gnome.org>
Fri, 13 Apr 2012 03:25:35 +0000 (23:25 -0400)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 13 Apr 2012 03:26:07 +0000 (23:26 -0400)
mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs
mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs
mcs/class/System.Drawing/Test/DrawingTest/Test/Makefile

index 52acfedf88a0223e42cbbd2d2672e38706582a06..c51c43607c91b63e391ac0ce0d91558625a15a8f 100644 (file)
@@ -337,7 +337,7 @@ namespace DrawingTestHelper
                private static void AssertAlmostEqual (float expected, float actual, float tolerance, string message)\r
                {\r
                        float error = System.Math.Abs ((expected - actual) / (expected + actual + float.Epsilon));\r
-                       Assert.IsTrue (error < tolerance, message);\r
+                       Assert.That (error < tolerance, Is.True, message);\r
                }\r
 \r
                public static void AssertAlmostEqual (PointF expected, PointF actual)\r
@@ -411,12 +411,12 @@ namespace DrawingTestHelper
 \r
                public void AssertCompare () {\r
                        CheckCounter ();\r
-                       Assert.IsTrue ((CompareToExpectedInternal () * 100) < DEFAULT_IMAGE_TOLERANCE);\r
+                       Assert.That ((CompareToExpectedInternal () * 100) < DEFAULT_IMAGE_TOLERANCE, Is.True);\r
                }\r
 \r
                public void AssertCompare (double tolerance) {\r
                        CheckCounter ();\r
-                       Assert.IsTrue ((CompareToExpectedInternal () * 100) < tolerance);\r
+                       Assert.That ((CompareToExpectedInternal () * 100) < tolerance, Is.True);\r
                }\r
                \r
                public double CompareToExpected () {\r
index 32d79a13b29da01bafa3c2ca7b839b6fe1feccb8..d1796375f2ced175dfce572d05d6ff4598230097 100644 (file)
@@ -38,6 +38,9 @@ using System.Drawing.Text;
 using System.Drawing.Imaging;\r
 using DrawingTestHelper;\r
 using System.IO;\r
+#if !MONOTOUCH\r
+using  NUnit.Framework.SyntaxHelpers;\r
+#endif\r
 \r
 namespace Test.Sys.Drawing.GraphicsFixtures {\r
        #region GraphicsFixtureProps\r
@@ -63,14 +66,14 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                [Test]\r
                public void ClipTest_1() {\r
                        Region r = new Region();\r
-                       Assert.IsTrue(r.Equals(t.Graphics.Clip, t.Graphics));\r
+                       Assert.That(r.Equals(t.Graphics.Clip, t.Graphics), Is.True);\r
                }\r
 \r
                [Test]\r
                public void ClipTest_2() {\r
                        Region r = new Region(new Rectangle(10, 10, 60, 60));\r
                        t.Graphics.Clip = r;\r
-                       Assert.IsTrue(r.Equals(t.Graphics.Clip, t.Graphics));\r
+                       Assert.That(r.Equals(t.Graphics.Clip, t.Graphics), Is.True);\r
 \r
                        Pen redPen   = new Pen(Color.Red, 3);\r
                        Pen greenPen = new Pen(Color.Green, 3);\r
@@ -94,7 +97,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw lines between original points to screen.\r
                        t.Graphics.DrawLines(redPen, curvePoints);\r
                        t.Show ();\r
-                       Assert.IsTrue(t.PDCompare(TOLERANCE));\r
+                       Assert.That(t.PDCompare(TOLERANCE), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -144,18 +147,18 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                [Test]\r
                public void ClipBoundsTest() {\r
                        Region r = new Region();\r
-                       Assert.IsTrue(t.Graphics.ClipBounds.Equals(r.GetBounds(t.Graphics)));\r
+                       Assert.That(t.Graphics.ClipBounds.Equals(r.GetBounds(t.Graphics)), Is.True);\r
 \r
                        RectangleF rf = new RectangleF(10, 10, 60, 60);\r
                        r = new Region(rf);\r
                        t.Graphics.Clip = r;\r
-                       Assert.IsTrue(rf.Equals(t.Graphics.ClipBounds));\r
+                       Assert.That(rf.Equals(t.Graphics.ClipBounds), Is.True);\r
                }\r
 \r
                [Test]\r
                public void CompositingModeTest() {\r
                        //TODO: seems to draw equal images\r
-                       Assert.AreEqual(CompositingMode.SourceOver, t.Graphics.CompositingMode);\r
+                       Assert.That (CompositingMode.SourceOver, Is.EqualTo (t.Graphics.CompositingMode));\r
 \r
                        Bitmap b = new Bitmap(100, 100);\r
                        Graphics g = Graphics.FromImage(b);\r
@@ -174,7 +177,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawImage(b, 300, 300);\r
 \r
                        t.Show ();\r
-                       Assert.IsTrue(t.PDCompare(TOLERANCE));\r
+                       Assert.That(t.PDCompare(TOLERANCE), Is.True);\r
                }\r
 \r
                [Test] //TBD\r
@@ -183,91 +186,91 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
 \r
                [Test]\r
                public void DpiXTest() {\r
-                       Assert.IsTrue(t.Graphics.DpiX == 96f);\r
+                       Assert.That(t.Graphics.DpiX == 96f, Is.True);\r
                }\r
 \r
                [Test]\r
                public void DpiYTest() {\r
-                       Assert.IsTrue(t.Graphics.DpiY == 96f);\r
+                       Assert.That(t.Graphics.DpiY == 96f, Is.True);\r
                }\r
 \r
                [Test] //TBD\r
                public void InterpolationModeTest() {\r
-                       Assert.AreEqual(InterpolationMode.Bilinear, t.Graphics.InterpolationMode);\r
+                       Assert.That (InterpolationMode.Bilinear, Is.EqualTo (t.Graphics.InterpolationMode));\r
                }\r
 \r
                [Test]\r
                public void IsClipEmtpyTest() {\r
-                       Assert.IsFalse(t.Graphics.IsClipEmpty);\r
+                       Assert.That (t.Graphics.IsClipEmpty, Is.False);\r
 \r
                        try {\r
                                t.Graphics.Clip = null;\r
                                Assert.Fail("The ArgumentNullException was not thrown");\r
                        }\r
                        catch(Exception e) {\r
-                               Assert.AreEqual(e.GetType(), typeof(ArgumentNullException));\r
+                               Assert.That (e.GetType(), Is.EqualTo (typeof(ArgumentNullException)));\r
                        }\r
 \r
                        Region r = new Region(new Rectangle(10, 10, 0, 0));\r
                        t.Graphics.Clip = r;\r
 \r
-                       Assert.IsTrue( t.Graphics.IsClipEmpty);\r
+                       Assert.That( t.Graphics.IsClipEmpty, Is.True);\r
                }\r
 \r
                [Test]\r
                public void IsVisibleClipEmtpyTest() {\r
-                       Assert.IsFalse(t.Graphics.IsVisibleClipEmpty, "default t.Graphics.IsVisibleClipEmpty");\r
+                       Assert.That (t.Graphics.IsVisibleClipEmpty, Is.False, "default t.Graphics.IsVisibleClipEmpty");\r
 \r
                        Region r = new Region(new Rectangle(512, 512, 100, 100));\r
                        t.Graphics.Clip = r;\r
-                       Assert.IsFalse(t.Graphics.IsClipEmpty);\r
-                       Assert.IsTrue(t.Graphics.IsVisibleClipEmpty);\r
+                       Assert.That (t.Graphics.IsClipEmpty, Is.False);\r
+                       Assert.That(t.Graphics.IsVisibleClipEmpty, Is.True);\r
                }\r
 \r
                [Test]\r
                public void PageScaleTest() {\r
-                       Assert.AreEqual(1f, t.Graphics.PageScale);\r
+                       Assert.That (1f, Is.EqualTo (t.Graphics.PageScale));\r
                }\r
 \r
                [Test]\r
                public void PageUnitTest() {\r
-                       Assert.AreEqual(GraphicsUnit.Display, t.Graphics.PageUnit);\r
+                       Assert.That (GraphicsUnit.Display, Is.EqualTo (t.Graphics.PageUnit));\r
                }\r
 \r
                [Test]\r
                public void PixelOffsetModeTest() {\r
-                       Assert.AreEqual(PixelOffsetMode.Default, t.Graphics.PixelOffsetMode);\r
+                       Assert.That (PixelOffsetMode.Default, Is.EqualTo (t.Graphics.PixelOffsetMode));\r
                }\r
 \r
                [Test]\r
                [Category("NotWorking")]\r
                public void RenderingOriginTest() {\r
-                       Assert.AreEqual(new Point(0,0), t.Graphics.RenderingOrigin);\r
+                       Assert.That (new Point(0,0), Is.EqualTo (t.Graphics.RenderingOrigin));\r
                }\r
 \r
                [Test]\r
                public void SmoothingModeTest() {\r
-                       Assert.AreEqual(SmoothingMode.None, t.Graphics.SmoothingMode);\r
+                       Assert.That (SmoothingMode.None, Is.EqualTo (t.Graphics.SmoothingMode));\r
                }\r
 \r
                [Test]\r
                public void TextContrastTest() {\r
-                       Assert.AreEqual(4, t.Graphics.TextContrast);\r
+                       Assert.That (4, Is.EqualTo (t.Graphics.TextContrast));\r
                }\r
 \r
                [Test]\r
                public void TextRenderingHintTest() {\r
-                       Assert.AreEqual(TextRenderingHint.SystemDefault, t.Graphics.TextRenderingHint);\r
+                       Assert.That (TextRenderingHint.SystemDefault, Is.EqualTo (t.Graphics.TextRenderingHint));\r
                }\r
 \r
                [Test]\r
                public void TransformTest() {\r
-                       Assert.AreEqual(new Matrix(), t.Graphics.Transform);\r
+                       Assert.That (new Matrix(), Is.EqualTo (t.Graphics.Transform));\r
                }\r
 \r
                [Test]\r
                public void VisibleClipBoundsTest() {\r
-                       Assert.AreEqual(new RectangleF(0, 0, 512, 512), t.Graphics.VisibleClipBounds);\r
+                       Assert.That (new RectangleF(0, 0, 512, 512), Is.EqualTo (t.Graphics.VisibleClipBounds));\r
                }\r
        }\r
 \r
@@ -317,35 +320,35 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawImage(bmp, new Point[]{new Point(170,10), new Point(250,0), new Point(100,100)}, src, GraphicsUnit.Pixel );\r
                        t.Graphics.DrawImage(bmp, new PointF[]{new PointF(70,10), new PointF(150,0), new PointF(10,100)}, srcF, GraphicsUnit.Pixel );\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage2() {\r
                        t.Graphics.DrawImage(bmp, dst, src, GraphicsUnit.Pixel);\r
                        t.Graphics.DrawImage(bmp, dstF, srcF, GraphicsUnit.Pixel);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage3() {\r
                        t.Graphics.DrawImage(bmp, 10.0F, 10.0F, srcF, GraphicsUnit.Pixel);\r
                        t.Graphics.DrawImage(bmp, 70.0F, 150.0F, 250.0F, 150.0F);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage4() {\r
                        t.Graphics.DrawImage(bmp, dst);\r
                        t.Graphics.DrawImage(bmp, dstF);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage5() {\r
                        t.Graphics.SetClip( new Rectangle(70, 0, 20, 200));\r
                        t.Graphics.DrawImage(bmp, new Point[]{new Point(50,50), new Point(250,30), new Point(100,150)}, src, GraphicsUnit.Pixel );\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage6() {\r
@@ -353,28 +356,28 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.SetClip( new Rectangle(70, 0, 20, 200));\r
                        t.Graphics.DrawImage(bmp, new Point[]{new Point(50,50), new Point(250,30), new Point(100,150)}, src, GraphicsUnit.Pixel );\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage7() {\r
                        t.Graphics.DrawImage(bmp, 170, 70, src, GraphicsUnit.Pixel);\r
                        t.Graphics.DrawImage(bmp, 70, 350, 350, 150);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage8() {\r
                        t.Graphics.DrawImage(bmp, new Point[]{new Point(170,10), new Point(250,10), new Point(100,100)} );\r
                        t.Graphics.DrawImage(bmp, new PointF[]{new PointF(170,100), new PointF(250,100), new PointF(100,190)} );\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImage9() {\r
                        t.Graphics.DrawImage(bmp, 0, 0);\r
                        t.Graphics.DrawImage(bmp, 200, 200);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImagePageUnit() {\r
@@ -387,7 +390,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
 \r
                        t.Graphics.DrawImage(bmp2, p, new Rectangle(100, 100, 100, 100), GraphicsUnit.Pixel);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImagePageUnit_2() {\r
@@ -401,7 +404,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
 \r
                        t.Graphics.DrawImage(bmp2, p, new Rectangle(100, 100, 100, 100), GraphicsUnit.Pixel);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImagePageUnit_3() {\r
@@ -409,7 +412,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.ScaleTransform(0.3f, 0.3f);\r
                        t.Graphics.DrawImage(bmp2, new Rectangle(100, 100, 100, 100));\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImagePageUnit_4() {\r
@@ -417,7 +420,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.ScaleTransform(0.5f, 0.5f);\r
                        t.Graphics.DrawImage(bmp, 50, 50);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImagePageUnitClip() {\r
@@ -432,7 +435,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.SetClip( new Rectangle(120, 120, 50, 100) );\r
                        t.Graphics.DrawImage(bmp2, p, new Rectangle(100, 100, 100, 100), GraphicsUnit.Pixel);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
 #if TARGET_JVM\r
@@ -441,14 +444,14 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                public void DrawImageWithResolution() {\r
                        t.Graphics.DrawImage(bmp2, 0, 0);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImageInContainer1() {\r
                        t.Graphics.BeginContainer(new Rectangle(10, 10, 50, 50), new Rectangle(70, 70, 100, 100), GraphicsUnit.Pixel);\r
                        t.Graphics.DrawImage(bmp, 0, 0);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
 #if TARGET_JVM\r
@@ -458,7 +461,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.BeginContainer(new Rectangle(10, 10, 50, 50), new Rectangle(70, 70, 100, 100), GraphicsUnit.Pixel);\r
                        t.Graphics.DrawImage(bmp2, 0, 0);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImageInContainer3() {\r
@@ -467,7 +470,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.ScaleTransform(0.5f, 0.5f);\r
                        t.Graphics.DrawImage(bmp2, 0, 0);\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
                [Test]\r
                public void DrawImageInContainer4() {\r
@@ -482,7 +485,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawImage(bmp2, p, new Rectangle(100, 100, 100, 100), GraphicsUnit.Pixel);\r
                        t.Graphics.EndContainer( c );\r
                        t.Show();\r
-                       Assert.IsTrue(t.Compare());\r
+                       Assert.That(t.Compare(), Is.True);\r
                }\r
        }\r
        #endregion\r
@@ -509,7 +512,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                [Test]\r
                public void FillModeAlternate() {\r
                        GraphicsPath p = new GraphicsPath();\r
-                       Assert.AreEqual(FillMode.Alternate, p.FillMode);\r
+                       Assert.That (FillMode.Alternate, Is.EqualTo (p.FillMode));\r
                }\r
                [Test]\r
                public void FillModeAlternate_1() {\r
@@ -528,7 +531,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        path.FillMode = FillMode.Alternate;\r
                        t.Graphics.FillPath( Brushes.Blue, path );\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public void FillModeAlternate_2() {\r
@@ -541,7 +544,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        path.FillMode = FillMode.Alternate;\r
                        t.Graphics.FillPath( Brushes.Blue, path );\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public void FillModeAlternate_3() {\r
@@ -559,7 +562,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        path.FillMode = FillMode.Alternate;\r
                        t.Graphics.FillPath( Brushes.Blue, path );\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public void FillModeWinding_1() {\r
@@ -578,7 +581,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        path.FillMode = FillMode.Winding;\r
                        t.Graphics.FillPath( Brushes.Blue, path );\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public void FillModeWinding_2() {\r
@@ -591,7 +594,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        path.FillMode = FillMode.Winding;\r
                        t.Graphics.FillPath( Brushes.Blue, path );\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public void FillModeWinding_3() {\r
@@ -609,7 +612,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        path.FillMode = FillMode.Winding;\r
                        t.Graphics.FillPath( Brushes.Blue, path );\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
        }\r
@@ -671,7 +674,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill untransformed rectangle with green.\r
                        t.Graphics.FillRectangle(new SolidBrush(Color.Green), 0.0F, 0.0F, 200.0F, 200.0F);\r
                        t.Show ();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -691,14 +694,14 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
 \r
                        SizeF size = graphics.MeasureString (drawString, drawFont, new PointF (0, 0), StringFormat.GenericTypographic);\r
 \r
-                       Assert.IsTrue (Math.Abs (size.Width - netWidth1) / netWidth1 < 0.01);\r
-                       Assert.IsTrue (Math.Abs (size.Height - netHeight1) / netHeight1 < 0.01);\r
+                       Assert.That (Math.Abs (size.Width - netWidth1) / netWidth1 < 0.01, Is.True);\r
+                       Assert.That (Math.Abs (size.Height - netHeight1) / netHeight1 < 0.01, Is.True);\r
 \r
                        graphics.PageUnit = GraphicsUnit.Pixel;\r
                        size = graphics.MeasureString (drawString, drawFont, new PointF (0, 0), StringFormat.GenericTypographic);\r
 \r
-                       Assert.IsTrue (Math.Abs (size.Width - netWidth2) / netWidth2 < 0.01);\r
-                       Assert.IsTrue (Math.Abs (size.Height - netHeight2) / netHeight2 < 0.01);\r
+                       Assert.That (Math.Abs (size.Width - netWidth2) / netWidth2 < 0.01, Is.True);\r
+                       Assert.That (Math.Abs (size.Height - netHeight2) / netHeight2 < 0.01, Is.True);\r
                }\r
 \r
                [Test]\r
@@ -727,16 +730,16 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.FillRectangle( Brushes.Yellow, new Rectangle(150, 80, 10, 10) );\r
 \r
                        t.Show ();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public virtual void ClearTest() {\r
                        // Clear screen with teal background.\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        t.Graphics.Clear(Color.Teal);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -754,37 +757,37 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw arc to screen.\r
                        t.Graphics.DrawArc(blackPen, (int)x, (int)y, (int)width, (int)height, (int)startAngle, (int)sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        startAngle =  10.0F;\r
                        sweepAngle = 120.0F;\r
                        t.Graphics.DrawArc(blackPen, new Rectangle((int)x, (int)y, (int)width, (int)height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        startAngle =  10.0F;\r
                        sweepAngle = 190.0F;\r
                        t.Graphics.DrawArc(blackPen, x, y, width, height, startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        startAngle =  10.0F;\r
                        sweepAngle = 300.0F;\r
                        t.Graphics.DrawArc(blackPen, new RectangleF(x, y, width, height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        startAngle =  -179.9F;\r
                        sweepAngle = -359.9F;\r
                        t.Graphics.DrawArc(blackPen, new RectangleF(x, y, width, height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        startAngle =  -10.0F;\r
                        sweepAngle = -300.0F;\r
                        t.Graphics.DrawArc(blackPen, new RectangleF(x, y, width, height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -806,21 +809,21 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                                controlX2, controlY2,\r
                                endX, endY);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        t.Graphics.DrawBezier(blackPen, new PointF( startX, startY),\r
                                new PointF(controlX1, controlY1),\r
                                new PointF(controlX2, controlY2),\r
                                new PointF(endX, endY));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
                        t.Graphics.DrawBezier(blackPen, new Point((int)startX, (int)startY),\r
                                new Point((int)controlX1, (int)controlY1),\r
                                new Point((int)controlX2, (int)controlY2),\r
                                new Point((int)endX, (int)endY));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -842,7 +845,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw arc to screen.\r
                        t.Graphics.DrawBeziers(blackPen, bezierPoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        PointF startF = new PointF(100.0F, 100.0F);\r
@@ -859,7 +862,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw arc to screen.\r
                        t.Graphics.DrawBeziers(blackPen, bezierPointsF);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -892,14 +895,14 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw closed curve to screen.\r
                        t.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        aFillMode = FillMode.Winding;\r
                        // Draw closed curve to screen.\r
                        t.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -933,17 +936,17 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw curve to screen.\r
                        t.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, tension);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawCurve(greenPen, curvePoints, tension);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawCurve(greenPen, curvePoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -977,22 +980,22 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw curve to screen.\r
                        t.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, tension);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawCurve(greenPen, curvePoints, tension);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawCurve(greenPen, curvePoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1007,12 +1010,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw ellipse to screen.\r
                        t.Graphics.DrawEllipse(blackPen, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawEllipse(blackPen, new Rectangle(x, y, width, height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1027,12 +1030,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw ellipse to screen.\r
                        t.Graphics.DrawEllipse(blackPen, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawEllipse(blackPen, new RectangleF(x, y, width, height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                static string getInFile (string file) {\r
@@ -1059,11 +1062,11 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw icon to screen.\r
                        t.Graphics.DrawIcon(newIcon, x, y);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
 \r
                        t.Graphics.DrawIcon(newIcon, new Rectangle(200, 300, 125, 345));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1076,7 +1079,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw icon to screen.\r
                        t.Graphics.DrawIconUnstretched(newIcon, rect);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 #if INTPTR_SUPPORTED\r
                // Define DrawImageAbort callback method.\r
@@ -1142,22 +1145,22 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw image to screen.\r
                        t.Graphics.DrawImageUnscaled(newImage, x, y, 100, 125);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawImageUnscaled(newImage, new Rectangle(x, y, 34, 235));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawImageUnscaled(newImage, x, y);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawImageUnscaled(newImage, new Point(x, y));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1172,12 +1175,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw line to screen.\r
                        t.Graphics.DrawLine(blackPen, x1, y1, x2, y2);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawLine(blackPen, new Point( x1, y1), new Point( x2, y2));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1192,12 +1195,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw line to screen.\r
                        t.Graphics.DrawLine(blackPen, x1, y1, x2, y2);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawLine(blackPen, new PointF( x1, y1), new PointF( x2, y2));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1214,7 +1217,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        //Draw lines to screen.\r
                        t.Graphics.DrawLines(pen, points);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1231,7 +1234,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        //Draw lines to screen.\r
                        t.Graphics.DrawLines(pen, points);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1244,7 +1247,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw graphics path to screen.\r
                        t.Graphics.DrawPath(blackPen, graphPath);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1262,12 +1265,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw pie to screen.\r
                        t.Graphics.DrawPie(blackPen, x, y, width, height, startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawPie(blackPen, new RectangleF( x, y, width, height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1285,12 +1288,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw pie to screen.\r
                        t.Graphics.DrawPie(blackPen, x, y, width, height, startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawPie(blackPen, new Rectangle( x, y, width, height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1317,7 +1320,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw polygon to screen.\r
                        t.Graphics.DrawPolygon(blackPen, curvePoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare()); // .NET's lines of polygon is more wide\r
+                       Assert.That(t.PDCompare()); // .NET's lines of polygon is more wi, Is.Truede\r
                }\r
 \r
                [Test]\r
@@ -1344,7 +1347,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw polygon to screen.\r
                        t.Graphics.DrawPolygon(blackPen, curvePoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1359,17 +1362,17 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rectangle to screen.\r
                        t.Graphics.DrawRectangle(blackPen, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawRectangle(blackPen, (int)x, (int)y, (int)width, (int)height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.DrawRectangle(blackPen, new Rectangle( (int)x, (int)y, (int)width, (int)height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1385,7 +1388,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rectangles to screen.\r
                        t.Graphics.DrawRectangles(blackPen, rects);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1401,7 +1404,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rectangles to screen.\r
                        t.Graphics.DrawRectangles(blackPen, rects);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test] //TBD: add more combinations\r
@@ -1421,21 +1424,21 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw string to screen.\r
                        t.Graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare()); // in .net the font is shmoothed\r
+                       Assert.That(t.PDCompare()); // in .net the font is shmooth, Is.Trueed\r
                        SetUp();\r
 \r
                        drawFormat.FormatFlags = StringFormatFlags.NoClip;\r
                        // Draw string to screen.\r
                        t.Graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        drawFormat.FormatFlags = StringFormatFlags.FitBlackBox;\r
                        // Draw string to screen.\r
                        t.Graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1452,7 +1455,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill untransformed rectangle with green.\r
                        t.Graphics.FillRectangle(new SolidBrush(Color.Green), 0, 0, 200, 200);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test] //TBD\r
@@ -1468,7 +1471,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill large rectangle to show clipping region.\r
                        t.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 300, 300);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1488,18 +1491,18 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill curve on screen.\r
                        t.Graphics.FillClosedCurve(redBrush, points);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
 \r
                        SetUp();\r
                        t.Graphics.FillClosedCurve(redBrush, points, newFillMode);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
 \r
                        SetUp();\r
                        newFillMode = FillMode.Alternate;\r
                        t.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1519,18 +1522,18 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill curve on screen.\r
                        t.Graphics.FillClosedCurve(redBrush, points);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillClosedCurve(redBrush, points, newFillMode);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        newFillMode = FillMode.Alternate;\r
                        t.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1545,12 +1548,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill ellipse on screen.\r
                        t.Graphics.FillEllipse(redBrush, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillEllipse(redBrush, new Rectangle( x, y, width, height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1565,12 +1568,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill ellipse on screen.\r
                        t.Graphics.FillEllipse(redBrush, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillEllipse(redBrush, new RectangleF( x, y, width, height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1583,7 +1586,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill graphics path to screen.\r
                        t.Graphics.FillPath(redBrush, graphPath);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1601,17 +1604,17 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill pie to screen.\r
                        t.Graphics.FillPie(redBrush, new Rectangle(x, y, width, height), startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillPie(redBrush, x, y, width, height, (int)startAngle, (int)sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillPie(redBrush, (float)x, (float)y, (float)width, (float)height, startAngle, sweepAngle);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1639,17 +1642,17 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill polygon to screen.\r
                        t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Winding);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Alternate);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillPolygon(blueBrush, curvePoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1677,17 +1680,17 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill polygon to screen.\r
                        t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Winding);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Alternate);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillPolygon(blueBrush, curvePoints);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1702,12 +1705,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill rectangle to screen.\r
                        t.Graphics.FillRectangle(blueBrush, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillRectangle(blueBrush, new Rectangle( x, y, width, height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1722,12 +1725,12 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill rectangle to screen.\r
                        t.Graphics.FillRectangle(blueBrush, x, y, width, height);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                        SetUp();\r
 \r
                        t.Graphics.FillRectangle(blueBrush, new RectangleF( x, y, width, height));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1743,7 +1746,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill rectangles to screen.\r
                        t.Graphics.FillRectangles(blueBrush, rects);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1759,7 +1762,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill rectangles to screen.\r
                        t.Graphics.FillRectangles(blueBrush, rects);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1773,7 +1776,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill region to screen.\r
                        t.Graphics.FillRegion(blueBrush, fillRegion);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1803,7 +1806,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Show();\r
                        t.Graphics.DrawRectangle(new Pen(Color.Red), intersectRect);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1830,7 +1833,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                                t.Show();\r
                        }\r
 \r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1880,7 +1883,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                                new Pen(Color.Blue, 1),\r
                                Rectangle.Round(measureRect2));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test] //TBD: add more overloads\r
@@ -1926,7 +1929,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                                Brushes.Black,\r
                                new PointF(100, 0));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1944,7 +1947,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, translated ellipse.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), -80, -40, 160, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1962,7 +1965,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, translated ellipse.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), -80, -40, 160, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1980,7 +1983,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, translated ellipse.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), -80, -40, 160, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -1999,7 +2002,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawRectangle(new Pen(Color.Black), clipRect);\r
                        t.Graphics.DrawRectangle(new Pen(Color.Red), Rectangle.Round(intersectRectF));\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2016,7 +2019,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.Restore(transState);\r
                        t.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 100, 100);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2028,7 +2031,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw translated, rotated ellipse to screen.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2040,7 +2043,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw translated, rotated ellipse to screen.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());  // Line width problem\r
+                       Assert.That(t.PDCompare());  // Line width probl, Is.Trueem\r
                }\r
 \r
                [Test]\r
@@ -2052,7 +2055,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, scaled rectangle to screen.\r
                        t.Graphics.DrawRectangle(new Pen(Color.Blue, 3), 50, 0, 100, 40);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare()); // Line width problem\r
+                       Assert.That(t.PDCompare()); // Line width probl, Is.Trueem\r
                }\r
 \r
                [Test]\r
@@ -2064,7 +2067,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, scaled rectangle to screen.\r
                        t.Graphics.DrawRectangle(new Pen(Color.Blue, 3), 50, 0, 100, 40);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test] //TBD: add more combination\r
@@ -2076,7 +2079,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill rectangle to demonstrate clip region.\r
                        t.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2101,7 +2104,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                                points[0],\r
                                points[1]);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2117,7 +2120,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Fill rectangle to demonstrate translated clip region.\r
                        t.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2129,7 +2132,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, translated ellipse to screen.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare()); // Line width problem\r
+                       Assert.That(t.PDCompare()); // Line width probl, Is.Trueem\r
                }\r
 \r
                [Test]\r
@@ -2141,7 +2144,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        // Draw rotated, translated ellipse to screen.\r
                        t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80);\r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2169,7 +2172,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawLine(Pens.Yellow, 10, 70, 70, 10);\r
 \r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -2188,7 +2191,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawLine(Pens.Green, 10, 70, 70, 10);\r
 \r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
                [Test]\r
                public virtual void TransfromPageScaleUnits_3() {\r
@@ -2218,7 +2221,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10);\r
 \r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
        }\r
 \r
@@ -3683,7 +3686,7 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        t.Graphics.FillRectangle( Brushes.SeaGreen, 0, 0, 100, 100 );\r
 \r
                        t.Show();\r
-                       Assert.IsTrue(t.PDCompare());\r
+                       Assert.That(t.PDCompare(), Is.True);\r
                }\r
 \r
                [Test]\r
@@ -3701,16 +3704,16 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
 \r
                        GraphicsContainer c1 = t.Graphics.BeginContainer();\r
 \r
-                       Assert.AreEqual(CompositingQuality.Default, t.Graphics.CompositingQuality);\r
-                       Assert.AreEqual(CompositingMode.SourceOver, t.Graphics.CompositingMode);\r
-                       Assert.AreEqual(InterpolationMode.Bilinear, t.Graphics.InterpolationMode);\r
-                       Assert.AreEqual(1.0F, t.Graphics.PageScale);\r
-                       Assert.AreEqual(GraphicsUnit.Display, t.Graphics.PageUnit);\r
-                       Assert.AreEqual(PixelOffsetMode.Default, t.Graphics.PixelOffsetMode);\r
-                       Assert.AreEqual(SmoothingMode.None, t.Graphics.SmoothingMode);\r
-                       Assert.AreEqual(true, t.Graphics.Transform.IsIdentity);\r
-                       Assert.AreEqual(4.0f, t.Graphics.TextContrast);\r
-                       Assert.AreEqual(TextRenderingHint.SystemDefault, t.Graphics.TextRenderingHint);\r
+                       Assert.That (CompositingQuality.Default, Is.EqualTo (t.Graphics.CompositingQuality));\r
+                       Assert.That (CompositingMode.SourceOver, Is.EqualTo (t.Graphics.CompositingMode));\r
+                       Assert.That (InterpolationMode.Bilinear, Is.EqualTo (t.Graphics.InterpolationMode));\r
+                       Assert.That (1.0F, Is.EqualTo (t.Graphics.PageScale));\r
+                       Assert.That (GraphicsUnit.Display, Is.EqualTo (t.Graphics.PageUnit));\r
+                       Assert.That (PixelOffsetMode.Default, Is.EqualTo (t.Graphics.PixelOffsetMode));\r
+                       Assert.That (SmoothingMode.None, Is.EqualTo (t.Graphics.SmoothingMode));\r
+                       Assert.That (true, Is.EqualTo (t.Graphics.Transform.IsIdentity));\r
+                       Assert.That (4.0f, Is.EqualTo (t.Graphics.TextContrast));\r
+                       Assert.That (TextRenderingHint.SystemDefault, Is.EqualTo (t.Graphics.TextRenderingHint));\r
 \r
                        t.Graphics.EndContainer(c1);\r
                }\r
@@ -3731,16 +3734,16 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
 \r
                        t.Graphics.Restore(s);\r
 \r
-                       Assert.AreEqual(CompositingQuality.Default, t.Graphics.CompositingQuality);\r
-                       Assert.AreEqual(CompositingMode.SourceOver, t.Graphics.CompositingMode);\r
-                       Assert.AreEqual(InterpolationMode.Bilinear, t.Graphics.InterpolationMode);\r
-                       Assert.AreEqual(1.0F, t.Graphics.PageScale);\r
-                       Assert.AreEqual(GraphicsUnit.Display, t.Graphics.PageUnit);\r
-                       Assert.AreEqual(PixelOffsetMode.Default, t.Graphics.PixelOffsetMode);\r
-                       Assert.AreEqual(SmoothingMode.None, t.Graphics.SmoothingMode);\r
-                       Assert.AreEqual(true, t.Graphics.Transform.IsIdentity);\r
-                       Assert.AreEqual(4.0f, t.Graphics.TextContrast);\r
-                       Assert.AreEqual(TextRenderingHint.SystemDefault, t.Graphics.TextRenderingHint);\r
+                       Assert.That (CompositingQuality.Default, Is.EqualTo (t.Graphics.CompositingQuality));\r
+                       Assert.That (CompositingMode.SourceOver, Is.EqualTo (t.Graphics.CompositingMode));\r
+                       Assert.That (InterpolationMode.Bilinear, Is.EqualTo (t.Graphics.InterpolationMode));\r
+                       Assert.That (1.0F, Is.EqualTo (t.Graphics.PageScale));\r
+                       Assert.That (GraphicsUnit.Display, Is.EqualTo (t.Graphics.PageUnit));\r
+                       Assert.That (PixelOffsetMode.Default, Is.EqualTo (t.Graphics.PixelOffsetMode));\r
+                       Assert.That (SmoothingMode.None, Is.EqualTo (t.Graphics.SmoothingMode));\r
+                       Assert.That (true, Is.EqualTo (t.Graphics.Transform.IsIdentity));\r
+                       Assert.That (4.0f, Is.EqualTo (t.Graphics.TextContrast));\r
+                       Assert.That (TextRenderingHint.SystemDefault, Is.EqualTo (t.Graphics.TextRenderingHint));\r
                }\r
 \r
                [Test]\r
@@ -3755,19 +3758,19 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        GraphicsContainer c3 = t.Graphics.BeginContainer();\r
 \r
                        t.Graphics.EndContainer(c2);\r
-                       Assert.AreEqual(3, t.Graphics.PageScale);\r
+                       Assert.That (3, Is.EqualTo (t.Graphics.PageScale));\r
 \r
                        t.Graphics.PageScale = 5;\r
                        GraphicsState c5 = t.Graphics.Save();\r
 \r
                        t.Graphics.EndContainer(c3);\r
-                       Assert.AreEqual(5, t.Graphics.PageScale);\r
+                       Assert.That (5, Is.EqualTo (t.Graphics.PageScale));\r
 \r
                        t.Graphics.Restore(c5);\r
-                       Assert.AreEqual(5, t.Graphics.PageScale);\r
+                       Assert.That (5, Is.EqualTo (t.Graphics.PageScale));\r
 \r
                        t.Graphics.EndContainer(c1);\r
-                       Assert.AreEqual(2, t.Graphics.PageScale);\r
+                       Assert.That (2, Is.EqualTo (t.Graphics.PageScale));\r
                }\r
                [Test]\r
                public void SaveRestoreGraphicsProps_4() {\r
@@ -3778,10 +3781,10 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
                        GraphicsState c2 = t.Graphics.Save();\r
 \r
                        t.Graphics.EndContainer(c1);\r
-                       Assert.AreEqual(2, t.Graphics.PageScale);\r
+                       Assert.That (2, Is.EqualTo (t.Graphics.PageScale));\r
 \r
                        t.Graphics.Restore(c2);\r
-                       Assert.AreEqual(2, t.Graphics.PageScale);\r
+                       Assert.That (2, Is.EqualTo (t.Graphics.PageScale));\r
                }\r
        }\r
        #endregion\r
index 77f753da1530901c529fcaf39b279bfa18fcf9a0..37983a6aa39035b35f1d5f1325b25ef4c431614b 100644 (file)
@@ -15,3 +15,6 @@ $(DRAWING_TEST_HELPER):
 
 run-test: Test.dll
        MONO_PATH="../../../../../class/lib/net_1_1::$(MONO_PATH)" /home/andrews/monobuild/mono/runtime/mono-wrapper --debug ../../../../../class/lib/net_1_1/nunit-console.exe Test.dll $(NUNIT_FLAGS)
+
+clean:
+       rm *dll
\ No newline at end of file