Exemplo n.º 1
0
        public void TestMethod1()
        {
            Mock <IGetInteger> mockIGetInteger = new Mock <IGetInteger>();

            mockIGetInteger.Setup(m => m.GetInt()).Returns(2);

            ServLocator.IGetInteger = mockIGetInteger.Object;

            IntWrapper intWrapper = new IntWrapper();
            int        i          = intWrapper.GetFromInterface();

            Assert.AreEqual(i, 2);
        }