File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ class InvocationMatcher {
148
148
149
149
bool isMatchingArg (roleArg, actArg) {
150
150
if (roleArg is _ArgMatcher ){
151
- return roleArg._matcher== null || roleArg._matcher.matches (actArg, null );
151
+ return roleArg._matcher== null || roleArg._matcher.matches (actArg, {} );
152
152
// } else if(roleArg is Mock){
153
153
// return identical(roleArg, actArg);
154
154
}else {
Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ main(){
142
142
when (mock.methodWithoutArgs ()).thenReturn ("B" );
143
143
expect (mock.methodWithoutArgs (), equals ("B" ));
144
144
});
145
+ test ("should mock method with calculated result" , (){
146
+ when (mock.methodWithNormalArgs (argThat (equals (43 )))).thenReturn ("43" );
147
+ when (mock.methodWithNormalArgs (argThat (equals (42 )))).thenReturn ("42" );
148
+ expect (mock.methodWithNormalArgs (43 ), equals ("43" ));
149
+ });
145
150
146
151
});
147
152
You can’t perform that action at this time.
0 commit comments