Example #1
0
        public void TestGetShimInstance()
        {
            Action action = new Action(() => Console.Clear());
            Shim   shim   = Shim.Replace(() => Console.Clear()).With(action);

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

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