Helper to set the reader buffer. Just pass a string to use for the unit test @param data The data to set
(final String data)
| 737 | * @param data The data to set |
| 738 | */ |
| 739 | private void setData(final String data) throws Exception { |
| 740 | final InputStream istream = new ByteArrayInputStream( |
| 741 | data.getBytes(Charset.forName("UTF-8"))); |
| 742 | BufferedReader reader = new BufferedReader(new InputStreamReader(istream)); |
| 743 | |
| 744 | PowerMockito.doReturn(reader).when(TextImporter.class, |
| 745 | PowerMockito.method(TextImporter.class, "open", String.class)) |
| 746 | .withArguments(anyString()); |
| 747 | } |
| 748 | } |
no test coverage detected