Exemplo n.º 1
0
        public void TestGetShimDelegateTarget()
        {
            Action action = new Action(() => Console.Clear());
            Shim   shim   = Shim.Replace(() => Console.Clear()).With(action);

            PoseContext.Isolate(() => { }, shim);

            Assert.AreEqual(action.Target, StubHelper.GetShimDelegateTarget(0));
            Assert.AreSame(action.Target, StubHelper.GetShimDelegateTarget(0));
        }