public void CreateTest() { var factory = new CalculateHandlerFactory(); var handler = factory.Create(); Assert.AreEqual(1 + 2 + 3, handler(1, 2, 3)); }
public void TestDelegateFactory() { IFactory <CalculateHandler> factory = new CalculateHandlerFactory(); CalculateHandler handler = factory.Create(); Assert.AreEqual <int>(1 + 2 + 3, handler(1, 2, 3)); }