public void ThreeParamFunctionIsComposableWithParam2And3() { Func <string, int, double, string> testFunction = (p1, p2, p3) => string.Format(p1, p2, p3); var expected = testFunction("{0}{1}", 3, 4.0); var composedFunction = Extended.Compose(testFunction, 3, 4.0); var actual = composedFunction("{0}{1}"); Assert.AreEqual(expected, actual); }
public void TwoParamFunctionIsComposableWithParam2() { Func <string, int, string> testFunction = (p1, p2) => string.Format(p1, p2); var expected = testFunction("{0}", 3); var composedFunction = Extended.Compose(testFunction, 3); var actual = composedFunction("{0}"); Assert.AreEqual(expected, actual); }