aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs60
1 files changed, 41 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index ddff896..92c73be 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -172,25 +172,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
172 172
173 Assert.That(neighbours.Count, Is.EqualTo(2)); 173 Assert.That(neighbours.Count, Is.EqualTo(2));
174 } 174 }
175
176 public void fixNullPresence()
177 {
178 string firstName = "testfirstname";
179
180 AgentCircuitData agent = new AgentCircuitData();
181 agent.AgentID = agent1;
182 agent.firstname = firstName;
183 agent.lastname = "testlastname";
184 agent.SessionID = UUID.Zero;
185 agent.SecureSessionID = UUID.Zero;
186 agent.circuitcode = 123;
187 agent.BaseFolder = UUID.Zero;
188 agent.InventoryFolder = UUID.Zero;
189 agent.startpos = Vector3.Zero;
190 agent.CapsPath = GetRandomCapsObjectPath();
191
192 acd1 = agent;
193 }
194 175
195 [Test] 176 [Test]
196 public void T013_TestRemoveNeighbourRegion() 177 public void T013_TestRemoveNeighbourRegion()
@@ -208,6 +189,28 @@ namespace OpenSim.Region.Framework.Scenes.Tests
208 CompleteAvatarMovement 189 CompleteAvatarMovement
209 */ 190 */
210 } 191 }
192
193 /// <summary>
194 /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
195 /// </summary>
196 /// <remarks>
197 /// Please note that unlike the other tests here, this doesn't rely on structures
198 /// </remarks>
199 [Test]
200 public void TestChildAgentEstablished()
201 {
202 UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
203
204 TestScene myScene1 = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
205 TestScene myScene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
206
207 SceneSetupHelpers.AddRootAgent(myScene1, agent1Id);
208 ScenePresence childPresence = myScene2.GetScenePresence(agent1);
209
210 // TODO: Need to do a fair amount of work to allow synchronous establishment of child agents
211// Assert.That(childPresence, Is.Not.Null);
212// Assert.That(childPresence.IsChildAgent, Is.True);
213 }
211 214
212 // I'm commenting this test, because this is not supposed to happen here 215 // I'm commenting this test, because this is not supposed to happen here
213 //[Test] 216 //[Test]
@@ -330,7 +333,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests
330 Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected."); 333 Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected.");
331 Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again."); 334 Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");
332 } 335 }
336
337 public void fixNullPresence()
338 {
339 string firstName = "testfirstname";
333 340
341 AgentCircuitData agent = new AgentCircuitData();
342 agent.AgentID = agent1;
343 agent.firstname = firstName;
344 agent.lastname = "testlastname";
345 agent.SessionID = UUID.Zero;
346 agent.SecureSessionID = UUID.Zero;
347 agent.circuitcode = 123;
348 agent.BaseFolder = UUID.Zero;
349 agent.InventoryFolder = UUID.Zero;
350 agent.startpos = Vector3.Zero;
351 agent.CapsPath = GetRandomCapsObjectPath();
352
353 acd1 = agent;
354 }
355
334 public static string GetRandomCapsObjectPath() 356 public static string GetRandomCapsObjectPath()
335 { 357 {
336 UUID caps = UUID.Random(); 358 UUID caps = UUID.Random();