In an Android instrumented test I want to check that when selecting a checkbox, the checkbox applies the Paint.STRIKE_THRU_TEXT_FLAG
paint flag to the text. Is there any way to check the paint flag of the text?
The code being tested is:
checkBox.setOnClickListener{
checkPaintFlags(checkBox)
}
...
private fun checkPaintFlags(checkBox: CheckBox) {
if(checkBox.isChecked) {
checkBox.paintFlags = Paint.STRIKE_THRU_TEXT_FLAG
} else {
checkBox.paintFlags = 0
}
}