Add test for array as root element in TestJsonCreateStore()

user_profiles
Justin Clark-Casey (justincc) 2013-02-13 00:51:45 +00:00
parent 3e9f3c0383
commit 70e641c708
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]