mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
Merge pull request #1900 from lnsane/增加ContentType新的构建方法的单元测试
增加ContentType新的构建方法的单元测试
This commit is contained in:
commit
f966fda28f
@ -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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user