public void Equilateral_DiffrentValues() { Triangle myTriangle = new Triangle(123.5, 134.1, 1223.1); Assert.IsFalse(myTriangle.isEquilateral()); }
public void Equilateral_SameValues() { Triangle myTriangle = new Triangle(100, 100, 100); Assert.IsTrue(myTriangle.isEquilateral()); }
public void TriangleConstructorPointsArray() { Point cordinateOne = new Point(0, 0); Point cordinateTwo = new Point(0, 5); Point cordinateThree = new Point(0, 5); Point[] cordinates = new Point[3] { cordinateOne, cordinateTwo, cordinateThree }; Triangle cordinateTriangle = new Triangle(cordinates); }
public void TriangleConstructorThreeValues() { // Testar att skapa en triangel genom standardkonstruktor och korrekt antal värden Triangle myTriangle = new Triangle(41.5, 15.5, 21.5); // Testar att skapa en triangel genom arraykonstruktor och korrekt antal värden // Osäker på denna, points istället? double[] triangleValues = { 41.5, 15.5, 21.5 }; Triangle myTriangle2 = new Triangle(triangleValues); }
public void TriangleAreaTest(double a, double b, double c, double result) { Triangle triangle = new Triangle(a, b, c); Assert.AreEqual(triangle.CalculateArea(), result, 0.05); }
public void Scalene_ValueOfZero() { Triangle myTriangle = new Triangle(0, 0, 0); Assert.IsFalse(myTriangle.isScalene()); }
public void AllSidesAreNegaive() { Assert.IsFalse(Triangle.IsTriangle(-3, -4, -5)); }
public void Scalene_AccurateValues() { Triangle myTriangle = new Triangle(10.0, 20.0, 30.0); Assert.IsTrue(myTriangle.isScalene()); }
public void AllSidesAreZero() { Assert.IsFalse(Triangle.IsTriangle(0, 0, 0)); }
public void OneSideIsNegative() { Assert.IsFalse(Triangle.IsTriangle(-3, 4, 5)); }
public void OneSideIsZero() { Assert.IsFalse(Triangle.IsTriangle(0, 2, 4)); }
public void HugeTriangle() { Assert.IsTrue(Triangle.IsTriangle(57961, 41335, 37546)); }
public void TwoSidesAreEqual() { Assert.IsTrue(Triangle.IsTriangle(8, 8, 10)); }
public void Isosceles_AccurateValues() { Triangle myTriangle = new Triangle(6, 5, 6); Assert.IsTrue(myTriangle.isIsosceles()); }
public void ImpossibleTriangle() { Assert.IsFalse(Triangle.IsTriangle(10, 1, 124)); }
public void Isosceles_Same() { Triangle myTriangle = new Triangle(100, 100, 100); Assert.IsFalse(myTriangle.isIsosceles()); }
public void IsRightTriangle() { Assert.IsTrue(Triangle.IsTriangle(2, 6, 7)); }
public void EgyptTriangle() { Assert.IsTrue(Triangle.IsTriangle(3, 4, 5)); }
public void Triangle_Right_Check() { var triangle = new Triangle(3, 4, 5); Assert.AreEqual(true, triangle.IsRight); }
public void RectangularTriangleTest(double a, double b, double c, bool result) { Triangle triangle = new Triangle(a, b, c); Assert.AreEqual(triangle.CheckRectangular(), result); }
public void IsTriangleIsosceles_Isosceles_True() { Triangle testIsosceles = new Triangle(); Assert.AreEqual(true, testIsosceles.IsTriangleIsosceles(3, 3, 2)); }
public void TriangleConstructorPoints() { Point cordinateOne = new Point(-5, 0); Point cordinateTwo = new Point(0, 5); Point cordinateThree = new Point(5, 0); Triangle cordinateTriangle = new Triangle(cordinateOne, cordinateTwo, cordinateThree); Assert.IsFalse(cordinateTriangle.isScalene()); }
public void IsTriangleScalene_Scalene_True() { Triangle testScalene = new Triangle(); Assert.AreEqual(true, testScalene.IsTriangleScalene(1, 2, 3)); }
public void TriangleConstructorPointsArrayTwoValues() { Point cordinateOne = new Point(0, 0); Point cordinateTwo = new Point(0, 5); Point[] cordinates = new Point[2] { cordinateOne, cordinateTwo }; Triangle cordinateTriangle = new Triangle(cordinates); Assert.IsFalse(cordinates.Length != 3); }
public void IsNotATriangle_NotATriangle_True() { Triangle testNotATriangle = new Triangle(); Assert.AreEqual(true, testNotATriangle.IsNotTriangle(3, 3, 9)); }
public void TriangleConstructorTwoValues() { // Testar att skapa en triangel genom arryay och fel antal värden double[] triangleValuesWrong = { 41.5, 15.5 }; Triangle myTriangle = new Triangle(triangleValuesWrong); //Assert.IsFalse(triangleValuesWrong[0] == 41.5 && triangleValuesWrong[1] == 15.5); }
public void WhatTypeTriangle_TypeOfTriangle_TypeOfTriangleString() { Triangle testTriangle = new Triangle(); Assert.AreEqual("not a triangle", testTriangle.WhatTypeTriangle(3, 3, 9)); }
public void Equilateral_NegativeValues() { Triangle myTriangle = new Triangle(-123.5, -134.1, -1223.1); Assert.IsFalse(myTriangle.isEquilateral()); }
public void IsTriangleEquilateral_Equilateral_True() { Triangle testEquilateral = new Triangle(); Assert.AreEqual(true, testEquilateral.IsTriangleEquilateral(3, 3, 3)); }
public void Equilateral_ValueOfZero() { Triangle myTriangle = new Triangle(0, 0, 0); }
public void IsTriangleRight(double a, double b, double c, bool isValid) { IShape triangle = new Triangle(a, b, c); Assert.AreEqual(isValid, ((Triangle)triangle).IsRight()); }
public void Isosceles_DiffrentValues() { Triangle myTriangle = new Triangle(136, 258, 124); Assert.IsFalse(myTriangle.isIsosceles()); }
public void When_All_Sides_Of_The_Triangle_Are_The_Same_Length_Then_The_Triangle_Should_Be_Equilateral() { var triangle = new Triangle(1,1,1); _triangleClassifier.ClassifyTriangle(triangle); }
public void Isosceles_ValueOfZero() { Triangle myTriangle = new Triangle(0, 0, 0); Assert.IsFalse(myTriangle.isIsosceles()); }
public TriangleType ClassifyTriangle(Triangle triangle) { return TriangleType.Equilateral; }
public void Scalene_NegativeValues() { Triangle myTriangle = new Triangle(-16, -14, -12); }
public void AllSidesAreEqual() { Assert.IsTrue(Triangle.IsTriangle(5, 5, 5)); }