api

http4k / org.http4k.testing / NamedResourceApprover

NamedResourceApprover

class NamedResourceApprover : Approver (source)

Constructors

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

Functions

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

Extension Functions

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