Closed GoogleCodeExporter closed 9 years ago
I cannot seem to reproduce it. Here's my test:
public class PlaygroundTest {
private class TestForMock
{
public String getValue()
{
return "";
}
}
@Before
public void foo() {
TestForMock mockString = Mockito.mock(TestForMock.class);
OngoingStubbing<String> ongoingStub = Mockito.when(mockString.getValue());
}
@Test
public void shouldTestSomething() throws Exception {
Mockito.mock(List.class);
}
}
it fails with:
UnfinishedStubbingException which is correct behavior.
Was it working for you before moving to 1.8 rc2?
Original comment by szcze...@gmail.com
on 17 Jul 2009 at 3:17
it was working fine in 1.7. The only thing we changed was the mockito jar that
we
were pointing to.
It does seem to work in our continuous build with ant without any problems.
Seems
limited to an issue within our Eclipse environment.
Original comment by jamie.do...@gtempaccount.com
on 17 Jul 2009 at 3:33
>java.lang.NoSuchMethodError:
>org.mockito.Mockito.when(Ljava/lang/Object;)Lorg/mockito/stubbing/OngoingStubbi
ng;
Jamie, I have a feeling that you have more than one mockito jar on your
classpath.
Can you verify this for me please?
Original comment by szcze...@gmail.com
on 19 Jul 2009 at 9:02
That was it. The 1.7 jar was still in the directory (although not referenced by
Eclipse).
Thanks very much for you help.
Original comment by jamiedou...@gmail.com
on 20 Jul 2009 at 2:45
Cool!
Original comment by szcze...@gmail.com
on 20 Jul 2009 at 3:00
Original issue reported on code.google.com by
jamie.do...@gtempaccount.com
on 17 Jul 2009 at 2:14