コード例 #1
0
ファイル: OneTests.cs プロジェクト: philipwolfe/NMock3
        private void PassesTestIfMethodExpectedOnceAndCalledOrdered(IParentInterface instance)
        {
            using (Factory.Ordered())
                Expect.On(instance).One.Method(_ => _.MethodVoid());

            instance.MethodVoid();
        }
コード例 #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);
        }
コード例 #3
0
ファイル: SubContainerTests.cs プロジェクト: pi-leo-liu/BoDi
 public DelegatingInterfce1(IParentInterface parentInterface)
 {
 }
コード例 #4
0
 public ParrentController(IParentInterface parentservice)
 {
     _service = parentservice;
 }
コード例 #5
0
ファイル: SubContainerTests.cs プロジェクト: gasparnagy/BoDi
 public DelegatingInterfce1(IParentInterface parentInterface)
 {
 }
コード例 #6
0
 public DelegateController(IParentInterface obj)
 {
     obj.Delegate += SendInput;
 }
コード例 #7
0
 public Implementor(IParentInterface parent)
 {
     _parent = parent;
 }
コード例 #8
0
ファイル: TestPresenter.cs プロジェクト: philipwolfe/NMock3
 public TestPresenter(IParentInterface mock)
 {
     _mock = mock;
 }