From eca6442bae4093019bd221e87413c74c77c4ff5d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 16 Jan 2009 21:56:13 +0000 Subject: * Rig up enough infrastructure to actually perform a successful 'standalone' teleport unit test with checks that the scene presence disappeared from sceneA and appeared in sceneB * However, I'm not convinced that the actual process in the test completely reflects reality, and a lot of stuff had to be rigged up (which should get resolved over time) --- .../Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs') 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 @@ using Nini.Config; using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; @@ -77,9 +78,14 @@ namespace OpenSim.Region.Environment.Scenes.Tests TestClient client = SceneTestUtils.AddRootAgent(sceneA, agentId); - client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); + // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used. + client.TeleportTargetScene = sceneB; - // TODO: Check that everything is as it should be + client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); + Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB"); + Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA"); + + // TODO: Check that more of everything is as it should be // TODO: test what happens if we try to teleport to a region that doesn't exist } -- cgit v1.1