diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs | 121 |
1 files changed, 60 insertions, 61 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs index 7d0757f..0f88ec6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | using Nini.Config; | 28 | using Nini.Config; |
29 | using NUnit.Framework; | 29 | using NUnit.Framework; |
30 | using NUnit.Framework.SyntaxHelpers; | ||
31 | using OpenMetaverse; | 30 | using OpenMetaverse; |
32 | using OpenMetaverse.Packets; | 31 | using OpenMetaverse.Packets; |
33 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -42,65 +41,65 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
42 | [TestFixture] | 41 | [TestFixture] |
43 | public class PacketHandlerTests | 42 | public class PacketHandlerTests |
44 | { | 43 | { |
45 | [Test] | 44 | // [Test] |
46 | /// <summary> | 45 | // /// <summary> |
47 | /// More a placeholder, really | 46 | // /// More a placeholder, really |
48 | /// </summary> | 47 | // /// </summary> |
49 | public void InPacketTest() | 48 | // public void InPacketTest() |
50 | { | 49 | // { |
51 | TestHelper.InMethod(); | 50 | // TestHelper.InMethod(); |
52 | 51 | // | |
53 | AgentCircuitData agent = new AgentCircuitData(); | 52 | // AgentCircuitData agent = new AgentCircuitData(); |
54 | agent.AgentID = UUID.Random(); | 53 | // agent.AgentID = UUID.Random(); |
55 | agent.firstname = "testfirstname"; | 54 | // agent.firstname = "testfirstname"; |
56 | agent.lastname = "testlastname"; | 55 | // agent.lastname = "testlastname"; |
57 | agent.SessionID = UUID.Zero; | 56 | // agent.SessionID = UUID.Zero; |
58 | agent.SecureSessionID = UUID.Zero; | 57 | // agent.SecureSessionID = UUID.Zero; |
59 | agent.circuitcode = 123; | 58 | // agent.circuitcode = 123; |
60 | agent.BaseFolder = UUID.Zero; | 59 | // agent.BaseFolder = UUID.Zero; |
61 | agent.InventoryFolder = UUID.Zero; | 60 | // agent.InventoryFolder = UUID.Zero; |
62 | agent.startpos = Vector3.Zero; | 61 | // agent.startpos = Vector3.Zero; |
63 | agent.CapsPath = "http://wibble.com"; | 62 | // agent.CapsPath = "http://wibble.com"; |
64 | 63 | // | |
65 | TestLLUDPServer testLLUDPServer; | 64 | // TestLLUDPServer testLLUDPServer; |
66 | TestLLPacketServer testLLPacketServer; | 65 | // TestLLPacketServer testLLPacketServer; |
67 | AgentCircuitManager acm; | 66 | // AgentCircuitManager acm; |
68 | IScene scene = new MockScene(); | 67 | // IScene scene = new MockScene(); |
69 | SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); | 68 | // SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); |
70 | 69 | // | |
71 | TestClient testClient = new TestClient(agent, scene); | 70 | // TestClient testClient = new TestClient(agent, scene); |
72 | 71 | // | |
73 | LLPacketHandler packetHandler | 72 | // LLPacketHandler packetHandler |
74 | = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings()); | 73 | // = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings()); |
75 | 74 | // | |
76 | packetHandler.InPacket(new AgentAnimationPacket()); | 75 | // packetHandler.InPacket(new AgentAnimationPacket()); |
77 | LLQueItem receivedPacket = packetHandler.PacketQueue.Dequeue(); | 76 | // LLQueItem receivedPacket = packetHandler.PacketQueue.Dequeue(); |
78 | 77 | // | |
79 | Assert.That(receivedPacket, Is.Not.Null); | 78 | // Assert.That(receivedPacket, Is.Not.Null); |
80 | Assert.That(receivedPacket.Incoming, Is.True); | 79 | // Assert.That(receivedPacket.Incoming, Is.True); |
81 | Assert.That(receivedPacket.Packet, Is.TypeOf(typeof(AgentAnimationPacket))); | 80 | // Assert.That(receivedPacket.Packet, Is.TypeOf(typeof(AgentAnimationPacket))); |
82 | } | 81 | // } |
83 | 82 | // | |
84 | /// <summary> | 83 | // /// <summary> |
85 | /// Add a client for testing | 84 | // /// Add a client for testing |
86 | /// </summary> | 85 | // /// </summary> |
87 | /// <param name="scene"></param> | 86 | // /// <param name="scene"></param> |
88 | /// <param name="testLLUDPServer"></param> | 87 | // /// <param name="testLLUDPServer"></param> |
89 | /// <param name="testPacketServer"></param> | 88 | // /// <param name="testPacketServer"></param> |
90 | /// <param name="acm">Agent circuit manager used in setting up the stack</param> | 89 | // /// <param name="acm">Agent circuit manager used in setting up the stack</param> |
91 | protected void SetupStack( | 90 | // protected void SetupStack( |
92 | IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, | 91 | // IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, |
93 | out AgentCircuitManager acm) | 92 | // out AgentCircuitManager acm) |
94 | { | 93 | // { |
95 | IConfigSource configSource = new IniConfigSource(); | 94 | // IConfigSource configSource = new IniConfigSource(); |
96 | ClientStackUserSettings userSettings = new ClientStackUserSettings(); | 95 | // ClientStackUserSettings userSettings = new ClientStackUserSettings(); |
97 | testLLUDPServer = new TestLLUDPServer(); | 96 | // testLLUDPServer = new TestLLUDPServer(); |
98 | acm = new AgentCircuitManager(); | 97 | // acm = new AgentCircuitManager(); |
99 | 98 | // | |
100 | uint port = 666; | 99 | // uint port = 666; |
101 | testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); | 100 | // testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); |
102 | testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); | 101 | // testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); |
103 | testLLUDPServer.LocalScene = scene; | 102 | // testLLUDPServer.LocalScene = scene; |
104 | } | 103 | // } |
105 | } | 104 | } |
106 | } | 105 | } |