PowerMockito.whenNew(A.class).withNoArguments().thenReturn(mockedA); // act myClass.example(); ... } 但其實有更好的替代方案,方法與上一個 ...
確定! 回上一頁