/// <summary> /// Returns a collection of all the talents in the selected tier. /// </summary> /// <param name="tier"> The talent tier.</param> /// <returns>A collection of <see cref="Talent"/>s.</returns> public IEnumerable <Talent> TierTalents(TalentTiers tier) { return(Talents.Where(x => x.Tier == tier)); }
public void OperatorNotEqualTest(string referenceId, string buttonId, AbilityTypes abilityTypes, bool isPassive, TalentTiers tier, string referenceId2, string buttonId2, AbilityTypes abilityTypes2, bool isPassive2, TalentTiers tier2) { Talent talent2 = new Talent() { AbilityTalentId = new AbilityTalentId(referenceId2, buttonId2) { AbilityType = abilityTypes2, IsPassive = isPassive2, }, Tier = tier2, }; Talent talent = new Talent() { AbilityTalentId = new AbilityTalentId(referenceId, buttonId) { AbilityType = abilityTypes, IsPassive = isPassive, }, Tier = tier, }; Ability ability = new Ability() { AbilityTalentId = new AbilityTalentId(referenceId, buttonId) { AbilityType = abilityTypes, IsPassive = isPassive, }, Tier = AbilityTiers.Hearth, }; #pragma warning disable SA1131 // Use readable conditions Assert.IsTrue(null ! != talent2); #pragma warning restore SA1131 // Use readable conditions Assert.IsTrue(talent2 != null !); Assert.IsFalse(null ! != (AbilityTalentId)null !); Assert.IsTrue(talent != talent2); Assert.AreNotEqual(talent.GetHashCode(), talent2 !.GetHashCode()); Assert.AreNotEqual(ability.GetHashCode(), talent2 !.GetHashCode()); }
public void NotEqualsTest(string referenceId, string buttonId, AbilityTypes abilityTypes, bool isPassive, TalentTiers tier) { Talent talent = new Talent() { AbilityTalentId = new AbilityTalentId("abil1", "abil77") { AbilityType = AbilityTypes.Q, IsPassive = false, }, Tier = tier, }; Assert.AreNotEqual(talent, new Talent() { AbilityTalentId = new AbilityTalentId(referenceId, buttonId) { AbilityType = abilityTypes, IsPassive = isPassive, }, Tier = tier, }); }
public void EqualsTest(string referenceId, string buttonId, AbilityTypes abilityTypes, bool isPassive, TalentTiers tier) { Talent talent = new Talent() { AbilityTalentId = new AbilityTalentId(referenceId, buttonId) { AbilityType = abilityTypes, IsPassive = isPassive, }, Tier = tier, }; Assert.AreEqual(talent, talent); }