diff --git a/hutool-http/src/test/java/cn/hutool/http/ContentTypeTest.java b/hutool-http/src/test/java/cn/hutool/http/ContentTypeTest.java new file mode 100644 index 000000000..1d03c44eb --- /dev/null +++ b/hutool-http/src/test/java/cn/hutool/http/ContentTypeTest.java @@ -0,0 +1,19 @@ +package cn.hutool.http; + +import cn.hutool.core.util.CharsetUtil; +import org.junit.Assert; +import org.junit.Test; + +/** + * ContentType 单元测试 + * + * + */ +public class ContentTypeTest { + + @Test + public void testBuild() { + String result = ContentType.build(ContentType.JSON, CharsetUtil.CHARSET_UTF_8); + Assert.assertEquals("application/json;charset=UTF-8", result); + } +}