mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
Add test for array as root element in TestJsonCreateStore()
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user