Пример #1
0
        public void WeaponCollection_GetAllWeaponsOfType_ListOfWeapons(WeaponType type, int expectedValue)
        {
            // TODO: call WeaponCollection.GetAllWeaponsOfType(type) and confirm that the weapons list returns Count matches the expected value using asserts.

            int count = weaponCollection.GetAllWeaponsOfType(type).Count();

            Assert.AreEqual(count, expectedValue);
        }
Пример #2
0
        public void WeaponCollection_GetAllWeaponsOfType_ListOfWeapons(WeaponType type, int expectedValue)
        {
            // TODO: call WeaponCollection.GetAllWeaponsOfType(type) and confirm that the weapons list returns Count matches the expected value using asserts.
            List <Weapon> weapons = WeaponCollection.GetAllWeaponsOfType(type);

            foreach (var weapon in weapons)
            {
                Assert.AreEqual(weapon.Type, type);
            }
            Assert.AreEqual(weapons.Count, expectedValue);
        }