JsonNodeTests UsingNonExistingIndexThrows Method Delta Engine Documentation

Namespace: DeltaEngine.Content.Json.Tests
Assembly: DeltaEngine.Content.Json.Tests (in DeltaEngine.Content.Json.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void UsingNonExistingIndexThrows()
Examples

[Test]
public void UsingNonExistingIndexThrows()
{
    var json = new JsonNode("{ \"layers\":[ { \"sky\":[1, 1] }, { \"ground\":[0, 0] } ] }");
    Assert.Throws<IndexOutOfRangeException>(() => Assert.NotNull(json["layers"][3]));
}
See Also