feat(remote): add streaming TeachersParser

This commit is contained in:
2026-09-19 14:47:46 +03:00
parent 1a4bff73d0
commit 458e4c4e69
7 changed files with 18086 additions and 29 deletions
@@ -0,0 +1,19 @@
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)
}
}