Esempio n. 1
0
        public void Decorating_weapon_with_silencer_object()
        {
            var simpleWeapon       = new BaseWeapon();
            var weaponWithSilencer = new WeaponSilencer(simpleWeapon);

            Assert.Equal("This is the base weapon! Silencer added!", weaponWithSilencer.Mount());
        }
Esempio n. 2
0
        public void Decorating_fullweapon_object()
        {
            var fullWeapon = new WeaponSilencer(new WeaponSight(new BaseWeapon()));

            Assert.Equal("This is the base weapon! Sight added! Silencer added!", fullWeapon.Mount());
        }