Browse Source

无jira任务 单元测试

new-design
vito 1 year ago
parent
commit
3a7fce0b20
  1. 9
      designer-base/src/test/java/com/fr/design/jxbrowser/MimeTypeTest.java

9
designer-base/src/test/java/com/fr/design/jxbrowser/MimeTypeTest.java

@ -13,9 +13,10 @@ public class MimeTypeTest {
@Test @Test
public void getMimeType() { public void getMimeType() {
Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.html")); Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.html"));
Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.html?a=ji")); Assert.assertEquals("truetype",
Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.xml?a=ji")); MimeType.parseMimeType("emb://com/fr/web/ui/resources?path=/com/fr/web/ui/font/iconfont.ttf"));
Assert.assertEquals("image/jpeg", MimeType.parseMimeType("http://a.jpg?a=ji")); Assert.assertEquals("font/woff",
Assert.assertEquals("image/jpeg", MimeType.parseMimeType("http://a.jpeg?a=ji")); MimeType.parseMimeType("http://a.html?path=com/fr/ui/a.woff"));
// 对资源来说不存在http://a.jpg?a=ji这种情况,之前多虑了
} }
} }
Loading…
Cancel
Save