Exemplo n.º 1
0
        public void TestWithoutInterface()
        {
            var fake = Substitute.For <DependencyWithoutInterface>();

            fake.Info(Arg.Any <string>()).Returns("Empty");
            var sut    = new SampleImplWithDependency(fake);
            var result = sut.TestDependencyWithoutInterface();

            Assert.IsNull(result);
        }
        public void TestWithoutInterfaceDependency()
        {
            //Type Mock Isolator
            var fake = A.Fake <DependencyWithoutInterface>();
            // A.CallTo(() => fake.Info(A<string>.Ignored)).Returns("Empty");
            var sut    = new SampleImplWithDependency(fake);
            var result = sut.TestDependencyWithoutInterface();

            Assert.AreEqual(result, "Empty");
        }