public void ParseFormalsTest() { FunctionParser functionParser = new FunctionParser(Init("(param1, param2)")); FunctionDefinition functionDefinition = new FunctionDefinition(); functionParser.ParseFormals(functionDefinition); //Test formals Assert.AreEqual(2, functionDefinition.GetFormals().Count); Formal[] formalArray = (Formal[])functionDefinition.GetFormals().ToArray(); Assert.AreEqual("param1", formalArray[0].ToString()); Assert.AreEqual("param2", formalArray[1].ToString()); }