Categories

Mockito and void methods on mock objects

SO I have
class TestFoo {

}
TestFoo s1 = Mockito.mock(TestFoo.class);
TestFoo s2 = Mockito.mock(TestFoo.class);

The Mockito doc “Real Partial Mocks” says to do this:

when(mock.someMethod()).thenCallRealMethod();

we get the error

“The method when(T) in the type Mockito is not applicable for the arguments (void)”

After 1/2 hour of hunting I found a hint, and refactored:

Mockito.doCallRealMethod().when(s1).assertEquals(s2);

Thanks 1&1 Ya Dopes for not including Subversion

OK so they warned me. They moved to a new Linux platform, and Subversion stopped working.

I used my own instructions to rebuild. No good. Errors.

After some Googling I found an article by Nick Sergeant and he basically had the same routine. But he dumped 1&1. I can’t afford to now.

So I tried the latest subversion [...]