How do I write a Scala unit test to verify that a function is called with some particular function as a parameter? -
i have class:
class somedao { this: support => def get(id:long): option[somedto] = { support.sproccall(somedto.fromresultset, somedao.getsproc, id) } }
somedto.fromresultset function1 [wrapperresultset, somedto].
is possible verify support.sproccall has been called correct function first parameter?
you're treading close problem of determining if 2 functions equal. particular problem has been covered many times on so, such how compare scala function values equality believe question less general form of question. if so, answer can't reasons founded in theory.
Comments
Post a Comment