Add testing for getting non-existing values and values from a non-existing datastore to TestJsonGetValue()

0.7.4-extended
Justin Clark-Casey (justincc) 2013-02-07 23:52:28 +00:00
parent c67f791097
commit 6418b89fd6
1 changed files with 10 additions and 1 deletions

View File

@ -158,6 +158,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
string value = (string)InvokeOp("JsonGetValue", storeId, "Hello"); string value = (string)InvokeOp("JsonGetValue", storeId, "Hello");
Assert.That(value, Is.EqualTo("World")); Assert.That(value, Is.EqualTo("World"));
// Test get of non-existing value
string fakeValueGet = (string)InvokeOp("JsonGetValue", storeId, "foo");
Assert.That(fakeValueGet, Is.EqualTo(""));
// Test get from non-existing store
UUID fakeStoreId = TestHelpers.ParseTail(0x500);
string fakeStoreValueGet = (string)InvokeOp("JsonGetValue", fakeStoreId, "Hello");
Assert.That(fakeStoreValueGet, Is.EqualTo(""));
} }
// [Test] // [Test]
@ -239,7 +248,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
public void TestJsonWriteReadNotecard() public void TestJsonWriteReadNotecard()
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
TestHelpers.EnableLogging(); // TestHelpers.EnableLogging();
string notecardName = "nc1"; string notecardName = "nc1";