From 00d9c3c2cc2edad290365cc9cb39aa86868b2e63 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 20 Nov 2008 17:27:45 +0000 Subject: * Add a scratch test for removing a client from a scene --- .../Environment/Scenes/Tests/ScenePresenceTests.cs | 18 ++++++++++++++++++ .../Region/Environment/Scenes/Tests/SceneTestUtils.cs | 3 +-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs index a82f9b1..fcc6c41 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs @@ -82,5 +82,23 @@ namespace OpenSim.Region.Environment.Scenes.Tests Assert.That(presence, Is.Not.Null, "presence is null"); Assert.That(presence.Firstname, Is.EqualTo(firstName), "First name not same"); } + + /// + /// Test removing an uncrossed root agent from a scene. + /// + [Test] + public void TestRemoveRootAgent() + { + Scene scene = SceneTestUtils.SetupScene(); + UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); + + SceneTestUtils.AddRootAgent(scene, agentId); + + scene.RemoveClient(agentId); + + ScenePresence presence = scene.GetScenePresence(agentId); + + Assert.That(presence, Is.Null, "presence is not null"); + } } } diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs index 2b2a114..1cdd32c 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs @@ -52,8 +52,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests AgentCircuitManager acm = new AgentCircuitManager(); CommunicationsManager cm = new TestCommunicationsManager(); - //SceneCommunicationService scs = new SceneCommunicationService(cm); - SceneCommunicationService scs = null; + SceneCommunicationService scs = new SceneCommunicationService(cm); StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); BaseHttpServer httpServer = new BaseHttpServer(666); IConfigSource configSource = new IniConfigSource(); -- cgit v1.1