Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.kdeveloper.javaBBCode.parser;
- import org.junit.Test;
- import static org.junit.Assert.*;
- public class BBCodeParserTest {
- /**
- * Test of parse method, of class BBCodeParser.
- */
- @Test
- public void testParse_String() throws Exception {
- // ERROR:
- doParse("a[b]aa[/b]aa[b]aa[/b]aaa");
- // OK:
- doParse("aa[b]aa[/b]aa[b]aa[/b]aaa");
- assertTrue(true);
- }
- public String doParse(String text) throws Exception {
- System.out.println("in:");
- System.out.println(text);
- System.out.println("out:");
- BBCodeParser parser = new BBCodeParser(text);
- String value = parser.parse();
- System.out.println(value);
- System.out.println("-----------------------------------");
- return value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement