another test....
parent
e7f0131509
commit
b458c5a9b4
|
@ -212,6 +212,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId);
|
ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId);
|
||||||
sp.AbsolutePosition = new Vector3(30, 31, 32);
|
sp.AbsolutePosition = new Vector3(30, 31, 32);
|
||||||
|
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
List<TestClient> destinationTestClients = new List<TestClient>();
|
List<TestClient> destinationTestClients = new List<TestClient>();
|
||||||
EntityTransferHelpers.SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement(
|
EntityTransferHelpers.SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement(
|
||||||
(TestClient)sp.ControllingClient, destinationTestClients);
|
(TestClient)sp.ControllingClient, destinationTestClients);
|
||||||
|
@ -224,11 +227,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
(uint)TeleportFlags.ViaLocation);
|
(uint)TeleportFlags.ViaLocation);
|
||||||
|
|
||||||
// Assert.That(sceneA.GetScenePresence(userId), Is.Null);
|
// Assert.That(sceneA.GetScenePresence(userId), Is.Null);
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
ScenePresence sceneBSp = sceneB.GetScenePresence(userId);
|
ScenePresence sceneBSp = sceneB.GetScenePresence(userId);
|
||||||
Assert.That(sceneBSp, Is.Not.Null);
|
Assert.That(sceneBSp, Is.Not.Null);
|
||||||
Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
|
Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
|
||||||
Assert.That(sceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition));
|
Assert.That(sceneBSp.AbsolutePosition.X, Is.EqualTo(teleportPosition.X));
|
||||||
|
Assert.That(sceneBSp.AbsolutePosition.Y, Is.EqualTo(teleportPosition.Y));
|
||||||
|
|
||||||
//Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
|
//Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
|
||||||
//Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
//Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
||||||
|
@ -310,7 +316,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
ScenePresence sceneASp = sceneA.GetScenePresence(userId);
|
ScenePresence sceneASp = sceneA.GetScenePresence(userId);
|
||||||
Assert.That(sceneASp, Is.Not.Null);
|
Assert.That(sceneASp, Is.Not.Null);
|
||||||
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
|
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
|
||||||
Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
|
Assert.That(sceneASp.AbsolutePosition.X, Is.EqualTo(preTeleportPosition.X));
|
||||||
|
Assert.That(sceneASp.AbsolutePosition.Y, Is.EqualTo(preTeleportPosition.Y));
|
||||||
|
|
||||||
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
|
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
|
||||||
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
||||||
|
@ -369,6 +376,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId);
|
ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId);
|
||||||
sp.AbsolutePosition = preTeleportPosition;
|
sp.AbsolutePosition = preTeleportPosition;
|
||||||
|
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
// Make sceneB refuse CreateAgent
|
// Make sceneB refuse CreateAgent
|
||||||
sceneB.LoginsEnabled = false;
|
sceneB.LoginsEnabled = false;
|
||||||
|
|
||||||
|
@ -381,12 +391,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
|
|
||||||
// ((TestClient)sp.ControllingClient).CompleteTeleportClientSide();
|
// ((TestClient)sp.ControllingClient).CompleteTeleportClientSide();
|
||||||
|
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
Assert.That(sceneB.GetScenePresence(userId), Is.Null);
|
Assert.That(sceneB.GetScenePresence(userId), Is.Null);
|
||||||
|
|
||||||
ScenePresence sceneASp = sceneA.GetScenePresence(userId);
|
ScenePresence sceneASp = sceneA.GetScenePresence(userId);
|
||||||
Assert.That(sceneASp, Is.Not.Null);
|
Assert.That(sceneASp, Is.Not.Null);
|
||||||
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
|
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
|
||||||
Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
|
Assert.That(sceneASp.AbsolutePosition.X, Is.EqualTo(preTeleportPosition.X));
|
||||||
|
Assert.That(sceneASp.AbsolutePosition.Y, Is.EqualTo(preTeleportPosition.Y));
|
||||||
|
|
||||||
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
|
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
|
||||||
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
||||||
|
@ -458,6 +472,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId);
|
ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId);
|
||||||
sp.AbsolutePosition = preTeleportPosition;
|
sp.AbsolutePosition = preTeleportPosition;
|
||||||
|
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
sceneA.RequestTeleportLocation(
|
sceneA.RequestTeleportLocation(
|
||||||
sp.ControllingClient,
|
sp.ControllingClient,
|
||||||
sceneB.RegionInfo.RegionHandle,
|
sceneB.RegionInfo.RegionHandle,
|
||||||
|
@ -468,13 +485,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
// FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate
|
// FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate
|
||||||
// communication with the destination region. But this is a very non-obvious way of doing it - really we
|
// communication with the destination region. But this is a very non-obvious way of doing it - really we
|
||||||
// should be forced to expicitly set this up.
|
// should be forced to expicitly set this up.
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
Assert.That(sceneB.GetScenePresence(userId), Is.Null);
|
Assert.That(sceneB.GetScenePresence(userId), Is.Null);
|
||||||
|
|
||||||
ScenePresence sceneASp = sceneA.GetScenePresence(userId);
|
ScenePresence sceneASp = sceneA.GetScenePresence(userId);
|
||||||
Assert.That(sceneASp, Is.Not.Null);
|
Assert.That(sceneASp, Is.Not.Null);
|
||||||
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
|
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
|
||||||
Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
|
Assert.That(sceneASp.AbsolutePosition.X, Is.EqualTo(preTeleportPosition.X));
|
||||||
|
Assert.That(sceneASp.AbsolutePosition.Y, Is.EqualTo(preTeleportPosition.Y));
|
||||||
|
|
||||||
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
|
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
|
||||||
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
|
||||||
|
@ -614,6 +634,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
ScenePresence beforeSceneASp = SceneHelpers.AddScenePresence(sceneA, tc, acd);
|
ScenePresence beforeSceneASp = SceneHelpers.AddScenePresence(sceneA, tc, acd);
|
||||||
beforeSceneASp.AbsolutePosition = new Vector3(30, 31, 32);
|
beforeSceneASp.AbsolutePosition = new Vector3(30, 31, 32);
|
||||||
|
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
Assert.That(beforeSceneASp, Is.Not.Null);
|
Assert.That(beforeSceneASp, Is.Not.Null);
|
||||||
Assert.That(beforeSceneASp.IsChildAgent, Is.False);
|
Assert.That(beforeSceneASp.IsChildAgent, Is.False);
|
||||||
|
|
||||||
|
@ -638,6 +661,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
teleportLookAt,
|
teleportLookAt,
|
||||||
(uint)TeleportFlags.ViaLocation);
|
(uint)TeleportFlags.ViaLocation);
|
||||||
|
|
||||||
|
sceneA.Update(4);
|
||||||
|
sceneB.Update(4);
|
||||||
|
|
||||||
ScenePresence afterSceneASp = sceneA.GetScenePresence(userId);
|
ScenePresence afterSceneASp = sceneA.GetScenePresence(userId);
|
||||||
Assert.That(afterSceneASp, Is.Not.Null);
|
Assert.That(afterSceneASp, Is.Not.Null);
|
||||||
Assert.That(afterSceneASp.IsChildAgent, Is.True);
|
Assert.That(afterSceneASp.IsChildAgent, Is.True);
|
||||||
|
@ -646,7 +672,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
Assert.That(afterSceneBSp, Is.Not.Null);
|
Assert.That(afterSceneBSp, Is.Not.Null);
|
||||||
Assert.That(afterSceneBSp.IsChildAgent, Is.False);
|
Assert.That(afterSceneBSp.IsChildAgent, Is.False);
|
||||||
Assert.That(afterSceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
|
Assert.That(afterSceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
|
||||||
Assert.That(afterSceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition));
|
Assert.That(afterSceneBSp.AbsolutePosition.X, Is.EqualTo(teleportPosition.X));
|
||||||
|
Assert.That(afterSceneBSp.AbsolutePosition.Y, Is.EqualTo(teleportPosition.Y));
|
||||||
|
|
||||||
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
|
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
|
||||||
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(1));
|
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(1));
|
||||||
|
|
Loading…
Reference in New Issue