diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs index cf24e58..e32e423 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System.Net; | 28 | using System.Net; |
29 | using log4net; | ||
29 | using NUnit.Framework; | 30 | using NUnit.Framework; |
30 | using OpenMetaverse.Packets; | 31 | using OpenMetaverse.Packets; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -33,7 +34,7 @@ using OpenSim.Framework.Communications; | |||
33 | using OpenSim.Region.ClientStack; | 34 | using OpenSim.Region.ClientStack; |
34 | using OpenSim.Region.ClientStack.LindenUDP; | 35 | using OpenSim.Region.ClientStack.LindenUDP; |
35 | 36 | ||
36 | namespace OpenSim.Region.ClientStack.LindenUDP | 37 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests |
37 | { | 38 | { |
38 | /// <summary> | 39 | /// <summary> |
39 | /// This will contain basic tests for the LindenUDP client stack | 40 | /// This will contain basic tests for the LindenUDP client stack |
@@ -44,13 +45,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
44 | [Test] | 45 | [Test] |
45 | public void TestAddClient() | 46 | public void TestAddClient() |
46 | { | 47 | { |
47 | TestLLUDPServer testLLUDPServer = new TestLLUDPServer(); | 48 | try |
49 | { | ||
50 | log4net.Config.XmlConfigurator.Configure(); | ||
51 | } | ||
52 | catch | ||
53 | { | ||
54 | // I don't care, just leave log4net off | ||
55 | } | ||
56 | |||
57 | TestLLUDPServer testLLUDPServer = new TestLLUDPServer(); | ||
58 | ClientStackUserSettings userSettings = new ClientStackUserSettings(); | ||
48 | 59 | ||
49 | uint port = 666; | 60 | uint port = 666; |
50 | testLLUDPServer.Initialise(null, ref port, -1, false, new ClientStackUserSettings(), null, null); | 61 | testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, null); |
62 | LLPacketServer packetServer = new LLPacketServer(testLLUDPServer, userSettings); | ||
63 | testLLUDPServer.LocalScene = new MockScene(); | ||
64 | |||
65 | UseCircuitCodePacket uccp = new UseCircuitCodePacket(); | ||
66 | UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock | ||
67 | = new OpenMetaverse.Packets.UseCircuitCodePacket.CircuitCodeBlock(); | ||
68 | uccpCcBlock.Code = 123456; | ||
69 | uccp.CircuitCode = uccpCcBlock; | ||
70 | |||
71 | EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); | ||
72 | |||
73 | testLLUDPServer.LoadReceive(uccp, testEp); | ||
74 | testLLUDPServer.ReceiveData(null); | ||
51 | 75 | ||
52 | //UseCircuitCodePacket uccp = new UseCircuitCodePacket(); | 76 | //Assert.IsTrue(testLLUDPServer.HasCircuit(123456)); |
53 | //llUdpServer.epS | ||
54 | } | 77 | } |
55 | } | 78 | } |
56 | } | 79 | } |