Beispiel #1
0
        public void ThrowCurrentWeapon_WithChange_Successful()
        {
            var player       = new PlayerBody(null, new Vector(0, 0), null, null, 0, 0, "Bob", 100, 1);
            int weaponsCount = player.WeaponsCount;

            player.AddWeapon(new WeaponSimpleBullet(0, 0, 0, 0, new TimeSpan(), null, "Weapon", new ShapeRectangle(3, 7, new Point(0, 0))));
            player.AddWeapon(new WeaponSimpleBullet(0, 0, 0, 0, new TimeSpan(), null, "Weapon", new ShapeRectangle(3, 7, new Point(0, 0))));

            player.ChangeWeapon();

            player.ThrowCurrentWeapon();

            Assert.AreEqual(1, player.WeaponsCount);
            Assert.IsNotNull(player.CurrentWeapon);
        }