29 lines
627 B
Scala
29 lines
627 B
Scala
package combinations
|
|
|
|
import munit.FunSuite
|
|
import cards._
|
|
|
|
class HighCardTest extends FunSuite {
|
|
|
|
test("HighCard accepts any hand") {
|
|
val hand = List(
|
|
Card(Two, Hearts),
|
|
Card(Four, Clubs),
|
|
Card(Seven, Diamonds),
|
|
Card(Jack, Spades),
|
|
Card(Ace, Hearts)
|
|
)
|
|
|
|
val combination = HighCard()
|
|
assert(combination.verify(hand))
|
|
assertEquals(combination.score.chips, 5)
|
|
assertEquals(combination.score.multiplier, 1)
|
|
}
|
|
|
|
test("HighCard accepts even a single card") {
|
|
val hand = List(Card(King, Clubs))
|
|
val combination = HighCard()
|
|
assert(combination.verify(hand))
|
|
}
|
|
}
|