提交 005a0dce 编写于 作者: S serge-rider

Remove powermock from tests


Former-commit-id: 5c8b35fa
上级 89178d3b
......@@ -15,11 +15,8 @@ import org.junit.Test;
import static org.mockito.AdditionalMatchers.or;
import static org.mockito.Matchers.isA;
import static org.mockito.Matchers.isNull;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
//@RunWith(PowerMockRunner.class)
public class CommonUtilsTest {
@Rule
......@@ -220,6 +217,7 @@ public class CommonUtilsTest {
Assert.assertFalse(CommonUtils.getBoolean(value, true));
}
/*
@PrepareForTest({ CommonUtils.class, System.class })
@Test
public void testGetLineSeparator() {
......@@ -230,6 +228,7 @@ public class CommonUtilsTest {
PowerMockito.when(System.getProperty(or(isA(String.class), isNull(String.class)))).thenReturn(null);
Assert.assertEquals("\n", CommonUtils.getLineSeparator());
}
*/
@Test
public void testGetRootCause() {
......
......@@ -18,14 +18,12 @@ import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
//@RunWith(PowerMockRunner.class)
public class SecurityUtilsTest {
@PrepareForTest(SecurityUtils.class)
/*
@PrepareForTest(SecurityUtils.class)
@Test
public void testGenerateGUID() throws Exception {
PowerMockito.mockStatic(InetAddress.class);
......@@ -116,4 +114,5 @@ public class SecurityUtilsTest {
PowerMockito.whenNew(Random.class).withParameterTypes(long.class).withArguments(anyLong()).thenReturn(random);
Assert.assertEquals(new Random(0L), SecurityUtils.getRandom());
}
*/
}
......@@ -301,6 +301,7 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
......@@ -313,6 +314,7 @@
<version>1.6.6</version>
<scope>test</scope>
</dependency>
-->
</dependencies>
</project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册