aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs28
1 files changed, 20 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
index 2af3afc..98d8ff6 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
@@ -224,18 +224,30 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
224 TestHelpers.InMethod(); 224 TestHelpers.InMethod();
225// TestHelpers.EnableLogging(); 225// TestHelpers.EnableLogging();
226 226
227 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); 227 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
228 228
229 int result = (int)InvokeOp("JsonTestPath", storeId, "Hello"); 229 {
230 Assert.That(result, Is.EqualTo(1)); 230 int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World");
231 Assert.That(result, Is.EqualTo(1));
232 }
233
234 // Test for path which does not resolve to a value.
235 {
236 int result = (int)InvokeOp("JsonTestPath", storeId, "Hello");
237 Assert.That(result, Is.EqualTo(0));
238 }
231 239
232 int result2 = (int)InvokeOp("JsonTestPath", storeId, "foo"); 240 {
233 Assert.That(result2, Is.EqualTo(0)); 241 int result2 = (int)InvokeOp("JsonTestPath", storeId, "foo");
242 Assert.That(result2, Is.EqualTo(0));
243 }
234 244
235 // Test with fake store 245 // Test with fake store
236 UUID fakeStoreId = TestHelpers.ParseTail(0x500); 246 {
237 int fakeStoreValueRemove = (int)InvokeOp("JsonTestPath", fakeStoreId, "Hello"); 247 UUID fakeStoreId = TestHelpers.ParseTail(0x500);
238 Assert.That(fakeStoreValueRemove, Is.EqualTo(0)); 248 int fakeStoreValueRemove = (int)InvokeOp("JsonTestPath", fakeStoreId, "Hello");
249 Assert.That(fakeStoreValueRemove, Is.EqualTo(0));
250 }
239 } 251 }
240 252
241 [Test] 253 [Test]