public void RawClone()
    {
      JRaw r1 = new JRaw("raw1");
      JToken r2 = r1.CloneToken();

      Assert.IsInstanceOfType(typeof(JRaw), r2);
    }
    public void RawEquals()
    {
      JRaw r1 = new JRaw("raw1");
      JRaw r2 = new JRaw("raw1");
      JRaw r3 = new JRaw("raw2");

      Assert.IsTrue(JToken.DeepEquals(r1, r2));
      Assert.IsFalse(JToken.DeepEquals(r1, r3));
    }
    public void RawChildValues()
    {
      JObject o = new JObject();
      o["val1"] = new JRaw("1");
      o["val2"] = new JRaw("1");

      string json = o.ToString();

      Assert.AreEqual(@"{
  ""val1"": 1,
  ""val2"": 1
}", json);
    }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JRaw"/> class from another <see cref="JRaw"/> object.
 /// </summary>
 /// <param name="other">A <see cref="JRaw"/> object to copy from.</param>
 public JRaw(JRaw other)
   : base(other)
 {
 }