package com.fanruan.api.util; import com.fanruan.api.Prepare; import org.junit.Assert; import org.junit.Test; import sun.nio.cs.ext.GBK; import java.nio.charset.StandardCharsets; /** * @author richie * @version 10.0 * Created by richie on 2019-08-16 */ public class IOKitTest extends Prepare { @Test public void testEncode() { Assert.assertEquals("UTF-8", StandardCharsets.UTF_8.toString()); } @Test public void testReadResourceAsString() { String text = IOKit.readResourceAsString("/com/fanruan/api/util/iokit.txt"); Assert.assertEquals("Hello World!", text); } }