Merge pull request #1900 from lnsane/增加ContentType新的构建方法的单元测试

增加ContentType新的构建方法的单元测试
This commit is contained in:
Golden Looly 2021-10-18 23:29:25 +08:00 committed by GitHub
commit f966fda28f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}