public void IListContains()
    {
      JProperty p = new JProperty("Test", 1);
      IList l = new JObject(p);

      Assert.IsTrue(l.Contains(p));
      Assert.IsFalse(l.Contains(new JProperty("Test", 1)));
    }
    public void IListRemove()
    {
      JProperty p1 = new JProperty("Test1", 1);
      JProperty p2 = new JProperty("Test2", "Two");
      IList l = new JObject(p1, p2);

      JProperty p3 = new JProperty("Test3", "III");

      // won't do anything
      l.Remove(p3);
      Assert.AreEqual(2, l.Count);

      l.Remove(p1);
      Assert.AreEqual(1, l.Count);
      Assert.IsFalse(l.Contains(p1));
      Assert.IsTrue(l.Contains(p2));

      l.Remove(p2);
      Assert.AreEqual(0, l.Count);
      Assert.IsFalse(l.Contains(p2));
      Assert.AreEqual(null, p2.Parent);
    }
    public void GenericListJTokenContains()
    {
      JProperty p = new JProperty("Test", 1);
      IList<JToken> l = new JObject(p);

      Assert.IsTrue(l.Contains(p));
      Assert.IsFalse(l.Contains(new JProperty("Test", 1)));
    }