1+ /*
2+ * Copyright 2020 KonnyakuCamp.
3+ *
4+ * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
5+ * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
6+ *
7+ * https://github.com/KonnyakuCamp/SuperCourseTimetableBot/blob/main/LICENSE
8+ */
19package stageguard.sctimetable
210
311import kotlinx.coroutines.runBlocking
412import org.junit.jupiter.api.Test
513import stageguard.sctimetable.api.LoginCookieData
614import stageguard.sctimetable.api.LoginInfoData
715import stageguard.sctimetable.api.SuperCourseApiService
16+ import stageguard.sctimetable.utils.AESUtils
17+ import stageguard.sctimetable.utils.Either
818
919class SCApiTest {
1020 @Test
1121 fun test () = runBlocking {
12- val loginInfo = LoginInfoData (" 123123123 " , " 123123123 " )
22+ /* val loginInfo = LoginInfoData("15065196743 ", "xzg20020410. ")
1323 var cookieInfo = LoginCookieData()
1424 val loginReceipt = SuperCourseApiService.loginViaPassword(loginInfo) {
1525 cookieInfo = it
1626 }
17- println (" ${loginReceipt.data.student.schoolName} -> ${loginReceipt.data.student.studentNum} " )
27+ println("${loginReceipt.data!! .student.schoolName} -> ${loginReceipt.data!! .student.studentNum}")
1828 println("jSessionId = ${cookieInfo.jSessionId}, serverId = ${cookieInfo.serverId}")
1929 var courseReceipt = SuperCourseApiService.getCourses(cookieInfo)
20- println (courseReceipt.data.lessonList.joinToString(" \n " ) { it.name })
30+ println(courseReceipt.data.lessonList.joinToString("\n") { it.name })*/
31+ }
32+ @Test
33+ fun loginWrong () = runBlocking {
34+ val x = SuperCourseApiService .loginViaPassword(" 15966355163" , " 033312ysz" )
35+ println (x)
2136 }
2237}
0 commit comments