* Add simple original sog xml serialization test
parent
f6badc528b
commit
412295ccde
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
|||
<ObjectFlags>0</ObjectFlags>
|
||||
<UUID><Guid>e6a5a05e-e8cc-4816-8701-04165e335790</Guid></UUID>
|
||||
<LocalId>2698615125</LocalId>
|
||||
<Name>Primitive</Name>
|
||||
<Name>PrimMyRide</Name>
|
||||
<Material>0</Material>
|
||||
<PassTouches>false</PassTouches>
|
||||
<RegionHandle>1099511628032000</RegionHandle>
|
||||
|
@ -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()
|
||||
|
|
|
@ -103,13 +103,13 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// <param name="max"></param>
|
||||
void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max);
|
||||
|
||||
void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName);
|
||||
|
||||
void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName);
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
|
||||
/// </summary>
|
||||
/// <param name="xmlString"></param>
|
||||
/// <returns>The scene object created. null if the scene object already existed</returns>
|
||||
/// <returns>The scene object created</returns>
|
||||
SceneObjectGroup DeserializeGroupFromXml2(string xmlString);
|
||||
|
||||
/// <summary>
|
||||
|
@ -117,6 +117,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// </summary>
|
||||
/// <param name="grp"></param>
|
||||
/// <returns></returns>
|
||||
string SerializeGroupToXml2(SceneObjectGroup grp);
|
||||
string SerializeGroupToXml2(SceneObjectGroup grp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue