diff options
author | Justin Clark-Casey (justincc) | 2013-01-30 05:39:34 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-30 05:39:34 +0000 |
commit | addf9ada49f35a40f8739d0614c1d48fbbb82ec1 (patch) | |
tree | 8ef81298331fb59d00b60e41fe74bc3ff1460ed1 /OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests | |
parent | Fix issue where lsl -> c# generation in co-operative termination mode did not... (diff) | |
download | opensim-SC-addf9ada49f35a40f8739d0614c1d48fbbb82ec1.zip opensim-SC-addf9ada49f35a40f8739d0614c1d48fbbb82ec1.tar.gz opensim-SC-addf9ada49f35a40f8739d0614c1d48fbbb82ec1.tar.bz2 opensim-SC-addf9ada49f35a40f8739d0614c1d48fbbb82ec1.tar.xz |
Add regression test for script func JsonRemoveValue()
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index 9f91728..d209551 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | |||
@@ -111,6 +111,58 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
111 | Assert.That(value, Is.EqualTo("World")); | 111 | Assert.That(value, Is.EqualTo("World")); |
112 | } | 112 | } |
113 | 113 | ||
114 | // [Test] | ||
115 | // public void TestJsonTakeValue() | ||
116 | // { | ||
117 | // TestHelpers.InMethod(); | ||
118 | //// TestHelpers.EnableLogging(); | ||
119 | // | ||
120 | // UUID storeId | ||
121 | // = (UUID)m_smcm.InvokeOperation( | ||
122 | // UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); | ||
123 | // | ||
124 | // string value | ||
125 | // = (string)m_smcm.InvokeOperation( | ||
126 | // UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" }); | ||
127 | // | ||
128 | // Assert.That(value, Is.EqualTo("World")); | ||
129 | // | ||
130 | // string value2 | ||
131 | // = (string)m_smcm.InvokeOperation( | ||
132 | // UUID.Zero, UUID.Zero, "JsonGetValue", new object[] { storeId, "Hello" }); | ||
133 | // | ||
134 | // Assert.That(value, Is.Null); | ||
135 | // } | ||
136 | |||
137 | [Test] | ||
138 | public void TestJsonRemoveValue() | ||
139 | { | ||
140 | TestHelpers.InMethod(); | ||
141 | // TestHelpers.EnableLogging(); | ||
142 | |||
143 | UUID storeId | ||
144 | = (UUID)m_smcm.InvokeOperation( | ||
145 | UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); | ||
146 | |||
147 | int returnValue | ||
148 | = (int)m_smcm.InvokeOperation( | ||
149 | UUID.Zero, UUID.Zero, "JsonRemoveValue", new object[] { storeId, "Hello" }); | ||
150 | |||
151 | Assert.That(returnValue, Is.EqualTo(1)); | ||
152 | |||
153 | int result | ||
154 | = (int)m_smcm.InvokeOperation( | ||
155 | UUID.Zero, UUID.Zero, "JsonTestPath", new object[] { storeId, "Hello" }); | ||
156 | |||
157 | Assert.That(result, Is.EqualTo(0)); | ||
158 | |||
159 | string returnValue2 | ||
160 | = (string)m_smcm.InvokeOperation( | ||
161 | UUID.Zero, UUID.Zero, "JsonGetValue", new object[] { storeId, "Hello" }); | ||
162 | |||
163 | Assert.That(returnValue2, Is.EqualTo("")); | ||
164 | } | ||
165 | |||
114 | [Test] | 166 | [Test] |
115 | public void TestJsonTestPath() | 167 | public void TestJsonTestPath() |
116 | { | 168 | { |