stop avatar service being set up in NPC TestCreate() - it's no longer used

bulletsim
Justin Clark-Casey (justincc) 2011-08-03 22:45:43 +01:00
parent a333c60f28
commit e0503d397c
1 changed files with 48 additions and 6 deletions

View File

@ -54,17 +54,17 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
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("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.Configs["NPC"].Set("Enabled", "true");
AvatarFactoryModule afm = new AvatarFactoryModule();
TestScene scene = SceneSetupHelpers.SetupScene();
SceneSetupHelpers.SetupSceneModules(scene, config, afm, new NPCModule(), new LocalAvatarServicesConnector());
SceneSetupHelpers.SetupSceneModules(scene, config, afm, new NPCModule());
TestClient originalClient = SceneSetupHelpers.AddClient(scene, TestHelper.ParseTail(0x1));
// ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);
@ -88,5 +88,47 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
Assert.That(npc, Is.Not.Null);
Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId));
}
// [Test]
// public void TestMove()
// {
// TestHelper.InMethod();
//// log4net.Config.XmlConfigurator.Configure();
//
// 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.Configs["NPC"].Set("Enabled", "true");
//
// TestScene scene = SceneSetupHelpers.SetupScene();
// SceneSetupHelpers.SetupSceneModules(scene, config, afm, new NPCModule(), new LocalAvatarServicesConnector());
// TestClient originalClient = SceneSetupHelpers.AddClient(scene, TestHelper.ParseTail(0x1));
//// ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);
//
// // 8 is the index of the first baked texture in AvatarAppearance
// UUID originalFace8TextureId = TestHelper.ParseTail(0x10);
// Primitive.TextureEntry originalTe = new Primitive.TextureEntry(UUID.Zero);
// 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));
// }
}
}