Exemplo n.º 1
0
        public void TestMethod1()
        {
            using (ShimsContext.Create())
            {
                ShimShimClass x = new ShimShimClass {
                    NowGet = () => { return(DateTime.Now); }
                };

                var a = new TargetClass();

                if (a.DoSomething().Year != 2017)
                {
                    Assert.Fail();
                }
            }
        }