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
While it is possible to set a MockedConstruction's behavior at creation by passing an Initializer parameter as the second parameter to
mockConstruction method, it is not possible to set the Initializer after creation. This is annoying for several reasons:
It doesn't work well with annotating the MockedConstruction with @mock
It doesn't work with the common coding pattern of setting the default behavior of a mock in the setup() method and overriding it if necessary in individual tests.
It makes it impossible to set up a MockedConstruction so that the second mocked T created has different behavior than the first.
Since a MockedConstructor must contain an Initializer for the static function to work, it should be possible to add a method to set this after construction.
The text was updated successfully, but these errors were encountered:
While it is possible to set a MockedConstruction's behavior at creation by passing an Initializer parameter as the second parameter to
mockConstruction method, it is not possible to set the Initializer after creation. This is annoying for several reasons:
Since a MockedConstructor must contain an Initializer for the static function to work, it should be possible to add a method to set this after construction.
The text was updated successfully, but these errors were encountered: