Open GoogleCodeExporter opened 8 years ago
ok, this should be failry easy to create
Original comment by brice.du...@gmail.com
on 27 Sep 2012 at 12:20
Fixed in revision 49f00f9d3cb839194b5052e27e5ac6230f9f2424
Original comment by brice.du...@gmail.com
on 27 Sep 2012 at 2:23
Thanks!
Original comment by esko.luo...@gmail.com
on 27 Sep 2012 at 2:53
It wasn't really a hard fix :)
Original comment by brice.du...@gmail.com
on 27 Sep 2012 at 2:55
Hey Esko,
In your use case, Mockito throws a different exception (ArgumentsAreDifferent)
and the message does contain the actual parameters. Can you confirm that?
Showing all args for all invocations might be a good idea on not ;). We should
make sure it does not clutter the view.
Original comment by szcze...@gmail.com
on 12 Oct 2012 at 9:20
Here is an example:
import org.junit.Test;
import static org.mockito.Mockito.*;
public class Example {
@Test
public void test1() {
AnInterface m = mock(AnInterface.class);
for (int i = 1; i <= 2; i++) {
m.foo(i);
}
verify(m).foo(1);
verify(m).foo(2);
verify(m).foo(3); // XXX: doesn't mention the parameters of foo(1) and foo(2)
verify(m).foo(4);
}
@Test
public void test2() {
AnInterface m = mock(AnInterface.class);
for (int i = 1; i <= 4; i++) {
m.foo(i);
}
verify(m).foo(1);
verify(m).foo(2);
verify(m).foo(5); // XXX: doesn't mention foo(4) at all
}
public interface AnInterface {
void foo(int i);
}
}
Original comment by esko.luo...@gmail.com
on 13 Oct 2012 at 12:14
I don't think this issue is fixed :). I may be wrong though - I haven't tested
it - I've just had a brief look at the code in master. Brice, if the cases
submitted by Esko work feel free to close the ticket!
Original comment by szcze...@gmail.com
on 10 Nov 2012 at 7:18
Original comment by brice.du...@gmail.com
on 8 Jan 2013 at 4:57
Original issue reported on code.google.com by
esko.luo...@gmail.com
on 27 Sep 2012 at 12:08