Closed nathanljones closed 9 years ago
Dear Nathan,
thank you very much for your issue posts! Do the Unit Tests that are shipped with mockA still pass?
Regards,
Uwe
Hi,
Unfortunately they do not.
I removed my changes and then they passed again.
However, I've kept in my free method (see separate issue). That makes it work again. So I think the issue is in the static methods aren't getting their variables cleared.
Thanx
Nath
On 6 August 2014 14:06, Uwe Kunath notifications@github.com wrote:
Dear Nathan,
thank you very much for your issue posts! Do the Unit Tests that are shipped with mockA still pass?
Regards,
Uwe
— Reply to this email directly or view it on GitHub https://github.com/uweku/mockA/issues/7#issuecomment-51331174.
Nathan Jones
Well, basically the current method call pattern may be closed only if a certain component of MS_CURRENT_METHOD_CALL_PATTERN in ZCL_MOCKA_MOCKER_METHOD is not initial and would be overwritten by a method call, e.g. if a second WITH-method call would be executed and the component IMPORTING is not initial. Also, in some cases, it is absolutely required to finalize the method call pattern structure as it the case when the mock-object needs to be generated (ZIF_MOCKA_MOCKER_METHOD~FINALIZE_CURRENT_METHOD_SIGN) I admit, the current logic is quite weak at this point and needs to be made more robust.
I reimplemented the parameter registration flasuhing logic so that it performs hopefully more robustly. Please see the latest build.
If you call the methods changes exports raises_by_name with with_changing
These don't get mocked.
I've added the following code finalize_current_method_sign( ).
To the end of each method before the ro_mocker_method = me. statement to get this to work.