aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-06-01 18:03:51 +0000
committerJustin Clarke Casey2009-06-01 18:03:51 +0000
commit412295ccdec05e205557b7d5caaec9befdfe8573 (patch)
tree651f32870c9bb43f8ed7683527c85117a7e5cc13 /OpenSim/Region
parent* minor: change the name of one serialization method to match its counterpart (diff)
downloadopensim-SC-412295ccdec05e205557b7d5caaec9befdfe8573.zip
opensim-SC-412295ccdec05e205557b7d5caaec9befdfe8573.tar.gz
opensim-SC-412295ccdec05e205557b7d5caaec9befdfe8573.tar.bz2
opensim-SC-412295ccdec05e205557b7d5caaec9befdfe8573.tar.xz
* Add simple original sog xml serialization test
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs33
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs8
3 files changed, 22 insertions, 21 deletions
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
121 public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) 121 public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName)
122 { 122 {
123 SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName); 123 SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName);
124 } 124 }
125 125
126 public SceneObjectGroup DeserializeGroupFromXml2(string xmlString) 126 public SceneObjectGroup DeserializeGroupFromXml2(string xmlString)
127 { 127 {
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;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
34using OpenSim.Region.Framework.Scenes.Serialization;
34using OpenSim.Tests.Common; 35using OpenSim.Tests.Common;
35using OpenSim.Tests.Common.Setup; 36using OpenSim.Tests.Common.Setup;
36using System.IO; 37using System.IO;
@@ -53,7 +54,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
53 <ObjectFlags>0</ObjectFlags> 54 <ObjectFlags>0</ObjectFlags>
54 <UUID><Guid>e6a5a05e-e8cc-4816-8701-04165e335790</Guid></UUID> 55 <UUID><Guid>e6a5a05e-e8cc-4816-8701-04165e335790</Guid></UUID>
55 <LocalId>2698615125</LocalId> 56 <LocalId>2698615125</LocalId>
56 <Name>Primitive</Name> 57 <Name>PrimMyRide</Name>
57 <Material>0</Material> 58 <Material>0</Material>
58 <PassTouches>false</PassTouches> 59 <PassTouches>false</PassTouches>
59 <RegionHandle>1099511628032000</RegionHandle> 60 <RegionHandle>1099511628032000</RegionHandle>
@@ -241,21 +242,21 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
241 SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule); 242 SceneSetupHelpers.SetupSceneModules(m_scene, m_serialiserModule);
242 } 243 }
243 244
244// [Test] 245 [Test]
245// public void TestLoadXml() 246 public void TestSerializeXml()
246// { 247 {
247// TestHelper.InMethod(); 248 TestHelper.InMethod();
248// //log4net.Config.XmlConfigurator.Configure(); 249 //log4net.Config.XmlConfigurator.Configure();
249// 250
250// SceneObjectGroup so = m_serialiserModule.DeserializeGroupFromXml2(xml2); 251 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(xml);
251// SceneObjectPart rootPart = so.RootPart; 252 SceneObjectPart rootPart = so.RootPart;
252// 253
253// Assert.That(rootPart.UUID, Is.EqualTo(new UUID("9be68fdd-f740-4a0f-9675-dfbbb536b946"))); 254 Assert.That(rootPart.UUID, Is.EqualTo(new UUID("e6a5a05e-e8cc-4816-8701-04165e335790")));
254// Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("b46ef588-411e-4a8b-a284-d7dcfe8e74ef"))); 255 Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("a6dacf01-4636-4bb9-8a97-30609438af9d")));
255// Assert.That(rootPart.Name, Is.EqualTo("PrimFun")); 256 Assert.That(rootPart.Name, Is.EqualTo("PrimMyRide"));
256// 257
257// // TODO: Check other properties 258 // TODO: Check other properties
258// } 259 }
259 260
260 [Test] 261 [Test]
261 public void TestDeserializeXml2() 262 public void TestDeserializeXml2()
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
index e062bbc..bfd25d3 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
@@ -103,13 +103,13 @@ namespace OpenSim.Region.Framework.Interfaces
103 /// <param name="max"></param> 103 /// <param name="max"></param>
104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max); 104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max);
105 105
106 void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName); 106 void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName);
107 107
108 /// <summary> 108 /// <summary>
109 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene. 109 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
110 /// </summary> 110 /// </summary>
111 /// <param name="xmlString"></param> 111 /// <param name="xmlString"></param>
112 /// <returns>The scene object created. null if the scene object already existed</returns> 112 /// <returns>The scene object created</returns>
113 SceneObjectGroup DeserializeGroupFromXml2(string xmlString); 113 SceneObjectGroup DeserializeGroupFromXml2(string xmlString);
114 114
115 /// <summary> 115 /// <summary>
@@ -117,6 +117,6 @@ namespace OpenSim.Region.Framework.Interfaces
117 /// </summary> 117 /// </summary>
118 /// <param name="grp"></param> 118 /// <param name="grp"></param>
119 /// <returns></returns> 119 /// <returns></returns>
120 string SerializeGroupToXml2(SceneObjectGroup grp); 120 string SerializeGroupToXml2(SceneObjectGroup grp);
121 } 121 }
122} 122}