-Added set indexer to JToken

This commit is contained in:
JamesNK
2009-09-18 21:38:50 +00:00
parent 379c3ce09b
commit fac4f481b3
8 changed files with 150 additions and 0 deletions
@@ -160,5 +160,13 @@ namespace Newtonsoft.Json.Tests.Linq
{
Assert.IsFalse((new JValue(5L)).HasValues);
}
[Test]
[ExpectedException(typeof(InvalidOperationException), ExpectedMessage = "Cannot set child value on Newtonsoft.Json.Linq.JValue.")]
public void SetValue()
{
JToken t = new JValue(5L);
t[0] = new JValue(3);
}
}
}