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