diff options
author | Justin Clark-Casey (justincc) | 2011-04-02 01:46:06 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-04-02 01:46:06 +0100 |
commit | 8e668abc6db47eb21d6eb294cf696d6bc10d51a6 (patch) | |
tree | b0b9a3b943b48df82d2eb961abfa8036b74e4461 | |
parent | add test for adding group object, factor out initial zero counts test (diff) | |
download | opensim-SC_OLD-8e668abc6db47eb21d6eb294cf696d6bc10d51a6.zip opensim-SC_OLD-8e668abc6db47eb21d6eb294cf696d6bc10d51a6.tar.gz opensim-SC_OLD-8e668abc6db47eb21d6eb294cf696d6bc10d51a6.tar.bz2 opensim-SC_OLD-8e668abc6db47eb21d6eb294cf696d6bc10d51a6.tar.xz |
add test for removing group owned objects
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index 38b2356..f006db2 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -199,6 +199,38 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
199 | Assert.That(pc.Simulator, Is.EqualTo(3)); | 199 | Assert.That(pc.Simulator, Is.EqualTo(3)); |
200 | } | 200 | } |
201 | 201 | ||
202 | /// <summary> | ||
203 | /// Test count after a parcel owner owned object is removed. | ||
204 | /// </summary> | ||
205 | [Test] | ||
206 | public void TestRemoveGroupObject() | ||
207 | { | ||
208 | TestHelper.InMethod(); | ||
209 | // log4net.Config.XmlConfigurator.Configure(); | ||
210 | |||
211 | m_lo.DeedToGroup(m_groupId); | ||
212 | |||
213 | IPrimCounts pc = m_lo.PrimCounts; | ||
214 | |||
215 | SceneObjectGroup sogToKeep = SceneSetupHelpers.CreateSceneObject(1, m_userId, 0x1); | ||
216 | sogToKeep.GroupID = m_groupId; | ||
217 | m_scene.AddNewSceneObject(sogToKeep, false); | ||
218 | |||
219 | SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x10); | ||
220 | m_scene.AddNewSceneObject(sogToDelete, false); | ||
221 | m_scene.DeleteSceneObject(sogToDelete, false); | ||
222 | |||
223 | Assert.That(pc.Owner, Is.EqualTo(0)); | ||
224 | Assert.That(pc.Group, Is.EqualTo(1)); | ||
225 | Assert.That(pc.Others, Is.EqualTo(0)); | ||
226 | Assert.That(pc.Total, Is.EqualTo(1)); | ||
227 | Assert.That(pc.Selected, Is.EqualTo(0)); | ||
228 | Assert.That(pc.Users[m_userId], Is.EqualTo(1)); | ||
229 | Assert.That(pc.Users[m_groupId], Is.EqualTo(0)); | ||
230 | Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); | ||
231 | Assert.That(pc.Simulator, Is.EqualTo(1)); | ||
232 | } | ||
233 | |||
202 | [Test] | 234 | [Test] |
203 | public void TestAddOthersObject() | 235 | public void TestAddOthersObject() |
204 | { | 236 | { |