aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-03-23 22:17:47 +0000
committerJustin Clark-Casey (justincc)2011-03-23 22:17:47 +0000
commit88673c86a4b9cde729c62fbdc92b8c9076c54230 (patch)
tree63a8c5dc224e0a10dfec58ae0889a398f8c69bf2
parentuser a non UUID.Zero user in pcm test to avoid any special treatment of UUID.... (diff)
downloadopensim-SC-88673c86a4b9cde729c62fbdc92b8c9076c54230.zip
opensim-SC-88673c86a4b9cde729c62fbdc92b8c9076c54230.tar.gz
opensim-SC-88673c86a4b9cde729c62fbdc92b8c9076c54230.tar.bz2
opensim-SC-88673c86a4b9cde729c62fbdc92b8c9076c54230.tar.xz
use a 3 part object for the pcm test rather than a 1 part, for improved test coverage
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs24
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