Coverage Summary for Class: IntegerPositiveValidator (cloud.mindbox.mobile_sdk.inapp.data.validators)
| Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| IntegerPositiveValidator |
100%
(2/2)
|
|
100%
(2/2)
|
100%
(12/12)
|
| IntegerPositiveValidator$isValid$1 |
100%
(1/1)
|
100%
(4/4)
|
100%
(1/1)
|
100%
(17/17)
|
| Total |
100%
(3/3)
|
100%
(4/4)
|
100%
(3/3)
|
100%
(29/29)
|
package cloud.mindbox.mobile_sdk.inapp.data.validators
import cloud.mindbox.mobile_sdk.utils.loggingRunCatching
internal class IntegerPositiveValidator : Validator<Int?> {
override fun isValid(item: Int?): Boolean =
loggingRunCatching(false) {
item?.let { it > 0 } ?: false
}
}