use of ddf.mime.MimeTypeMapper in project ddf by codice.
the class MimeTypeMapperTest method testMultipleResolvers.
@Test
public void testMultipleResolvers() throws Exception {
MimeTypeMapper mapper = new MimeTypeMapperImpl(MOCK_MIME_TYPE_RESOLVERS);
String fileExtension = mapper.getFileExtensionForMimeType("image/nitf");
LOGGER.debug("fileExtension = {}", fileExtension);
assertEquals(".nitf", fileExtension);
}
use of ddf.mime.MimeTypeMapper in project ddf by codice.
the class MimeTypeMapperTest method testSingleResolver.
@Test
public void testSingleResolver() throws Exception {
MimeTypeMapper mapper = new MimeTypeMapperImpl(MOCK_MIME_TYPE_RESOLVERS);
String fileExtension = mapper.getFileExtensionForMimeType("image/nitf");
LOGGER.debug("fileExtension = {}", fileExtension);
assertEquals(".nitf", fileExtension);
}
Aggregations