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
If I write test that sets up a Mock in a method annotated with @BeforeMethod, that mock is correctly torn down after the method completes. However, if I change the annotation to @BeforeClass, that mock is not correctly torn down. I think that this is because the TestNGRunnerDecorator does not implement the ITestListener interface and tear down mocks after the class finishes.
So in summary, the following works as expected:
@BeforeMethod
public void setup() {
new MockThatExtendsMockUp();
}
But the following does not:
@BeforeClass
public void setup() {
new MockThatExtendsMockUp();
}
The text was updated successfully, but these errors were encountered:
If I write test that sets up a Mock in a method annotated with
@BeforeMethod
, that mock is correctly torn down after the method completes. However, if I change the annotation to@BeforeClass
, that mock is not correctly torn down. I think that this is because theTestNGRunnerDecorator
does not implement theITestListener
interface and tear down mocks after the class finishes.So in summary, the following works as expected:
But the following does not:
The text was updated successfully, but these errors were encountered: