Skip to content

Commit

Permalink
test: LottoTicketGenerator's generate method
Browse files Browse the repository at this point in the history
  • Loading branch information
doxxx93 committed Oct 24, 2023
1 parent 8a88f33 commit 62d4ca8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/kotlin/model/lotto/LottoTicketGeneratorTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package model.lotto

import io.kotest.core.spec.style.FreeSpec
import io.kotest.matchers.shouldBe

class LottoTicketGeneratorTest : FreeSpec(
{
"LottoTicketGenerator 생성" - {
"일정 수의 티켓 생성" {
val count = 5
val tickets = LottoTicketGenerator.generate(count)

tickets.size shouldBe count
}

"수동 티켓 생성" {
val manualNumbers = listOf(

Check failure on line 17 in src/test/kotlin/model/lotto/LottoTicketGeneratorTest.kt

View workflow job for this annotation

GitHub Actions / Check Code Quality

[ktlint] reported by reviewdog 🐶 A multiline expression should start on a new line Raw Output: src/test/kotlin/model/lotto/LottoTicketGeneratorTest.kt:17:37: error: A multiline expression should start on a new line (standard:multiline-expression-wrapping)
LottoNumbers.from(listOf(1, 2, 3, 4, 5, 6)),
LottoNumbers.from(listOf(7, 8, 9, 10, 11, 12)),
)
val tickets = LottoTicketGenerator.generate(manualNumbers)

tickets.size shouldBe manualNumbers.size

tickets.forEach { it.type shouldBe TicketType.Manual }
}
}
},
)

0 comments on commit 62d4ca8

Please sign in to comment.