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
[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
// 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
[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
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
\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
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
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
\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
\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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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
// 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
\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
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
// 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
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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
//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
//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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
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
t.Show();\r
}\r
\r
- Assert.IsTrue(t.PDCompare());\r
+ Assert.That(t.PDCompare(), Is.True);\r
}\r
\r
[Test]\r
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
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
// 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
// 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
// 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
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
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
// 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
// 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
// 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
// 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
// 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
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
// 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
// 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
// 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
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
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
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
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
\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
\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
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
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