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()); }