Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import static org.mockito.Mockito.*;
- EsaClase eso = mock(EsaClase.class);
- when(eso.funcion("parametro1")).thenReturn(1);
- when(eso.funcion("parametro2")).thenReturn(2);
- when(eso.funcion("parametro3")).thenReturn(3);
- when(eso.funcion("parametro4")).thenReturn(4);
- @Test
- public void pruebaUno(){
- assertTrue(eso.funcion("parametro1")==1);
- //Esta prueba funciona :D
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement