Questions tagged «linkageerror»

6
模拟系统类时出现Mockito + PowerMock LinkageError
我有这样的代码片段: @RunWith(PowerMockRunner.class) @PrepareForTest({Thread.class}) public class AllMeasuresDataTest { @Before public void setUp() throws Exception { } @Test public void testGetMeasures() { AllMeasuresData measure = new AllMeasuresData(); assertEquals(measure.getMeasures(), null); HashMap<String, Measure> map = new HashMap<String, Measure>(); measure.setMeasures(map); assertEquals(measure.getMeasures(), map); measure.setMeasures(null); assertEquals(measure.getMeasures(), null); } @Test public void testAllMeasuresData() throws IOException { ClassLoader loader …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.