public void WhatShapeIsThisTest() { var svc = new MyRedPill(); //equilateral int a, b, c; a = b = c = 10; var output = svc.WhatShapeIsThis(a, b, c); Assert.AreEqual(TriangleType.Equilateral, output, "Equilateral check failed"); //isosceles a = 5; b = 5; c = 8; output = svc.WhatShapeIsThis(a, b, c); Assert.AreEqual(TriangleType.Isosceles, output, "Isosceles check failed"); //scalene a = 5; b = 6; c = 10; output = svc.WhatShapeIsThis(a, b, c); Assert.AreEqual(TriangleType.Scalene, output, "Scalene check failed"); //error a = 5; b = 5; c = 11; output = svc.WhatShapeIsThis(a, b, c); Assert.AreEqual(TriangleType.Error, output, "Error check failed"); }
public void WhatShapeIsThisTest1() { MyRedPill redPill = new MyRedPill(); TriangleType type = redPill.WhatShapeIsThis(-1, 0, 0); Assert.AreEqual(type, TriangleType.Error); type = redPill.WhatShapeIsThis(0, -1, 0); Assert.AreEqual(type, TriangleType.Error); type = redPill.WhatShapeIsThis(0, 0, -1); Assert.AreEqual(type, TriangleType.Error); }
public void WhatShapeIsThisTest7() { MyRedPill redPill = new MyRedPill(); TriangleType type = redPill.WhatShapeIsThis(12, 6, 14); Assert.AreEqual(type, TriangleType.Scalene); }
public void WhatShapeIsThisTest5() { MyRedPill redPill = new MyRedPill(); TriangleType type = redPill.WhatShapeIsThis(2, 1, 3); Assert.AreEqual(type, TriangleType.Error); }
public void WhatShapeIsThisTest3() { MyRedPill redPill = new MyRedPill(); TriangleType type = redPill.WhatShapeIsThis(2, 2, 2); Assert.AreEqual(type, TriangleType.Equilateral); }
public void WhatShapeIsThisTest2() { MyRedPill redPill = new MyRedPill(); TriangleType type = redPill.WhatShapeIsThis(2, 2, 1); Assert.AreEqual(type, TriangleType.Isosceles); }