|
|
@@ -98,28 +98,28 @@ public class TriangleCheckerTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testValidIsoscelesTriangle() { |
|
|
|
public void testValidNoTriangle5() { |
|
|
|
|
|
|
|
// Arrange |
|
|
|
float a = 3; |
|
|
|
float b = 3; |
|
|
|
float c = 4; |
|
|
|
float a = 4; |
|
|
|
float b = 4; |
|
|
|
float c = 13; |
|
|
|
|
|
|
|
// Act |
|
|
|
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c); |
|
|
|
|
|
|
|
// Assert |
|
|
|
assertEquals(TriangleChecker.TriangleType.ISOSCELES, type); |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, type); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testValidNoTriangle5() { |
|
|
|
public void testValidNoTriangle6() { |
|
|
|
|
|
|
|
// Arrange |
|
|
|
float a = 4; |
|
|
|
float b = 4; |
|
|
|
float c = 13; |
|
|
|
float a = 3; |
|
|
|
float b = 5; |
|
|
|
float c = 8; |
|
|
|
|
|
|
|
// Act |
|
|
|
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c); |
|
|
@@ -129,5 +129,21 @@ public class TriangleCheckerTest { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testValidIsoscelesTriangle() { |
|
|
|
|
|
|
|
// Arrange |
|
|
|
float a = 3; |
|
|
|
float b = 3; |
|
|
|
float c = 4; |
|
|
|
|
|
|
|
// Act |
|
|
|
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c); |
|
|
|
|
|
|
|
// Assert |
|
|
|
assertEquals(TriangleChecker.TriangleType.ISOSCELES, type); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |