intellij-plugin/educational-core/testSrc/com/jetbrains/edu/learning/stepik/hyperskill/checker/HyperskillCheckEduTaskMessageTest.kt [58:110]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private fun configureResponse() { mockConnector.withResponseHandler(testRootDisposable) { request, _ -> MockResponseFactory.fromString( when (val path = request.pathWithoutPrams) { "/api/attempts" -> attempt "/api/submissions" -> submission else -> error("Wrong path: ${path}") } ) } } @Language("JSON") private val attempt = """ { "meta": { "page": 1, "has_next": false, "has_previous": false }, "attempts": [ { "dataset": "", "id": 7565800, "status": "active", "step": 4368, "time": "2020-04-29T11:44:20.422Z", "user": 6242591 } ] } """ @Language("JSON") private val submission = """ { "meta": { "page": 1, "has_next": false, "has_previous": false }, "submissions": [ { "attempt": "7565800", "id": "7565003", "status": "evaluation", "step": 4368, "time": "2020-04-29T11:44:20.422Z", "user": 6242591 } ] } """ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - intellij-plugin/educational-core/testSrc/com/jetbrains/edu/learning/stepik/hyperskill/checker/HyperskillCheckEduTaskTest.kt [44:96]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private fun configureResponse() { mockConnector.withResponseHandler(testRootDisposable) { request, _ -> MockResponseFactory.fromString( when (val path = request.pathWithoutPrams) { "/api/attempts" -> attempt "/api/submissions" -> submission else -> error("Wrong path: ${path}") } ) } } @Language("JSON") private val attempt = """ { "meta": { "page": 1, "has_next": false, "has_previous": false }, "attempts": [ { "dataset": "", "id": 7565800, "status": "active", "step": 4368, "time": "2020-04-29T11:44:20.422Z", "user": 6242591 } ] } """ @Language("JSON") private val submission = """ { "meta": { "page": 1, "has_next": false, "has_previous": false }, "submissions": [ { "attempt": "7565800", "id": "7565003", "status": "evaluation", "step": 4368, "time": "2020-04-29T11:44:20.422Z", "user": 6242591 } ] } """ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -