package co.socibo;
/*
 * @author Umashankar
 * <a href="http://j2eedev.org">http://j2eedev.org</a>
 * Beginer JUnit Tutorial
 * */

import co.socibo.MainApp;
import java.util.ArrayList;
import java.util.Arrays;
import junit.framework.TestCase;
import org.junit.Assert;

public class MainAppTest extends TestCase {


    public MainAppTest(String testName) {
	super(testName);
    }

    protected void setUp() throws Exception {
	super.setUp();
    }

    protected void tearDown() throws Exception {
	super.tearDown();
    }

    public void testParseSimple() {
	ArrayList<Object> ret = MainApp.parse("foo(1,2,3)");
	assertEquals(ret.get(0), "foo");
	assertTrue(Arrays.equals((String[])ret.get(1), new String[]{"1","2","3"}));
    }

    // public void testParseComplex() {
    // 	ArrayList<Object> ret = MainApp.parse("foo(1,2,3);boo(2,3)");
    // 	assertEquals(ret.get(0), "foo");
    // 	assertTrue(Arrays.equals((String[])ret.get(1), new String[]{"1","2","3"}));
    // }
    
}

@@ -560,421 +560,11 @@
 ) %7B%0A
-%09ArrayList%3CObject%3E ret = MainApp.parse(%22foo(1,2,3)%22);%0A%09assertEquals(ret.get(0), %22foo%22);%0A%09assertTrue(Arrays.equals((String%5B%5D)ret.get(1), new String%5B%5D%7B%221%22,%222%22,%223%22%7D));%0A    %7D%0A%0A    // public void testParseComplex() %7B%0A    // %09ArrayList%3CObject%3E ret = MainApp.parse(%22foo(1,2,3);boo(2,3)%22);%0A    // %09assertEquals(ret.get(0), %22foo%22);%0A    // %09assertTrue(Arrays.equals((String%5B%5D)ret.get(1), new String%5B%5D%7B%221%22,%222%22,%223%22%7D));%0A    //
+   
  %7D%0A 

test fixed