Ejemplo n.º 1
0
        public void Create_WhenImplementationMethodNotIsNull_MustReturnWithTargetInvocation()
        {
            var target = new Mock <IFakeTarget>();

            ITargetInvocation targetInvocation = this.testee.Create(target.Object, typeof(IFakeTarget).GetMethod("Foo"));

            targetInvocation.Should().BeOfType <WithTargetInvocation>();

            targetInvocation.InvokeMethodOnTarget(new object[0]);
            target.Verify(x => x.Foo());
        }
Ejemplo n.º 2
0
        public void Create_WhenImplementationMethodIsNull_MustReturnWithoutTargetInvocation()
        {
            ITargetInvocation targetInvocation = this.testee.Create(null, null);

            targetInvocation.Should().BeOfType <WithoutTargetInvocation>();
        }