Add passing but incomplete NPC move regression test

bulletsim
Justin Clark-Casey (justincc) 2011-08-03 22:51:46 +01:00
parent e0503d397c
commit d78fe44191
1 changed files with 25 additions and 47 deletions

View File

@ -53,12 +53,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
// log4net.Config.XmlConfigurator.Configure(); // log4net.Config.XmlConfigurator.Configure();
IConfigSource config = new IniConfigSource(); IConfigSource config = new IniConfigSource();
// config.AddConfig("Modules");
// config.Configs["Modules"].Set("AvatarServices", "LocalAvatarServicesConnector");
// config.AddConfig("AvatarService");
// config.Configs["AvatarService"].Set("LocalServiceModule", "OpenSim.Services.AvatarService.dll:AvatarService");
// config.Configs["AvatarService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
config.AddConfig("NPC"); config.AddConfig("NPC");
config.Configs["NPC"].Set("Enabled", "true"); config.Configs["NPC"].Set("Enabled", "true");
@ -89,46 +83,30 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId)); Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId));
} }
// [Test] [Test]
// public void TestMove() public void TestMove()
// { {
// TestHelper.InMethod(); TestHelper.InMethod();
//// log4net.Config.XmlConfigurator.Configure(); log4net.Config.XmlConfigurator.Configure();
//
// IConfigSource config = new IniConfigSource(); IConfigSource config = new IniConfigSource();
//
// config.AddConfig("Modules"); config.AddConfig("NPC");
// config.Configs["Modules"].Set("AvatarServices", "LocalAvatarServicesConnector"); config.Configs["NPC"].Set("Enabled", "true");
// config.AddConfig("AvatarService");
// config.Configs["AvatarService"].Set("LocalServiceModule", "OpenSim.Services.AvatarService.dll:AvatarService"); TestScene scene = SceneSetupHelpers.SetupScene();
// config.Configs["AvatarService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); SceneSetupHelpers.SetupSceneModules(scene, config, new NPCModule());
// config.AddConfig("NPC"); TestClient originalClient = SceneSetupHelpers.AddClient(scene, TestHelper.ParseTail(0x1));
// config.Configs["NPC"].Set("Enabled", "true"); // ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);
//
// TestScene scene = SceneSetupHelpers.SetupScene(); Vector3 startPos = new Vector3(128, 128, 30);
// SceneSetupHelpers.SetupSceneModules(scene, config, afm, new NPCModule(), new LocalAvatarServicesConnector()); INPCModule npcModule = scene.RequestModuleInterface<INPCModule>();
// TestClient originalClient = SceneSetupHelpers.AddClient(scene, TestHelper.ParseTail(0x1)); UUID npcId = npcModule.CreateNPC("John", "Smith", startPos, scene, originalClient.AgentId);
//// ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);
// ScenePresence npc = scene.GetScenePresence(npcId);
// // 8 is the index of the first baked texture in AvatarAppearance Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
// UUID originalFace8TextureId = TestHelper.ParseTail(0x10);
// Primitive.TextureEntry originalTe = new Primitive.TextureEntry(UUID.Zero); // Not yet complete
// Primitive.TextureEntryFace originalTef = originalTe.CreateFace(8); }
// originalTef.TextureID = originalFace8TextureId;
//
// // We also need to add the texture to the asset service, otherwise the AvatarFactoryModule will tell
// // ScenePresence.SendInitialData() to reset our entire appearance.
// scene.AssetService.Store(AssetHelpers.CreateAsset(originalFace8TextureId));
//
// afm.SetAppearance(originalClient, originalTe, null);
//
// INPCModule npcModule = scene.RequestModuleInterface<INPCModule>();
// UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), scene, originalClient.AgentId);
//
// ScenePresence npc = scene.GetScenePresence(npcId);
//
// Assert.That(npc, Is.Not.Null);
// Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId));
// }
} }
} }