mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
This commit is contained in:
@@ -270,7 +270,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
///
|
||||
/// </summary>
|
||||
// -----------------------------------------------------------------
|
||||
public JsonStoreNodeType PathType(UUID storeID, string path)
|
||||
public JsonStoreNodeType GetPathType(UUID storeID, string path)
|
||||
{
|
||||
if (! m_enabled) return JsonStoreNodeType.Undefined;
|
||||
|
||||
@@ -407,7 +407,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
///
|
||||
/// </summary>
|
||||
// -----------------------------------------------------------------
|
||||
public int ArrayLength(UUID storeID, string path)
|
||||
public int GetArrayLength(UUID storeID, string path)
|
||||
{
|
||||
if (! m_enabled) return -1;
|
||||
|
||||
|
||||
@@ -215,19 +215,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
|
||||
#endregion
|
||||
|
||||
#region ScriptConstantInteface
|
||||
#region ScriptConstantsInterface
|
||||
|
||||
[ScriptConstant]
|
||||
public static readonly int JSONTYPEUNDEF = (int)JsonStoreNodeType.Undefined;
|
||||
public static readonly int JSON_TYPE_UNDEF = (int)JsonStoreNodeType.Undefined;
|
||||
|
||||
[ScriptConstant]
|
||||
public static readonly int JSONTYPEOBJECT = (int)JsonStoreNodeType.Object;
|
||||
public static readonly int JSON_TYPE_OBJECT = (int)JsonStoreNodeType.Object;
|
||||
|
||||
[ScriptConstant]
|
||||
public static readonly int JSONTYPEARRAY = (int)JsonStoreNodeType.Array;
|
||||
public static readonly int JSON_TYPE_ARRAY = (int)JsonStoreNodeType.Array;
|
||||
|
||||
[ScriptConstant]
|
||||
public static readonly int JSONTYPEVALUE = (int)JsonStoreNodeType.Value;
|
||||
public static readonly int JSON_TYPE_VALUE = (int)JsonStoreNodeType.Value;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -336,9 +336,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
/// </summary>
|
||||
// -----------------------------------------------------------------
|
||||
[ScriptInvocation]
|
||||
public int JsonPathType(UUID hostID, UUID scriptID, UUID storeID, string path)
|
||||
public int JsonGetPathType(UUID hostID, UUID scriptID, UUID storeID, string path)
|
||||
{
|
||||
return (int)m_store.PathType(storeID,path);
|
||||
return (int)m_store.GetPathType(storeID,path);
|
||||
}
|
||||
|
||||
[ScriptInvocation]
|
||||
@@ -365,7 +365,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
}
|
||||
|
||||
[ScriptInvocation]
|
||||
public int JsonSetValueJson(UUID hostID, UUID scriptID, UUID storeID, string path, string value)
|
||||
public int JsonSetJson(UUID hostID, UUID scriptID, UUID storeID, string path, string value)
|
||||
{
|
||||
return m_store.SetValue(storeID,path,value,true) ? 1 : 0;
|
||||
}
|
||||
@@ -387,9 +387,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
/// </summary>
|
||||
// -----------------------------------------------------------------
|
||||
[ScriptInvocation]
|
||||
public int JsonArrayLength(UUID hostID, UUID scriptID, UUID storeID, string path)
|
||||
public int JsonGetArrayLength(UUID hostID, UUID scriptID, UUID storeID, string path)
|
||||
{
|
||||
return m_store.ArrayLength(storeID,path);
|
||||
return m_store.GetArrayLength(storeID,path);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
@@ -406,7 +406,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||
}
|
||||
|
||||
[ScriptInvocation]
|
||||
public string JsonGetValueJson(UUID hostID, UUID scriptID, UUID storeID, string path)
|
||||
public string JsonGetJson(UUID hostID, UUID scriptID, UUID storeID, string path)
|
||||
{
|
||||
string value = String.Empty;
|
||||
m_store.GetValue(storeID,path,true, out value);
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
private Scene m_scene;
|
||||
private MockScriptEngine m_engine;
|
||||
private ScriptModuleCommsModule m_smcm;
|
||||
private JsonStoreScriptModule m_jssm;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureInit()
|
||||
@@ -82,10 +83,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
m_engine = new MockScriptEngine();
|
||||
m_smcm = new ScriptModuleCommsModule();
|
||||
JsonStoreModule jsm = new JsonStoreModule();
|
||||
JsonStoreScriptModule jssm = new JsonStoreScriptModule();
|
||||
m_jssm = new JsonStoreScriptModule();
|
||||
|
||||
m_scene = new SceneHelpers().SetupScene();
|
||||
SceneHelpers.SetupSceneModules(m_scene, configSource, m_engine, m_smcm, jsm, jssm);
|
||||
SceneHelpers.SetupSceneModules(m_scene, configSource, m_engine, m_smcm, jsm, m_jssm);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -208,7 +209,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonGetValueJson()
|
||||
public void TestJsonGetJson()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
@@ -216,26 +217,26 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }");
|
||||
|
||||
{
|
||||
string value = (string)InvokeOp("JsonGetValueJson", storeId, "Hello.World");
|
||||
string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World");
|
||||
Assert.That(value, Is.EqualTo("'Two'"));
|
||||
}
|
||||
|
||||
// Test get of path section instead of leaf
|
||||
{
|
||||
string value = (string)InvokeOp("JsonGetValueJson", storeId, "Hello");
|
||||
string value = (string)InvokeOp("JsonGetJson", storeId, "Hello");
|
||||
Assert.That(value, Is.EqualTo("{\"World\":\"Two\"}"));
|
||||
}
|
||||
|
||||
// Test get of non-existing value
|
||||
{
|
||||
string fakeValueGet = (string)InvokeOp("JsonGetValueJson", storeId, "foo");
|
||||
string fakeValueGet = (string)InvokeOp("JsonGetJson", storeId, "foo");
|
||||
Assert.That(fakeValueGet, Is.EqualTo(""));
|
||||
}
|
||||
|
||||
// Test get from non-existing store
|
||||
{
|
||||
UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
string fakeStoreValueGet = (string)InvokeOp("JsonGetValueJson", fakeStoreId, "Hello");
|
||||
string fakeStoreValueGet = (string)InvokeOp("JsonGetJson", fakeStoreId, "Hello");
|
||||
Assert.That(fakeStoreValueGet, Is.EqualTo(""));
|
||||
}
|
||||
}
|
||||
@@ -293,7 +294,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
int result = (int)InvokeOp("JsonTestPath", storeId, "Hello");
|
||||
Assert.That(result, Is.EqualTo(0));
|
||||
|
||||
string returnValue2 = (string)InvokeOp("JsonGetValueJson", storeId, "Hello");
|
||||
string returnValue2 = (string)InvokeOp("JsonGetJson", storeId, "Hello");
|
||||
Assert.That(returnValue2, Is.EqualTo(""));
|
||||
}
|
||||
|
||||
@@ -314,7 +315,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
string stringReturnValue = (string)InvokeOp("JsonGetValue", storeId, "Hello[0]");
|
||||
Assert.That(stringReturnValue, Is.EqualTo("value2"));
|
||||
|
||||
stringReturnValue = (string)InvokeOp("JsonGetValueJson", storeId, "Hello[1]");
|
||||
stringReturnValue = (string)InvokeOp("JsonGetJson", storeId, "Hello[1]");
|
||||
Assert.That(stringReturnValue, Is.EqualTo(""));
|
||||
}
|
||||
|
||||
@@ -334,67 +335,171 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void TestJsonTestPath()
|
||||
// {
|
||||
// TestHelpers.InMethod();
|
||||
//// TestHelpers.EnableLogging();
|
||||
//
|
||||
// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
|
||||
//
|
||||
// {
|
||||
// int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World");
|
||||
// Assert.That(result, Is.EqualTo(1));
|
||||
// }
|
||||
//
|
||||
// // Test for path which does not resolve to a value.
|
||||
// {
|
||||
// int result = (int)InvokeOp("JsonTestPath", storeId, "Hello");
|
||||
// Assert.That(result, Is.EqualTo(0));
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// int result2 = (int)InvokeOp("JsonTestPath", storeId, "foo");
|
||||
// Assert.That(result2, Is.EqualTo(0));
|
||||
// }
|
||||
//
|
||||
// // Test with fake store
|
||||
// {
|
||||
// UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
// int fakeStoreValueRemove = (int)InvokeOp("JsonTestPath", fakeStoreId, "Hello");
|
||||
// Assert.That(fakeStoreValueRemove, Is.EqualTo(0));
|
||||
// }
|
||||
// }
|
||||
|
||||
// [Test]
|
||||
// public void TestJsonTestPathJson()
|
||||
// {
|
||||
// TestHelpers.InMethod();
|
||||
//// TestHelpers.EnableLogging();
|
||||
//
|
||||
// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
|
||||
//
|
||||
// {
|
||||
// int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World");
|
||||
// Assert.That(result, Is.EqualTo(1));
|
||||
// }
|
||||
//
|
||||
// // Test for path which does not resolve to a value.
|
||||
// {
|
||||
// int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello");
|
||||
// Assert.That(result, Is.EqualTo(1));
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// int result2 = (int)InvokeOp("JsonTestPathJson", storeId, "foo");
|
||||
// Assert.That(result2, Is.EqualTo(0));
|
||||
// }
|
||||
//
|
||||
// // Test with fake store
|
||||
// {
|
||||
// UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
// int fakeStoreValueRemove = (int)InvokeOp("JsonTestPathJson", fakeStoreId, "Hello");
|
||||
// Assert.That(fakeStoreValueRemove, Is.EqualTo(0));
|
||||
// }
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void TestJsonTestPath()
|
||||
public void TestGetArrayLength()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }");
|
||||
|
||||
{
|
||||
int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World");
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
int result = (int)InvokeOp("JsonGetArrayLength", storeId, "Hello.World");
|
||||
Assert.That(result, Is.EqualTo(2));
|
||||
}
|
||||
|
||||
// Test for path which does not resolve to a value.
|
||||
// Test path which is not an array
|
||||
{
|
||||
int result = (int)InvokeOp("JsonTestPath", storeId, "Hello");
|
||||
Assert.That(result, Is.EqualTo(0));
|
||||
int result = (int)InvokeOp("JsonGetArrayLength", storeId, "Hello");
|
||||
Assert.That(result, Is.EqualTo(-1));
|
||||
}
|
||||
|
||||
// Test fake path
|
||||
{
|
||||
int result2 = (int)InvokeOp("JsonTestPath", storeId, "foo");
|
||||
Assert.That(result2, Is.EqualTo(0));
|
||||
int result = (int)InvokeOp("JsonGetArrayLength", storeId, "foo");
|
||||
Assert.That(result, Is.EqualTo(-1));
|
||||
}
|
||||
|
||||
// Test with fake store
|
||||
// Test fake store
|
||||
{
|
||||
UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
int fakeStoreValueRemove = (int)InvokeOp("JsonTestPath", fakeStoreId, "Hello");
|
||||
Assert.That(fakeStoreValueRemove, Is.EqualTo(0));
|
||||
int result = (int)InvokeOp("JsonGetArrayLength", fakeStoreId, "Hello.World");
|
||||
Assert.That(result, Is.EqualTo(-1));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonTestPathJson()
|
||||
public void TestJsonGetPathType()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }");
|
||||
|
||||
{
|
||||
int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World");
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
// Test for path which does not resolve to a value.
|
||||
{
|
||||
int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello");
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
int result = (int)InvokeOp("JsonGetPathType", storeId, ".");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_OBJECT));
|
||||
}
|
||||
|
||||
{
|
||||
int result2 = (int)InvokeOp("JsonTestPathJson", storeId, "foo");
|
||||
Assert.That(result2, Is.EqualTo(0));
|
||||
int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_OBJECT));
|
||||
}
|
||||
|
||||
// Test with fake store
|
||||
{
|
||||
int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello.World");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_ARRAY));
|
||||
}
|
||||
|
||||
{
|
||||
int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello.World[0]");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_VALUE));
|
||||
}
|
||||
|
||||
{
|
||||
int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello.World[1]");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_VALUE));
|
||||
}
|
||||
|
||||
// Test for non-existant path
|
||||
{
|
||||
int result = (int)InvokeOp("JsonGetPathType", storeId, "foo");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_UNDEF));
|
||||
}
|
||||
|
||||
// Test for non-existant store
|
||||
{
|
||||
UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
int fakeStoreValueRemove = (int)InvokeOp("JsonTestPathJson", fakeStoreId, "Hello");
|
||||
Assert.That(fakeStoreValueRemove, Is.EqualTo(0));
|
||||
int result = (int)InvokeOp("JsonGetPathType", fakeStoreId, ".");
|
||||
Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_UNDEF));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonList2Path()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
|
||||
// Invoking these methods directly since I just couldn't get comms module invocation to work for some reason
|
||||
// - some confusion with the methods that take a params object[] invocation.
|
||||
{
|
||||
string result = m_jssm.JsonList2Path(UUID.Zero, UUID.Zero, new object[] { "foo" });
|
||||
Assert.That(result, Is.EqualTo("{foo}"));
|
||||
}
|
||||
|
||||
{
|
||||
string result = m_jssm.JsonList2Path(UUID.Zero, UUID.Zero, new object[] { "foo", "bar" });
|
||||
Assert.That(result, Is.EqualTo("{foo}.{bar}"));
|
||||
}
|
||||
|
||||
{
|
||||
string result = m_jssm.JsonList2Path(UUID.Zero, UUID.Zero, new object[] { "foo", 1, "bar" });
|
||||
Assert.That(result, Is.EqualTo("{foo}.[1].{bar}"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,17 +519,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
Assert.That(value, Is.EqualTo("Times"));
|
||||
}
|
||||
|
||||
// Commented out as this currently unexpectedly fails.
|
||||
// Test setting a key containing periods with delineation
|
||||
// {
|
||||
// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
|
||||
//
|
||||
// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times");
|
||||
// Assert.That(result, Is.EqualTo(1));
|
||||
//
|
||||
// string value = (string)InvokeOp("JsonGetValue", storeId, "{Fun.Circus}");
|
||||
// Assert.That(value, Is.EqualTo("Times"));
|
||||
// }
|
||||
{
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
|
||||
|
||||
int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times");
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
|
||||
string value = (string)InvokeOp("JsonGetValue", storeId, "{Fun.Circus}");
|
||||
Assert.That(value, Is.EqualTo("Times"));
|
||||
}
|
||||
|
||||
// *** Test [] ***
|
||||
|
||||
@@ -494,7 +598,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
Assert.That(value, Is.EqualTo("Times"));
|
||||
}
|
||||
|
||||
// Commented out as this currently unexpectedly fails.
|
||||
// // Commented out as this currently unexpectedly fails.
|
||||
// // Test setting a key containing brackets around an integer with delineation
|
||||
// {
|
||||
// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
|
||||
@@ -502,7 +606,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times");
|
||||
// Assert.That(result, Is.EqualTo(1));
|
||||
//
|
||||
// string value = (string)InvokeOp("JsonGetValue", storeId, "{Fun[]Circus}");
|
||||
// string value = (string)InvokeOp("JsonGetValue", storeId, "{Fun[0]Circus}");
|
||||
// Assert.That(value, Is.EqualTo("Times"));
|
||||
// }
|
||||
|
||||
@@ -530,16 +634,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
Assert.That(value, Is.EqualTo(""));
|
||||
}
|
||||
|
||||
// Commented out as this currently unexpectedly fails.
|
||||
// // Commented out as this currently unexpectedly fails.
|
||||
// // Test setting a key containing unbalanced }
|
||||
// {
|
||||
// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
|
||||
//
|
||||
// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times");
|
||||
// Assert.That(result, Is.EqualTo(1));
|
||||
//
|
||||
// string value = (string)InvokeOp("JsonGetValue", storeId, "{Fun}Circus}");
|
||||
// Assert.That(value, Is.EqualTo("Times"));
|
||||
// Assert.That(result, Is.EqualTo(0));
|
||||
// }
|
||||
|
||||
// Test setting a key containing unbalanced { with delineation
|
||||
@@ -584,7 +685,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonSetValueJson()
|
||||
public void TestJsonSetJson()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
@@ -593,7 +694,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
{
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
|
||||
|
||||
int result = (int)InvokeOp("JsonSetValueJson", storeId, "Fun", "'Times'");
|
||||
int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'");
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
|
||||
string value = (string)InvokeOp("JsonGetValue", storeId, "Fun");
|
||||
@@ -604,7 +705,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
{
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
|
||||
|
||||
int result = (int)InvokeOp("JsonSetValueJson", storeId, "Fun", "{ 'Filled' : 'Times' }");
|
||||
int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }");
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
|
||||
string value = (string)InvokeOp("JsonGetValue", storeId, "Fun.Filled");
|
||||
@@ -615,7 +716,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
{
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
|
||||
|
||||
int result = (int)InvokeOp("JsonSetValueJson", storeId, "Fun", "Times");
|
||||
int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times");
|
||||
Assert.That(result, Is.EqualTo(0));
|
||||
|
||||
string value = (string)InvokeOp("JsonGetValue", storeId, "Fun");
|
||||
@@ -626,7 +727,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
{
|
||||
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
|
||||
|
||||
int result = (int)InvokeOp("JsonSetValueJson", storeId, "Fun.Circus", "'Times'");
|
||||
int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'");
|
||||
Assert.That(result, Is.EqualTo(0));
|
||||
|
||||
string value = (string)InvokeOp("JsonGetValue", storeId, "Fun.Circus");
|
||||
@@ -636,7 +737,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
|
||||
// Test with fake store
|
||||
{
|
||||
UUID fakeStoreId = TestHelpers.ParseTail(0x500);
|
||||
int fakeStoreValueSet = (int)InvokeOp("JsonSetValueJson", fakeStoreId, "Hello", "'World'");
|
||||
int fakeStoreValueSet = (int)InvokeOp("JsonSetJson", fakeStoreId, "Hello", "'World'");
|
||||
Assert.That(fakeStoreValueSet, Is.EqualTo(0));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user