public void SetsPropertyValue()
        {
            var samurai = new Samurai(null);
            var sword = new Sword();

            injector.Invoke(samurai, sword);

            samurai.Weapon.Should().BeSameAs(sword);
        }
 public void CallsMethod()
 {
     var samurai = new Samurai(new Sword());
     injector.Invoke(samurai, new[] { "Bob" });
     samurai.Name.Should().Be("Bob");
 }
 public void SetsPropertyValueToNullIfInvokedWithNullArgument()
 {
     var samurai = new Samurai(new Sword());
     injector.Invoke(samurai, null);
     samurai.Weapon.Should().BeNull();
 }
 public void CallsMethod()
 {
     var samurai = new Samurai(new Sword());
     injector.Invoke(samurai, new[] { "evildoer" });
     samurai.IsBattleHardened.Should().BeTrue();
 }