public void RectangleWithXY() { var rectangle = new Rectangle( 20, 20, 30, 20, 30, 30, 20, 30); Assert.IsTrue(rectangle.GetType() == typeof(Rectangle)); Assert.IsTrue(rectangle.Height == 10 && rectangle.Width == 10); Assert.IsTrue(rectangle.Lines.Count == 4); Assert.AreEqual(15, rectangle.CenterPoint.X); Assert.AreEqual(15, rectangle.CenterPoint.Y); Assert.AreEqual(rectangle.Fill, Color.Empty); Assert.AreEqual(rectangle.Stroke, Color.Black); Assert.AreEqual(100, rectangle.ComputeArea()); Assert.AreEqual(10, rectangle.CalculateHeight()); Assert.AreEqual(10, rectangle.CalculateWidth()); Assert.IsFalse(rectangle.CompositeShape); rectangle.Fill = Color.Aqua; Assert.AreEqual(Color.Aqua, rectangle.Fill); foreach (var line in rectangle.Lines) { Assert.IsTrue(line.ComputeLength() == 10); } }