gordonad / powermock

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

MockPolicy intercepts the mocked method only once and only from the first test method (first @Test annotation) #97

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Write a MockPolicy for a private method in a class.
2. Construct two Test methods, both performing the same action.
3. Run the JUnit Test case.

What is the expected output? What do you see instead?
Expected Output: Calls from both test Methods are intercepted and the mock 
is returned.
Actual Output: Only the first test method gets intercepted and the mock is 
returned. The second test method is not intercepted and the actual call to 
the private method goes through.

What version of the product are you using? On what operating system?
PowerMock v 1.1.1 on Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by shivimur...@gmail.com on 3 Apr 2009 at 5:00

GoogleCodeExporter commented 8 years ago
This has already been fixed in trunk. The fix will be available in the next 
version
of PowerMock.

Original comment by johan.ha...@gmail.com on 9 Apr 2009 at 2:07