use of org.springframework.core.io.buffer.DataBufferUtils in project spring-framework by spring-projects.
the class DefaultPartHttpMessageReaderTests method noHeaders.
@ParameterizedDefaultPartHttpMessageReaderTest
public void noHeaders(String displayName, DefaultPartHttpMessageReader reader) {
MockServerHttpRequest request = createRequest(new ClassPathResource("no-header.multipart", getClass()), "boundary");
Flux<Part> result = reader.read(forClass(Part.class), request, emptyMap());
StepVerifier.create(result).consumeNextWith(part -> {
assertThat(part.headers()).isEmpty();
part.content().subscribe(DataBufferUtils::release);
}).verifyComplete();
}
Aggregations