From 2e86978b609e3e2013a8f4c53f9afc9ed239d20b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 7 Feb 2013 23:30:03 +0000 Subject: Add TestJsonDestoreStoreNotExists() This still returns true even if we ask to destroy a store that does not exist. Need to check that this is more appropriate behaviour. --- .../JsonStore/Tests/JsonStoreScriptModuleTests.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index aea94ea..5484d8d 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs @@ -135,6 +135,20 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests } [Test] + public void TestJsonDestroyStoreNotExists() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + UUID fakeStoreId = TestHelpers.ParseTail(0x500); + + int dsrv = (int)InvokeOp("JsonDestroyStore", fakeStoreId); + + // XXX: Current returns 'true' even though no such store existed. Need to ask if this is best behaviour. + Assert.That(dsrv, Is.EqualTo(1)); + } + + [Test] public void TestJsonGetValue() { TestHelpers.InMethod(); -- cgit v1.1