Esempio n. 1
0
 public void TestFromJsonWithIEnumerable()
 {
     Assert.AreEqual("new Tests.New.GenericField<System.Collections.Generic.IEnumerable<System.Int32>>\n{\nValll = new System.Collections.Generic.List<System.Int32>\n{\n5\n}\n}", Cd2Cd.GenerateFromJson <GenericField <IEnumerable <int> > >("{\"Valll\":[5]}"));
 }
Esempio n. 2
0
 public void TestFromJsonWithEnumAsByte()
 {
     Assert.AreEqual("new Tests.New.GenericField<Tests.New.AnEnum>\n{\nValll = (Tests.New.AnEnum)1\n}", Cd2Cd.GenerateFromJson <GenericField <AnEnum> >("{\"Valll\":1}"));
 }
Esempio n. 3
0
 public void TestFromJsonWithNull()
 {
     Assert.AreEqual("new Tests.New.GenericField<System.Nullable<System.Int32>>\n{\nValll = null\n}", Cd2Cd.GenerateFromJson <GenericField <int?> >("{\"Valll\":null}"));
 }