Beispiel #1
0
        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());
        }
Beispiel #2
0
        public void TalentTest_JustGeneratetTest_WithoutDiverateRequirement()
        {
            charakter = null;

            InterfaceTalent          talent = getTalentWithoutDeviateRequirement();
            List <TalentRequirement> trl    = talent.getRequirementList();
            List <TalentDeviate>     tdl    = talent.getDeviateList();

            Assert.AreEqual(getTalentName(), talent.getName());
            Assert.AreEqual(getProbeList().Count(), talent.getProbeCount());
            Assert.AreEqual(getProbeStringOne(), talent.getProbeStringOne());
            Assert.AreEqual(getProbeStringTwo(), talent.getProbeStringTwo());
            Assert.AreEqual("-", talent.getTaW());
            Assert.AreEqual("0", talent.getTAWBonus());
            Assert.AreEqual(getBEString(), talent.getBe());
            Assert.AreEqual(0, talent.getDeviateList().Count);
            Assert.AreEqual(0, talent.getRequirementList().Count);
            Assert.AreEqual("-", talent.getRequirementString());
            Assert.AreEqual("-", talent.getDeviateString());
            Assert.AreEqual("-", talent.getTaW());
            Assert.AreEqual("0", talent.getTAWBonus());
        }
Beispiel #3
0
        public void controllInterfaceTalent(InterfaceTalent talent)
        {
            Assert.AreEqual(currentType, talent.GetType());
            Assert.AreEqual(currentName, talent.getName());
            Assert.AreEqual(currentComplexeName, talent.getName());
            Assert.AreEqual(currentProbeCount, talent.getProbeCount());
            Assert.AreEqual(currentProbeStringOne, talent.getProbeStringOne());
            Assert.AreEqual(currentProbeStringTwo, talent.getProbeStringTwo());

            Assert.AreEqual(currentBE, talent.getBe());
            Assert.AreEqual(currentDeviate, talent.getDeviateString());
            Assert.AreEqual(currentTAW, talent.getTaW());
            Assert.AreEqual(currentTAWBonus, talent.getTAWBonus());
        }
        private static XmlElement saveTalent(InterfaceTalent talent, XmlDocument characterFile, XmlElement element)
        {
            String name = talent.getName();
            String taw  = talent.getTaW().ToString();

            name = nameRplacements(name);

            XmlElement TalentElement = characterFile.CreateElement(ManagmentXMLStrings.TalentElement);
            XmlElement NameElement   = characterFile.CreateElement(ManagmentXMLStrings.Name);
            XmlElement TawElement    = characterFile.CreateElement(ManagmentXMLStrings.TAW);

            TalentElement.AppendChild(NameElement).InnerText = name;
            TalentElement.AppendChild(TawElement).InnerText  = taw;
            element.AppendChild(TalentElement);

            return(TalentElement);
        }