public void TestScaleSquare200Percent() { Square square = new Square(10); square.Scale(200); Assert.AreEqual(20, square.Height); Assert.AreEqual(20, square.Width); }
public void TestScaleSquare37Percent() { Square square = new Square(15); square.Scale(37); Assert.AreEqual((decimal) 5.55, square.Height); Assert.AreEqual((decimal) 5.55, square.Width); }
private void PopulateTestShapes() { var square = new Square(30); square.FillColor = Colors.AliceBlue; square.BorderColor = Colors.BurlyWood; var square2 = new Square(200); square2.BorderColor = Colors.Navy; square2.FillColor = Colors.Fuchsia; square.DrawOnto(ShapeCanvas, 1, 50); square.DrawOnto(ShapeCanvas, 50, 5); }
public void TestSquareConstructor() { Square square = new Square(40); Assert.AreEqual(40, square.Height); Assert.AreEqual(40, square.Width); }
public void TestSquareArea() { Square square = new Square(15); Assert.AreEqual(225, square.Area()); }
public void TestScaleSquareToNegativePercent() { Square square = new Square(15); square.Scale(-10); }
public void TestScaleSquareTo0Percent() { Square square = new Square(15); square.Scale(0); }
public void TestDefaultColors() { Square shape = new Square(15); Assert.AreEqual(Colors.Bisque, shape.FillColor); Assert.AreEqual(Colors.Tomato, shape.BorderColor); }
public void TestBiggerSquarePerimeter() { Square square = new Square(10); Assert.AreEqual(40, square.Perimeter()); }
public void TestBiggerSquareArea() { Square square = new Square(10); Assert.AreEqual(100, square.Area()); }
public void TestSquareSides() { Square square = new Square(15); Assert.AreEqual(4, square.SidesCount); }
public void TestSquarePerimeter() { Square square = new Square(15); Assert.AreEqual(60, square.Perimeter()); }
public void TestSquareArea() { Square testSquare = new Square(); Assert.IsTrue(testSquare.calculateOutput(new[] { 2, 4 }) == 8.00); }