public void TestScaleTrapezoid37Percent() { Trapezoid trapezoid = new Trapezoid(20, 15, 10); trapezoid.Scale(37); Assert.AreEqual((decimal)7.4, trapezoid.LongBase); Assert.AreEqual((decimal)5.55, trapezoid.ShortBase); Assert.AreEqual((decimal)3.7, trapezoid.Height); Assert.AreEqual((decimal)75.96, trapezoid.AcuteAngle); Assert.AreEqual((decimal)104.04, trapezoid.ObtuseAngle); }
public void TestScaleTrapezoid200Percent() { Trapezoid trapezoid = new Trapezoid(20, 15, 10); trapezoid.Scale(200); Assert.AreEqual(40, trapezoid.LongBase); Assert.AreEqual(30, trapezoid.ShortBase); Assert.AreEqual(20, trapezoid.Height); Assert.AreEqual((decimal)75.96, trapezoid.AcuteAngle); Assert.AreEqual((decimal)104.04, trapezoid.ObtuseAngle); }
public void TestTrapezoidConstructorCalculatesAngles2() { Trapezoid trapezoid = new Trapezoid(20, 15, 2); Assert.AreEqual((decimal) 38.66, trapezoid.AcuteAngle); Assert.AreEqual((decimal) 141.34, trapezoid.ObtuseAngle); }
public void TestTrapezoidConstructorCalculatesAngles1() { Trapezoid trapezoid = new Trapezoid(8, 4, 2); Assert.AreEqual(45, trapezoid.AcuteAngle); Assert.AreEqual(135, trapezoid.ObtuseAngle); }
public void TestTrapezoidArea2() { Trapezoid trapezoid = new Trapezoid(8, 4, 2); Assert.AreEqual(12, trapezoid.Area()); }
public void TestTrapezoidArea() { Trapezoid trapezoid = new Trapezoid(20, 15, 10); Assert.AreEqual(175, trapezoid.Area()); }
public void TrapezoidScaleToNegativePercent() { Trapezoid trapezoid = new Trapezoid(20, 15, 10); trapezoid.Scale(-10); }
public void TestDefaultTrapezoidColors() { Trapezoid shape = new Trapezoid(20, 15, 2); Assert.AreEqual(Colors.Bisque, shape.FillColor); Assert.AreEqual(Colors.Tomato, shape.BorderColor); }
public void TrapezoidScaleTo0Percent() { Trapezoid trapezoid = new Trapezoid(20, 15, 10); trapezoid.Scale(0); }
public void TestTrapezoidSidesCount() { Trapezoid trapezoid = new Trapezoid(20, 15, 2); Assert.AreEqual(4, trapezoid.SidesCount); }
public void TestTrapezoidPerimeter2() { Trapezoid trapezoid = new Trapezoid(8, 2, 4); Assert.AreEqual(20, trapezoid.Perimeter()); }
public void TestTrapezoidPerimeter() { Trapezoid trapezoid = new Trapezoid(20, 15, 10); Assert.AreEqual((decimal)55.62, trapezoid.Perimeter()); }
public void TestTrapezoidConstructorSetsProperties2() { Trapezoid trapezoid = new Trapezoid(20, 15, 2); Assert.AreEqual(20, trapezoid.LongBase); Assert.AreEqual(15, trapezoid.ShortBase); Assert.AreEqual(2, trapezoid.Height); }
public void TestTrapezoidConstructorSetsProperties() { Trapezoid trapezoid = new Trapezoid(8, 2, 4); Assert.AreEqual(8, trapezoid.LongBase); Assert.AreEqual(2, trapezoid.ShortBase); Assert.AreEqual(4, trapezoid.Height); }