예제 #1
0
 @Test
 public void testBrackets() {
   assertEquals(
       false,
       BalancedBrackets.isBalanced("hallo (ich ( bin ( eine ganze)tiefe)aber(wieder)schle)sdad)"));
   assertEquals(false, BalancedBrackets.isBalanced("badass)"));
   assertEquals(false, BalancedBrackets.isBalanced("badass2("));
 }
예제 #2
0
 @Test
 public void testEmpty() {
   assertEquals(true, BalancedBrackets.isBalanced(""));
 }
예제 #3
0
 @Test
 public void testNull() {
   assertEquals(true, BalancedBrackets.isBalanced(null));
 }
예제 #4
0
 @Test
 public void testValid() {
   assertEquals(true, BalancedBrackets.isBalanced("()()adsd"));
   assertEquals(true, BalancedBrackets.isBalanced("345((345(asdsasd)ads)asd(sd64)asdasd)345"));
   assertEquals(true, BalancedBrackets.isBalanced("()"));
 }