public void SimpleTest()
        {
            ControllTalent controller;
            String         ResourcePath;

            ResourcePath = ManagmentSaveStrings.currentDirectory;
            ResourcePath = Path.Combine(ResourcePath, ManagmentSaveStrings.Recources);
            ResourcePath = Path.Combine(ResourcePath, "TestResources");
            controller   = new ControllTalent(ResourcePath);

            List <TalentWeaponless> list = controller.getTalentList <TalentWeaponless>();

            Assert.AreEqual(2, list.Count);

            InterfaceTalent talent = controller.getTalent("Raufen");

            Assert.AreEqual(typeof(TalentWeaponless), talent.GetType());

            TalentFighting ftalent = (TalentFighting)talent;

            Assert.AreEqual("BE", ftalent.getBe());
            Assert.AreEqual("0", ftalent.getPA());

            List <TalentNature> ln = controller.getTalentList <TalentNature>();

            Assert.AreEqual(0, ln.Count);
        }
Exemple #2
0
        public void setATWithoutTaW()
        {
            talent = getTalentFightingWithDeviateRequirement();
            charakter.addTalent(talent);
            talent.setAT(10);

            Assert.AreEqual(0, talent.getAT());
        }
Exemple #3
0
 public void controllTalentFighting(TalentFighting talent)
 {
     Assert.AreEqual(currentAT, talent.getAT());
     Assert.AreEqual(currentPA, talent.getPA());
     Assert.AreEqual(currentProbeValueAT, talent.getProbeValueAT());
     Assert.AreEqual(currentProbeValuePA, talent.getProbeValuePA());
     Assert.AreEqual(currentProbeStringThree, talent.getProbeStringThree());
 }
Exemple #4
0
        public void setPAwithoutTAW_ParadeFalse()
        {
            parade = false;
            talent = getTalentFightingWithDeviateRequirement();
            charakter.addTalent(talent);
            talent.setPA(10);

            Assert.AreEqual(("---").ToString(), talent.getPA());
        }
Exemple #5
0
        public void setPAwithTaW0_ParadeTrue()
        {
            parade = true;
            talent = getTalentFightingWithDeviateRequirement();
            charakter.addTalent(talent);

            talent.setTaw("0");
            talent.setPA(10);

            Assert.AreEqual((0).ToString(), talent.getPA());
        }
Exemple #6
0
        public void setATWithATGreateTAW()
        {
            Random random = new Random();

            talent = getTalentFightingWithDeviateRequirement();
            charakter.addTalent(talent);

            int taw = random.Next(maxTaW);
            int at  = random.Next(maxAT) + taw;

            talent.setTaw(taw.ToString());
            talent.setAT(at);

            Assert.AreEqual(taw, talent.getAT());
        }
Exemple #7
0
        public void setPAWithTaW_ParadeTrue_PAGreaterTaW()
        {
            Random random = new Random();

            parade = true;
            talent = getTalentFightingWithDeviateRequirement();
            charakter.addTalent(talent);

            int taw = random.Next(maxTaW);
            int pa  = random.Next(maxPA) + taw;

            talent.setTaw(taw.ToString());
            talent.setPA(pa);

            Assert.AreEqual(taw.ToString(), talent.getPA());
        }
Exemple #8
0
        public void setTAandPA_PAfirst()
        {
            Random random = new Random();

            talent = getTalentFightingWithDeviateRequirement();
            charakter.addTalent(talent);
            parade = true;

            int expected = 0;
            int taw      = random.Next(maxTaW);
            int at       = random.Next(maxAT);
            int pa       = random.Next(maxPA);

            talent.setTaw(taw.ToString());
            talent.setPA(pa);
            talent.setAT(at);

            expected = pa;
            if (taw < pa)
            {
                expected = taw;
            }
            Assert.AreEqual(expected.ToString(), talent.getPA());

            expected = at;
            if (taw - pa < at)
            {
                expected = taw - pa;
                if (expected < 0)
                {
                    expected = 0;
                }
            }

            Assert.AreEqual(expected, talent.getAT());
        }
Exemple #9
0
 public override InterfaceTalent getTalentWithRequirement()
 {
     talent = getTalentightingWithRequirement();
     return(talent);
 }
Exemple #10
0
 public override InterfaceTalent getTalentWithDeviate()
 {
     talent = getTalentFightingWithDeviate();
     return(talent);
 }
Exemple #11
0
 public void getProbeStringThree()
 {
     talent = getTalentFightingWithDeviateRequirement();
     Assert.AreEqual(advancedvalue.ToString(), talent.getProbeStringThree());
 }