aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs39
1 files changed, 38 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index 72f74fa..e6b8627 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -44,8 +44,11 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
44 [TestFixture] 44 [TestFixture]
45 public class PrimCountModuleTests 45 public class PrimCountModuleTests
46 { 46 {
47 /// <summary>
48 /// Test count after a parcel owner owned object is added.
49 /// </summary>
47 [Test] 50 [Test]
48 public void TestAddObject() 51 public void TestAddOwnerObject()
49 { 52 {
50 TestHelper.InMethod(); 53 TestHelper.InMethod();
51// log4net.Config.XmlConfigurator.Configure(); 54// log4net.Config.XmlConfigurator.Configure();
@@ -80,5 +83,39 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
80 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0)); 83 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0));
81 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(3)); 84 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(3));
82 } 85 }
86
87 /// <summary>
88 /// Test count after a parcel owner owned object is removed.
89 /// </summary>
90 [Test]
91 public void TestRemoveOwnerObject()
92 {
93 TestHelper.InMethod();
94// log4net.Config.XmlConfigurator.Configure();
95
96 PrimCountModule pcm = new PrimCountModule();
97 LandManagementModule lmm = new LandManagementModule();
98 Scene scene = SceneSetupHelpers.SetupScene();
99 SceneSetupHelpers.SetupSceneModules(scene, lmm, pcm);
100
101 UUID userId = new UUID("00000000-0000-0000-0000-000000000010");
102 UUID dummyUserId = new UUID("99999999-9999-9999-9999-999999999999");
103 ILandObject lo = new LandObject(userId, false, scene);
104 lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
105 lmm.AddLandObject(lo);
106 //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID);
107
108 scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, userId, 0x1), false);
109 SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, userId, 0x10);
110 scene.AddNewSceneObject(sogToDelete, false);
111 scene.DeleteSceneObject(sogToDelete, false);
112
113 Assert.That(pcm.GetOwnerCount(lo.LandData.GlobalID), Is.EqualTo(1));
114 Assert.That(pcm.GetGroupCount(lo.LandData.GlobalID), Is.EqualTo(0));
115 Assert.That(pcm.GetOthersCount(lo.LandData.GlobalID), Is.EqualTo(0));
116 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, userId), Is.EqualTo(1));
117 Assert.That(pcm.GetUserCount(lo.LandData.GlobalID, dummyUserId), Is.EqualTo(0));
118 Assert.That(pcm.GetSimulatorCount(lo.LandData.GlobalID), Is.EqualTo(1));
119 }
83 } 120 }
84} \ No newline at end of file 121} \ No newline at end of file