[英]How do you add PowerMock to your project?
I am using mockito in my project and then found i could not use mockito for static classes and so have been told to download and use powermock. 我在项目中使用了模仿,然后发现我无法对静态类使用模仿,因此被告知要下载并使用powermock。 i download from here https://code.google.com/p/powermock/wiki/Downloads , this file specifically. 我从这里https://code.google.com/p/powermock/wiki/Downloads专门下载此文件。 PowerMock 1.6.0 with Mockito and JUnit including dependencies 具有Mockito和JUnit的PowerMock 1.6.0(包括依赖项)
Do i just need to import the JARs from this into my project library? 我是否只需要从中将JAR导入到我的项目库中? or is there more to it? 还是还有更多?
I assume you don't use maven. 我认为您不使用Maven。 You just have to add the corresponding powermock version. 您只需要添加相应的powermock版本。 Take a look to this mapping and choose the right version: 查看此映射并选择正确的版本:
Mockito PowerMock
1.10+ 1.6.0
1.9.5-rc1 - 1.9.5 1.5.0 - 1.5.6
1.9.0-rc1 & 1.9.0 1.4.10 - 1.4.12
1.8.5 1.3.9 - 1.4.9
1.8.4 1.3.7 & 1.3.8
1.8.3 1.3.6
1.8.1 & 1.8.2 1.3.5
1.8 1.3
1.7 1.2.5
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.