Add remove test for unowned avatars

iar_mods
Justin Clark-Casey (justincc) 2012-01-12 20:47:19 +00:00
parent c4972e7734
commit 1ac5aa6808
1 changed files with 20 additions and 0 deletions

View File

@ -118,6 +118,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
Assert.That(umm.GetUserName(npc.UUID), Is.EqualTo(string.Format("{0} {1}", npc.Firstname, npc.Lastname)));
}
[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<INPCModule>();
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()
{