|
1 | 1 | package com.thealgorithms.maths;
|
2 | 2 |
|
3 |
| -import static org.junit.jupiter.api.Assertions.assertEquals; |
| 3 | +import static org.junit.jupiter.api.Assertions.assertFalse; |
| 4 | +import static org.junit.jupiter.api.Assertions.assertTrue; |
4 | 5 |
|
5 | 6 | import org.junit.jupiter.api.Test;
|
6 | 7 |
|
7 | 8 | public class PythagoreanTripleTest {
|
8 | 9 |
|
9 | 10 | @Test
|
10 | 11 | public void Testpythagoreantriple() {
|
11 |
| - assertEquals(true, PythagoreanTriple.isPythagTriple(3, 4, 5)); |
12 |
| - assertEquals(true, PythagoreanTriple.isPythagTriple(6, 8, 10)); |
13 |
| - assertEquals(true, PythagoreanTriple.isPythagTriple(9, 12, 15)); |
14 |
| - assertEquals(true, PythagoreanTriple.isPythagTriple(12, 16, 20)); |
15 |
| - assertEquals(true, PythagoreanTriple.isPythagTriple(15, 20, 25)); |
16 |
| - assertEquals(true, PythagoreanTriple.isPythagTriple(18, 24, 30)); |
17 |
| - assertEquals(false, PythagoreanTriple.isPythagTriple(5, 20, 30)); |
18 |
| - assertEquals(false, PythagoreanTriple.isPythagTriple(6, 8, 100)); |
19 |
| - assertEquals(false, PythagoreanTriple.isPythagTriple(-2, -2, 2)); |
| 12 | + assertTrue(PythagoreanTriple.isPythagTriple(3, 4, 5)); |
| 13 | + assertTrue(PythagoreanTriple.isPythagTriple(6, 8, 10)); |
| 14 | + assertTrue(PythagoreanTriple.isPythagTriple(9, 12, 15)); |
| 15 | + assertTrue(PythagoreanTriple.isPythagTriple(12, 16, 20)); |
| 16 | + assertTrue(PythagoreanTriple.isPythagTriple(15, 20, 25)); |
| 17 | + assertTrue(PythagoreanTriple.isPythagTriple(18, 24, 30)); |
| 18 | + assertFalse(PythagoreanTriple.isPythagTriple(5, 20, 30)); |
| 19 | + assertFalse(PythagoreanTriple.isPythagTriple(6, 8, 100)); |
| 20 | + assertFalse(PythagoreanTriple.isPythagTriple(-2, -2, 2)); |
20 | 21 | }
|
21 | 22 | }
|
0 commit comments