Consider I have two methods:
Method(object obj);
Method(ArrayList list);
I want to ensure that Method(object) is being called with not
null argument during test.
mock.Expect("Method", new NotNull());
will not work, since call: Method(new ArrayList()); will satisfy
an expectation.
1. It might be already fixed, since I have old release - if that's
the case disregard this message.
2. Solution 1: provide optional parameter (Type[]) that is
required to be defined for overloaded methods.
3. Solution 2: generate aliased functions for overloaded
methods. E.g. Method_Object and Method_ArrayList.
4. Guess method invoked at run-time based on arguments.
Regards,
Roman V. Gavrilov
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=397472
Could you provide some examples or a little more detail as to
what you would like to see here?
Thanks,
Griffin
Logged In: YES
user_id=1170022
Consider I have two methods:
Method(object obj);
Method(ArrayList list);
I want to ensure that Method(object) is being called with not
null argument during test.
mock.Expect("Method", new NotNull());
will not work, since call: Method(new ArrayList()); will satisfy
an expectation.
1. It might be already fixed, since I have old release - if that's
the case disregard this message.
2. Solution 1: provide optional parameter (Type[]) that is
required to be defined for overloaded methods.
3. Solution 2: generate aliased functions for overloaded
methods. E.g. Method_Object and Method_ArrayList.
4. Guess method invoked at run-time based on arguments.
Regards,
Roman V. Gavrilov