aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-12 20:42:44 +0000
committerJustin Clarke Casey2009-01-12 20:42:44 +0000
commitefcf6ff095c55fdcb6870eeb544c53ff964a501a (patch)
treedc4cc6eebc75c75888d8b46328b71f9497ac3a1c
parentThank you kindly, Tlaukkan (Tommil) for a patch that: (diff)
downloadopensim-SC_OLD-efcf6ff095c55fdcb6870eeb544c53ff964a501a.zip
opensim-SC_OLD-efcf6ff095c55fdcb6870eeb544c53ff964a501a.tar.gz
opensim-SC_OLD-efcf6ff095c55fdcb6870eeb544c53ff964a501a.tar.bz2
opensim-SC_OLD-efcf6ff095c55fdcb6870eeb544c53ff964a501a.tar.xz
* Extend current stub packet handler test into a really basic one that checks that a sent in packet ends up on the client queue ready for processing
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs
index ac5175c..62e6e96 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Threading;
28using Nini.Config; 29using Nini.Config;
29using NUnit.Framework; 30using NUnit.Framework;
30using NUnit.Framework.SyntaxHelpers; 31using NUnit.Framework.SyntaxHelpers;
@@ -46,7 +47,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
46 /// <summary> 47 /// <summary>
47 /// More a placeholder, really 48 /// More a placeholder, really
48 /// </summary> 49 /// </summary>
49 public void DummyTest() 50 public void InPacketTest()
50 { 51 {
51 AgentCircuitData agent = new AgentCircuitData(); 52 AgentCircuitData agent = new AgentCircuitData();
52 agent.AgentID = UUID.Random(); 53 agent.AgentID = UUID.Random();
@@ -65,11 +66,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
65 AgentCircuitManager acm; 66 AgentCircuitManager acm;
66 SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm); 67 SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm);
67 68
69 TestClient testClient = new TestClient(agent);
70
68 ILLPacketHandler packetHandler 71 ILLPacketHandler packetHandler
69 = new LLPacketHandler(new TestClient(agent), testLLPacketServer, new ClientStackUserSettings()); 72 = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings());
70 73
71 packetHandler.InPacket(new AgentAnimationPacket()); 74 packetHandler.InPacket(new AgentAnimationPacket());
72 //Assert.That(Is.Not.Null(packetHandler.PacketQueue.Dequeue())); 75 LLQueItem receivedPacket = packetHandler.PacketQueue.Dequeue();
76
77 Assert.That(receivedPacket, Is.Not.Null);
78 Assert.That(receivedPacket.Incoming, Is.True);
79 Assert.That(receivedPacket.Packet, Is.TypeOf(typeof(AgentAnimationPacket)));
73 } 80 }
74 81
75 /// <summary> 82 /// <summary>