aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs (renamed from OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs)44
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs (renamed from OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs)2
2 files changed, 8 insertions, 38 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 9b5f52f..04f5817 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
51 /// Scene presence tests 51 /// Scene presence tests
52 /// </summary> 52 /// </summary>
53 [TestFixture] 53 [TestFixture]
54 public class ScenePresenceTests 54 public class ScenePresenceAgentTests
55 { 55 {
56 public Scene scene, scene2, scene3; 56 public Scene scene, scene2, scene3;
57 public UUID agent1, agent2, agent3; 57 public UUID agent1, agent2, agent3;
@@ -81,11 +81,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
81 agent2 = UUID.Random(); 81 agent2 = UUID.Random();
82 agent3 = UUID.Random(); 82 agent3 = UUID.Random();
83 random = new Random(); 83 random = new Random();
84 sog1 = NewSOG(UUID.Random(), scene, agent1); 84 sog1 = SceneHelpers.CreateSceneObject(1, agent1);
85 sog2 = NewSOG(UUID.Random(), scene, agent1); 85 scene.AddSceneObject(sog1);
86 sog3 = NewSOG(UUID.Random(), scene, agent1); 86 sog2 = SceneHelpers.CreateSceneObject(1, agent1);
87 scene.AddSceneObject(sog2);
88 sog3 = SceneHelpers.CreateSceneObject(1, agent1);
89 scene.AddSceneObject(sog3);
87 90
88 //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
89 region1 = scene.RegionInfo.RegionHandle; 91 region1 = scene.RegionInfo.RegionHandle;
90 region2 = scene2.RegionInfo.RegionHandle; 92 region2 = scene2.RegionInfo.RegionHandle;
91 region3 = scene3.RegionInfo.RegionHandle; 93 region3 = scene3.RegionInfo.RegionHandle;
@@ -349,37 +351,5 @@ namespace OpenSim.Region.Framework.Scenes.Tests
349 capsPath = capsPath.Remove(capsPath.Length - 4, 4); 351 capsPath = capsPath.Remove(capsPath.Length - 4, 4);
350 return capsPath; 352 return capsPath;
351 } 353 }
352
353 private SceneObjectGroup NewSOG(UUID uuid, Scene scene, UUID agent)
354 {
355 SceneObjectPart sop = new SceneObjectPart();
356 sop.Name = RandomName();
357 sop.Description = RandomName();
358 sop.Text = RandomName();
359 sop.SitName = RandomName();
360 sop.TouchName = RandomName();
361 sop.UUID = uuid;
362 sop.Shape = PrimitiveBaseShape.Default;
363 sop.Shape.State = 1;
364 sop.OwnerID = agent;
365
366 SceneObjectGroup sog = new SceneObjectGroup(sop);
367 sog.SetScene(scene);
368
369 return sog;
370 }
371
372 private static string RandomName()
373 {
374 StringBuilder name = new StringBuilder();
375 int size = random.Next(5,12);
376 char ch ;
377 for (int i=0; i<size; i++)
378 {
379 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
380 name.Append(ch);
381 }
382 return name.ToString();
383 }
384 } 354 }
385} \ No newline at end of file 355} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index fb5a19f..4765a86 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
44 /// Teleport tests in a standalone OpenSim 44 /// Teleport tests in a standalone OpenSim
45 /// </summary> 45 /// </summary>
46 [TestFixture] 46 [TestFixture]
47 public class StandaloneTeleportTests 47 public class ScenePresenceTeleportTests
48 { 48 {
49 /// <summary> 49 /// <summary>
50 /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. 50 /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common.