api

http4k / org.http4k.testing / NamedResourceApprover

NamedResourceApprover

class NamedResourceApprover : Approver

Constructors

Name Summary
<init> NamedResourceApprover(name: String, approvalContent: ApprovalContent, approvalSource: ApprovalSource)

Functions

Name Summary
assertApproved Check the content of the passed message against the previously approved content.fun <T : HttpMessage> assertApproved(httpMessage: T): Unit

Extension Functions

Name Summary
assertApproved fun Approver.assertApproved(response: Response, expectedStatus: Status): Unit
fun Approver.assertApproved(content: String): Unit
fun Approver.assertApproved(content: InputStream): Unit
hasApprovedContent Create a Hamkrest Matcher for this message that can be combined with other Matchersfun <T : HttpMessage> Approver.hasApprovedContent(): Matcher<T>