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
Until we fully move from CGLIB to Byte Buddy we should let the user choose to not use the PowerMockMaker for certain mocks. This would be extremely helpful for tests that do not require PowerMock to still take advantage of Mockito2 features such as mocking public methods of a non-public parent class while still allowing tests in the project to leverage PowerMock.
I think we should use implement a mockito PluginSwitch which allows the user to turn off/on the PowerMockMaker plugin temporarily. This, however, is not currently possible as we are unable to tell mockito to reload plugins after the PluginSwitch updates state due to the registry being final. Will update with mockito ticket (edit: mockito/mockito#1003). While this is not done yet, we can work around it by putting this switch inside of PowerMockMaker.
What steps will reproduce the problem?
Try to mock out a public method in a non-public parent class.
What is the expected output?
Method to be mocked.
What do you see instead?
mockito exception due to PowerMockMaker still using cglib.
What version of the product are you using?
1.7.0RC4
The text was updated successfully, but these errors were encountered:
Until we fully move from CGLIB to Byte Buddy we should let the user choose to not use the PowerMockMaker for certain mocks. This would be extremely helpful for tests that do not require PowerMock to still take advantage of Mockito2 features such as mocking public methods of a non-public parent class while still allowing tests in the project to leverage PowerMock.
I think we should use implement a mockito PluginSwitch which allows the user to turn off/on the PowerMockMaker plugin temporarily. This, however, is not currently possible as we are unable to tell mockito to reload plugins after the PluginSwitch updates state due to the registry being final. Will update with mockito ticket (edit: mockito/mockito#1003). While this is not done yet, we can work around it by putting this switch inside of PowerMockMaker.
What steps will reproduce the problem?
What is the expected output?
What do you see instead?
What version of the product are you using?
The text was updated successfully, but these errors were encountered: