MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / setData

Method setData

test/tools/TestTextImporter.java:739–747  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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}

Calls 2

methodMethod · 0.80
getBytesMethod · 0.45

Tested by

no test coverage detected