Beispiel #1
0
        public void TestDemo3()
        {
            IDemo1Service d = new Demo1Service();

            var callb = A.Fake<Action<string>>();

            d.Demo3(callb);
            A.CallTo(() => callb.Invoke(A<string>.Ignored)).MustHaveHappened(Repeated.Exactly.Times(10));//0
        }
Beispiel #2
0
        public void TestDemo1()
        {
            IDemo1Service d = new Demo1Service();

            var callb = A.Fake<Action<string>>();

            d.Demo1(callb);
            //Thread.Sleep(3000); // method should take 2s to play out async
            A.CallTo(() => callb.Invoke(A<string>.Ignored)).MustHaveHappened(Repeated.Exactly.Times(10)); //0
        }
Beispiel #3
0
        public void TestDemo4()
        {
            IDemo1Service d = new Demo1Service();

            var callb = A.Fake<Action<string>>();
            var uie = A.Fake<UIElement>();

            d.Demo4Setup(uie, callb);
            d.Demo4Toggle();
            A.CallTo(() => callb.Invoke(A<string>.Ignored)).MustHaveHappened(Repeated.Exactly.Times(10));//0
        }