public void IsRectangle_SetSides_ReturnFalse(double sideA, double sideB, double sideC) { var triangle = new Triangle(sideA, sideB, sideC); var result = triangle.IsRectangular(); Assert.IsFalse(result); }
public void Triangle545IsRectangular_ReturnFalse() { Triangle triangle = new Triangle(5, 4, 5); bool result = triangle.IsRectangular(); Assert.IsFalse(result); }
public void Triangle345IsRectangular_ReturnTrue() { Triangle triangle = new Triangle(3, 4, 5); bool result = triangle.IsRectangular(); Assert.IsTrue(result); }
public void RectangularWorks() { Triangle triangle = new Triangle(3, 4, 5); Assert.IsTrue(triangle.IsRectangular()); triangle = new Triangle(5, 4, 3); Assert.IsTrue(triangle.IsRectangular()); Assert.Pass(); }
public void IsRectangularTest() { #region ѕ–яћќ”√ќЋ№Ќџ… bool correct = true; bool result = circle.IsRectangular(4, 3, 5); if (result != correct) { throw new Exception($"ќтвет: {result}. ѕравильный ответ: {correct}"); } #endregion #region ≈ѕ–яћќ”√ќЋ№Ќџ… correct = false; result = circle.IsRectangular(1, 1, 1); if (result != correct) { throw new Exception($"ќтвет: {result}. ѕравильный ответ: {correct}"); } #endregion }
public void CreateRectangularTriangle() { var lines = new List <Line> { new Line(new Dot(0d, 0d), new Dot(0d, 5d)), new Line(new Dot(0d, 5d), new Dot(5d, 5d)), new Line(new Dot(5d, 5d), new Dot(0d, 0d)) }; var triangle = new Triangle(lines); Assert.True(triangle.IsRectangular()); }
public void IsTriangleRectangular() { Triangle triangle = new Triangle(3, 4, 5); Assert.True(triangle.IsRectangular()); }