You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following test fails .
public class VarArgsTest {
interface MyClass {
public String doSomething(String string, String... varargs);
}
@Test
public void shouldWork() {
MyClass myClass = mock(MyClass.class);
when(myClass.doSomething("hello", null)).thenReturn("hello");
when(myClass.doSomething("goodbye", null)).thenReturn("goodbye");
String result = myClass.doSomething("hello", null);
assertEquals("hello", result);
}
What is the expected output? What do you see instead?
the expected output is "hello" but instead returns "goodbye"
What version of the product are you using? On what operating system?
v1.6 Windows XP 32 bit
Please provide any additional information below.
Original issue reported on code.google.com by melodiou...@gmail.com on 3 Nov 2008 at 10:53
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
melodiou...@gmail.com
on 3 Nov 2008 at 10:53The text was updated successfully, but these errors were encountered: