diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index 99a7076..77ee785 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | |||
@@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
180 | TestHelpers.InMethod(); | 180 | TestHelpers.InMethod(); |
181 | // TestHelpers.EnableLogging(); | 181 | // TestHelpers.EnableLogging(); |
182 | 182 | ||
183 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); | 183 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); |
184 | 184 | ||
185 | { | 185 | { |
186 | string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World"); | 186 | string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World"); |
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
213 | TestHelpers.InMethod(); | 213 | TestHelpers.InMethod(); |
214 | // TestHelpers.EnableLogging(); | 214 | // TestHelpers.EnableLogging(); |
215 | 215 | ||
216 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); | 216 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); |
217 | 217 | ||
218 | { | 218 | { |
219 | string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World"); | 219 | string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World"); |
@@ -246,11 +246,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
246 | // TestHelpers.InMethod(); | 246 | // TestHelpers.InMethod(); |
247 | //// TestHelpers.EnableLogging(); | 247 | //// TestHelpers.EnableLogging(); |
248 | // | 248 | // |
249 | // UUID storeId | 249 | // UUID storeId |
250 | // = (UUID)m_smcm.InvokeOperation( | 250 | // = (UUID)m_smcm.InvokeOperation( |
251 | // UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); | 251 | // UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); |
252 | // | 252 | // |
253 | // string value | 253 | // string value |
254 | // = (string)m_smcm.InvokeOperation( | 254 | // = (string)m_smcm.InvokeOperation( |
255 | // UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" }); | 255 | // UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" }); |
256 | // | 256 | // |
@@ -271,7 +271,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
271 | 271 | ||
272 | // Test remove of node in object pointing to a string | 272 | // Test remove of node in object pointing to a string |
273 | { | 273 | { |
274 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); | 274 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); |
275 | 275 | ||
276 | int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); | 276 | int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); |
277 | Assert.That(returnValue, Is.EqualTo(1)); | 277 | Assert.That(returnValue, Is.EqualTo(1)); |
@@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
285 | 285 | ||
286 | // Test remove of node in object pointing to another object | 286 | // Test remove of node in object pointing to another object |
287 | { | 287 | { |
288 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }"); | 288 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }"); |
289 | 289 | ||
290 | int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); | 290 | int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); |
291 | Assert.That(returnValue, Is.EqualTo(1)); | 291 | Assert.That(returnValue, Is.EqualTo(1)); |
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
299 | 299 | ||
300 | // Test remove of node in an array | 300 | // Test remove of node in an array |
301 | { | 301 | { |
302 | UUID storeId | 302 | UUID storeId |
303 | = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }"); | 303 | = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }"); |
304 | 304 | ||
305 | int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]"); | 305 | int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]"); |
@@ -320,7 +320,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
320 | 320 | ||
321 | // Test remove of non-existing value | 321 | // Test remove of non-existing value |
322 | { | 322 | { |
323 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); | 323 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); |
324 | 324 | ||
325 | int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese"); | 325 | int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese"); |
326 | Assert.That(fakeValueRemove, Is.EqualTo(0)); | 326 | Assert.That(fakeValueRemove, Is.EqualTo(0)); |
@@ -340,7 +340,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
340 | // TestHelpers.InMethod(); | 340 | // TestHelpers.InMethod(); |
341 | //// TestHelpers.EnableLogging(); | 341 | //// TestHelpers.EnableLogging(); |
342 | // | 342 | // |
343 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); | 343 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); |
344 | // | 344 | // |
345 | // { | 345 | // { |
346 | // int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World"); | 346 | // int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World"); |
@@ -372,7 +372,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
372 | // TestHelpers.InMethod(); | 372 | // TestHelpers.InMethod(); |
373 | //// TestHelpers.EnableLogging(); | 373 | //// TestHelpers.EnableLogging(); |
374 | // | 374 | // |
375 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); | 375 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); |
376 | // | 376 | // |
377 | // { | 377 | // { |
378 | // int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World"); | 378 | // int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World"); |
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
437 | TestHelpers.InMethod(); | 437 | TestHelpers.InMethod(); |
438 | // TestHelpers.EnableLogging(); | 438 | // TestHelpers.EnableLogging(); |
439 | 439 | ||
440 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }"); | 440 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }"); |
441 | 441 | ||
442 | { | 442 | { |
443 | int result = (int)InvokeOp("JsonGetNodeType", storeId, "."); | 443 | int result = (int)InvokeOp("JsonGetNodeType", storeId, "."); |
@@ -509,7 +509,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
509 | // TestHelpers.EnableLogging(); | 509 | // TestHelpers.EnableLogging(); |
510 | 510 | ||
511 | { | 511 | { |
512 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 512 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
513 | 513 | ||
514 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times"); | 514 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times"); |
515 | Assert.That(result, Is.EqualTo(1)); | 515 | Assert.That(result, Is.EqualTo(1)); |
@@ -520,7 +520,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
520 | 520 | ||
521 | // Test setting a key containing periods with delineation | 521 | // Test setting a key containing periods with delineation |
522 | { | 522 | { |
523 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 523 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
524 | 524 | ||
525 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times"); | 525 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times"); |
526 | Assert.That(result, Is.EqualTo(1)); | 526 | Assert.That(result, Is.EqualTo(1)); |
@@ -533,7 +533,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
533 | 533 | ||
534 | // Test setting a key containing unbalanced ] without delineation. Expecting failure | 534 | // Test setting a key containing unbalanced ] without delineation. Expecting failure |
535 | { | 535 | { |
536 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 536 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
537 | 537 | ||
538 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times"); | 538 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times"); |
539 | Assert.That(result, Is.EqualTo(0)); | 539 | Assert.That(result, Is.EqualTo(0)); |
@@ -544,7 +544,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
544 | 544 | ||
545 | // Test setting a key containing unbalanced [ without delineation. Expecting failure | 545 | // Test setting a key containing unbalanced [ without delineation. Expecting failure |
546 | { | 546 | { |
547 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 547 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
548 | 548 | ||
549 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times"); | 549 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times"); |
550 | Assert.That(result, Is.EqualTo(0)); | 550 | Assert.That(result, Is.EqualTo(0)); |
@@ -555,7 +555,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
555 | 555 | ||
556 | // Test setting a key containing unbalanced [] without delineation. Expecting failure | 556 | // Test setting a key containing unbalanced [] without delineation. Expecting failure |
557 | { | 557 | { |
558 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 558 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
559 | 559 | ||
560 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times"); | 560 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times"); |
561 | Assert.That(result, Is.EqualTo(0)); | 561 | Assert.That(result, Is.EqualTo(0)); |
@@ -566,7 +566,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
566 | 566 | ||
567 | // Test setting a key containing unbalanced ] with delineation | 567 | // Test setting a key containing unbalanced ] with delineation |
568 | { | 568 | { |
569 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 569 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
570 | 570 | ||
571 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times"); | 571 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times"); |
572 | Assert.That(result, Is.EqualTo(1)); | 572 | Assert.That(result, Is.EqualTo(1)); |
@@ -577,7 +577,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
577 | 577 | ||
578 | // Test setting a key containing unbalanced [ with delineation | 578 | // Test setting a key containing unbalanced [ with delineation |
579 | { | 579 | { |
580 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 580 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
581 | 581 | ||
582 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times"); | 582 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times"); |
583 | Assert.That(result, Is.EqualTo(1)); | 583 | Assert.That(result, Is.EqualTo(1)); |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
588 | 588 | ||
589 | // Test setting a key containing empty balanced [] with delineation | 589 | // Test setting a key containing empty balanced [] with delineation |
590 | { | 590 | { |
591 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 591 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
592 | 592 | ||
593 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times"); | 593 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times"); |
594 | Assert.That(result, Is.EqualTo(1)); | 594 | Assert.That(result, Is.EqualTo(1)); |
@@ -600,7 +600,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
600 | // // Commented out as this currently unexpectedly fails. | 600 | // // Commented out as this currently unexpectedly fails. |
601 | // // Test setting a key containing brackets around an integer with delineation | 601 | // // Test setting a key containing brackets around an integer with delineation |
602 | // { | 602 | // { |
603 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 603 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
604 | // | 604 | // |
605 | // int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times"); | 605 | // int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times"); |
606 | // Assert.That(result, Is.EqualTo(1)); | 606 | // Assert.That(result, Is.EqualTo(1)); |
@@ -610,10 +610,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
610 | // } | 610 | // } |
611 | 611 | ||
612 | // *** Test {} *** | 612 | // *** Test {} *** |
613 | 613 | ||
614 | // Test setting a key containing unbalanced } without delineation. Expecting failure (?) | 614 | // Test setting a key containing unbalanced } without delineation. Expecting failure (?) |
615 | { | 615 | { |
616 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 616 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
617 | 617 | ||
618 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times"); | 618 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times"); |
619 | Assert.That(result, Is.EqualTo(0)); | 619 | Assert.That(result, Is.EqualTo(0)); |
@@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
624 | 624 | ||
625 | // Test setting a key containing unbalanced { without delineation. Expecting failure (?) | 625 | // Test setting a key containing unbalanced { without delineation. Expecting failure (?) |
626 | { | 626 | { |
627 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 627 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
628 | 628 | ||
629 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times"); | 629 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times"); |
630 | Assert.That(result, Is.EqualTo(0)); | 630 | Assert.That(result, Is.EqualTo(0)); |
@@ -636,7 +636,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
636 | // // Commented out as this currently unexpectedly fails. | 636 | // // Commented out as this currently unexpectedly fails. |
637 | // // Test setting a key containing unbalanced } | 637 | // // Test setting a key containing unbalanced } |
638 | // { | 638 | // { |
639 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 639 | // UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
640 | // | 640 | // |
641 | // int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times"); | 641 | // int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times"); |
642 | // Assert.That(result, Is.EqualTo(0)); | 642 | // Assert.That(result, Is.EqualTo(0)); |
@@ -644,7 +644,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
644 | 644 | ||
645 | // Test setting a key containing unbalanced { with delineation | 645 | // Test setting a key containing unbalanced { with delineation |
646 | { | 646 | { |
647 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 647 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
648 | 648 | ||
649 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times"); | 649 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times"); |
650 | Assert.That(result, Is.EqualTo(1)); | 650 | Assert.That(result, Is.EqualTo(1)); |
@@ -655,7 +655,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
655 | 655 | ||
656 | // Test setting a key containing balanced {} with delineation. This should fail. | 656 | // Test setting a key containing balanced {} with delineation. This should fail. |
657 | { | 657 | { |
658 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 658 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
659 | 659 | ||
660 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times"); | 660 | int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times"); |
661 | Assert.That(result, Is.EqualTo(0)); | 661 | Assert.That(result, Is.EqualTo(0)); |
@@ -666,7 +666,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
666 | 666 | ||
667 | // Test setting to location that does not exist. This should fail. | 667 | // Test setting to location that does not exist. This should fail. |
668 | { | 668 | { |
669 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 669 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
670 | 670 | ||
671 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times"); | 671 | int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times"); |
672 | Assert.That(result, Is.EqualTo(0)); | 672 | Assert.That(result, Is.EqualTo(0)); |
@@ -691,7 +691,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
691 | 691 | ||
692 | // Single quoted token case | 692 | // Single quoted token case |
693 | { | 693 | { |
694 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); | 694 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); |
695 | 695 | ||
696 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'"); | 696 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'"); |
697 | Assert.That(result, Is.EqualTo(1)); | 697 | Assert.That(result, Is.EqualTo(1)); |
@@ -702,7 +702,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
702 | 702 | ||
703 | // Sub-tree case | 703 | // Sub-tree case |
704 | { | 704 | { |
705 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); | 705 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); |
706 | 706 | ||
707 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }"); | 707 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }"); |
708 | Assert.That(result, Is.EqualTo(1)); | 708 | Assert.That(result, Is.EqualTo(1)); |
@@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
713 | 713 | ||
714 | // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings. | 714 | // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings. |
715 | { | 715 | { |
716 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); | 716 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); |
717 | 717 | ||
718 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times"); | 718 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times"); |
719 | Assert.That(result, Is.EqualTo(0)); | 719 | Assert.That(result, Is.EqualTo(0)); |
@@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
724 | 724 | ||
725 | // Test setting to location that does not exist. This should fail. | 725 | // Test setting to location that does not exist. This should fail. |
726 | { | 726 | { |
727 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); | 727 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); |
728 | 728 | ||
729 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'"); | 729 | int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'"); |
730 | Assert.That(result, Is.EqualTo(0)); | 730 | Assert.That(result, Is.EqualTo(0)); |
@@ -757,7 +757,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
757 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); | 757 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); |
758 | m_scene.AddSceneObject(so); | 758 | m_scene.AddSceneObject(so); |
759 | 759 | ||
760 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); | 760 | UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); |
761 | 761 | ||
762 | { | 762 | { |
763 | string notecardName = "nc1"; | 763 | string notecardName = "nc1"; |
@@ -820,14 +820,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
820 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); | 820 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); |
821 | m_scene.AddSceneObject(so); | 821 | m_scene.AddSceneObject(so); |
822 | 822 | ||
823 | UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); | 823 | UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); |
824 | 824 | ||
825 | // Write notecard | 825 | // Write notecard |
826 | InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName); | 826 | InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName); |
827 | 827 | ||
828 | { | 828 | { |
829 | // Read notecard | 829 | // Read notecard |
830 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 830 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
831 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName); | 831 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName); |
832 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); | 832 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); |
833 | 833 | ||
@@ -837,10 +837,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
837 | 837 | ||
838 | { | 838 | { |
839 | // Read notecard to new single component path | 839 | // Read notecard to new single component path |
840 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 840 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
841 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName); | 841 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName); |
842 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); | 842 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); |
843 | 843 | ||
844 | string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); | 844 | string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); |
845 | Assert.That(value, Is.EqualTo("")); | 845 | Assert.That(value, Is.EqualTo("")); |
846 | 846 | ||
@@ -850,7 +850,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
850 | 850 | ||
851 | { | 851 | { |
852 | // Read notecard to new multi-component path. This should not work. | 852 | // Read notecard to new multi-component path. This should not work. |
853 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); | 853 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); |
854 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); | 854 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); |
855 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); | 855 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); |
856 | 856 | ||
@@ -863,7 +863,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
863 | 863 | ||
864 | { | 864 | { |
865 | // Read notecard to existing multi-component path. This should work | 865 | // Read notecard to existing multi-component path. This should work |
866 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); | 866 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); |
867 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); | 867 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); |
868 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); | 868 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); |
869 | 869 | ||
@@ -876,7 +876,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
876 | 876 | ||
877 | { | 877 | { |
878 | // Read notecard to invalid path. This should not work. | 878 | // Read notecard to invalid path. This should not work. |
879 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); | 879 | UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); |
880 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName); | 880 | UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName); |
881 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); | 881 | Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); |
882 | 882 | ||