aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-17 18:45:25 -0400
committerJonathan Freedman2010-10-17 18:45:25 -0400
commit4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65 (patch)
tree79142f2364b658f52b63e3ae688a5521290e2a4f /OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
parent* more url / hg cleanup (diff)
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.zip
opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.tar.gz
opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.tar.bz2
opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs19
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
index 799a448..f10e848 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
@@ -25,6 +25,9 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
29using System.IO;
30using System.Xml;
28using log4net.Config; 31using log4net.Config;
29using NUnit.Framework; 32using NUnit.Framework;
30using NUnit.Framework.SyntaxHelpers; 33using NUnit.Framework.SyntaxHelpers;
@@ -34,8 +37,6 @@ using OpenSim.Region.Framework.Scenes;
34using OpenSim.Region.Framework.Scenes.Serialization; 37using OpenSim.Region.Framework.Scenes.Serialization;
35using OpenSim.Tests.Common; 38using OpenSim.Tests.Common;
36using OpenSim.Tests.Common.Setup; 39using OpenSim.Tests.Common.Setup;
37using System.IO;
38using System.Xml;
39 40
40namespace OpenSim.Region.CoreModules.World.Serialiser.Tests 41namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
41{ 42{
@@ -302,15 +303,19 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
302 { 303 {
303 case "UUID": 304 case "UUID":
304 xtr.ReadStartElement("UUID"); 305 xtr.ReadStartElement("UUID");
305 uuid = UUID.Parse(xtr.ReadElementString("Guid")); 306 try
306 xtr.ReadEndElement(); 307 {
308 uuid = UUID.Parse(xtr.ReadElementString("UUID"));
309 xtr.ReadEndElement();
310 }
311 catch { } // ignore everything but <UUID><UUID>...</UUID></UUID>
307 break; 312 break;
308 case "Name": 313 case "Name":
309 name = xtr.ReadElementContentAsString(); 314 name = xtr.ReadElementContentAsString();
310 break; 315 break;
311 case "CreatorID": 316 case "CreatorID":
312 xtr.ReadStartElement("CreatorID"); 317 xtr.ReadStartElement("CreatorID");
313 creatorId = UUID.Parse(xtr.ReadElementString("Guid")); 318 creatorId = UUID.Parse(xtr.ReadElementString("UUID"));
314 xtr.ReadEndElement(); 319 xtr.ReadEndElement();
315 break; 320 break;
316 } 321 }
@@ -369,7 +374,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
369 // Need to add the object to the scene so that the request to get script state succeeds 374 // Need to add the object to the scene so that the request to get script state succeeds
370 m_scene.AddSceneObject(so); 375 m_scene.AddSceneObject(so);
371 376
372 string xml2 = m_serialiserModule.SerializeGroupToXml2(so); 377 Dictionary<string, object> options = new Dictionary<string, object>();
378 options["old-guids"] = true;
379 string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options);
373 380
374 XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); 381 XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
375 xtr.ReadStartElement("SceneObjectGroup"); 382 xtr.ReadStartElement("SceneObjectGroup");