aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Tests')
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs10
3 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
index 548fea9..5ce78a3 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
63 agent.CapsPath = "http://wibble.com"; 63 agent.CapsPath = "http://wibble.com";
64 64
65 scene.NewUserConnection(agent); 65 scene.NewUserConnection(agent);
66 scene.AddNewClient(new TestClient(agent)); 66 scene.AddNewClient(new TestClient(agent, scene));
67 67
68 ScenePresence presence = scene.GetScenePresence(agentId); 68 ScenePresence presence = scene.GetScenePresence(agentId);
69 69
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
index 3c4049d..5fa897c 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
118 scene.NewUserConnection(agent); 118 scene.NewUserConnection(agent);
119 119
120 // Stage 2: add the new client as a child agent to the scene 120 // Stage 2: add the new client as a child agent to the scene
121 TestClient client = new TestClient(agent); 121 TestClient client = new TestClient(agent, scene);
122 scene.AddNewClient(client); 122 scene.AddNewClient(client);
123 123
124 // Stage 3: Invoke agent crossing, which converts the child agent into a root agent (with appearance, 124 // Stage 3: Invoke agent crossing, which converts the child agent into a root agent (with appearance,
diff --git a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs
index a3d116d..d7342de 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs
@@ -27,6 +27,7 @@
27 27
28using Nini.Config; 28using Nini.Config;
29using NUnit.Framework; 29using NUnit.Framework;
30using NUnit.Framework.SyntaxHelpers;
30using OpenMetaverse; 31using OpenMetaverse;
31using OpenSim.Framework; 32using OpenSim.Framework;
32using OpenSim.Framework.Communications; 33using OpenSim.Framework.Communications;
@@ -77,9 +78,14 @@ namespace OpenSim.Region.Environment.Scenes.Tests
77 78
78 TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId); 79 TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId);
79 80
80 client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); 81 // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used.
82 client.TeleportTargetScene = sceneB;
81 83
82 // TODO: Check that everything is as it should be 84 client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40));
85 Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB");
86 Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA");
87
88 // TODO: Check that more of everything is as it should be
83 89
84 // TODO: test what happens if we try to teleport to a region that doesn't exist 90 // TODO: test what happens if we try to teleport to a region that doesn't exist
85 } 91 }