From 9021bb231c6db0d1dba767e4886bf562b91f03c5 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 29 May 2009 16:27:43 +0000 Subject: [PATCH] * minor: move common serialization test code into fixture setup --- .../World/Serialiser/Tests/SerialiserTests.cs | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 3d8fb44a66..ad9d301be0 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs @@ -119,18 +119,22 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests "; + protected SerialiserModule m_serialiserModule; + + [TestFixtureSetUp] + public void Init() + { + m_serialiserModule = new SerialiserModule(); + SceneSetupHelpers.SetupSceneModules(SceneSetupHelpers.SetupScene(false), m_serialiserModule); + } + [Test] public void TestLoadXml2() { TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); - SerialiserModule serialiserModule = new SerialiserModule(); - - Scene scene = SceneSetupHelpers.SetupScene(false); - SceneSetupHelpers.SetupSceneModules(scene, serialiserModule); - - SceneObjectGroup so = serialiserModule.DeserializeGroupFromXml2(xml2); + SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2); SceneObjectPart rootPart = so.RootPart; 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 } + + //[Test] + public void TestSaveXml2() + { + TestHelper.InMethod(); + //log4net.Config.XmlConfigurator.Configure(); + } } } \ No newline at end of file