Beispiel #1
0
        public void TestMockMethodForAdd()
        {
            MockMethod add = new MockMethod(typeof(ICalculator), "Add");

            add.With(5, 3).Return(8);
            add.With(2, 7).Return(9);
            Assert.AreEqual(add.Call(5, 3), 8);
            Assert.AreEqual(add.Call(2, 7), 9);
            Assert.AreEqual(add.Call(4, 8), 0);
        }