From 412295ccdec05e205557b7d5caaec9befdfe8573 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 1 Jun 2009 18:03:51 +0000
Subject: * Add simple original sog xml serialization test
---
.../World/Serialiser/SerialiserModule.cs | 2 +-
.../World/Serialiser/Tests/SerialiserTests.cs | 33 +++++++++++-----------
2 files changed, 18 insertions(+), 17 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
index 79062da..b6d28ab 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName)
{
SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName);
- }
+ }
public SceneObjectGroup DeserializeGroupFromXml2(string xmlString)
{
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
index 617cc25..d028360 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
@@ -31,6 +31,7 @@ using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Serialization;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Setup;
using System.IO;
@@ -53,7 +54,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
0
e6a5a05e-e8cc-4816-8701-04165e335790
2698615125
- Primitive
+ PrimMyRide
0
false
1099511628032000
@@ -241,21 +242,21 @@ 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 TestSerializeXml()
+ {
+ TestHelper.InMethod();
+ //log4net.Config.XmlConfigurator.Configure();
+
+ SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(xml);
+ SceneObjectPart rootPart = so.RootPart;
+
+ Assert.That(rootPart.UUID, Is.EqualTo(new UUID("e6a5a05e-e8cc-4816-8701-04165e335790")));
+ Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("a6dacf01-4636-4bb9-8a97-30609438af9d")));
+ Assert.That(rootPart.Name, Is.EqualTo("PrimMyRide"));
+
+ // TODO: Check other properties
+ }
[Test]
public void TestDeserializeXml2()
--
cgit v1.1