public void Constructor_JArray_Test() { var jArr = new JArray(1, 2); var j = new WFJson(jArr); Assert.AreEqual(j.ToString(), "[1,2]"); }
public void Constructor_New_Test() { WFJson j = null; j = new WFJson(); Assert.AreEqual(j.ToString(), "{}", "create a empty JsonObject fail"); }
public void Constructor_JObject_Test() { var jobj = new JObject(new JProperty("a", 1)); var j = new WFJson(jobj); Assert.AreEqual(j.ToString(), "{\"a\":1}", "create a JosnObject with JObject fail"); }
public void Add_WFJson_Test() { var j = WFJson.Parse("[]"); var a = new WFJson("sd"); j.Add(a); Assert.AreEqual(j[0].ToString(), a.ToString()); }