123456789101112131415161718192021222324 |
- import org.junit.Test;
- import static org.junit.Assert.*;
-
- public class TriangleCheckerTest {
-
- @Test
- public void testValidTriangle() {
-
- // Arrange
- float a = 2;
- float b = 3;
- float c = 4;
-
- // Act
- TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c);
-
- // Assert
- assertEquals(TriangleChecker.TriangleType.NORMAL, type);
- assertEquals(TriangleChecker.TriangleType.EQUILATERAL, type);
- assertEquals(TriangleChecker.TriangleType.ISOSCELES, type);
-
- }
-
- }
|