use of io.restassured.mapper.factory.DefaultJackson2ObjectMapperFactory in project rest-assured by rest-assured.
the class MultiPartUploadITest method multiPartSupportsSpecifyingAnObjectMapperToMultiPartSpecBuilder.
@Test
public void multiPartSupportsSpecifyingAnObjectMapperToMultiPartSpecBuilder() throws Exception {
// Given
final Greeting greeting = new Greeting();
greeting.setFirstName("John");
greeting.setLastName("Doe");
// When
given().multiPart(new MultiPartSpecBuilder(greeting, new Jackson2Mapper(new DefaultJackson2ObjectMapperFactory())).fileName("RoleBasedAccessFeaturePlan.csv").controlName("text").mimeType("application/vnd.ms-excel").build()).when().post("/multipart/text").then().statusCode(200).body(containsString("John"), containsString("Doe"), containsString("{"));
}
Aggregations