Skip to content

Commit

Permalink
test for the header based rowNum
Browse files Browse the repository at this point in the history
  • Loading branch information
mykhaylo- authored Apr 14, 2021
1 parent 6b3798f commit c4c6616
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ class CsvReaderTest : WordSpec({
|2""".trimMargin()
result shouldBe listOf(mapOf("h1" to "a", h2 to "b", "h3" to "c"))
}
"number of fields in a row has to be based on the header #82" {
val data = "1,2,3\na,b\nx,y,z"

val exception = shouldThrow<CSVFieldNumDifferentException> {
csvReader().readAllWithHeader(data)
}
exception.fieldNum shouldBe 3
}
}

"open method (with fileName argument)" should {
Expand Down

0 comments on commit c4c6616

Please sign in to comment.