Answers for "mock ioexception mockito on BufferedReader"

0

mock ioexception mockito on BufferedReader

@Test
public void readFileTest5() throws Exception {
    BufferedReader bufferedReader = Mockito.mock(BufferedReader.class);
    FileReader fileReader = Mockito.mock(FileReader.class);
    when(BufferedReader.readLine()).thenReturn("abc");
    assertEquals("",new ArrayList<String>(), FileUtil.readFile("abc"));
}
Posted by: Guest on June-24-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language