Teresa Sparkman wrote:We have a java-based test framework and use testNG. How can lambdas be used to simplify code testing?
Hi Teresa,
I think the biggest benefit isn't their direct usage in test code, although there is a good example elsewhere in this
thread of that happening, its actually in making it easier to abstract over different behaviours. Being able to pass in some behaviour as a parameter makes it a lot easier to write code which is testable. In the same way that depending on any abstraction makes it easier to write code that's testable.
regards,
Richard