public void Interface_returning_concrete_without_static_member_should_return_object_if_instructed_to()
        {
            var sub = Substitute.For<IInterfaceReturningConcreteWithoutPublicStaticMethod>();
            var obj = new ConcreteWithoutPublicStaticMethod();
            sub.AMethod().Returns(obj);

            var returnedClass = sub.AMethod();

            Assert.That(returnedClass, Is.SameAs(obj));
        }
Ejemplo n.º 2
0
        public void Interface_returning_concrete_without_static_member_should_return_object_if_instructed_to()
        {
            var sub = Substitute.For <IInterfaceReturningConcreteWithoutPublicStaticMethod>();
            var obj = new ConcreteWithoutPublicStaticMethod();

            sub.AMethod().Returns(obj);

            var returnedClass = sub.AMethod();

            Assert.That(returnedClass, Is.SameAs(obj));
        }