Example usage for org.springframework.restdocs.operation OperationRequestPart getContentAsString

List of usage examples for org.springframework.restdocs.operation OperationRequestPart getContentAsString

Introduction

In this page you can find the example usage for org.springframework.restdocs.operation OperationRequestPart getContentAsString.

Prototype

String getContentAsString();

Source Link

Document

Returns the content of the part as a String .

Usage

From source file:io.github.restdocsext.jersey.operation.preprocess.BinaryPartPlaceholderOperationPreprocessorTest.java

private boolean hasPart(Collection<OperationRequestPart> parts, String name, String content) {
    for (OperationRequestPart part : parts) {
        if (name.equals(part.getName()) && content.equals(part.getContentAsString())) {
            return true;
        }//from   w w w.  ja  v  a  2 s .c o m
    }
    return false;
}

From source file:io.github.restdocsext.jersey.JerseyRequestConverterTest.java

private boolean hasPart(List<OperationRequestPart> parts, String name, String content) {
    for (OperationRequestPart part : parts) {
        if (name.equals(part.getName()) && content.equals(part.getContentAsString())) {
            return true;
        }/*www.  j a  v a 2 s  . co m*/
    }
    return false;
}