package com.atlassian.stash.internal.plugin;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public final class SimpleContentTypeResolverTest {

    @Test
    public void testGetContentType() throws Exception {
        final SimpleContentTypeResolver typeResolver = new SimpleContentTypeResolver();

        assertEquals("text/css", typeResolver.getContentType("http://localhost:42/test/static/main.css"));
        assertEquals("application/javascript", typeResolver.getContentType("http://localhost:42/test/static/test.js"));
        assertEquals("image/jpeg", typeResolver.getContentType("http://localhost:42/test/static/image.jpg"));
        assertEquals("image/png", typeResolver.getContentType("http://localhost:42/test/static/image.png"));
        assertEquals("application/pdf", typeResolver.getContentType("http://localhost:42/test/test.pdf"));
    }

}
