diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index 639d781..8c1b6a3 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -61,13 +61,17 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
61 | lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); | 61 | lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); |
62 | lmm.AddLandObject(lo); | 62 | lmm.AddLandObject(lo); |
63 | //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID); | 63 | //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID); |
64 | 64 | ||
65 | string objName = "obj1"; | 65 | SceneObjectPart part1 |
66 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); | ||
67 | |||
68 | SceneObjectPart part | ||
69 | = new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 66 | = new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
70 | { Name = objName, UUID = objUuid }; | 67 | { Name = "obj1", UUID = new UUID("00000000-0000-0000-0000-000000000001") }; |
68 | SceneObjectGroup sog = new SceneObjectGroup(part1); | ||
69 | sog.AddPart( | ||
70 | new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | ||
71 | { Name = "obj2", UUID = new UUID("00000000-0000-0000-0000-000000000002") }); | ||
72 | sog.AddPart( | ||
73 | new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | ||
74 | { Name = "obj3", UUID = new UUID("00000000-0000-0000-0000-000000000003") }); | ||
71 | 75 | ||
72 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(0)); | 76 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(0)); |
73 | Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0)); | 77 | Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0)); |
@@ -76,14 +80,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
76 | Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); | 80 | Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); |
77 | Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(0)); | 81 | Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(0)); |
78 | 82 | ||
79 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | 83 | scene.AddNewSceneObject(sog, false); |
80 | 84 | ||
81 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(1)); | 85 | Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(3)); |
82 | Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0)); | 86 | Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0)); |
83 | Assert.That(pcm.GetOthersCount(lo.LandData.GlobalID), Is.EqualTo(0)); | 87 | Assert.That(pcm.GetOthersCount(lo.LandData.GlobalID), Is.EqualTo(0)); |
84 | Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, userId), Is.EqualTo(1)); | 88 | Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, userId), Is.EqualTo(3)); |
85 | Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); | 89 | Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); |
86 | Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(1)); | 90 | Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(3)); |
87 | } | 91 | } |
88 | } | 92 | } |
89 | } \ No newline at end of file | 93 | } \ No newline at end of file |