Closed infinite closed 10 years ago
Hi,
Would you consider adding the following convenience function to the MockitoTestCase?
{{{
public function argThatMatches(matcher:Function): * { return argThat(new FunctionMatcher(matcher)); } }}}
So that we can easily use anonymous functions to verify arguments.
verify().that(_listener.validationResultHandler( argThatMatches(function(item:ValidationResultEvent): Boolean { return item.type == ValidationResultEvent.INVALID; }) )); }}}
Thanks, Shanon.
From loomis on 2009-09-30 20:49:23+00:00
I added the code. It will be available in the next release.
Hi,
Would you consider adding the following convenience function to the MockitoTestCase?
{{{
!actionscript3
public function argThatMatches(matcher:Function): * { return argThat(new FunctionMatcher(matcher)); } }}}
So that we can easily use anonymous functions to verify arguments.
{{{
!actionscript3
verify().that(_listener.validationResultHandler( argThatMatches(function(item:ValidationResultEvent): Boolean { return item.type == ValidationResultEvent.INVALID; }) )); }}}
Thanks, Shanon.