mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-31 00:37:15 +08:00
style: include NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION
(#5149)
* style: use `assertFalse` and `assertTrue` * style: include `NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION`
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@ -8,14 +9,14 @@ public class PythagoreanTripleTest {
|
||||
|
||||
@Test
|
||||
public void Testpythagoreantriple() {
|
||||
assertEquals(true, PythagoreanTriple.isPythagTriple(3, 4, 5));
|
||||
assertEquals(true, PythagoreanTriple.isPythagTriple(6, 8, 10));
|
||||
assertEquals(true, PythagoreanTriple.isPythagTriple(9, 12, 15));
|
||||
assertEquals(true, PythagoreanTriple.isPythagTriple(12, 16, 20));
|
||||
assertEquals(true, PythagoreanTriple.isPythagTriple(15, 20, 25));
|
||||
assertEquals(true, PythagoreanTriple.isPythagTriple(18, 24, 30));
|
||||
assertEquals(false, PythagoreanTriple.isPythagTriple(5, 20, 30));
|
||||
assertEquals(false, PythagoreanTriple.isPythagTriple(6, 8, 100));
|
||||
assertEquals(false, PythagoreanTriple.isPythagTriple(-2, -2, 2));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(3, 4, 5));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(6, 8, 10));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(9, 12, 15));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(12, 16, 20));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(15, 20, 25));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(18, 24, 30));
|
||||
assertFalse(PythagoreanTriple.isPythagTriple(5, 20, 30));
|
||||
assertFalse(PythagoreanTriple.isPythagTriple(6, 8, 100));
|
||||
assertFalse(PythagoreanTriple.isPythagTriple(-2, -2, 2));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user