Search in sources :

Example 1 with ContentTypeResolver

use of com.vaadin.flow.function.ContentTypeResolver in project flow by vaadin.

the class StreamResourceTest method getDefaultContentTypeResolver.

@Test
public void getDefaultContentTypeResolver() {
    StreamResource resource = new StreamResource("foo", () -> makeEmptyStream());
    ContentTypeResolver resolver = resource.getContentTypeResolver();
    Assert.assertNotNull(resolver);
    assertContentType(resource, resolver);
}
Also used : StreamResource(com.vaadin.flow.server.StreamResource) ContentTypeResolver(com.vaadin.flow.function.ContentTypeResolver) Test(org.junit.Test)

Aggregations

ContentTypeResolver (com.vaadin.flow.function.ContentTypeResolver)1 StreamResource (com.vaadin.flow.server.StreamResource)1 Test (org.junit.Test)1