}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void Constructor_Int_Null ()
{
- new Matrix (rect, null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix (rect, null));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Constructor_Int_Empty ()
{
- new Matrix (rect, new Point[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix (rect, new Point[0]));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Constructor_Int_4Point ()
{
- new Matrix (rect, new Point[4]);
+ Assert.Throws<ArgumentException> (() => new Matrix (rect, new Point[4]));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void Constructor_Float_Null ()
{
- new Matrix (rectf, null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix (rectf, null));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Constructor_Float_Empty ()
{
- new Matrix (rectf, new PointF[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix (rectf, new PointF[0]));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Constructor_Float_2PointF ()
{
- new Matrix (rectf, new PointF[2]);
+ Assert.Throws<ArgumentException> (() => new Matrix (rectf, new PointF[2]));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Rotate_InvalidOrder ()
{
- new Matrix ().Rotate (180, (MatrixOrder) Int32.MinValue);
+ Assert.Throws<ArgumentException> (() => new Matrix ().Rotate (180, (MatrixOrder) Int32.MinValue));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void RotateAt_InvalidOrder ()
{
- new Matrix ().RotateAt (180, new PointF (10, 10), (MatrixOrder) Int32.MinValue);
+ Assert.Throws<ArgumentException> (() => new Matrix ().RotateAt (180, new PointF (10, 10), (MatrixOrder) Int32.MinValue));
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void Multiply_Null ()
{
- new Matrix (10, 20, 30, 40, 50, 60).Multiply (null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix (10, 20, 30, 40, 50, 60).Multiply (null));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void Multiply_Null_Order ()
{
- new Matrix (10, 20, 30, 40, 50, 60).Multiply (null, MatrixOrder.Append);
+ Assert.Throws<ArgumentNullException> (() => new Matrix (10, 20, 30, 40, 50, 60).Multiply (null, MatrixOrder.Append));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Multiply_InvalidOrder ()
{
Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60);
- matrix.Multiply (new Matrix (10, 20, 30, 40, 50, 60), (MatrixOrder)Int32.MinValue);
+ Assert.Throws<ArgumentException> (() => matrix.Multiply (new Matrix (10, 20, 30, 40, 50, 60), (MatrixOrder)Int32.MinValue));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Scale_InvalidOrder ()
{
- new Matrix ().Scale (2, 1, (MatrixOrder) Int32.MinValue);
+ Assert.Throws<ArgumentException> (() => new Matrix ().Scale (2, 1, (MatrixOrder) Int32.MinValue));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Shear_InvalidOrder ()
{
- new Matrix ().Shear (-1, 1, (MatrixOrder) Int32.MinValue);
+ Assert.Throws<ArgumentException> (() => new Matrix ().Shear (-1, 1, (MatrixOrder) Int32.MinValue));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void TransformPoints_Point_Null ()
{
- new Matrix ().TransformPoints ((Point[]) null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix ().TransformPoints ((Point[]) null));
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void TransformPoints_PointF_Null ()
{
- new Matrix ().TransformPoints ((PointF[]) null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix ().TransformPoints ((PointF[]) null));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void TransformPoints_Point_Empty ()
{
- new Matrix ().TransformPoints (new Point[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix ().TransformPoints (new Point[0]));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void TransformPoints_PointF_Empty ()
{
- new Matrix ().TransformPoints (new PointF[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix ().TransformPoints (new PointF[0]));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void TransformVectors_Point_Null ()
{
- new Matrix ().TransformVectors ((Point[]) null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix ().TransformVectors ((Point[]) null));
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void TransformVectors_PointF_Null ()
{
- new Matrix ().TransformVectors ((PointF[]) null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix ().TransformVectors ((PointF[]) null));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void TransformVectors_Point_Empty ()
{
- new Matrix ().TransformVectors (new Point[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix ().TransformVectors (new Point[0]));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void TransformVectors_PointF_Empty ()
{
- new Matrix ().TransformVectors (new PointF[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix ().TransformVectors (new PointF[0]));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Translate_InvalidOrder ()
{
- new Matrix ().Translate (-1, 1, (MatrixOrder) Int32.MinValue);
+ Assert.Throws<ArgumentException> (() => new Matrix ().Translate (-1, 1, (MatrixOrder) Int32.MinValue));
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
public void VectorTransformPoints_Null ()
{
- new Matrix ().VectorTransformPoints ((Point[]) null);
+ Assert.Throws<ArgumentNullException> (() => new Matrix ().VectorTransformPoints ((Point[]) null));
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void VectorTransformPoints_Empty ()
{
- new Matrix ().VectorTransformPoints (new Point[0]);
+ Assert.Throws<ArgumentException> (() => new Matrix ().VectorTransformPoints (new Point[0]));
}
}
}