public void TestEnumToJson() { var h = new HaveEnum() { Id = 3, Code = TypeCode.Char }; var str = h.ToJsonString(); Assert.AreEqual("{\"id\":3,\"code\":\"Char\"}", str); }