本文整理汇总了C#中OpenSim.Tests.Common.SceneHelpers.CloseAgent方法的典型用法代码示例。如果您正苦于以下问题:C# SceneHelpers.CloseAgent方法的具体用法?C# SceneHelpers.CloseAgent怎么用?C# SceneHelpers.CloseAgent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Tests.Common.SceneHelpers
的用法示例。
在下文中一共展示了SceneHelpers.CloseAgent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestChildAgentSingleRegionCapabilities
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.CloseAgent(sp.UUID, false);
Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null);
// TODO: Need to add tests for other ICapabiltiesModule methods.
}
示例2: TestCloseClient
public void TestCloseClient()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
TestScene scene = new SceneHelpers().SetupScene();
ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
scene.CloseAgent(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();
}