diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs index a61b9c2..3bc8467 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs | |||
@@ -74,17 +74,34 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
74 | sceneB.SetModuleInterfaces(); | 74 | sceneB.SetModuleInterfaces(); |
75 | sceneB.RegisterRegionWithGrid(); | 75 | sceneB.RegisterRegionWithGrid(); |
76 | 76 | ||
77 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); | 77 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); |
78 | |||
79 | TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId); | 78 | TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId); |
79 | |||
80 | ICapabilitiesModule sceneACapsModule = sceneA.RequestModuleInterface<ICapabilitiesModule>(); | ||
80 | 81 | ||
82 | Assert.That( | ||
83 | sceneACapsModule.GetCapsPath(agentId), | ||
84 | Is.EqualTo(client.CapsSeedUrl), | ||
85 | "Incorrect caps object path set up in sceneA"); | ||
86 | |||
81 | // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used. | 87 | // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used. |
82 | client.TeleportTargetScene = sceneB; | 88 | client.TeleportTargetScene = sceneB; |
83 | |||
84 | client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); | 89 | client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); |
90 | |||
85 | Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB"); | 91 | 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"); | 92 | Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA"); |
87 | 93 | ||
94 | ICapabilitiesModule sceneBCapsModule = sceneB.RequestModuleInterface<ICapabilitiesModule>(); | ||
95 | |||
96 | // Temporary assertion - caps url construction should at least be doable through a method. | ||
97 | Assert.That( | ||
98 | "http://" + sceneB.RegionInfo.ExternalHostName + ":" + sceneB.RegionInfo.HttpPort + "/CAPS/" + sceneBCapsModule.GetCapsPath(agentId) + "0000/", | ||
99 | Is.EqualTo(client.CapsSeedUrl), | ||
100 | "Incorrect caps object path set up in sceneB"); | ||
101 | |||
102 | // This assertion will currently fail since we don't remove the caps paths when no longer needed | ||
103 | //Assert.That(sceneACapsModule.GetCapsPath(agentId), Is.Null, "sceneA still had a caps object path"); | ||
104 | |||
88 | // TODO: Check that more of everything is as it should be | 105 | // TODO: Check that more of everything is as it should be |
89 | 106 | ||
90 | // TODO: test what happens if we try to teleport to a region that doesn't exist | 107 | // TODO: test what happens if we try to teleport to a region that doesn't exist |