November 2024
Intermediate to advanced
300 pages
7h 12m
English
The Search class requires you to pass an InputStream on a Search object through its constructor. Your test builds an InputStream in two places. The first construction requires three statements:
| | var 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."; |
| | var bytes = pageContent.getBytes(); |
| | var stream = new ByteArrayInputStream(bytes); |
The test contains implementation detail specifics ...
Read now
Unlock full access