Teresa Sparkman wrote:We have a java-based test framework and use testNG. How can lambdas be used to simplify code testing?
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.
These are the worst of times and these are the best of times. And this is the best tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss