Ejemplo n.º 1
0
        private void PassesTestIfMethodExpectedOnceAndCalledOrdered(IParentInterface instance)
        {
            using (Factory.Ordered())
                Expect.On(instance).One.Method(_ => _.MethodVoid());

            instance.MethodVoid();
        }
Ejemplo n.º 2
0
        private void WithArgumentsTest(IParentInterface instance)
        {
            using (Factory.Ordered())
            {
                Expect.On(instance).One.Method(_ => _.MethodVoid(0, 0, 0)).With(1, 2, 3);
                Expect.On(instance).One.Method(_ => _.MethodVoid(0, 0, 0)).With(Is.EqualTo(4), Is.AtLeast(5), Is.AtMost(6));
                Expect.On(instance).One.Method(_ => _.MethodVoid(0, 0, 0)).With(7, Is.AtLeast(8), 9);
                Expect.On(instance).One.Method(_ => _.MethodVoid(0, 0, 0)).With(
                    new PredicateMatcher <int>(parameter => parameter == 10),
                    Is.Match <int>(parameter => parameter == 11),
                    Is.Anything);
            }

            instance.MethodVoid(1, 2, 3);
            instance.MethodVoid(4, 5, 6);
            instance.MethodVoid(7, 8, 9);
            instance.MethodVoid(10, 11, 12);
        }
Ejemplo n.º 3
0
 internal void CallVoidMethod(Version version)
 {
     _mock.MethodVoid(version);
 }