package com.kwan.springbootkwan.utils; import com.kwan.springbootkwan.SpringBootKwanApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest @ContextConfiguration(classes = SpringBootKwanApplication.class) public class PinyinUtilTest { @Test public void testName() { assert "ceshi".equals(PinyinUtil.getPinyin("测试")); } }