aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-10-30 22:32:23 +0000
committerJustin Clarke Casey2008-10-30 22:32:23 +0000
commit5feaff8524845d3475c02d1ba96465925e65e34a (patch)
tree0a74b46b64e56ee924e59077276b8fa7f2b63a19 /OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs
parent* test: Test that the client stack doesn't completely blow up if a client pas... (diff)
downloadopensim-SC_OLD-5feaff8524845d3475c02d1ba96465925e65e34a.zip
opensim-SC_OLD-5feaff8524845d3475c02d1ba96465925e65e34a.tar.gz
opensim-SC_OLD-5feaff8524845d3475c02d1ba96465925e65e34a.tar.bz2
opensim-SC_OLD-5feaff8524845d3475c02d1ba96465925e65e34a.tar.xz
test: Extend malformed packet test to actually check that a valid packet can get through after the malformed ones have been sent
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs
index 4981a1d..4c8ee9c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs
@@ -36,6 +36,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
36 /// </summary> 36 /// </summary>
37 public class MockScene : SceneBase 37 public class MockScene : SceneBase
38 { 38 {
39 public int ObjectNameCallsReceived
40 {
41 get { return m_objectNameCallsReceived; }
42 }
43 protected int m_objectNameCallsReceived;
44
39 public MockScene() 45 public MockScene()
40 { 46 {
41 m_regInfo = new RegionInfo(1000, 1000, null, null); 47 m_regInfo = new RegionInfo(1000, 1000, null, null);
@@ -44,9 +50,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
44 50
45 public override void Update() {} 51 public override void Update() {}
46 public override void LoadWorldMap() {} 52 public override void LoadWorldMap() {}
47 public override void AddNewClient(IClientAPI client, bool child) {} 53
54 public override void AddNewClient(IClientAPI client, bool child)
55 {
56 client.OnObjectName += RecordObjectNameCall;
57 }
58
48 public override void RemoveClient(UUID agentID) {} 59 public override void RemoveClient(UUID agentID) {}
49 public override void CloseAllAgents(uint circuitcode) {} 60 public override void CloseAllAgents(uint circuitcode) {}
50 public override bool OtherRegionUp(RegionInfo thisRegion) { return false; } 61 public override bool OtherRegionUp(RegionInfo thisRegion) { return false; }
62
63 /// <summary>
64 /// Doesn't really matter what the call is - we're using this to test that a packet has actually been received
65 /// </summary>
66 protected void RecordObjectNameCall(IClientAPI remoteClient, uint localID, string message)
67 {
68 m_objectNameCallsReceived++;
69 }
51 } 70 }
52} 71}