public void TestChildAgentSingleRegionCapabilities() { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); UUID spUuid = TestHelpers.ParseTail(0x1); // XXX: This is not great since the use of statics will mean that this has to be manually cleaned up for // any subsequent test. // XXX: May replace with a mock IHttpServer later. BaseHttpServer httpServer = new BaseHttpServer(99999); MainServer.AddHttpServer(httpServer); MainServer.Instance = httpServer; CapabilitiesModule capsMod = new CapabilitiesModule(); TestScene scene = new SceneHelpers().SetupScene(); SceneHelpers.SetupSceneModules(scene, capsMod); ScenePresence sp = SceneHelpers.AddChildScenePresence(scene, spUuid); Assert.That(capsMod.GetCapsForUser(spUuid), Is.Not.Null); // TODO: Need to add tests for other ICapabiltiesModule methods. scene.IncomingCloseAgent(sp.UUID, false); Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); // TODO: Need to add tests for other ICapabiltiesModule methods. }
public void TestCloseAgent() { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); TestScene scene = new SceneHelpers().SetupScene(); ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); scene.IncomingCloseAgent(sp.UUID, false); Assert.That(scene.GetScenePresence(sp.UUID), Is.Null); Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null); Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(0)); // TestHelpers.DisableLogging(); }