SHARE
TWEET

Untitled

a guest May 19th, 2017 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Test
  2.     public void loadJsonFromFile() throws Exception {
  3.         DataModel mockResult = jsonMockUtility.getJsonToMock(
  4.                 "data.json",
  5.                 DataModel.class);
  6.  
  7.         when(mockContext.getAssets().open(anyString())).thenReturn(mockInputStream);
  8.         when(jsonUtil.getJsonFromFile(mockContext, "", DataModel.class)).thenReturn(mockResult);
  9.         presenter.loadJsonFromFile(mockContext);
  10.     }
RAW Paste Data
Top