From f6badc528b7f7b86602ce658a142bdd03648ea1c Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 1 Jun 2009 17:38:11 +0000 Subject: * minor: change the name of one serialization method to match its counterpart --- .../World/Serialiser/Tests/SerialiserTests.cs | 132 ++++++++++++++++++++- 1 file changed, 128 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs') diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 832c99e..617cc25 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs @@ -9,7 +9,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the + * * Neither the name of the OpenSim Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * @@ -41,6 +41,114 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests [TestFixture] public class SerialiserTests { + private string xml = @" + + + + false + a6dacf01-4636-4bb9-8a97-30609438af9d + e6a5a05e-e8cc-4816-8701-04165e335790 + 1 + + 0 + e6a5a05e-e8cc-4816-8701-04165e335790 + 2698615125 + Primitive + 0 + false + 1099511628032000 + 0 + 147.2392.69822.78084 + 000 + -4.371139E-08-1-4.371139E-080 + 000 + 000 + 000 + 000 + + + + + + 0 + 0 + + 1 + AAAAAAAAERGZmQAAAAAABQCVlZUAAAAAQEAAAABAQAAAAAAAAAAAAAAAAAAAAA== + AA== + 0 + 16 + 0 + 0 + 0 + 100 + 100 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 0 + 0 + 0 + 10100.5 + 0 + Square + Same + 00000000-0000-0000-0000-000000000000 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + false + false + false + + 10100.5 + 0 + 0001 + 000 + 000 + 0001 + 0 + 1211330445 + 0 + 0 + 0 + 0 + 00000000-0000-0000-0000-000000000000 + a6dacf01-4636-4bb9-8a97-30609438af9d + a6dacf01-4636-4bb9-8a97-30609438af9d + 2147483647 + 2147483647 + 0 + 0 + 2147483647 + None + 00000000-0000-0000-0000-000000000000 + 0 + + + + + "; + private string xml2 = @" @@ -133,8 +241,24 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule); } +// [Test] +// public void TestLoadXml() +// { +// TestHelper.InMethod(); +// //log4net.Config.XmlConfigurator.Configure(); +// +// SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2); +// SceneObjectPart rootPart = so.RootPart; +// +// Assert.That(rootPart.UUID, Is.EqualTo(new UUID("9be68fdd-f740-4a0f-9675-dfbbb536b946"))); +// Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("b46ef588-411e-4a8b-a284-d7dcfe8e74ef"))); +// Assert.That(rootPart.Name, Is.EqualTo("PrimFun")); +// +// // TODO: Check other properties +// } + [Test] - public void TestLoadXml2() + public void TestDeserializeXml2() { TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); @@ -150,7 +274,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests } [Test] - public void TestSaveXml2() + public void TestSerializeXml2() { TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); @@ -174,7 +298,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests // Need to add the object to the scene so that the request to get script state succeeds m_scene.AddSceneObject(so); - string xml2 = m_serialiserModule.SaveGroupToXml2(so); + string xml2 = m_serialiserModule.SerializeGroupToXml2(so); XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); xtr.ReadStartElement("SceneObjectGroup"); -- cgit v1.1