Reputation: 400
Where is this print() method defined? I can't seem to figure out where the actual method is? It just seems to work like magic. I know what an interface is. I'm asking explicitly, if I run er.response().getBody().print(); then where is the print method defined for RestAssured? I haven't overridden it.
public interface ResponseBody<T extends ResponseBody<T>> extends ResponseBodyExtractionOptions {
String print();
...
...
}
For example, I'm running:
er.response().getBody().print();
Yet none of the classes below print seem to have print defined.
Upvotes: 0
Views: 1084
Reputation: 400
Thanks for the stupid downvotes. In fact, you were wrong, this wasn't an interface question.
I appreciate Sotirios Delimanolis' comment, I did not know about the getClass() method.
Running this method revealed print() is defined in the String class.
Upvotes: 2