You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if the following class is used for mocking;
type
TMyClass = class(TObject)
functionNonVirtualFunc : boolean;
end;
If the caller for TMock specifies a behavior or expectation on the NonVirtualFunc method they will not get any warning or error. Also their Verify call on the Mock will not fail as their are no registered expectations.
From what I can see this should be as simple as flagging in the Expect and Will*When calls that they were called. If the DoInvoke is not called after them then an exception is raised. This could be done on the reference release of the setup object. This shouldn't destroy the object as the Mock owns the proxy, however it should reduce the reference count by one.
This should remove an annoying bug where not having virtual declared on a method means you simply don't see the defined behavior being called.
The text was updated successfully, but these errors were encountered:
Currently if the following class is used for mocking;
If the caller for TMock specifies a behavior or expectation on the NonVirtualFunc method they will not get any warning or error. Also their Verify call on the Mock will not fail as their are no registered expectations.
From what I can see this should be as simple as flagging in the Expect and Will*When calls that they were called. If the DoInvoke is not called after them then an exception is raised. This could be done on the reference release of the setup object. This shouldn't destroy the object as the Mock owns the proxy, however it should reduce the reference count by one.
This should remove an annoying bug where not having virtual declared on a method means you simply don't see the defined behavior being called.
The text was updated successfully, but these errors were encountered: