public void addTalent(InterfaceTalent talent) { if (talent == null) { return; } if (controll_TalentExist(talent)) { return; } if (getTalent(talent.getName()) != null) { return; } talent.setCharacter(this); List <InterfaceTalent> list = null; if (TalentDictionary.TryGetValue(talent.GetType(), out list)) { list.Add(talent); } else { list = new List <InterfaceTalent>(0); TalentDictionary.Add(talent.GetType(), list); this.addTalent(talent); } }
public void TalentTest_getProbeStringTwo_CharakterSet() { InterfaceTalent talent = getTalentWithDeviateRequirement(); talent.setCharacter(charakter); Assert.AreEqual(getProbeStringTwo(), talent.getProbeStringTwo()); }
public void TalentTest_setTaW() { InterfaceTalent talent = getTalentWithoutDeviateRequirement(); int TaW = random.Next(maxTaW); Assert.AreEqual("-", talent.getTaW()); talent.setCharacter(charakter); talent.setTaw(TaW.ToString()); Assert.AreEqual(TaW.ToString(), talent.getTaW()); Assert.AreEqual(getProbeStringOne(), talent.getProbeStringOne()); talent.setTaw("-"); Assert.AreEqual("-", talent.getTaW()); }