aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-03-23 23:19:15 +0000
committerJustin Clark-Casey (justincc)2011-03-23 23:19:15 +0000
commitf001aab8aa5f3ceebe259ff89673c7757b16c637 (patch)
tree5f1365a4c50e1a7c5966634ffbcfb3d213cf28b4 /OpenSim/Region
parentAdd PrimCountModuleTests.TestRemoveOwnerObject(). (diff)
downloadopensim-SC-f001aab8aa5f3ceebe259ff89673c7757b16c637.zip
opensim-SC-f001aab8aa5f3ceebe259ff89673c7757b16c637.tar.gz
opensim-SC-f001aab8aa5f3ceebe259ff89673c7757b16c637.tar.bz2
opensim-SC-f001aab8aa5f3ceebe259ff89673c7757b16c637.tar.xz
extend TestAddOwnerObject() to add a second object
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index e6b8627..a0e7e4c 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -58,15 +58,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
58 Scene scene = SceneSetupHelpers.SetupScene(); 58 Scene scene = SceneSetupHelpers.SetupScene();
59 SceneSetupHelpers.SetupSceneModules(scene, lmm, pcm); 59 SceneSetupHelpers.SetupSceneModules(scene, lmm, pcm);
60 60
61 UUID userId = new UUID("00000000-0000-0000-0000-000000000010"); 61 UUID userId = new UUID("00000000-0000-0000-0000-100000000000");
62 UUID dummyUserId = new UUID("99999999-9999-9999-9999-999999999999"); 62 UUID dummyUserId = new UUID("99999999-9999-9999-9999-999999999999");
63 ILandObject lo = new LandObject(userId, false, scene); 63 ILandObject lo = new LandObject(userId, false, scene);
64 lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 64 lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
65 lmm.AddLandObject(lo); 65 lmm.AddLandObject(lo);
66 //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID); 66 //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID);
67 67
68 SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, userId);
69
70 Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(0)); 68 Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(0));
71 Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0)); 69 Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0));
72 Assert.That(pcm.GetOthersCount(lo.LandData.GlobalID), Is.EqualTo(0)); 70 Assert.That(pcm.GetOthersCount(lo.LandData.GlobalID), Is.EqualTo(0));
@@ -74,6 +72,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
74 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); 72 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0));
75 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(0)); 73 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(0));
76 74
75 SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, userId, 0x01);
77 scene.AddNewSceneObject(sog, false); 76 scene.AddNewSceneObject(sog, false);
78 77
79 Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(3)); 78 Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(3));
@@ -82,6 +81,17 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
82 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, userId), Is.EqualTo(3)); 81 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, userId), Is.EqualTo(3));
83 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); 82 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0));
84 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(3)); 83 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(3));
84
85 // Add a second object and retest
86 SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, userId, 0x10);
87 scene.AddNewSceneObject(sog2, false);
88
89 Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(5));
90 Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0));
91 Assert.That(pcm.GetOthersCount(lo.LandData.GlobalID), Is.EqualTo(0));
92 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, userId), Is.EqualTo(5));
93 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0));
94 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(5));
85 } 95 }
86 96
87 /// <summary> 97 /// <summary>