コード例 #1
0
 public void testValidateAbilitiesReturnsTrueAt27PointBuy()
 {
     Player player = new Player();
     player.assignAbility("dexterity", 15);
     player.assignAbility("intelligence", 15);
     player.assignAbility("wisdom", 15);
     Assert.IsTrue(player.validateAbilities());
 }
コード例 #2
0
 public void testValidateAbilitiesReturnsFalseAt26PointBuy()
 {
     Player player = new Player();
     player.assignAbility("dexterity", 15);
     player.assignAbility("intelligence", 15);
     player.assignAbility("wisdom", 14);
     player.assignAbility("charisma", 9);
     Assert.IsFalse(player.validateAbilities());
 }
コード例 #3
0
 public void testPlayerAbilitiesAddToPaidInPointBuy()
 {
     Player player = new Player();
     int pointsLeft = player.assignAbility("strength", 14);
     Assert.AreEqual(20, pointsLeft);
 }