예제 #1
0
        public void WeaponCollection_GetAllWeaponsOfRarity_ListOfWeapons(int stars, int expectedValue)
        {
            // TODO: call WeaponCollection.GetAllWeaponsOfRarity(stars) and confirm that the weapons list returns Count matches the expected value using asserts.
            List <Weapon> weaponList = weaponCollection.GetAllWeaponOfRarity(stars);

            foreach (var weapon in weaponList)
            {
                Assert.AreEqual(weapon.Rarity, stars);
            }
            Assert.AreEqual(weaponList.Count, 5, 10);
        }