aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index 1836447..a3672d5 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -147,7 +147,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
147 TestHelper.InMethod(); 147 TestHelper.InMethod();
148 148
149 string reason; 149 string reason;
150
151 if (acd1 == null)
152 fixNullPresence();
153
150 scene.NewUserConnection(acd1, out reason); 154 scene.NewUserConnection(acd1, out reason);
155 if (testclient == null)
156 testclient = new TestClient(acd1, scene);
151 scene.AddNewClient(testclient); 157 scene.AddNewClient(testclient);
152 158
153 ScenePresence presence = scene.GetScenePresence(agent1); 159 ScenePresence presence = scene.GetScenePresence(agent1);
@@ -162,6 +168,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests
162 168
163 Assert.That(neighbours.Count, Is.EqualTo(2)); 169 Assert.That(neighbours.Count, Is.EqualTo(2));
164 } 170 }
171 public void fixNullPresence()
172 {
173 string firstName = "testfirstname";
174
175 AgentCircuitData agent = new AgentCircuitData();
176 agent.AgentID = agent1;
177 agent.firstname = firstName;
178 agent.lastname = "testlastname";
179 agent.SessionID = UUID.Zero;
180 agent.SecureSessionID = UUID.Zero;
181 agent.circuitcode = 123;
182 agent.BaseFolder = UUID.Zero;
183 agent.InventoryFolder = UUID.Zero;
184 agent.startpos = Vector3.Zero;
185 agent.CapsPath = GetRandomCapsObjectPath();
186
187 acd1 = agent;
188 }
165 189
166 [Test] 190 [Test]
167 public void T013_TestRemoveNeighbourRegion() 191 public void T013_TestRemoveNeighbourRegion()