diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index 60824be..f57cf98 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -81,12 +81,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
81 | // FIXME: Can't do this test yet since group 2 still has its root part! We can't yet null this since | 81 | // FIXME: Can't do this test yet since group 2 still has its root part! We can't yet null this since |
82 | // it might cause SOG.ProcessBackup() to fail due to the race condition. This really needs to be fixed. | 82 | // it might cause SOG.ProcessBackup() to fail due to the race condition. This really needs to be fixed. |
83 | Assert.That(grp2.IsDeleted, "SOG 2 was not registered as deleted after link."); | 83 | Assert.That(grp2.IsDeleted, "SOG 2 was not registered as deleted after link."); |
84 | Assert.That(grp2.Children.Count, Is.EqualTo(0), "Group 2 still contained children after delink."); | 84 | Assert.That(grp2.Parts.Length, Is.EqualTo(0), "Group 2 still contained children after delink."); |
85 | Assert.That(grp1.Children.Count == 2); | 85 | Assert.That(grp1.Parts.Length == 2); |
86 | 86 | ||
87 | if (debugtest) | 87 | if (debugtest) |
88 | { | 88 | { |
89 | m_log.Debug("parts: " + grp1.Children.Count); | 89 | m_log.Debug("parts: " + grp1.Parts.Length); |
90 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation); | 90 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation); |
91 | m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset); | 91 | m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset); |
92 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset); | 92 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset); |
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
126 | if (debugtest) | 126 | if (debugtest) |
127 | m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset); | 127 | m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset); |
128 | 128 | ||
129 | Assert.That(grp1.Children.Count, Is.EqualTo(1), "Group 1 still contained part2 after delink."); | 129 | Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink."); |
130 | Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero"); | 130 | Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero"); |
131 | } | 131 | } |
132 | 132 | ||
@@ -177,22 +177,22 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
177 | grp3.LinkToGroup(grp4); | 177 | grp3.LinkToGroup(grp4); |
178 | 178 | ||
179 | // At this point we should have 4 parts total in two groups. | 179 | // At this point we should have 4 parts total in two groups. |
180 | Assert.That(grp1.Children.Count == 2, "Group1 children count should be 2"); | 180 | Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2"); |
181 | Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); | 181 | Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); |
182 | Assert.That(grp2.Children.Count, Is.EqualTo(0), "Group 2 still contained parts after delink."); | 182 | Assert.That(grp2.Parts.Length, Is.EqualTo(0), "Group 2 still contained parts after delink."); |
183 | Assert.That(grp3.Children.Count == 2, "Group3 children count should be 2"); | 183 | Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2"); |
184 | Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); | 184 | Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); |
185 | Assert.That(grp4.Children.Count, Is.EqualTo(0), "Group 4 still contained parts after delink."); | 185 | Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink."); |
186 | 186 | ||
187 | if (debugtest) | 187 | if (debugtest) |
188 | { | 188 | { |
189 | m_log.Debug("--------After Link-------"); | 189 | m_log.Debug("--------After Link-------"); |
190 | m_log.Debug("Group1: parts:" + grp1.Children.Count); | 190 | m_log.Debug("Group1: parts:" + grp1.Parts.Length); |
191 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation); | 191 | m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation); |
192 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); | 192 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); |
193 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset); | 193 | m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset); |
194 | 194 | ||
195 | m_log.Debug("Group3: parts:"+grp3.Children.Count); | 195 | m_log.Debug("Group3: parts:" + grp3.Parts.Length); |
196 | m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation); | 196 | m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation); |
197 | m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset); | 197 | m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset); |
198 | m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset); | 198 | m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset); |
@@ -240,12 +240,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
240 | if (debugtest) | 240 | if (debugtest) |
241 | { | 241 | { |
242 | m_log.Debug("--------After De-Link-------"); | 242 | m_log.Debug("--------After De-Link-------"); |
243 | m_log.Debug("Group1: parts:" + grp1.Children.Count); | 243 | m_log.Debug("Group1: parts:" + grp1.Parts.Length); |
244 | m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.Rotation); | 244 | m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.Rotation); |
245 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); | 245 | m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset); |
246 | m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset); | 246 | m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset); |
247 | 247 | ||
248 | m_log.Debug("Group3: parts:" + grp3.Children.Count); | 248 | m_log.Debug("Group3: parts:" + grp3.Parts.Length); |
249 | m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.Rotation); | 249 | m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.Rotation); |
250 | m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset); | 250 | m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset); |
251 | m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset); | 251 | m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset); |
@@ -295,9 +295,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
295 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); | 295 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
296 | 296 | ||
297 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 297 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
298 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(2)); | 298 | Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2)); |
299 | Assert.That(storedObjects[0].Children.ContainsKey(rootPartUuid)); | 299 | Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); |
300 | Assert.That(storedObjects[0].Children.ContainsKey(linkPartUuid)); | 300 | Assert.That(storedObjects[0].ContainsPart(linkPartUuid)); |
301 | } | 301 | } |
302 | 302 | ||
303 | /// <summary> | 303 | /// <summary> |
@@ -338,8 +338,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
338 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); | 338 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
339 | 339 | ||
340 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 340 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
341 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(1)); | 341 | Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(1)); |
342 | Assert.That(storedObjects[0].Children.ContainsKey(rootPartUuid)); | 342 | Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); |
343 | } | 343 | } |
344 | } | 344 | } |
345 | } | 345 | } |