From 1ac5aa68087910dbb3cdfc141d77a95eb89177fa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jan 2012 20:47:19 +0000 Subject: Add remove test for unowned avatars --- .../World/NPC/Tests/NPCModuleTests.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs') diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 571d33d..d21d601 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -119,6 +119,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests } [Test] + public void TestRemove() + { + TestHelpers.InMethod(); +// log4net.Config.XmlConfigurator.Configure(); + + ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); +// ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId); + + Vector3 startPos = new Vector3(128, 128, 30); + INPCModule npcModule = scene.RequestModuleInterface(); + UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, UUID.Zero, scene, sp.Appearance); + + npcModule.DeleteNPC(npcId, scene); + + ScenePresence deletedNpc = scene.GetScenePresence(npcId); + + Assert.That(deletedNpc, Is.Null); + } + + [Test] public void TestAttachments() { TestHelpers.InMethod(); -- cgit v1.1