From ba369c5cfe89706c0e7261e699dac1d0c3c68cd6 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 25 Jan 2013 01:55:27 +0000 Subject: Add basic JsonGetValue() regression test. --- .../JsonStore/Tests/JsonStoreScriptModuleTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Scripting') diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index 4b6ddd6..204bab1 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs @@ -82,5 +82,22 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests Assert.That(storeId, Is.Not.EqualTo(UUID.Zero)); } + + [Test] + public void TestJsonGetValue() + { + TestHelpers.InMethod(); +// log4net.Config.XmlConfigurator.Configure(); + + UUID storeId + = (UUID)m_smcm.InvokeOperation( + UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); + + string value + = (string)m_smcm.InvokeOperation( + UUID.Zero, UUID.Zero, "JsonGetValue", new object[] { storeId, "Hello" }); + + Assert.That(value, Is.EqualTo("World")); + } } } \ No newline at end of file -- cgit v1.1