You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TriangleCheckerTest.java 561B

123456789101112131415161718192021222324
  1. import org.junit.Test;
  2. import static org.junit.Assert.*;
  3. public class TriangleCheckerTest {
  4. @Test
  5. public void testValidTriangle() {
  6. // Arrange
  7. float a = 2;
  8. float b = 3;
  9. float c = 4;
  10. // Act
  11. TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c);
  12. // Assert
  13. assertEquals(TriangleChecker.TriangleType.NORMAL, type);
  14. assertEquals(TriangleChecker.TriangleType.EQUILATERAL, type);
  15. assertEquals(TriangleChecker.TriangleType.ISOSCELES, type);
  16. }
  17. }