public static final class RqRegex.Fake extends Object implements RqRegex
Use this class in unit tests, when you need to create a fake version of a request with a matcher inside. For example:
new TkIndex().act( new RqRegex.Fake("/(.*)", "/hello") );
RqRegex.Fake
Constructor and Description |
---|
RqRegex.Fake(Request req,
String ptn,
String query)
Ctor.
|
RqRegex.Fake(String ptn,
String query)
Ctor.
|
public RqRegex.Fake(String ptn, String query)
ptn
- Patternquery
- Querypublic Matcher matcher()
RqRegex
public Iterable<String> head() throws IOException
Request
head
in interface Request
IOException
- If something goes wrongpublic InputStream body() throws IOException
Request
body
in interface Request
IOException
- If something goes wrongCopyright © 2015 Take. All rights reserved.