@@ -12,19 +12,19 @@ sealed class Method(val value: String) {
12
12
}
13
13
14
14
sealed class MockedResponse (
15
- val httpResponseCode : Int = DEFAULT_MOCK_HTTP_RESPONSE_CODE ,
16
- val delayInMillis : Long = DEFAULT_MOCK_DELAY_IN_MILLIS ,
15
+ open val httpResponseCode : Int = DEFAULT_MOCK_HTTP_RESPONSE_CODE ,
16
+ open val delayInMillis : Long = DEFAULT_MOCK_DELAY_IN_MILLIS ,
17
17
) {
18
18
companion object {
19
19
const val DEFAULT_MOCK_DELAY_IN_MILLIS = 0L
20
20
const val DEFAULT_MOCK_HTTP_RESPONSE_CODE = 200
21
21
}
22
22
}
23
23
24
- class MockedApiResponse (
24
+ data class MockedApiResponse (
25
25
val body : String = DEFAULT_BODY ,
26
- httpResponseCode : Int = DEFAULT_MOCK_HTTP_RESPONSE_CODE ,
27
- delayInMillis : Long = DEFAULT_MOCK_DELAY_IN_MILLIS ,
26
+ override val httpResponseCode : Int = DEFAULT_MOCK_HTTP_RESPONSE_CODE ,
27
+ override val delayInMillis : Long = DEFAULT_MOCK_DELAY_IN_MILLIS ,
28
28
) : MockedResponse(
29
29
httpResponseCode,
30
30
delayInMillis,
@@ -34,10 +34,10 @@ class MockedApiResponse(
34
34
}
35
35
}
36
36
37
- class MockedBufferedResponse (
37
+ data class MockedBufferedResponse (
38
38
val buffer : Buffer ,
39
- httpResponseCode : Int = DEFAULT_MOCK_HTTP_RESPONSE_CODE ,
40
- delayInMillis : Long = DEFAULT_MOCK_DELAY_IN_MILLIS ,
39
+ override val httpResponseCode : Int = DEFAULT_MOCK_HTTP_RESPONSE_CODE ,
40
+ override val delayInMillis : Long = DEFAULT_MOCK_DELAY_IN_MILLIS ,
41
41
) : MockedResponse(
42
42
httpResponseCode,
43
43
delayInMillis,
@@ -48,4 +48,4 @@ internal class RequestAndResponse(val requestInfo: RequestInfo, val mockedRespon
48
48
data class RequestInfo (val path : Path , val method : Method )
49
49
typealias Path = String
50
50
51
- internal class RequestInfoWithPattern (val pathPattern : PatternMatcher , val method : Method )
51
+ internal class RequestInfoWithPattern (val pathPattern : PatternMatcher , val method : Method )
0 commit comments