Try ignoring json tests if they can't be run due to being on <=.net 3.5

0.7.4-extended
Justin Clark-Casey (justincc) 2013-01-29 04:26:26 +00:00
parent 56e245e5e9
commit 0810f5f449
1 changed files with 17 additions and 6 deletions

View File

@ -59,8 +59,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
{ {
base.SetUp(); base.SetUp();
TestHelpers.EnableLogging();
IConfigSource configSource = new IniConfigSource(); IConfigSource configSource = new IniConfigSource();
IConfig jsonStoreConfig = configSource.AddConfig("JsonStore"); IConfig jsonStoreConfig = configSource.AddConfig("JsonStore");
jsonStoreConfig.Set("Enabled", "true"); jsonStoreConfig.Set("Enabled", "true");
@ -72,9 +70,20 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
m_scene = new SceneHelpers().SetupScene(); m_scene = new SceneHelpers().SetupScene();
SceneHelpers.SetupSceneModules(m_scene, configSource, m_engine, m_smcm, jsm, jssm); SceneHelpers.SetupSceneModules(m_scene, configSource, m_engine, m_smcm, jsm, jssm);
try
{
m_smcm.RegisterScriptInvocation(this, "DummyTestMethod");
}
catch (ArgumentException)
{
Assert.Ignore("Ignoring test since running on .NET 3.5 or earlier.");
} }
// [Test] // XXX: Unfortunately, ICommsModule currently has no way of deregistering methods.
}
[Test]
public void TestJsonCreateStore() public void TestJsonCreateStore()
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
@ -85,7 +94,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
Assert.That(storeId, Is.Not.EqualTo(UUID.Zero)); Assert.That(storeId, Is.Not.EqualTo(UUID.Zero));
} }
// [Test] [Test]
public void TestJsonGetValue() public void TestJsonGetValue()
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
@ -102,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
Assert.That(value, Is.EqualTo("World")); Assert.That(value, Is.EqualTo("World"));
} }
// [Test] [Test]
public void TestJsonTestPath() public void TestJsonTestPath()
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
@ -119,7 +128,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
Assert.That(result, Is.EqualTo(1)); Assert.That(result, Is.EqualTo(1));
} }
// [Test] [Test]
public void TestJsonSetValue() public void TestJsonSetValue()
{ {
TestHelpers.InMethod(); TestHelpers.InMethod();
@ -141,5 +150,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
Assert.That(value, Is.EqualTo("World")); Assert.That(value, Is.EqualTo("World"));
} }
public object DummyTestMethod(object o1, object o2, object o3, object o4, object o5) { return null; }
} }
} }