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); }
public void setATWithoutTaW() { talent = getTalentFightingWithDeviateRequirement(); charakter.addTalent(talent); talent.setAT(10); Assert.AreEqual(0, talent.getAT()); }
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()); }
public void setPAwithoutTAW_ParadeFalse() { parade = false; talent = getTalentFightingWithDeviateRequirement(); charakter.addTalent(talent); talent.setPA(10); Assert.AreEqual(("---").ToString(), talent.getPA()); }
public void setPAwithTaW0_ParadeTrue() { parade = true; talent = getTalentFightingWithDeviateRequirement(); charakter.addTalent(talent); talent.setTaw("0"); talent.setPA(10); Assert.AreEqual((0).ToString(), talent.getPA()); }
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()); }
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()); }
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()); }
public override InterfaceTalent getTalentWithRequirement() { talent = getTalentightingWithRequirement(); return(talent); }
public override InterfaceTalent getTalentWithDeviate() { talent = getTalentFightingWithDeviate(); return(talent); }
public void getProbeStringThree() { talent = getTalentFightingWithDeviateRequirement(); Assert.AreEqual(advancedvalue.ToString(), talent.getProbeStringThree()); }