forked from agzam/vyatsu-schedule
19 lines
628 B
Kotlin
19 lines
628 B
Kotlin
package agzam.vyatsu
|
|
|
|
import agzam.vyatsu.data.remote.GroupsParser
|
|
import org.junit.Assert.assertTrue
|
|
import org.junit.Test
|
|
|
|
class GroupsPipelineMemoryTest {
|
|
|
|
@Test
|
|
fun streamingUnderSmallHeap() {
|
|
val fixture = checkNotNull(javaClass.getResourceAsStream("/groups.html")) {
|
|
"Fixture groups.html not found in src/test/resources"
|
|
}
|
|
val result = fixture.use(GroupsParser::parseStream)
|
|
assertTrue(result.groups.size > 400)
|
|
assertTrue(result.groups.any { it.id == "26981" && it.name.contains("ПОДб-1701-08-00") })
|
|
assertTrue(result.dateRanges.size > 400)
|
|
}
|
|
} |