mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 09:45:04 +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.strings;
|
||||
|
||||
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,16 +9,16 @@ public class ValidParenthesesTest {
|
||||
|
||||
@Test
|
||||
void testOne() {
|
||||
assertEquals(true, ValidParentheses.isValid("()"));
|
||||
assertTrue(ValidParentheses.isValid("()"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testTwo() {
|
||||
assertEquals(true, ValidParentheses.isValid("()[]{}"));
|
||||
assertTrue(ValidParentheses.isValid("()[]{}"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testThree() {
|
||||
assertEquals(false, ValidParentheses.isValid("(]"));
|
||||
assertFalse(ValidParentheses.isValid("(]"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user