mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-31 00:37:15 +08:00

* style: use `assertFalse` and `assertTrue` * style: include `NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION`
25 lines
507 B
Java
25 lines
507 B
Java
package com.thealgorithms.strings;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
public class ValidParenthesesTest {
|
|
|
|
@Test
|
|
void testOne() {
|
|
assertTrue(ValidParentheses.isValid("()"));
|
|
}
|
|
|
|
@Test
|
|
void testTwo() {
|
|
assertTrue(ValidParentheses.isValid("()[]{}"));
|
|
}
|
|
|
|
@Test
|
|
void testThree() {
|
|
assertFalse(ValidParentheses.isValid("(]"));
|
|
}
|
|
}
|