use of com.karumi.marvelapiclient.MarvelApiException in project Rosie by Karumi.
the class MainActivityTest method givenExceptionObtainingCharacters.
private void givenExceptionObtainingCharacters() throws Exception {
when(charactersRepository.getAll(ReadPolicy.CACHE_ONLY)).thenReturn(new ArrayList<Character>());
when(charactersRepository.getPage(any(Page.class))).thenThrow(new MarvelApiException(ANY_EXCEPTION, null));
}
use of com.karumi.marvelapiclient.MarvelApiException in project Rosie by Karumi.
the class MainActivityTest method givenConnectionExceptionObtainingCharacters.
private void givenConnectionExceptionObtainingCharacters() throws Exception {
when(charactersRepository.getAll(ReadPolicy.CACHE_ONLY)).thenReturn(new ArrayList<Character>());
when(charactersRepository.getPage(any(Page.class))).thenThrow(new MarvelApiException(ANY_EXCEPTION, new UnknownHostException()));
}
Aggregations