public void TestCallAmbiguous() { ISmartInvoker _si = CreateSmartInvoker(); object[] arg = new object[] { 1 }; object result = _si.Invoke("Sum", arg); }
public void TestCallV3() { ISmartInvoker _si = CreateSmartInvoker(); object[] arg = new object[] { 1, 2, 3, 4 }; object result = _si.Invoke("Sum", arg); Assert.AreEqual("v3", result); }
public void TestOptVarArgsOmitAll() { ISmartInvoker _si = CreateSmartInvoker(); object[] args = new object[] { 1 }; object result = _si.Invoke("OptAndVarArgs", args); Assert.AreEqual("4.1", result); }
public void TestVarArgsMoreArg() { ISmartInvoker _si = CreateSmartInvoker(); object[] args = new object[] { 1, 2, 3, 4, 5 }; object result = _si.Invoke("VarArgs", args); Assert.AreEqual("3.2", result); }
public void TestOptArgOmitArg() { ISmartInvoker _si = CreateSmartInvoker(); object[] args = new object[] { 1, 2 }; object result = _si.Invoke("OptionalArgs", args); Assert.AreEqual("2.2", result); }
public void TestNormalErr() { ISmartInvoker _si = CreateSmartInvoker(); object[] args = new object[] { 1, 2 }; object result = _si.Invoke("Normal", args); Assert.AreEqual("1", result); }
public void TestOptVarArgsProvideOptMoreVarArg() { ISmartInvoker _si = CreateSmartInvoker(); object[] args = new object[] { 1, 2, 3, 4, 5 }; object result = _si.Invoke("OptAndVarArgs", args); Assert.AreEqual("4.3", result); }