ahmaddarawshi / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

Should we add a "nullAllMocks" methods? #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It could be quite convenient to have a "nullAllMocks" that can be used to
set all mocks created by PowerMock to null. This will save the user from
having to do:

@After
public void tearDown() {
  mock1 = null;
  mock2 = null;
  ..
  mockN = null;
}

and instead do:
@After
public void tearDown() {
  nullAllMocks();
}

Original issue reported on code.google.com by johan.ha...@gmail.com on 13 Nov 2008 at 9:59

GoogleCodeExporter commented 9 years ago
This should probably be supported by the AnnotationEnabler.

Original comment by johan.ha...@gmail.com on 2 Dec 2008 at 3:47

GoogleCodeExporter commented 9 years ago
A FieldDefault test listener has been implemented to deal with this.

Original comment by johan.ha...@gmail.com on 8 Dec 2008 at 3:59