Ejemplo n.º 1
0
        public void TestGetHeight()
        {
            ShapeFactory sf = new RectangleFactory();

            Shapes.Rectangle rectangle = (Shapes.Rectangle)sf.Create2dShape();
            rectangle.Point1.X = 2;
            rectangle.Point1.Y = 2;
            rectangle.Point2.X = 4;
            rectangle.Point2.Y = 4;
            Assert.AreEqual(2, rectangle.GetHeight());
        }
Ejemplo n.º 2
0
 /**
  * @return the length of a side (all sides are equal)
  */
 public double GetSide()
 {
     return(Rectangle.GetHeight());
 }