public void TestCreateRootScenePresence() { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); UUID spUuid = TestHelpers.ParseTail(0x1); TestScene scene = new SceneHelpers().SetupScene(); SceneHelpers.AddScenePresence(scene, spUuid); Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null); Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); ScenePresence sp = scene.GetScenePresence(spUuid); Assert.That(sp, Is.Not.Null); Assert.That(sp.IsChildAgent, Is.False); Assert.That(sp.UUID, Is.EqualTo(spUuid)); Assert.That(scene.GetScenePresences().Count, Is.EqualTo(1)); }
public void TestDupeCompleteMovementCalls() { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); UUID spUuid = TestHelpers.ParseTail(0x1); TestScene scene = new SceneHelpers().SetupScene(); int makeRootAgentEvents = 0; scene.EventManager.OnMakeRootAgent += spi => makeRootAgentEvents++; ScenePresence sp = SceneHelpers.AddScenePresence(scene, spUuid); Assert.That(makeRootAgentEvents, Is.EqualTo(1)); // Normally these would be invoked by a CompleteMovement message coming in to the UDP stack. But for // convenience, here we will invoke it manually. sp.CompleteMovement(sp.ControllingClient, true); Assert.That(makeRootAgentEvents, Is.EqualTo(1)); // Check rest of exepcted parameters. Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null); Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); Assert.That(sp.IsChildAgent, Is.False); Assert.That(sp.UUID, Is.EqualTo(spUuid)); Assert.That(scene.GetScenePresences().Count, Is.EqualTo(1)); }