*/
public class TestCommandParser {
@Test
public void testParseLine() throws RecognitionException {
Command c1 = CommandBuilder.parseLine("config");
assertEquals("config", c1.getCommand());
assertEquals(0, c1.getArgs().length);
Command c2 = CommandBuilder.parseLine("config this is a test");
assertEquals("config", c2.getCommand());
assertEquals("this", c2.getArgs()[0]);
assertEquals("is", c2.getArgs()[1]);
assertEquals("a", c2.getArgs()[2]);
assertEquals("test", c2.getArgs()[3]);
Command c3 = CommandBuilder.parseLine("config bla bla-3409h");
assertEquals("config", c3.getCommand());
assertEquals("bla", c3.getArgs()[0]);
assertEquals("bla-3409h", c3.getArgs()[1]);
// Make sure we parse things that start with numbers or acceptable symbols
// as well
Command c4 = CommandBuilder.parseLine("1 -2 :3 .4");
assertEquals("1", c4.getCommand());
assertEquals("-2", c4.getArgs()[0]);
assertEquals(":3", c4.getArgs()[1]);
assertEquals(".4", c4.getArgs()[2]);
}