Beispiel #1
0
        public void TestMethod1()
        {
            A a = new A();

            a.a = 10;
            a.b = 12;

            MyInterface myInterface = MockRepository.Mock <MyInterface>();

            myInterface.Expect(x => x.retValue(Arg <A> .Matches(m => m.a == 10 && m.b == 12)))
            .Return(5);

            int ret = myInterface.retValue(a);

            Assert.True(ret == 5);
            myInterface.VerifyExpectations(true);
        }