forked from agzam/vyatsu-schedule
feat(remote): add streaming TeachersParser
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user