NamedResourceApprover

class NamedResourceApprover(name: String, approvalContent: ApprovalContent, approvalSource: ApprovalSource, transformer: ApprovalTransformer<*> = ApprovalTransformer.StringWithNormalisedLineEndings()) : Approver

Constructors

Link copied to clipboard
constructor(name: String, approvalContent: ApprovalContent, approvalSource: ApprovalSource, transformer: ApprovalTransformer<*> = ApprovalTransformer.StringWithNormalisedLineEndings())

Functions

Link copied to clipboard
open override fun <T : HttpMessage> assertApproved(httpMessage: T)

Check the content of the passed message against the previously approved content.

Link copied to clipboard
fun Approver.assertApproved(content: InputStream, contentType: ContentType? = null)
fun Approver.assertApproved(content: String, contentType: ContentType? = null)
fun Approver.assertApproved(response: Response, expectedStatus: Status)
Link copied to clipboard

Create a Hamkrest Matcher for this message that can be combined with other Matchers

Link copied to clipboard
open override fun withNameSuffix(suffix: String): NamedResourceApprover