aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2010-05-05 21:22:29 -0400
committerTeravus Ovares (Dan Olivares)2010-05-05 21:22:29 -0400
commit4183cef4094364d28fd4497fdb4332ff4be34914 (patch)
tree3a99be3cd83bddea2818eccbdb1d014e234f7631
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-4183cef4094364d28fd4497fdb4332ff4be34914.zip
opensim-SC_OLD-4183cef4094364d28fd4497fdb4332ff4be34914.tar.gz
opensim-SC_OLD-4183cef4094364d28fd4497fdb4332ff4be34914.tar.bz2
opensim-SC_OLD-4183cef4094364d28fd4497fdb4332ff4be34914.tar.xz
* Fixes LandDataSerializerTests on Windows by stripping CR from the serialization result since the reference serialization has LF only.
* Added a bool result and then an Assert.That(result) because resharper was having a hard time with the equality compare in Assert.That.
-rw-r--r--OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
index 14e0462..70e87b3 100644
--- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
+++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
@@ -96,15 +96,19 @@ namespace OpenSim.Framework.Serialization.Tests
96 [Test] 96 [Test]
97 public void LandDataSerializerSerializeTest() 97 public void LandDataSerializerSerializeTest()
98 { 98 {
99 string serialized = LandDataSerializer.Serialize(this.land); 99 string serialized = LandDataSerializer.Serialize(this.land).Replace("\r\n", "\n");
100 Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string"); 100 Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string");
101 Assert.That(serialized == LandDataSerializerTest.preSerialized,
102 "result of Serialize(LandData) does not match expected result");
103 101
104 string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList); 102 // adding a simple boolean variable because resharper nUnit integration doesn't like this
105 Assert.That(serializedWithParcelAccessList.Length > 0, 103 // XML data in the Assert.That statement. Not sure why.
104 bool result = (serialized == preSerialized);
105 Assert.That(result, "result of Serialize LandData does not match expected result");
106
107 string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList).Replace("\r\n", "\n");
108 Assert.That(serializedWithParcelAccessList.Length > 0,
106 "Serialize(LandData) returned empty string for LandData object with ParcelAccessList"); 109 "Serialize(LandData) returned empty string for LandData object with ParcelAccessList");
107 Assert.That(serializedWithParcelAccessList == LandDataSerializerTest.preSerializedWithParcelAccessList, 110 result = (serializedWithParcelAccessList == preSerializedWithParcelAccessList);
111 Assert.That(result,
108 "result of Serialize(LandData) does not match expected result (pre-serialized with parcel access list"); 112 "result of Serialize(LandData) does not match expected result (pre-serialized with parcel access list");
109 } 113 }
110 114