* minor: move common serialization test code into fixture setup

0.6.6-post-fixes
Justin Clarke Casey 2009-05-29 16:27:43 +00:00
parent fa04937a82
commit 9021bb231c
1 changed files with 17 additions and 6 deletions

View File

@ -119,18 +119,22 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
<OtherParts /> <OtherParts />
</SceneObjectGroup>"; </SceneObjectGroup>";
protected SerialiserModule m_serialiserModule;
[TestFixtureSetUp]
public void Init()
{
m_serialiserModule = new SerialiserModule();
SceneSetupHelpers.SetupSceneModules(SceneSetupHelpers.SetupScene(false), m_serialiserModule);
}
[Test] [Test]
public void TestLoadXml2() public void TestLoadXml2()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure(); //log4net.Config.XmlConfigurator.Configure();
SerialiserModule serialiserModule = new SerialiserModule(); SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2);
Scene scene = SceneSetupHelpers.SetupScene(false);
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule);
SceneObjectGroup so = serialiserModule.DeserializeGroupFromXml2(xml2);
SceneObjectPart rootPart = so.RootPart; SceneObjectPart rootPart = so.RootPart;
Assert.That(rootPart.UUID, Is.EqualTo(new UUID("9be68fdd-f740-4a0f-9675-dfbbb536b946"))); Assert.That(rootPart.UUID, Is.EqualTo(new UUID("9be68fdd-f740-4a0f-9675-dfbbb536b946")));
@ -139,5 +143,12 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
// TODO: Check other properties // TODO: Check other properties
} }
//[Test]
public void TestSaveXml2()
{
TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure();
}
} }
} }