Closed
Description
Description
UTBot suggests to generate tests for protected
members of Kotlin class, but because they are visible only inside that class itself and its descendants the generated code cannot access such methods and fails at compilation.
To Reproduce
- In UTBot settings set
Generated test language
toKotlin
- Invoke test generation for following class
class Calc {
protected fun substract(a: Int, b: Int): Int {
return a - b
}
}
Expected behavior
UTBot either warn that there is NO methods it can test or create compilable code (if we can and want to access this method through reflection).
Actual behavior
UTBot allows to generate tests for that method and create uncompilable code.
Visual proofs (screenshots, logs, images)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done