scap
02/13/2018, 8:00 PM//what is the best way to test an object that calls external resources.
object Foo {
private val logger = SomethingThatLogs()
fun bar(number: Int) {
if(number == 42){
logger.log("That is the meaning of life")
}
}
}
I want to test that the logger is call when 42 is passed in but not 31 but not actually do the logging.