Add schools API integration (#2302)

This commit is contained in:
Mikołaj Pich 2023-09-25 19:44:13 +02:00 committed by GitHub
parent 0fa197d520
commit 95b4d53fac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 195 additions and 15 deletions

View file

@ -5,6 +5,7 @@ import io.github.wulkanowy.data.pojos.RegisterStudent
import io.github.wulkanowy.data.pojos.RegisterSymbol
import io.github.wulkanowy.data.pojos.RegisterUnit
import io.github.wulkanowy.data.pojos.RegisterUser
import io.github.wulkanowy.data.repositories.SchoolsRepository
import io.github.wulkanowy.data.repositories.StudentRepository
import io.github.wulkanowy.sdk.Sdk
import io.github.wulkanowy.sdk.scrapper.Scrapper
@ -40,6 +41,9 @@ class LoginStudentSelectPresenterTest {
@MockK
lateinit var studentRepository: StudentRepository
@MockK
lateinit var schoolsRepository: SchoolsRepository
@MockK(relaxed = true)
lateinit var analytics: AnalyticsHelper
@ -110,6 +114,7 @@ class LoginStudentSelectPresenterTest {
clearMocks(studentRepository, loginStudentSelectView)
coEvery { studentRepository.getSavedStudents(false) } returns emptyList()
coEvery { schoolsRepository.logSchoolLogin(any(), any()) } just Runs
every { loginStudentSelectView.initView() } just Runs
every { loginStudentSelectView.symbols } returns emptyMap()
@ -120,6 +125,7 @@ class LoginStudentSelectPresenterTest {
presenter = LoginStudentSelectPresenter(
studentRepository = studentRepository,
schoolsRepository = schoolsRepository,
loginErrorHandler = errorHandler,
syncManager = syncManager,
analytics = analytics,