mirror of
				https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
				synced 2025-10-31 02:16:18 +08:00 
			
		
		
		
	add test
This commit is contained in:
		| @@ -1,9 +1,11 @@ | ||||
| package love.sola.netsupport.wechat; | ||||
|  | ||||
| import com.google.gson.*; | ||||
| import lombok.Data; | ||||
| import love.sola.netsupport.config.Lang; | ||||
| import love.sola.netsupport.enums.ISP; | ||||
| import org.junit.Test; | ||||
| import org.yaml.snakeyaml.Yaml; | ||||
|  | ||||
| import java.text.MessageFormat; | ||||
| import java.util.Date; | ||||
| @@ -40,4 +42,14 @@ public class TestMessageFormat { | ||||
| 		assert "15838838438".equals(MessageFormat.format("{0,number,#}", 15838838438L)); | ||||
| 	} | ||||
|  | ||||
| 	@Test | ||||
| 	public void testYaml() { | ||||
| 		assert new Yaml().loadAs("array: \n  - \"err\"\n  - \"ee\"", TestArray.class).array.length == 2; | ||||
| 	} | ||||
|  | ||||
| 	@Data | ||||
| 	public static class TestArray { | ||||
| 		String[] array; | ||||
| 	} | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sola
					Sola