aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
index a2d065c..de42e74 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
@@ -263,6 +263,38 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
263 } 263 }
264 264
265 [Test] 265 [Test]
266 public void TestJsonTestPathJson()
267 {
268 TestHelpers.InMethod();
269// TestHelpers.EnableLogging();
270
271 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
272
273 {
274 int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World");
275 Assert.That(result, Is.EqualTo(1));
276 }
277
278 // Test for path which does not resolve to a value.
279 {
280 int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello");
281 Assert.That(result, Is.EqualTo(1));
282 }
283
284 {
285 int result2 = (int)InvokeOp("JsonTestPathJson", storeId, "foo");
286 Assert.That(result2, Is.EqualTo(0));
287 }
288
289 // Test with fake store
290 {
291 UUID fakeStoreId = TestHelpers.ParseTail(0x500);
292 int fakeStoreValueRemove = (int)InvokeOp("JsonTestPathJson", fakeStoreId, "Hello");
293 Assert.That(fakeStoreValueRemove, Is.EqualTo(0));
294 }
295 }
296
297 [Test]
266 public void TestJsonSetValue() 298 public void TestJsonSetValue()
267 { 299 {
268 TestHelpers.InMethod(); 300 TestHelpers.InMethod();