For example:
class A {
func methodB() {
func methodC() {
...
}
...
}
...
}
Is that possible to test methodC in unit test?
For example:
class A {
func methodB() {
func methodC() {
...
}
...
}
...
}
Is that possible to test methodC in unit test?
No, I don't think there is any way to refer to methodC() outside the scope of its enclosing function unless the enclosing function provides a reference to it in some way (as a return value, etc).
It's hard for me to think of something that's more of an implementation detail that shouldn't be tested than a nested function.