public void Add1() { var add1 = MultipleArguments.Add1(); var actual = add1(2); var expected = 3; Assert.AreEqual(expected, actual); }
public void AddThreeParam1() { var add1 = MultipleArguments.AddThreeParam1(); var actual = add1(2)(3); var expected = 6; Assert.AreEqual(expected, actual); }
public void PartialApplication_WithExternalFunction() { var hello = MultipleArguments.FormatMessage().Apply("Hello"); var goodbye = MultipleArguments.FormatMessage().Apply("Goodbye"); var actual = hello("Scott"); var expected = "Hello: Scott"; Assert.AreEqual(expected, actual); actual = goodbye("Scott"); expected = "Goodbye: Scott"; Assert.AreEqual(expected, actual); }