Advertisement
Guest User

eso

a guest
Nov 27th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import static org.mockito.Mockito.*;
  2.  
  3. EsaClase eso = mock(EsaClase.class);
  4. when(eso.funcion("parametro1")).thenReturn(1);
  5. when(eso.funcion("parametro2")).thenReturn(2);
  6. when(eso.funcion("parametro3")).thenReturn(3);
  7. when(eso.funcion("parametro4")).thenReturn(4);
  8.  
  9.  
  10. @Test
  11. public void pruebaUno(){   
  12.     assertTrue(eso.funcion("parametro1")==1);
  13.     //Esta prueba funciona :D
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement