From 85e07c78fbed9e85c142c0f565c27015ad95769d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 6 Aug 2011 02:17:41 +0100
Subject: refactor: Change SceneHelpers.AddClient() to AddScenePresence().
This seems to make more sense as we can get SP.ControllingClient
---
.../Scenes/Tests/ScenePresenceAgentTests.cs | 72 ++++++++++++----------
1 file changed, 41 insertions(+), 31 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 04f5817..73acf28 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -93,6 +93,47 @@ namespace OpenSim.Region.Framework.Scenes.Tests
region3 = scene3.RegionInfo.RegionHandle;
}
+// [Test]
+// public void TestLogout()
+// {
+// TestHelpers.InMethod();
+//// log4net.Config.XmlConfigurator.Configure();
+//
+// TestScene scene = SceneHelpers.SetupScene();
+// SceneHelpers.
+// }
+
+ ///
+ /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
+ ///
+ ///
+ /// Please note that unlike the other tests here, this doesn't rely on structures
+ ///
+ [Test]
+ public void TestChildAgentEstablished()
+ {
+ TestHelpers.InMethod();
+// log4net.Config.XmlConfigurator.Configure();
+
+ UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
+
+ TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
+// TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
+
+ IConfigSource configSource = new IniConfigSource();
+ configSource.AddConfig("Modules").Set("EntityTransferModule", "BasicEntityTransferModule");
+ EntityTransferModule etm = new EntityTransferModule();
+
+ SceneHelpers.SetupSceneModules(myScene1, configSource, etm);
+
+ SceneHelpers.AddScenePresence(myScene1, agent1Id);
+// ScenePresence childPresence = myScene2.GetScenePresence(agent1);
+
+ // TODO: Need to do a fair amount of work to allow synchronous establishment of child agents
+// Assert.That(childPresence, Is.Not.Null);
+// Assert.That(childPresence.IsChildAgent, Is.True);
+ }
+
///
/// Test adding a root agent to a scene. Doesn't yet actually complete crossing the agent into the scene.
///
@@ -190,37 +231,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
CompleteAvatarMovement
*/
}
-
- ///
- /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
- ///
- ///
- /// Please note that unlike the other tests here, this doesn't rely on structures
- ///
- [Test]
- public void TestChildAgentEstablished()
- {
- TestHelpers.InMethod();
-// log4net.Config.XmlConfigurator.Configure();
-
- UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
-
- TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
- TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
-
- IConfigSource configSource = new IniConfigSource();
- configSource.AddConfig("Modules").Set("EntityTransferModule", "BasicEntityTransferModule");
- EntityTransferModule etm = new EntityTransferModule();
-
- SceneHelpers.SetupSceneModules(myScene1, configSource, etm);
-
- SceneHelpers.AddClient(myScene1, agent1Id);
- ScenePresence childPresence = myScene2.GetScenePresence(agent1);
-
- // TODO: Need to do a fair amount of work to allow synchronous establishment of child agents
-// Assert.That(childPresence, Is.Not.Null);
-// Assert.That(childPresence.IsChildAgent, Is.True);
- }
// I'm commenting this test because it does not represent
// crossings. The Thread.Sleep's in here are not meaningful mocks,
--
cgit v1.1