29 using System.Collections.Generic;
32 using System.Reflection;
34 using System.Threading;
37 using NUnit.Framework;
39 using OpenSim.Framework;
41 using OpenSim.Framework.Servers;
42 using OpenSim.Region.Framework.Interfaces;
43 using OpenSim.Region.Framework.Scenes;
44 using OpenSim.Region.CoreModules.Framework;
45 using OpenSim.Tests.Common;
47 namespace OpenSim.Tests.Common
49 public static class EntityTransferHelpers
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62 public static void SetupInformClientOfNeighbourTriggersNeighbourClientCreate(
68 tc.OnTestClientInformClientOfNeighbour += (neighbourHandle, neighbourExternalEndPoint) =>
71 Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y);
74 "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}",
75 x, y, neighbourExternalEndPoint);
80 SceneManager.Instance.TryGetScene(x, y, out neighbourScene);
83 neighbourTcs.Add(neighbourTc);
84 neighbourScene.AddNewAgent(neighbourTc, PresenceType.User);
97 public static void SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement(
98 TestClient client, List<TestClient> destinationClients)
100 client.OnTestClientSendRegionTeleport
101 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) =>
104 Util.RegionHandleToRegionLoc(regionHandle, out x, out y);
107 "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}",
108 x, y, regionExternalEndPoint);
112 Scene destinationScene;
113 SceneManager.Instance.TryGetScene(x, y, out destinationScene);
116 destinationClients.Add(destinationClient);
117 destinationScene.AddNewAgent(destinationClient, PresenceType.User);
119 ThreadPool.UnsafeQueueUserWorkItem(o => destinationClient.CompleteMovement(), null);
Circuit data for an agent. Connection information shared between regions that accept UDP connections ...