Coverage Summary for Class: BackgroundDto (cloud.mindbox.mobile_sdk.inapp.data.dto)
| Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| BackgroundDto |
100%
(2/2)
|
|
100%
(3/3)
|
100%
(7/7)
|
| BackgroundDto$LayerDto |
100%
(1/1)
|
|
100%
(1/1)
|
100%
(2/2)
|
| BackgroundDto$LayerDto$ImageLayerDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| BackgroundDto$LayerDto$ImageLayerDto$ActionDto |
100%
(1/1)
|
|
100%
(1/1)
|
100%
(2/2)
|
| BackgroundDto$LayerDto$ImageLayerDto$ActionDto$PushPermissionActionDto |
100%
(3/3)
|
|
100%
(5/5)
|
100%
(13/13)
|
| BackgroundDto$LayerDto$ImageLayerDto$ActionDto$PushPermissionActionDto$Companion |
|
| BackgroundDto$LayerDto$ImageLayerDto$ActionDto$RedirectUrlActionDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| BackgroundDto$LayerDto$ImageLayerDto$ActionDto$RedirectUrlActionDto$Companion |
|
| BackgroundDto$LayerDto$ImageLayerDto$Companion |
|
| BackgroundDto$LayerDto$ImageLayerDto$SourceDto |
100%
(1/1)
|
|
100%
(1/1)
|
100%
(2/2)
|
| BackgroundDto$LayerDto$ImageLayerDto$SourceDto$UrlSourceDto |
100%
(3/3)
|
|
100%
(5/5)
|
100%
(13/13)
|
| BackgroundDto$LayerDto$ImageLayerDto$SourceDto$UrlSourceDto$Companion |
|
| BackgroundDto$LayerDto$WebViewLayerDto |
100%
(5/5)
|
|
100%
(9/9)
|
100%
(23/23)
|
| BackgroundDto$LayerDto$WebViewLayerDto$Companion |
|
| Total |
100%
(24/24)
|
|
100%
(39/39)
|
100%
(98/98)
|
package cloud.mindbox.mobile_sdk.inapp.data.dto
import cloud.mindbox.mobile_sdk.inapp.data.dto.deserializers.WebViewParamsDeserializer
import com.google.gson.annotations.JsonAdapter
import com.google.gson.annotations.SerializedName
internal data class BackgroundDto(
@SerializedName("layers")
val layers: List<LayerDto?>?
) {
internal sealed class LayerDto {
internal data class ImageLayerDto(
@SerializedName("action")
val action: ActionDto?,
@SerializedName("source")
val source: SourceDto?,
@SerializedName("${"$"}type")
val type: String?
) : LayerDto() {
internal companion object {
const val IMAGE_TYPE_JSON_NAME = "image"
}
internal sealed class ActionDto {
internal data class RedirectUrlActionDto(
@SerializedName("intentPayload")
val intentPayload: String?,
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("value")
val value: String?
) : ActionDto() {
internal companion object {
const val REDIRECT_URL_ACTION_TYPE_JSON_NAME = "redirectUrl"
}
}
internal data class PushPermissionActionDto(
@SerializedName("intentPayload")
val intentPayload: String?,
@SerializedName("${"$"}type")
val type: String?,
) : ActionDto() {
internal companion object {
const val PUSH_PERMISSION_TYPE_JSON_NAME = "pushPermission"
}
}
}
internal sealed class SourceDto {
internal data class UrlSourceDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("value")
val value: String?
) : SourceDto() {
internal companion object {
const val URL_SOURCE_JSON_NAME = "url"
}
}
}
}
internal data class WebViewLayerDto(
@SerializedName("baseUrl")
val baseUrl: String?,
@SerializedName("contentUrl")
val contentUrl: String?,
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("params")
@JsonAdapter(WebViewParamsDeserializer::class)
val params: Map<String, String>?,
) : LayerDto() {
internal companion object {
const val WEBVIEW_TYPE_JSON_NAME = "webview"
}
}
}
}