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
Describe the project you are working on:
The GUT unit testing framework.
Describe the problem or limitation you are having in your project:
When creating doubles for objects I cannot determine if a method is static or not which causes error when instantiating said object.
Describe how this feature / enhancement will help you overcome this problem or limitation:
I can exclude static methods from doubling.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
In the results of get_method_list the dictionary would include some way to determine if a method is static or not.
Describe implementation detail for your proposal (in code), if possible:
NA
If this enhancement will not be used often, can it be worked around with a few lines of script?:
There is a workaround. Barring any way to determine the status from info provided by the engine, I must make users specify a list of functions not to double. This is more cumbersome for users than it is to code.
Is there a reason why this should be core and not an add-on in the asset library?:
I don't know how an add-on could supply this info. It's also useful information that others may need at some point. Most everything else about the method is provided by get_method_list
The text was updated successfully, but these errors were encountered:
There is an annotations #20318 issue opened here which if ever implemented should help solve problems like this.
I've ran into the same issue as you with WAT so I've ended up defaulting to a deferred creation of a partial double. Users get a TestDoubleDirector back and then it is up them to short-circuit the methods (director.method("add").stub(null) or in this use case director.method("add", "static").stub(null) and then the method structures are written once the users call var dbl = director.double())
On a related note the addition of annotations means we could possibly do:
Calinou
changed the title
Add an indicator to method meta data to indicate static methods
Add an indicator to method metadata to indicate static methods
Nov 22, 2020
Describe the project you are working on:
The GUT unit testing framework.
Describe the problem or limitation you are having in your project:
When creating doubles for objects I cannot determine if a method is static or not which causes error when instantiating said object.
Describe how this feature / enhancement will help you overcome this problem or limitation:
I can exclude static methods from doubling.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
In the results of
get_method_list
the dictionary would include some way to determine if a method is static or not.Describe implementation detail for your proposal (in code), if possible:
NA
If this enhancement will not be used often, can it be worked around with a few lines of script?:
There is a workaround. Barring any way to determine the status from info provided by the engine, I must make users specify a list of functions not to double. This is more cumbersome for users than it is to code.
Is there a reason why this should be core and not an add-on in the asset library?:
I don't know how an add-on could supply this info. It's also useful information that others may need at some point. Most everything else about the method is provided by
get_method_list
The text was updated successfully, but these errors were encountered: