aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-03-23 23:14:55 +0000
committerJustin Clark-Casey (justincc)2011-03-23 23:14:55 +0000
commitebbe3afaf15fa07f4a8d1c2db8795065b852ec8d (patch)
tree92887a87a5fcbd67288b43c7d89e601bf69fa0ae /OpenSim/Tests/Common/Setup
parentrefactor common sop setup parts into a single method (diff)
downloadopensim-SC_OLD-ebbe3afaf15fa07f4a8d1c2db8795065b852ec8d.zip
opensim-SC_OLD-ebbe3afaf15fa07f4a8d1c2db8795065b852ec8d.tar.gz
opensim-SC_OLD-ebbe3afaf15fa07f4a8d1c2db8795065b852ec8d.tar.bz2
opensim-SC_OLD-ebbe3afaf15fa07f4a8d1c2db8795065b852ec8d.tar.xz
Add PrimCountModuleTests.TestRemoveOwnerObject().
Also adds SceneSetupHelpers methods to easily create sogs with different part UUIDs
Diffstat (limited to 'OpenSim/Tests/Common/Setup')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs27
1 files changed, 22 insertions, 5 deletions
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
488 /// <param name="ownerId"></param> 488 /// <param name="ownerId"></param>
489 /// <returns></returns> 489 /// <returns></returns>
490 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) 490 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId)
491 { 491 {
492 return CreateSceneObject(parts, ownerId, 0x1);
493 }
494
495 /// <summary>
496 /// Create a scene object but do not add it to the scene.
497 /// </summary>
498 /// <param name="parts">The number of parts that should be in the scene object</param>
499 /// <param name="ownerId"></param>
500 /// <param name="uuidTail">
501 /// The hexadecimal last part of the UUID for parts created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}"
502 /// will be given to the root part, and incremented for each part thereafter.
503 /// </param>
504 /// <returns></returns>
505 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail)
506 {
507 string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail);
508
492 SceneObjectGroup sog 509 SceneObjectGroup sog
493 = new SceneObjectGroup( 510 = new SceneObjectGroup(
494 CreateSceneObjectPart("part1", new UUID("00000000-0000-0000-0000-000000000001"), ownerId)); 511 CreateSceneObjectPart("part0", new UUID(rawSogId), ownerId));
495 512
496 if (parts > 1) 513 if (parts > 1)
497 for (int i = 2; i <= parts; i++) 514 for (int i = 1; i < parts; i++)
498 sog.AddPart( 515 sog.AddPart(
499 CreateSceneObjectPart( 516 CreateSceneObjectPart(
500 string.Format("obj{0}", i), 517 string.Format("obj{0}", i),
501 new UUID(string.Format("00000000-0000-0000-0000-{0:D12}", i)), 518 new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i)),
502 ownerId)); 519 ownerId));
503 520
504 return sog; 521 return sog;
505 } 522 }
506 } 523 }
507} \ No newline at end of file 524} \ No newline at end of file