diff options
author | Justin Clark-Casey (justincc) | 2013-02-07 23:58:19 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-07 23:58:19 +0000 |
commit | 75f1e0431580975e5588b63025c7c94aedafb050 (patch) | |
tree | cb0c95f30dd3130bfeabd68f5ae4eeeeb0801310 /OpenSim/Region | |
parent | Add testing for getting non-existing values and values from a non-existing da... (diff) | |
download | opensim-SC-75f1e0431580975e5588b63025c7c94aedafb050.zip opensim-SC-75f1e0431580975e5588b63025c7c94aedafb050.tar.gz opensim-SC-75f1e0431580975e5588b63025c7c94aedafb050.tar.bz2 opensim-SC-75f1e0431580975e5588b63025c7c94aedafb050.tar.xz |
Add tests for removing fake values/from fake store in TestJsonRemoveValue()
Again, need to check if returning true for removing a value that doesn't exist is most appropriate.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index d341901..297c33c 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs | |||
@@ -208,6 +208,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests | |||
208 | 208 | ||
209 | string returnValue2 = (string)InvokeOp("JsonGetValue", storeId, "Hello"); | 209 | string returnValue2 = (string)InvokeOp("JsonGetValue", storeId, "Hello"); |
210 | Assert.That(returnValue2, Is.EqualTo("")); | 210 | Assert.That(returnValue2, Is.EqualTo("")); |
211 | |||
212 | // Test remove of non-existing value | ||
213 | int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Hello"); | ||
214 | |||
215 | // XXX: Is this the best response to removing a value that isn't there? | ||
216 | Assert.That(fakeValueRemove, Is.EqualTo(1)); | ||
217 | |||
218 | // Test get from non-existing store | ||
219 | UUID fakeStoreId = TestHelpers.ParseTail(0x500); | ||
220 | int fakeStoreValueRemove = (int)InvokeOp("JsonRemoveValue", fakeStoreId, "Hello"); | ||
221 | Assert.That(fakeStoreValueRemove, Is.EqualTo(0)); | ||
211 | } | 222 | } |
212 | 223 | ||
213 | [Test] | 224 | [Test] |