예제 #1
0
        public void should_use_katana_against_someone()
        {
            // GIVEN
            var katana = new Katana();

            // WHEN
            var result = katana.UseAgainst("Arialdo");

            // THEN
            result.Should().Be("I chop you in 2, Arialdo!");
        }
예제 #2
0
        public string Attack(string target)
        {
            IWeapon weapon;

            switch (WeaponToUse)
            {
            case "katana":
                weapon = new Katana();
                break;

            case "gun":
                weapon = new Gun();
                break;

            default:
                throw new NotImplementedException();
            }

            return($"I'm a Samurai... {weapon.UseAgainst(target)}");
        }