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. int count = weaponCollection.GetAllWeaponsOfRarity(stars).Count(); Assert.AreEqual(count, expectedValue); }
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> weapons = WeaponCollection.GetAllWeaponsOfRarity(stars); foreach (var weapon in weapons) { Assert.AreEqual(weapon.Rarity, stars); } Assert.AreEqual(weapons.Count, expectedValue); }