Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flavorTextEntries into Move #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/kotlin/me/sargunvohra/lib/pokekotlin/model/moves.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ data class Move(
val statChanges: List<MoveStatChange>,
val target: NamedApiResource,
val type: NamedApiResource,
val machines: List<MachineVersionDetail>
val machines: List<MachineVersionDetail>,
val flavorTextEntries: List<MoveFlavorText>
)

data class ContestComboSets(
Expand Down Expand Up @@ -112,3 +113,9 @@ data class MoveTarget(
val moves: List<NamedApiResource>,
val names: List<Name>
)

data class MoveFlavorText(
val flavorText: String,
val language: NamedApiResource,
val versionGroup: NamedApiResource
)
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
package me.sargunvohra.lib.pokekotlin.test.model

import me.sargunvohra.lib.pokekotlin.model.*
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import me.sargunvohra.lib.pokekotlin.model.ApiResource
import me.sargunvohra.lib.pokekotlin.model.ContestComboDetail
import me.sargunvohra.lib.pokekotlin.model.ContestComboSets
import me.sargunvohra.lib.pokekotlin.model.Description
import me.sargunvohra.lib.pokekotlin.model.Effect
import me.sargunvohra.lib.pokekotlin.model.MachineVersionDetail
import me.sargunvohra.lib.pokekotlin.model.MoveMetaData
import me.sargunvohra.lib.pokekotlin.model.MoveStatChange
import me.sargunvohra.lib.pokekotlin.model.Name
import me.sargunvohra.lib.pokekotlin.model.NamedApiResource
import me.sargunvohra.lib.pokekotlin.model.PastMoveStatValues
import me.sargunvohra.lib.pokekotlin.model.VerboseEffect
import me.sargunvohra.lib.pokekotlin.test.MockServer
import org.junit.Test

Expand Down Expand Up @@ -76,6 +65,13 @@ class MoveTest {
versionGroup = NamedApiResource("red-blue", "version-group", 1)
) in machines
)
assert(
MoveFlavorText(
flavorText = "An attack that may\ncause paralysis.",
language = NamedApiResource("en", "language", 9),
versionGroup = NamedApiResource("gold-silver", "version-group", 3)
) in flavorTextEntries
)
}
}

Expand Down