public class AnonymousFunctionCallTest {
// -------------------------- OTHER METHODS --------------------------
@Test
public void args2values2() {
Assert.assertEquals("(function(a,b){alert(a+b)})(1,2)", new AnonymousFunctionCall("a", "b").addParameterValue(1, 2)
.addToBody("alert(a+b)").toScript());
Assert.assertEquals("(function(a,b){alert(a+b)})(1,2)", new AnonymousFunctionCall().addParameterName("a", "b")
.addParameterValue(1, 2).addToBody("alert(a+b)").toScript());
Assert.assertEquals("(function(a,b){alert(a+b)})(1,2)", new AnonymousFunctionCall().addParameterName("a")
.addParameterName("b").addParameterValue(1, 2).addToBody("alert(a+b)").toScript());
}