Extend TestJsonCreateStore() with a one key input and an input with raw number values

0.7.4-extended
Justin Clark-Casey (justincc) 2013-02-12 23:00:24 +00:00
parent 7cacf5f8a0
commit 009178d7dd
1 changed files with 20 additions and 2 deletions

View File

@ -115,8 +115,26 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
TestHelpers.InMethod(); TestHelpers.InMethod();
// TestHelpers.EnableLogging(); // TestHelpers.EnableLogging();
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); // Test blank store
Assert.That(storeId, Is.Not.EqualTo(UUID.Zero)); {
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
Assert.That(storeId, Is.Not.EqualTo(UUID.Zero));
}
// Test single element store
{
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }");
Assert.That(storeId, Is.Not.EqualTo(UUID.Zero));
}
// Test with an integer value
{
UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 42.15 }");
Assert.That(storeId, Is.Not.EqualTo(UUID.Zero));
string value = (string)InvokeOp("JsonGetValue", storeId, "Hello");
Assert.That(value, Is.EqualTo("42.15"));
}
} }
[Test] [Test]