Skip to content

Commit 42a67f2

Browse files
authored
Merge pull request #82 from cbruegg/add-mythical-legendary-attrs
Add fields is_mythical and is_legendary
2 parents c4188f7 + 0a571d8 commit 42a67f2

File tree

3 files changed

+7
-1
lines changed
  • src
    • main/kotlin/me/sargunvohra/lib/pokekotlin/model
    • test

3 files changed

+7
-1
lines changed

src/main/kotlin/me/sargunvohra/lib/pokekotlin/model/pokemon.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ data class PokemonSpecies(
240240
val captureRate: Int,
241241
val baseHappiness: Int,
242242
val isBaby: Boolean,
243+
val isLegendary: Boolean,
244+
val isMythical: Boolean,
243245
val hatchCounter: Int,
244246
val hasGenderDifferences: Boolean,
245247
val formsSwitchable: Boolean,

src/test/kotlin/me/sargunvohra/lib/pokekotlin/test/model/PokemonTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ class PokemonTest {
407407
assertEquals(45, captureRate)
408408
assertEquals(70, baseHappiness)
409409
assertEquals(false, isBaby)
410+
assertEquals(false, isMythical)
411+
assertEquals(false, isLegendary)
410412
assertEquals(20, hatchCounter)
411413
assertEquals(false, hasGenderDifferences)
412414
assertEquals(false, formsSwitchable)

src/test/resources/data/api/v2/pokemon-species/1/index.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,8 @@
706706
"hatch_counter": 20,
707707
"id": 1,
708708
"is_baby": false,
709+
"is_legendary": false,
710+
"is_mythical": false,
709711
"name": "bulbasaur",
710712
"names": [
711713
{
@@ -847,4 +849,4 @@
847849
}
848850
}
849851
]
850-
}
852+
}

0 commit comments

Comments
 (0)