mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
增加ContentType新的构建方法的单元测试
This commit is contained in:
parent
e04789c322
commit
121bcc159e
@ -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