March 2015
Intermediate to advanced
236 pages
5h 26m
English
We must pass an InputStream to a Search object through its constructor. Our test builds an InputStream in two places. The first construction requires three statements:
| iloveyouboss/test-4/test/util/SearchTest.java | |
| | String pageContent = "There are certain queer times and occasions " |
| | + "in this strange mixed affair we call life when a man " |
| | + "takes this whole universe for a vast practical joke, " |
| | + "though the wit thereof he but dimly discerns, and more " |
| | + "than suspects that the joke is at nobody's expense but " |
| | + "his own."; |
| | byte[] bytes = pageContent.getBytes(); |
| | ByteArrayInputStream stream = new ByteArrayInputStream(bytes); |
As in our earlier example, where you introduced ...
Read now
Unlock full access