From ebbe3afaf15fa07f4a8d1c2db8795065b852ec8d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 23 Mar 2011 23:14:55 +0000
Subject: Add PrimCountModuleTests.TestRemoveOwnerObject().
Also adds SceneSetupHelpers methods to easily create sogs with different part UUIDs
---
OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 27 ++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Tests/Common')
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 87b6389..57850c1 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -488,20 +488,37 @@ namespace OpenSim.Tests.Common.Setup
///
///
public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId)
- {
+ {
+ return CreateSceneObject(parts, ownerId, 0x1);
+ }
+
+ ///
+ /// Create a scene object but do not add it to the scene.
+ ///
+ /// The number of parts that should be in the scene object
+ ///
+ ///
+ /// The hexadecimal last part of the UUID for parts created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}"
+ /// will be given to the root part, and incremented for each part thereafter.
+ ///
+ ///
+ public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail)
+ {
+ string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail);
+
SceneObjectGroup sog
= new SceneObjectGroup(
- CreateSceneObjectPart("part1", new UUID("00000000-0000-0000-0000-000000000001"), ownerId));
+ CreateSceneObjectPart("part0", new UUID(rawSogId), ownerId));
if (parts > 1)
- for (int i = 2; i <= parts; i++)
+ for (int i = 1; i < parts; i++)
sog.AddPart(
CreateSceneObjectPart(
string.Format("obj{0}", i),
- new UUID(string.Format("00000000-0000-0000-0000-{0:D12}", i)),
+ new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i)),
ownerId));
return sog;
- }
+ }
}
}
\ No newline at end of file
--
cgit v1.1