Skip to content

Commit

Permalink
Merge pull request #71 from CSC207-UofT/xichen/PokemonManagerTest
Browse files Browse the repository at this point in the history
Some renames
  • Loading branch information
TonyXiChen authored Dec 11, 2021
2 parents 076a1a6 + a3d73a8 commit 262d4b4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/java/usecase_pokemon/PokemonManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ public class PokemonManagerTest {
PokemonManager testPM = new PokemonManager(testPJRFT);

@Test
public void getPokemonTest() {
public void testGetPokemon() {
Pokemon pokemon = testPM.getPokemon("Pikachu", 1);
assertTrue(pokemon.getName().equals("Pikachu") && pokemon.getLevel() == 1);
}

@Test
public void addExperiencePointTest() {
public void testAddExperiencePoint() {
Pokemon pokemon = testPM.getPokemon("Pikachu", 1);
int current = pokemon.getExperiencePoint();
testPM.addExperiencePoint(pokemon, 10);
assertEquals(10, pokemon.getExperiencePoint() - current);
}

@Test
public void setPocketAndGetPocketTest() {
public void testSetPocketAndGetPocket() {
Pocket testPocket = new Pocket();
testPocket.add(testPM.getPokemon("Pikachu", 1));
testPM.setPocket(testPocket);
assertEquals("Pikachu", testPM.getPocket().getPokemons().get(0).getName());
}

@Test
public void getPocketInfoTest() {
public void testGetPocketInfo() {
// for simple only, due to similarity
Pocket testPocket = new Pocket();
testPocket.add(testPM.getPokemon("Pikachu", 1));
Expand All @@ -47,7 +47,7 @@ public void getPocketInfoTest() {
}

@Test
public void setBattlePokemonAndGetBattlePokemonTest() {
public void testGetBattlePokemonAndGetBattlePokemon() {
Pocket testPocket = new Pocket();
testPocket.add(testPM.getPokemon("Pikachu", 1));
testPocket.add(testPM.getPokemon("Squirtle", 2));
Expand All @@ -57,7 +57,7 @@ public void setBattlePokemonAndGetBattlePokemonTest() {
}

@Test
public void addTest() {
public void testAdd() {
Pocket testPocket = new Pocket();
testPocket.add(testPM.getPokemon("Pikachu", 1));
testPM.setPocket(testPocket);
Expand All @@ -66,7 +66,7 @@ public void addTest() {
}

@Test
public void healAllTest() {
public void testHealAll() {
Pocket testPocket = new Pocket();
Pokemon pokemon = testPM.getPokemon("Pikachu", 1);
pokemon.setHitPoint(pokemon.getHitPoint() - 1);
Expand Down

0 comments on commit 262d4b4

Please sign in to comment.