michalborek / mockito-eclipse-tools

Eclipse plugin that simplifies test creation by providing refactorings for Mockito mocks.
7 stars 5 forks source link

When trying to convert variable from method that has a vararg parameter, exception is thrown #17

Open michalborek opened 10 years ago

michalborek commented 10 years ago
@Before
public void before() {
    final IQuickFix fixMock1 = mock(IQuickFix.class);
    testedClass = new MocksQuickFixProcessor(Arrays.asList(fixMock1, fixMock2));
}

When converting fixMock2, exception is thrown from ContextBaseTypeFinder. That's because it is treated as a method with two parameters, and the method binding returns array instead.