aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-19 19:00:11 +0000
committerJustin Clark-Casey (justincc)2012-01-19 19:00:11 +0000
commit9356963bd36e5c3b8c2b27bfcc2efa60ffbd02d6 (patch)
tree10fbe60949d8ad43ca5d076dd685a1edd11e5d6a /OpenSim/Tests/Common/Mock
parentRegionReady: (diff)
downloadopensim-SC_OLD-9356963bd36e5c3b8c2b27bfcc2efa60ffbd02d6.zip
opensim-SC_OLD-9356963bd36e5c3b8c2b27bfcc2efa60ffbd02d6.tar.gz
opensim-SC_OLD-9356963bd36e5c3b8c2b27bfcc2efa60ffbd02d6.tar.bz2
opensim-SC_OLD-9356963bd36e5c3b8c2b27bfcc2efa60ffbd02d6.tar.xz
Add basic request and send image regression tests for LLImageManager
Diffstat (limited to 'OpenSim/Tests/Common/Mock')
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 37b90e1..2fc6572 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -44,9 +44,6 @@ namespace OpenSim.Tests.Common.Mock
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 // Mock testing variables
48 public List<ImageDataPacket> sentdatapkt = new List<ImageDataPacket>();
49 public List<ImagePacketPacket> sentpktpkt = new List<ImagePacketPacket>();
50 EventWaitHandle wh = new EventWaitHandle (false, EventResetMode.AutoReset, "Crossing"); 47 EventWaitHandle wh = new EventWaitHandle (false, EventResetMode.AutoReset, "Crossing");
51 48
52 // TODO: This is a really nasty (and temporary) means of telling the test client which scene to invoke setup 49 // TODO: This is a really nasty (and temporary) means of telling the test client which scene to invoke setup
@@ -61,6 +58,9 @@ namespace OpenSim.Tests.Common.Mock
61 public List<UUID> ReceivedOnlineNotifications { get; private set; } 58 public List<UUID> ReceivedOnlineNotifications { get; private set; }
62 public List<UUID> ReceivedFriendshipTerminations { get; private set; } 59 public List<UUID> ReceivedFriendshipTerminations { get; private set; }
63 60
61 public List<ImageDataPacket> SentImageDataPackets { get; private set; }
62 public List<ImagePacketPacket> SentImagePacketPackets { get; private set; }
63
64// disable warning: public events, part of the public API 64// disable warning: public events, part of the public API
65#pragma warning disable 67 65#pragma warning disable 67
66 66
@@ -452,6 +452,9 @@ namespace OpenSim.Tests.Common.Mock
452 ReceivedOfflineNotifications = new List<UUID>(); 452 ReceivedOfflineNotifications = new List<UUID>();
453 ReceivedOnlineNotifications = new List<UUID>(); 453 ReceivedOnlineNotifications = new List<UUID>();
454 ReceivedFriendshipTerminations = new List<UUID>(); 454 ReceivedFriendshipTerminations = new List<UUID>();
455
456 SentImageDataPackets = new List<ImageDataPacket>();
457 SentImagePacketPackets = new List<ImagePacketPacket>();
455 } 458 }
456 459
457 /// <summary> 460 /// <summary>
@@ -804,7 +807,7 @@ namespace OpenSim.Tests.Common.Mock
804 im.ImageData.Data = ImageData; 807 im.ImageData.Data = ImageData;
805 im.ImageID.Codec = imageCodec; 808 im.ImageID.Codec = imageCodec;
806 im.Header.Zerocoded = true; 809 im.Header.Zerocoded = true;
807 sentdatapkt.Add(im); 810 SentImageDataPackets.Add(im);
808 } 811 }
809 812
810 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 813 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
@@ -814,7 +817,7 @@ namespace OpenSim.Tests.Common.Mock
814 im.ImageID.Packet = partNumber; 817 im.ImageID.Packet = partNumber;
815 im.ImageID.ID = imageUuid; 818 im.ImageID.ID = imageUuid;
816 im.ImageData.Data = imageData; 819 im.ImageData.Data = imageData;
817 sentpktpkt.Add(im); 820 SentImagePacketPackets.Add(im);
818 } 821 }
819 822
820 public void SendImageNotFound(UUID imageid) 823 public void SendImageNotFound(UUID imageid)