Permalink
Browse files

renamed addToCurrentXP addExperience, inferring current xp

  • Loading branch information...
1 parent b514862 commit 6140afef6464b709fbf67f8346dd560e8a4680c5 @matyb committed Feb 22, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 dnd_tdd/test/org/dnd/CharacterTest.java
@@ -1,5 +1,4 @@
package org.dnd;
-import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -191,28 +190,28 @@ public void testNewCharacterDefaultsToLevel1() throws Exception {
@Test
public void testEvery1000HitPointsLevelsUpCharacter() throws Exception {
Character me = new Character();
- me.addToCurrentXP(2000);
+ me.addExperience(2000);
assertEquals(3, me.getLevel());
}
@Test
public void testEveryLevelIncreasesBaseHPBy5() throws Exception {
Character me = new Character();
- me.addToCurrentXP(2000);
+ me.addExperience(2000);
assertEquals(15, me.getHP());
}
@Test
public void testForEveryEvenLevelAddOneToRoll_EvenLevel() throws Exception {
Character me = new Character();
- me.addToCurrentXP(1000);
+ me.addExperience(1000);
assertEquals(11, me.getModifiedRoll(10));
}
@Test
public void testForEveryEvenLevelAddOneToRoll_OddLevel() throws Exception {
Character me = new Character();
- me.addToCurrentXP(2000);
+ me.addExperience(2000);
assertEquals(11, me.getModifiedRoll(10));
}
}

0 comments on commit 6140afe

Please sign in to comment.