Add test for array as root element in TestJsonCreateStore()

0.7.4-extended
Justin Clark-Casey (justincc) 2013-02-13 00:51:45 +00:00
parent 50811b02ab
commit 3fdeb559f0
1 changed files with 9 additions and 0 deletions

View File

@ -135,6 +135,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
string value = (string)InvokeOp("JsonGetValue", storeId, "Hello");
Assert.That(value, Is.EqualTo("42.15"));
}
// Test with an array as the root node
{
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "[ 'one', 'two', 'three' ]");
Assert.That(storeId, Is.Not.EqualTo(UUID.Zero));
string value = (string)InvokeOp("JsonGetValue", storeId, "[1]");
Assert.That(value, Is.EqualTo("two"));
}
}
[Test]