File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ PowerMock是一个Java模拟框架,可用于解决通常认为很难甚至无
61
61
``` java
62
62
InterfaceToMock mock = Powermockito . mock(InterfaceToMock . class)
63
63
64
- Powermockito . when(mock. method(Params …)). thenReturn(value)
64
+ Powermockito . when(mock. method(Params …)). thenReturn(value)
65
65
66
- Powermockito . when(mock. method(Params . . )). thenThrow(Exception )
66
+ Powermockito . when(mock. method(Params . . )). thenThrow(Exception )
67
67
```
68
68
69
69
##### 4.2 设置对象的private属性
@@ -137,9 +137,9 @@ Powermockito.mockStatic(FinalClassToMock.class);
137
137
``` java
138
138
1 ) PowerMockito . spy(TargetClass . class);
139
139
140
- 2 ) Powemockito . when(TargetClass . targetMethod()). doReturn()
140
+ 2 ) Powemockito . when(TargetClass . targetMethod()). doReturn()
141
141
142
- 3 ) 注意加入
142
+ 3 ) 注意加入
143
143
144
144
@RunWith (PowerMockRunner . class)
145
145
You can’t perform that action at this time.
0 commit comments