package com.marvinelsen.tatoeba.internal

import io.kotest.core.spec.style.ShouldSpec
import io.kotest.matchers.shouldBe
import java.util.zip.GZIPInputStream

class SimpleTatoebaParserTest : ShouldSpec({
    should("parse all of tatoeba example sentences file correctly") {
        val tatoebaFilePath = "/cmn_sentences.tsv.gz"
        val tatoebaFileStream = GZIPInputStream(javaClass.getResourceAsStream(tatoebaFilePath))

        val tatoebaParser = SimpleTatoebaParser()

        tatoebaFileStream.use {
            val tatoebaSentences = tatoebaParser.parse(tatoebaFileStream)

            tatoebaSentences.toList().size shouldBe 74_585
        }
    }
})
