aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index f479e12..df2dacb 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -131,13 +131,29 @@ namespace OpenSim.Region.Framework.Scenes.Tests
131 131
132 UUID agentId = TestHelpers.ParseTail(0x01); 132 UUID agentId = TestHelpers.ParseTail(0x01);
133 AgentCircuitData acd = SceneHelpers.GenerateAgentData(agentId); 133 AgentCircuitData acd = SceneHelpers.GenerateAgentData(agentId);
134 acd.child = true;
134 135
135 GridRegion region = scene.GridService.GetRegionByName(UUID.Zero, scene.RegionInfo.RegionName); 136 GridRegion region = scene.GridService.GetRegionByName(UUID.Zero, scene.RegionInfo.RegionName);
136 string reason; 137 string reason;
138 // XXX: ViaLogin may not be correct here.
137 scene.SimulationService.CreateAgent(region, acd, (uint)TeleportFlags.ViaLogin, out reason); 139 scene.SimulationService.CreateAgent(region, acd, (uint)TeleportFlags.ViaLogin, out reason);
138 140
139 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null); 141 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null);
140 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); 142 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
143
144 // There's no scene presence yet since only an agent circuit has been established.
145 Assert.That(scene.GetScenePresence(agentId), Is.Null);
146
147 TestClient client = new TestClient(acd, scene);
148 scene.AddNewClient(client, PresenceType.User);
149
150 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null);
151 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
152
153 ScenePresence sp = scene.GetScenePresence(agentId);
154 Assert.That(sp, Is.Not.Null);
155 Assert.That(sp.UUID, Is.EqualTo(agentId));
156 Assert.That(sp.IsChildAgent, Is.True);
141 } 157 }
142 158
143 /// <summary> 159 /// <summary>