aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Tests/Common/Mock
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Common/Mock/BaseAssetRepository.cs8
-rw-r--r--OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs3
-rw-r--r--OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs28
-rw-r--r--OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs58
-rw-r--r--OpenSim/Tests/Common/Mock/MockScriptEngine.cs10
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs128
-rw-r--r--OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs27
-rw-r--r--OpenSim/Tests/Common/Mock/TestGroupsDataPlugin.cs339
-rw-r--r--OpenSim/Tests/Common/Mock/TestHttpClientContext.cs16
-rw-r--r--OpenSim/Tests/Common/Mock/TestHttpRequest.cs82
-rw-r--r--OpenSim/Tests/Common/Mock/TestHttpResponse.cs38
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs40
-rw-r--r--OpenSim/Tests/Common/Mock/TestLLUDPServer.cs30
-rw-r--r--OpenSim/Tests/Common/Mock/TestLandChannel.cs9
-rw-r--r--OpenSim/Tests/Common/Mock/TestScene.cs6
-rw-r--r--OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs10
16 files changed, 652 insertions, 180 deletions
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
index cb4fb80..d0430ff 100644
--- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common
36 { 36 {
37 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>(); 37 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>();
38 38
39 public AssetBase FetchAsset(UUID uuid) 39 public AssetBase FetchAsset(UUID uuid)
40 { 40 {
41 if (AssetsExist(new[] { uuid })[0]) 41 if (AssetsExist(new[] { uuid })[0])
42 return Assets[uuid]; 42 return Assets[uuid];
@@ -44,17 +44,17 @@ namespace OpenSim.Tests.Common
44 return null; 44 return null;
45 } 45 }
46 46
47 public void CreateAsset(AssetBase asset) 47 public void CreateAsset(AssetBase asset)
48 { 48 {
49 Assets[asset.FullID] = asset; 49 Assets[asset.FullID] = asset;
50 } 50 }
51 51
52 public void UpdateAsset(AssetBase asset) 52 public void UpdateAsset(AssetBase asset)
53 { 53 {
54 CreateAsset(asset); 54 CreateAsset(asset);
55 } 55 }
56 56
57 public bool[] AssetsExist(UUID[] uuids) 57 public bool[] AssetsExist(UUID[] uuids)
58 { 58 {
59 return Array.ConvertAll(uuids, id => Assets.ContainsKey(id)); 59 return Array.ConvertAll(uuids, id => Assets.ContainsKey(id));
60 } 60 }
diff --git a/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
index dddf75d..aaf61e7 100644
--- a/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
@@ -54,9 +54,10 @@ namespace OpenSim.Tests.Common
54 return assets.Find(x=>x.FullID == uuid); 54 return assets.Find(x=>x.FullID == uuid);
55 } 55 }
56 56
57 public void StoreAsset(AssetBase asset) 57 public bool StoreAsset(AssetBase asset)
58 { 58 {
59 assets.Add(asset); 59 assets.Add(asset);
60 return true;
60 } 61 }
61 62
62 public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); } 63 public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); }
diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
index 7f530d0..e9deac7 100644
--- a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
+++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
@@ -85,8 +85,8 @@ namespace OpenSim.Tests.Common
85 { 85 {
86 } 86 }
87 87
88 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, 88 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID,
89 int membershipFee, bool openEnrollment, bool allowPublish, 89 int membershipFee, bool openEnrollment, bool allowPublish,
90 bool maturePublish, UUID founderID) 90 bool maturePublish, UUID founderID)
91 { 91 {
92 XGroup group = new XGroup() 92 XGroup group = new XGroup()
@@ -118,13 +118,13 @@ namespace OpenSim.Tests.Common
118 } 118 }
119 } 119 }
120 120
121 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, 121 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
122 UUID insigniaID, int membershipFee, bool openEnrollment, 122 UUID insigniaID, int membershipFee, bool openEnrollment,
123 bool allowPublish, bool maturePublish) 123 bool allowPublish, bool maturePublish)
124 { 124 {
125 } 125 }
126 126
127 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 127 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
128 string title, ulong powers) 128 string title, ulong powers)
129 { 129 {
130 } 130 }
@@ -133,7 +133,7 @@ namespace OpenSim.Tests.Common
133 { 133 {
134 } 134 }
135 135
136 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 136 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
137 string title, ulong powers) 137 string title, ulong powers)
138 { 138 {
139 } 139 }
@@ -144,7 +144,7 @@ namespace OpenSim.Tests.Common
144 144
145 145
146 if (group == null) 146 if (group == null)
147 m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: No group found with ID {0}", groupID); 147 m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: No group found with ID {0}", groupID);
148 148
149 return group; 149 return group;
150 } 150 }
@@ -152,7 +152,7 @@ namespace OpenSim.Tests.Common
152 public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID groupID, string groupName) 152 public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID groupID, string groupName)
153 { 153 {
154 m_log.DebugFormat( 154 m_log.DebugFormat(
155 "[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}", 155 "[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}",
156 groupID, groupName); 156 groupID, groupName);
157 157
158 XGroup xg = GetXGroup(groupID, groupName); 158 XGroup xg = GetXGroup(groupID, groupName);
@@ -194,7 +194,7 @@ namespace OpenSim.Tests.Common
194 public void SetAgentGroupInfo(UUID requestingAgentID, UUID agentID, UUID groupID, bool acceptNotices, bool listInProfile) 194 public void SetAgentGroupInfo(UUID requestingAgentID, UUID agentID, UUID groupID, bool acceptNotices, bool listInProfile)
195 { 195 {
196 m_log.DebugFormat( 196 m_log.DebugFormat(
197 "[MOCK GROUPS SERVICES CONNECTOR]: SetAgentGroupInfo, requestingAgentID {0}, agentID {1}, groupID {2}, acceptNotices {3}, listInProfile {4}", 197 "[MOCK GROUPS SERVICES CONNECTOR]: SetAgentGroupInfo, requestingAgentID {0}, agentID {1}, groupID {2}, acceptNotices {3}, listInProfile {4}",
198 requestingAgentID, agentID, groupID, acceptNotices, listInProfile); 198 requestingAgentID, agentID, groupID, acceptNotices, listInProfile);
199 199
200 XGroup group = GetXGroup(groupID, null); 200 XGroup group = GetXGroup(groupID, null);
@@ -228,7 +228,7 @@ namespace OpenSim.Tests.Common
228 public void AddAgentToGroup(UUID requestingAgentID, UUID agentID, UUID groupID, UUID roleID) 228 public void AddAgentToGroup(UUID requestingAgentID, UUID agentID, UUID groupID, UUID roleID)
229 { 229 {
230 m_log.DebugFormat( 230 m_log.DebugFormat(
231 "[MOCK GROUPS SERVICES CONNECTOR]: AddAgentToGroup, requestingAgentID {0}, agentID {1}, groupID {2}, roleID {3}", 231 "[MOCK GROUPS SERVICES CONNECTOR]: AddAgentToGroup, requestingAgentID {0}, agentID {1}, groupID {2}, roleID {3}",
232 requestingAgentID, agentID, groupID, roleID); 232 requestingAgentID, agentID, groupID, roleID);
233 233
234 XGroup group = GetXGroup(groupID, null); 234 XGroup group = GetXGroup(groupID, null);
@@ -348,7 +348,7 @@ namespace OpenSim.Tests.Common
348 348
349 return notices; 349 return notices;
350 } 350 }
351 351
352 public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID) 352 public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
353 { 353 {
354 m_log.DebugFormat( 354 m_log.DebugFormat(
@@ -378,14 +378,14 @@ namespace OpenSim.Tests.Common
378 return gni; 378 return gni;
379 } 379 }
380 } 380 }
381 381
382 return null; 382 return null;
383 } 383 }
384 384
385 public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket) 385 public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket)
386 { 386 {
387 m_log.DebugFormat( 387 m_log.DebugFormat(
388 "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}", 388 "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}",
389 requestingAgentID, groupID, noticeID, fromName, subject, message, binaryBucket.Length); 389 requestingAgentID, groupID, noticeID, fromName, subject, message, binaryBucket.Length);
390 390
391 XGroup group = GetXGroup(groupID, null); 391 XGroup group = GetXGroup(groupID, null);
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
index 5df8e04..a73a0b8 100644
--- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -74,6 +74,11 @@ namespace OpenSim.Data.Null
74 m_store.StoreTerrain(terrain, regionID); 74 m_store.StoreTerrain(terrain, regionID);
75 } 75 }
76 76
77 public void StoreBakedTerrain(TerrainData terrain, UUID regionID)
78 {
79 m_store.StoreBakedTerrain(terrain, regionID);
80 }
81
77 public double[,] LoadTerrain(UUID regionID) 82 public double[,] LoadTerrain(UUID regionID)
78 { 83 {
79 return m_store.LoadTerrain(regionID); 84 return m_store.LoadTerrain(regionID);
@@ -84,6 +89,11 @@ namespace OpenSim.Data.Null
84 return m_store.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); 89 return m_store.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ);
85 } 90 }
86 91
92 public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
93 {
94 return m_store.LoadBakedTerrain(regionID, pSizeX, pSizeY, pSizeZ);
95 }
96
87 public void StoreLandObject(ILandObject Parcel) 97 public void StoreLandObject(ILandObject Parcel)
88 { 98 {
89 m_store.StoreLandObject(Parcel); 99 m_store.StoreLandObject(Parcel);
@@ -138,6 +148,11 @@ namespace OpenSim.Data.Null
138 m_store.RemoveRegionEnvironmentSettings(regionUUID); 148 m_store.RemoveRegionEnvironmentSettings(regionUUID);
139 } 149 }
140 150
151 public UUID[] GetObjectIDs(UUID regionID)
152 {
153 return new UUID[0];
154 }
155
141 public void SaveExtra(UUID regionID, string name, string value) 156 public void SaveExtra(UUID regionID, string name, string value)
142 { 157 {
143 } 158 }
@@ -159,14 +174,15 @@ namespace OpenSim.Data.Null
159 public class NullDataStore : ISimulationDataStore 174 public class NullDataStore : ISimulationDataStore
160 { 175 {
161// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 176// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
162 177
163 protected Dictionary<UUID, RegionSettings> m_regionSettings = new Dictionary<UUID, RegionSettings>(); 178 protected Dictionary<UUID, RegionSettings> m_regionSettings = new Dictionary<UUID, RegionSettings>();
164 protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); 179 protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>();
165 protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems 180 protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems
166 = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); 181 = new Dictionary<UUID, ICollection<TaskInventoryItem>>();
167 protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); 182 protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>();
183 protected Dictionary<UUID, TerrainData> m_bakedterrains = new Dictionary<UUID, TerrainData>();
168 protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); 184 protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>();
169 185
170 public void Initialise(string dbfile) 186 public void Initialise(string dbfile)
171 { 187 {
172 return; 188 return;
@@ -180,14 +196,14 @@ namespace OpenSim.Data.Null
180 { 196 {
181 m_regionSettings[rs.RegionUUID] = rs; 197 m_regionSettings[rs.RegionUUID] = rs;
182 } 198 }
183 199
184 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) 200 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
185 { 201 {
186 //This connector doesn't support the windlight module yet 202 //This connector doesn't support the windlight module yet
187 //Return default LL windlight settings 203 //Return default LL windlight settings
188 return new RegionLightShareData(); 204 return new RegionLightShareData();
189 } 205 }
190 206
191 public void RemoveRegionWindlightSettings(UUID regionID) 207 public void RemoveRegionWindlightSettings(UUID regionID)
192 { 208 {
193 } 209 }
@@ -222,7 +238,7 @@ namespace OpenSim.Data.Null
222 238
223 if (rs == null) 239 if (rs == null)
224 rs = new RegionSettings(); 240 rs = new RegionSettings();
225 241
226 return rs; 242 return rs;
227 } 243 }
228 244
@@ -234,9 +250,9 @@ namespace OpenSim.Data.Null
234 foreach (SceneObjectPart prim in obj.Parts) 250 foreach (SceneObjectPart prim in obj.Parts)
235 { 251 {
236// m_log.DebugFormat( 252// m_log.DebugFormat(
237// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", 253// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}",
238// prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); 254// prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID);
239 255
240 m_sceneObjectParts[prim.UUID] = prim; 256 m_sceneObjectParts[prim.UUID] = prim;
241 } 257 }
242 } 258 }
@@ -250,7 +266,7 @@ namespace OpenSim.Data.Null
250 if (part.ParentGroup.UUID == obj) 266 if (part.ParentGroup.UUID == obj)
251 { 267 {
252// m_log.DebugFormat( 268// m_log.DebugFormat(
253// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", 269// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}",
254// part.Name, part.UUID, obj, regionUUID); 270// part.Name, part.UUID, obj, regionUUID);
255 m_sceneObjectParts.Remove(part.UUID); 271 m_sceneObjectParts.Remove(part.UUID);
256 } 272 }
@@ -265,7 +281,7 @@ namespace OpenSim.Data.Null
265 public List<SceneObjectGroup> LoadObjects(UUID regionUUID) 281 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
266 { 282 {
267 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>(); 283 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
268 284
269 // Create all of the SOGs from the root prims first 285 // Create all of the SOGs from the root prims first
270 foreach (SceneObjectPart prim in m_sceneObjectParts.Values) 286 foreach (SceneObjectPart prim in m_sceneObjectParts.Values)
271 { 287 {
@@ -302,10 +318,10 @@ namespace OpenSim.Data.Null
302 } 318 }
303 } 319 }
304 } 320 }
305 321
306 // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that 322 // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that
307 // way! 323 // way!
308 324
309 return new List<SceneObjectGroup>(objects.Values); 325 return new List<SceneObjectGroup>(objects.Values);
310 } 326 }
311 327
@@ -314,6 +330,11 @@ namespace OpenSim.Data.Null
314 m_terrains[regionID] = ter; 330 m_terrains[regionID] = ter;
315 } 331 }
316 332
333 public void StoreBakedTerrain(TerrainData ter, UUID regionID)
334 {
335 m_bakedterrains[regionID] = ter;
336 }
337
317 public void StoreTerrain(double[,] ter, UUID regionID) 338 public void StoreTerrain(double[,] ter, UUID regionID)
318 { 339 {
319 m_terrains[regionID] = new HeightmapTerrainData(ter); 340 m_terrains[regionID] = new HeightmapTerrainData(ter);
@@ -327,6 +348,14 @@ namespace OpenSim.Data.Null
327 return null; 348 return null;
328 } 349 }
329 350
351 public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
352 {
353 if (m_bakedterrains.ContainsKey(regionID))
354 return m_bakedterrains[regionID];
355 else
356 return null;
357 }
358
330 public double[,] LoadTerrain(UUID regionID) 359 public double[,] LoadTerrain(UUID regionID)
331 { 360 {
332 if (m_terrains.ContainsKey(regionID)) 361 if (m_terrains.ContainsKey(regionID))
@@ -355,6 +384,11 @@ namespace OpenSim.Data.Null
355 { 384 {
356 } 385 }
357 386
387 public UUID[] GetObjectIDs(UUID regionID)
388 {
389 return new UUID[0];
390 }
391
358 public void SaveExtra(UUID regionID, string name, string value) 392 public void SaveExtra(UUID regionID, string name, string value)
359 { 393 {
360 } 394 }
diff --git a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
index d7a144c..9d426f6 100644
--- a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
+++ b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
@@ -40,7 +40,7 @@ using OpenSim.Region.ScriptEngine.Shared;
40namespace OpenSim.Tests.Common 40namespace OpenSim.Tests.Common
41{ 41{
42 public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine 42 public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine
43 { 43 {
44 public IConfigSource ConfigSource { get; private set; } 44 public IConfigSource ConfigSource { get; private set; }
45 45
46 public IConfig Config { get; private set; } 46 public IConfig Config { get; private set; }
@@ -89,7 +89,7 @@ namespace OpenSim.Tests.Common
89 { 89 {
90 } 90 }
91 91
92 public string Name { get { return "Mock Script Engine"; } } 92 public string Name { get { return "Mock Script Engine"; } }
93 public string ScriptEngineName { get { return Name; } } 93 public string ScriptEngineName { get { return Name; } }
94 94
95 public Type ReplaceableInterface { get { return null; } } 95 public Type ReplaceableInterface { get { return null; } }
@@ -200,7 +200,7 @@ namespace OpenSim.Tests.Common
200 { 200 {
201 throw new System.NotImplementedException (); 201 throw new System.NotImplementedException ();
202 } 202 }
203 203
204 public IScriptWorkItem QueueEventHandler(object parms) 204 public IScriptWorkItem QueueEventHandler(object parms)
205 { 205 {
206 throw new System.NotImplementedException (); 206 throw new System.NotImplementedException ();
@@ -221,7 +221,7 @@ namespace OpenSim.Tests.Common
221 throw new System.NotImplementedException (); 221 throw new System.NotImplementedException ();
222 } 222 }
223 223
224 public void SetScriptState(UUID itemID, bool state) 224 public void SetScriptState(UUID itemID, bool state, bool self)
225 { 225 {
226 throw new System.NotImplementedException (); 226 throw new System.NotImplementedException ();
227 } 227 }
@@ -258,7 +258,7 @@ namespace OpenSim.Tests.Common
258 258
259 public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } } 259 public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } }
260 260
261 public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } } 261 public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } }
262 262
263 public void ClearPostedEvents() 263 public void ClearPostedEvents()
264 { 264 {
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 0e1bc8f..449716b 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Tests.Common
88 public event MoneyTransferRequest OnMoneyTransferRequest; 88 public event MoneyTransferRequest OnMoneyTransferRequest;
89 public event ParcelBuy OnParcelBuy; 89 public event ParcelBuy OnParcelBuy;
90 public event Action<IClientAPI> OnConnectionClosed; 90 public event Action<IClientAPI> OnConnectionClosed;
91 91 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
92 public event ImprovedInstantMessage OnInstantMessage; 92 public event ImprovedInstantMessage OnInstantMessage;
93 public event ChatMessage OnChatFromClient; 93 public event ChatMessage OnChatFromClient;
94 public event TextureRequest OnRequestTexture; 94 public event TextureRequest OnRequestTexture;
@@ -105,6 +105,7 @@ namespace OpenSim.Tests.Common
105 public event ObjectDrop OnObjectDrop; 105 public event ObjectDrop OnObjectDrop;
106 public event StartAnim OnStartAnim; 106 public event StartAnim OnStartAnim;
107 public event StopAnim OnStopAnim; 107 public event StopAnim OnStopAnim;
108 public event ChangeAnim OnChangeAnim;
108 public event LinkObjects OnLinkObjects; 109 public event LinkObjects OnLinkObjects;
109 public event DelinkObjects OnDelinkObjects; 110 public event DelinkObjects OnDelinkObjects;
110 public event RequestMapBlocks OnRequestMapBlocks; 111 public event RequestMapBlocks OnRequestMapBlocks;
@@ -117,6 +118,7 @@ namespace OpenSim.Tests.Common
117 public event SetAlwaysRun OnSetAlwaysRun; 118 public event SetAlwaysRun OnSetAlwaysRun;
118 119
119 public event DeRezObject OnDeRezObject; 120 public event DeRezObject OnDeRezObject;
121 public event RezRestoreToWorld OnRezRestoreToWorld;
120 public event Action<IClientAPI> OnRegionHandShakeReply; 122 public event Action<IClientAPI> OnRegionHandShakeReply;
121 public event GenericCall1 OnRequestWearables; 123 public event GenericCall1 OnRequestWearables;
122 public event Action<IClientAPI, bool> OnCompleteMovementToRegion; 124 public event Action<IClientAPI, bool> OnCompleteMovementToRegion;
@@ -153,6 +155,7 @@ namespace OpenSim.Tests.Common
153 public event GenericCall7 OnObjectMaterial; 155 public event GenericCall7 OnObjectMaterial;
154 public event UpdatePrimFlags OnUpdatePrimFlags; 156 public event UpdatePrimFlags OnUpdatePrimFlags;
155 public event UpdatePrimTexture OnUpdatePrimTexture; 157 public event UpdatePrimTexture OnUpdatePrimTexture;
158 public event ClientChangeObject onClientChangeObject;
156 public event UpdateVector OnUpdatePrimGroupPosition; 159 public event UpdateVector OnUpdatePrimGroupPosition;
157 public event UpdateVector OnUpdatePrimSinglePosition; 160 public event UpdateVector OnUpdatePrimSinglePosition;
158 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 161 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
@@ -295,7 +298,7 @@ namespace OpenSim.Tests.Common
295 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 298 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
296 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 299 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
297 public event ClassifiedDelete OnClassifiedDelete; 300 public event ClassifiedDelete OnClassifiedDelete;
298 public event ClassifiedDelete OnClassifiedGodDelete; 301 public event ClassifiedGodDelete OnClassifiedGodDelete;
299 302
300 public event EventNotificationAddRequest OnEventNotificationAddRequest; 303 public event EventNotificationAddRequest OnEventNotificationAddRequest;
301 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 304 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
@@ -318,7 +321,7 @@ namespace OpenSim.Tests.Common
318 public event AvatarInterestUpdate OnAvatarInterestUpdate; 321 public event AvatarInterestUpdate OnAvatarInterestUpdate;
319 322
320 public event PlacesQuery OnPlacesQuery; 323 public event PlacesQuery OnPlacesQuery;
321 324
322 public event FindAgentUpdate OnFindAgent; 325 public event FindAgentUpdate OnFindAgent;
323 public event TrackAgentUpdate OnTrackAgent; 326 public event TrackAgentUpdate OnTrackAgent;
324 public event NewUserReport OnUserReport; 327 public event NewUserReport OnUserReport;
@@ -334,11 +337,12 @@ namespace OpenSim.Tests.Common
334 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 337 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
335 public event SimWideDeletesDelegate OnSimWideDeletes; 338 public event SimWideDeletesDelegate OnSimWideDeletes;
336 public event SendPostcard OnSendPostcard; 339 public event SendPostcard OnSendPostcard;
340 public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
337 public event MuteListEntryUpdate OnUpdateMuteListEntry; 341 public event MuteListEntryUpdate OnUpdateMuteListEntry;
338 public event MuteListEntryRemove OnRemoveMuteListEntry; 342 public event MuteListEntryRemove OnRemoveMuteListEntry;
339 public event GodlikeMessage onGodlikeMessage; 343 public event GodlikeMessage onGodlikeMessage;
340 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 344 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
341 345 public event GenericCall2 OnUpdateThrottles;
342#pragma warning restore 67 346#pragma warning restore 67
343 347
344 /// <value> 348 /// <value>
@@ -387,6 +391,8 @@ namespace OpenSim.Tests.Common
387 get { return FirstName + " " + LastName; } 391 get { return FirstName + " " + LastName; }
388 } 392 }
389 393
394 public int PingTimeMS { get { return 0; } }
395
390 public bool IsActive 396 public bool IsActive
391 { 397 {
392 get { return true; } 398 get { return true; }
@@ -398,16 +404,19 @@ namespace OpenSim.Tests.Common
398 public UUID ActiveGroupId 404 public UUID ActiveGroupId
399 { 405 {
400 get { return UUID.Zero; } 406 get { return UUID.Zero; }
407 set { }
401 } 408 }
402 409
403 public string ActiveGroupName 410 public string ActiveGroupName
404 { 411 {
405 get { return String.Empty; } 412 get { return String.Empty; }
413 set { }
406 } 414 }
407 415
408 public ulong ActiveGroupPowers 416 public ulong ActiveGroupPowers
409 { 417 {
410 get { return 0; } 418 get { return 0; }
419 set { }
411 } 420 }
412 421
413 public bool IsGroupMember(UUID groupID) 422 public bool IsGroupMember(UUID groupID)
@@ -415,6 +424,13 @@ namespace OpenSim.Tests.Common
415 return false; 424 return false;
416 } 425 }
417 426
427 public Dictionary<UUID, ulong> GetGroupPowers()
428 {
429 return new Dictionary<UUID, ulong>();
430 }
431
432 public void SetGroupPowers(Dictionary<UUID, ulong> powers) { }
433
418 public ulong GetGroupPowers(UUID groupID) 434 public ulong GetGroupPowers(UUID groupID)
419 { 435 {
420 return 0; 436 return 0;
@@ -448,6 +464,8 @@ namespace OpenSim.Tests.Common
448 get { return new IPEndPoint(IPAddress.Loopback, (ushort)m_circuitCode); } 464 get { return new IPEndPoint(IPAddress.Loopback, (ushort)m_circuitCode); }
449 } 465 }
450 466
467 public List<uint> SelectedObjects {get; private set;}
468
451 /// <summary> 469 /// <summary>
452 /// Constructor 470 /// Constructor
453 /// </summary> 471 /// </summary>
@@ -570,10 +588,27 @@ namespace OpenSim.Tests.Common
570 ReceivedKills.AddRange(localID); 588 ReceivedKills.AddRange(localID);
571 } 589 }
572 590
591 public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
592 {
593 }
594
573 public virtual void SetChildAgentThrottle(byte[] throttle) 595 public virtual void SetChildAgentThrottle(byte[] throttle)
574 { 596 {
575 } 597 }
576 598
599 public virtual void SetChildAgentThrottle(byte[] throttle, float factor)
600 {
601 }
602
603 public void SetAgentThrottleSilent(int throttle, int setting)
604 {
605 }
606
607 public int GetAgentThrottleSilent(int throttle)
608 {
609 return 0;
610 }
611
577 public byte[] GetThrottlesPacked(float multiplier) 612 public byte[] GetThrottlesPacked(float multiplier)
578 { 613 {
579 return new byte[0]; 614 return new byte[0];
@@ -608,6 +643,11 @@ namespace OpenSim.Tests.Common
608 643
609 } 644 }
610 645
646 public virtual bool CanSendLayerData()
647 {
648 return false;
649 }
650
611 public virtual void SendLayerData(float[] map) 651 public virtual void SendLayerData(float[] map)
612 { 652 {
613 } 653 }
@@ -619,9 +659,9 @@ namespace OpenSim.Tests.Common
619 { 659 {
620 } 660 }
621 661
622 public virtual void SendWindData(Vector2[] windSpeeds) { } 662 public virtual void SendWindData(int version, Vector2[] windSpeeds) { }
623 663
624 public virtual void SendCloudData(float[] cloudCover) { } 664 public virtual void SendCloudData(int version, float[] cloudCover) { }
625 665
626 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) 666 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
627 { 667 {
@@ -633,7 +673,7 @@ namespace OpenSim.Tests.Common
633 { 673 {
634 AgentCircuitData agentData = new AgentCircuitData(); 674 AgentCircuitData agentData = new AgentCircuitData();
635 agentData.AgentID = AgentId; 675 agentData.AgentID = AgentId;
636 agentData.SessionID = SessionId; 676 agentData.SessionID = SessionId;
637 agentData.SecureSessionID = UUID.Zero; 677 agentData.SecureSessionID = UUID.Zero;
638 agentData.circuitcode = m_circuitCode; 678 agentData.circuitcode = m_circuitCode;
639 agentData.child = false; 679 agentData.child = false;
@@ -673,7 +713,7 @@ namespace OpenSim.Tests.Common
673 public virtual void SendTeleportFailed(string reason) 713 public virtual void SendTeleportFailed(string reason)
674 { 714 {
675 m_log.DebugFormat( 715 m_log.DebugFormat(
676 "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}", 716 "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}",
677 m_firstName, m_lastName, m_scene.Name, reason); 717 m_firstName, m_lastName, m_scene.Name, reason);
678 } 718 }
679 719
@@ -720,7 +760,11 @@ namespace OpenSim.Tests.Common
720 { 760 {
721 } 761 }
722 762
723 public void SendAvatarDataImmediate(ISceneEntity avatar) 763 public void SendEntityFullUpdateImmediate(ISceneEntity ent)
764 {
765 }
766
767 public void SendEntityTerseUpdateImmediate(ISceneEntity ent)
724 { 768 {
725 } 769 }
726 770
@@ -741,7 +785,7 @@ namespace OpenSim.Tests.Common
741 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, 785 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
742 List<InventoryItemBase> items, 786 List<InventoryItemBase> items,
743 List<InventoryFolderBase> folders, 787 List<InventoryFolderBase> folders,
744 int version, 788 int version,
745 bool fetchFolders, 789 bool fetchFolders,
746 bool fetchItems) 790 bool fetchItems)
747 { 791 {
@@ -755,6 +799,10 @@ namespace OpenSim.Tests.Common
755 { 799 {
756 } 800 }
757 801
802 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
803 {
804 }
805
758 public virtual void SendRemoveInventoryItem(UUID itemID) 806 public virtual void SendRemoveInventoryItem(UUID itemID)
759 { 807 {
760 } 808 }
@@ -771,7 +819,7 @@ namespace OpenSim.Tests.Common
771 { 819 {
772 } 820 }
773 821
774 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) 822 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
775 { 823 {
776 } 824 }
777 825
@@ -817,6 +865,10 @@ namespace OpenSim.Tests.Common
817 { 865 {
818 } 866 }
819 867
868 public void SendAlertMessage(string message, string info)
869 {
870 }
871
820 public void SendSystemAlertMessage(string message) 872 public void SendSystemAlertMessage(string message)
821 { 873 {
822 } 874 }
@@ -833,7 +885,7 @@ namespace OpenSim.Tests.Common
833 OnRegionHandShakeReply(this); 885 OnRegionHandShakeReply(this);
834 } 886 }
835 } 887 }
836 888
837 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 889 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
838 { 890 {
839 } 891 }
@@ -910,8 +962,13 @@ namespace OpenSim.Tests.Common
910 ReceivedOnlineNotifications.AddRange(agentIDs); 962 ReceivedOnlineNotifications.AddRange(agentIDs);
911 } 963 }
912 964
913 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, 965 public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY)
914 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 966 {
967 }
968
969 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos,
970 Quaternion SitOrientation, bool autopilot,
971 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
915 { 972 {
916 } 973 }
917 974
@@ -937,7 +994,7 @@ namespace OpenSim.Tests.Common
937 { 994 {
938 } 995 }
939 996
940 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 997 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
941 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, 998 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
942 UUID partnerID) 999 UUID partnerID)
943 { 1000 {
@@ -966,10 +1023,10 @@ namespace OpenSim.Tests.Common
966 1023
967 public void Close() 1024 public void Close()
968 { 1025 {
969 Close(false); 1026 Close(true, false);
970 } 1027 }
971 1028
972 public void Close(bool force) 1029 public void Close(bool sendStop, bool force)
973 { 1030 {
974 // Fire the callback for this connection closing 1031 // Fire the callback for this connection closing
975 // This is necesary to get the presence detector to notice that a client has logged out. 1032 // This is necesary to get the presence detector to notice that a client has logged out.
@@ -1175,6 +1232,10 @@ namespace OpenSim.Tests.Common
1175 { 1232 {
1176 } 1233 }
1177 1234
1235 public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
1236 {
1237 }
1238
1178 public void SendJoinGroupReply(UUID groupID, bool success) 1239 public void SendJoinGroupReply(UUID groupID, bool success)
1179 { 1240 {
1180 } 1241 }
@@ -1238,14 +1299,30 @@ namespace OpenSim.Tests.Common
1238 { 1299 {
1239 } 1300 }
1240 1301
1302 public void UpdateGroupMembership(GroupMembershipData[] data)
1303 {
1304 }
1305
1306 public void GroupMembershipRemove(UUID GroupID)
1307 {
1308 }
1309
1310 public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
1311 {
1312 }
1313
1241 public void SendUseCachedMuteList() 1314 public void SendUseCachedMuteList()
1242 { 1315 {
1243 } 1316 }
1244 1317
1318 public void SendEmpytMuteList()
1319 {
1320 }
1321
1245 public void SendMuteListUpdate(string filename) 1322 public void SendMuteListUpdate(string filename)
1246 { 1323 {
1247 } 1324 }
1248 1325
1249 public void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) 1326 public void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled)
1250 { 1327 {
1251 } 1328 }
@@ -1265,7 +1342,7 @@ namespace OpenSim.Tests.Common
1265 { 1342 {
1266 } 1343 }
1267 1344
1268 public void Disconnect() 1345 public void Disconnect()
1269 { 1346 {
1270 } 1347 }
1271 1348
@@ -1274,19 +1351,19 @@ namespace OpenSim.Tests.Common
1274 if (OnReceivedSendRebakeAvatarTextures != null) 1351 if (OnReceivedSendRebakeAvatarTextures != null)
1275 OnReceivedSendRebakeAvatarTextures(textureID); 1352 OnReceivedSendRebakeAvatarTextures(textureID);
1276 } 1353 }
1277 1354
1278 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) 1355 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1279 { 1356 {
1280 } 1357 }
1281 1358
1282 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) 1359 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1283 { 1360 {
1284 } 1361 }
1285 1362
1286 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) 1363 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1287 { 1364 {
1288 } 1365 }
1289 1366
1290 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) 1367 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1291 { 1368 {
1292 } 1369 }
@@ -1315,9 +1392,12 @@ namespace OpenSim.Tests.Common
1315 { 1392 {
1316 } 1393 }
1317 1394
1318 public void SendPartPhysicsProprieties(ISceneEntity entity) 1395 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
1319 { 1396 {
1320 } 1397 }
1321 1398
1399 public void SendPartPhysicsProprieties(ISceneEntity entity)
1400 {
1401 }
1322 } 1402 }
1323} 1403}
diff --git a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
index f2bae58..f2ce064 100644
--- a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
+++ b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Tests.Common
46{ 46{
47 public class TestEventQueueGetModule : IEventQueue, INonSharedRegionModule 47 public class TestEventQueueGetModule : IEventQueue, INonSharedRegionModule
48 { 48 {
49 public class Event 49 public class Event
50 { 50 {
51 public string Name { get; set; } 51 public string Name { get; set; }
52 public object[] Args { get; set; } 52 public object[] Args { get; set; }
@@ -64,7 +64,7 @@ namespace OpenSim.Tests.Common
64 64
65 public void Close() {} 65 public void Close() {}
66 66
67 public void AddRegion(Scene scene) 67 public void AddRegion(Scene scene)
68 { 68 {
69 Events = new Dictionary<UUID, List<Event>>(); 69 Events = new Dictionary<UUID, List<Event>>();
70 scene.RegisterModuleInterface<IEventQueue>(this); 70 scene.RegisterModuleInterface<IEventQueue>(this);
@@ -108,12 +108,12 @@ namespace OpenSim.Tests.Common
108 AddEvent(avatarID, "Enqueue", o); 108 AddEvent(avatarID, "Enqueue", o);
109 return true; 109 return true;
110 } 110 }
111 111/*
112 public void DisableSimulator(ulong handle, UUID avatarID) 112 public void DisableSimulator(ulong handle, UUID avatarID)
113 { 113 {
114 AddEvent(avatarID, "DisableSimulator", handle); 114 AddEvent(avatarID, "DisableSimulator", handle);
115 } 115 }
116 116*/
117 public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) 117 public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY)
118 { 118 {
119 AddEvent(avatarID, "EnableSimulator", handle); 119 AddEvent(avatarID, "EnableSimulator", handle);
@@ -138,18 +138,23 @@ namespace OpenSim.Tests.Common
138 } 138 }
139 139
140 public void ChatterboxInvitation( 140 public void ChatterboxInvitation(
141 UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName, 141 UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName,
142 byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl, 142 byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl,
143 UUID transactionID, bool fromGroup, byte[] binaryBucket) 143 UUID transactionID, bool fromGroup, byte[] binaryBucket)
144 { 144 {
145 AddEvent( 145 AddEvent(
146 toAgent, "ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, 146 toAgent, "ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
147 timeStamp, offline, parentEstateID, position, ttl, transactionID, fromGroup, binaryBucket); 147 timeStamp, offline, parentEstateID, position, ttl, transactionID, fromGroup, binaryBucket);
148 } 148 }
149 149
150 public void ChatterBoxSessionAgentListUpdates (UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, bool isModerator, bool textMute) 150 public void ChatterBoxSessionAgentListUpdates (UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, bool isModerator, bool textMute , bool isEnterorLeave)
151 {
152 AddEvent(toAgent, "ChatterBoxSessionAgentListUpdates", sessionID, fromAgent, canVoiceChat, isModerator, textMute, isEnterorLeave);
153 }
154
155 public void ChatterBoxForceClose (UUID toAgent, UUID sessionID, string reason)
151 { 156 {
152 AddEvent(toAgent, "ChatterBoxSessionAgentListUpdates", sessionID, fromAgent, canVoiceChat, isModerator, textMute); 157 AddEvent(toAgent, "ForceCloseChatterBoxSession", sessionID, reason);
153 } 158 }
154 159
155 public void ParcelProperties (OpenMetaverse.Messages.Linden.ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) 160 public void ParcelProperties (OpenMetaverse.Messages.Linden.ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
@@ -157,9 +162,9 @@ namespace OpenSim.Tests.Common
157 AddEvent(avatarID, "ParcelProperties", parcelPropertiesMessage); 162 AddEvent(avatarID, "ParcelProperties", parcelPropertiesMessage);
158 } 163 }
159 164
160 public void GroupMembership (OpenMetaverse.Packets.AgentGroupDataUpdatePacket groupUpdate, UUID avatarID) 165 public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
161 { 166 {
162 AddEvent(avatarID, "GroupMembership", groupUpdate); 167 AddEvent(receiverAgent, "AgentGroupDataUpdate", data);
163 } 168 }
164 169
165 public OSD ScriptRunningEvent (UUID objectID, UUID itemID, bool running, bool mono) 170 public OSD ScriptRunningEvent (UUID objectID, UUID itemID, bool running, bool mono)
diff --git a/OpenSim/Tests/Common/Mock/TestGroupsDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestGroupsDataPlugin.cs
new file mode 100644
index 0000000..8e2d8e6
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestGroupsDataPlugin.cs
@@ -0,0 +1,339 @@
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6using OpenMetaverse;
7using OpenSim.Data;
8
9namespace OpenSim.Tests.Common.Mock
10{
11 public class TestGroupsDataPlugin : IGroupsData
12 {
13 class CompositeKey
14 {
15 private readonly string _key;
16 public string Key
17 {
18 get { return _key; }
19 }
20
21 public CompositeKey(UUID _k1, string _k2)
22 {
23 _key = _k1.ToString() + _k2;
24 }
25
26 public CompositeKey(UUID _k1, string _k2, string _k3)
27 {
28 _key = _k1.ToString() + _k2 + _k3;
29 }
30
31 public override bool Equals(object obj)
32 {
33 if (obj is CompositeKey)
34 {
35 return Key == ((CompositeKey)obj).Key;
36 }
37 return false;
38 }
39
40 public override int GetHashCode()
41 {
42 return base.GetHashCode();
43 }
44
45 public override string ToString()
46 {
47 return Key;
48 }
49 }
50
51 private Dictionary<UUID, GroupData> m_Groups;
52 private Dictionary<CompositeKey, MembershipData> m_Membership;
53 private Dictionary<CompositeKey, RoleData> m_Roles;
54 private Dictionary<CompositeKey, RoleMembershipData> m_RoleMembership;
55 private Dictionary<UUID, InvitationData> m_Invites;
56 private Dictionary<UUID, NoticeData> m_Notices;
57 private Dictionary<string, PrincipalData> m_Principals;
58
59 public TestGroupsDataPlugin(string connectionString, string realm)
60 {
61 m_Groups = new Dictionary<UUID, GroupData>();
62 m_Membership = new Dictionary<CompositeKey, MembershipData>();
63 m_Roles = new Dictionary<CompositeKey, RoleData>();
64 m_RoleMembership = new Dictionary<CompositeKey, RoleMembershipData>();
65 m_Invites = new Dictionary<UUID, InvitationData>();
66 m_Notices = new Dictionary<UUID, NoticeData>();
67 m_Principals = new Dictionary<string, PrincipalData>();
68 }
69
70 #region groups table
71 public bool StoreGroup(GroupData data)
72 {
73 return false;
74 }
75
76 public GroupData RetrieveGroup(UUID groupID)
77 {
78 if (m_Groups.ContainsKey(groupID))
79 return m_Groups[groupID];
80
81 return null;
82 }
83
84 public GroupData RetrieveGroup(string name)
85 {
86 return m_Groups.Values.First(g => g.Data.ContainsKey("Name") && g.Data["Name"] == name);
87 }
88
89 public GroupData[] RetrieveGroups(string pattern)
90 {
91 if (string.IsNullOrEmpty(pattern))
92 pattern = "1";
93
94 IEnumerable<GroupData> groups = m_Groups.Values.Where(g => g.Data.ContainsKey("Name") && (g.Data["Name"].StartsWith(pattern) || g.Data["Name"].EndsWith(pattern)));
95
96 return (groups != null) ? groups.ToArray() : new GroupData[0];
97 }
98
99 public bool DeleteGroup(UUID groupID)
100 {
101 return m_Groups.Remove(groupID);
102 }
103
104 public int GroupsCount()
105 {
106 return m_Groups.Count;
107 }
108 #endregion
109
110 #region membership table
111 public MembershipData RetrieveMember(UUID groupID, string pricipalID)
112 {
113 CompositeKey dkey = new CompositeKey(groupID, pricipalID);
114 if (m_Membership.ContainsKey(dkey))
115 return m_Membership[dkey];
116
117 return null;
118 }
119
120 public MembershipData[] RetrieveMembers(UUID groupID)
121 {
122 IEnumerable<CompositeKey> keys = m_Membership.Keys.Where(k => k.Key.StartsWith(groupID.ToString()));
123 return keys.Where(m_Membership.ContainsKey).Select(x => m_Membership[x]).ToArray();
124 }
125
126 public MembershipData[] RetrieveMemberships(string principalID)
127 {
128 IEnumerable<CompositeKey> keys = m_Membership.Keys.Where(k => k.Key.EndsWith(principalID.ToString()));
129 return keys.Where(m_Membership.ContainsKey).Select(x => m_Membership[x]).ToArray();
130 }
131
132 public MembershipData[] RetrievePrincipalGroupMemberships(string principalID)
133 {
134 return RetrieveMemberships(principalID);
135 }
136
137 public MembershipData RetrievePrincipalGroupMembership(string principalID, UUID groupID)
138 {
139 CompositeKey dkey = new CompositeKey(groupID, principalID);
140 if (m_Membership.ContainsKey(dkey))
141 return m_Membership[dkey];
142 return null;
143 }
144
145 public bool StoreMember(MembershipData data)
146 {
147 CompositeKey dkey = new CompositeKey(data.GroupID, data.PrincipalID);
148 m_Membership[dkey] = data;
149 return true;
150 }
151
152 public bool DeleteMember(UUID groupID, string principalID)
153 {
154 CompositeKey dkey = new CompositeKey(groupID, principalID);
155 if (m_Membership.ContainsKey(dkey))
156 return m_Membership.Remove(dkey);
157
158 return false;
159 }
160
161 public int MemberCount(UUID groupID)
162 {
163 return m_Membership.Count;
164 }
165 #endregion
166
167 #region roles table
168 public bool StoreRole(RoleData data)
169 {
170 CompositeKey dkey = new CompositeKey(data.GroupID, data.RoleID.ToString());
171 m_Roles[dkey] = data;
172 return true;
173 }
174
175 public RoleData RetrieveRole(UUID groupID, UUID roleID)
176 {
177 CompositeKey dkey = new CompositeKey(groupID, roleID.ToString());
178 if (m_Roles.ContainsKey(dkey))
179 return m_Roles[dkey];
180
181 return null;
182 }
183
184 public RoleData[] RetrieveRoles(UUID groupID)
185 {
186 IEnumerable<CompositeKey> keys = m_Roles.Keys.Where(k => k.Key.StartsWith(groupID.ToString()));
187 return keys.Where(m_Roles.ContainsKey).Select(x => m_Roles[x]).ToArray();
188 }
189
190 public bool DeleteRole(UUID groupID, UUID roleID)
191 {
192 CompositeKey dkey = new CompositeKey(groupID, roleID.ToString());
193 if (m_Roles.ContainsKey(dkey))
194 return m_Roles.Remove(dkey);
195
196 return false;
197 }
198
199 public int RoleCount(UUID groupID)
200 {
201 return m_Roles.Count;
202 }
203 #endregion
204
205 #region rolememberhip table
206 public RoleMembershipData[] RetrieveRolesMembers(UUID groupID)
207 {
208 IEnumerable<CompositeKey> keys = m_Roles.Keys.Where(k => k.Key.StartsWith(groupID.ToString()));
209 return keys.Where(m_RoleMembership.ContainsKey).Select(x => m_RoleMembership[x]).ToArray();
210 }
211
212 public RoleMembershipData[] RetrieveRoleMembers(UUID groupID, UUID roleID)
213 {
214 IEnumerable<CompositeKey> keys = m_Roles.Keys.Where(k => k.Key.StartsWith(groupID.ToString() + roleID.ToString()));
215 return keys.Where(m_RoleMembership.ContainsKey).Select(x => m_RoleMembership[x]).ToArray();
216 }
217
218 public RoleMembershipData[] RetrieveMemberRoles(UUID groupID, string principalID)
219 {
220 IEnumerable<CompositeKey> keys = m_Roles.Keys.Where(k => k.Key.StartsWith(groupID.ToString()) && k.Key.EndsWith(principalID));
221 return keys.Where(m_RoleMembership.ContainsKey).Select(x => m_RoleMembership[x]).ToArray();
222 }
223
224 public RoleMembershipData RetrieveRoleMember(UUID groupID, UUID roleID, string principalID)
225 {
226 CompositeKey dkey = new CompositeKey(groupID, roleID.ToString(), principalID);
227 if (m_RoleMembership.ContainsKey(dkey))
228 return m_RoleMembership[dkey];
229
230 return null;
231 }
232
233 public int RoleMemberCount(UUID groupID, UUID roleID)
234 {
235 return m_RoleMembership.Count;
236 }
237
238 public bool StoreRoleMember(RoleMembershipData data)
239 {
240 CompositeKey dkey = new CompositeKey(data.GroupID, data.RoleID.ToString(), data.PrincipalID);
241 m_RoleMembership[dkey] = data;
242 return true;
243 }
244
245 public bool DeleteRoleMember(RoleMembershipData data)
246 {
247 CompositeKey dkey = new CompositeKey(data.GroupID, data.RoleID.ToString(), data.PrincipalID);
248 if (m_RoleMembership.ContainsKey(dkey))
249 return m_RoleMembership.Remove(dkey);
250
251 return false;
252 }
253
254 public bool DeleteMemberAllRoles(UUID groupID, string principalID)
255 {
256 List<CompositeKey> keys = m_RoleMembership.Keys.Where(k => k.Key.StartsWith(groupID.ToString()) && k.Key.EndsWith(principalID)).ToList();
257 foreach (CompositeKey k in keys)
258 m_RoleMembership.Remove(k);
259 return true;
260 }
261 #endregion
262
263 #region principals table
264 public bool StorePrincipal(PrincipalData data)
265 {
266 m_Principals[data.PrincipalID] = data;
267 return true;
268 }
269
270 public PrincipalData RetrievePrincipal(string principalID)
271 {
272 if (m_Principals.ContainsKey(principalID))
273 return m_Principals[principalID];
274
275 return null;
276 }
277
278 public bool DeletePrincipal(string principalID)
279 {
280 if (m_Principals.ContainsKey(principalID))
281 return m_Principals.Remove(principalID);
282 return false;
283 }
284 #endregion
285
286 #region invites table
287 public bool StoreInvitation(InvitationData data)
288 {
289 return false;
290 }
291
292 public InvitationData RetrieveInvitation(UUID inviteID)
293 {
294 return null;
295 }
296
297 public InvitationData RetrieveInvitation(UUID groupID, string principalID)
298 {
299 return null;
300 }
301
302 public bool DeleteInvite(UUID inviteID)
303 {
304 return false;
305 }
306
307 public void DeleteOldInvites()
308 {
309 }
310 #endregion
311
312 #region notices table
313 public bool StoreNotice(NoticeData data)
314 {
315 return false;
316 }
317
318 public NoticeData RetrieveNotice(UUID noticeID)
319 {
320 return null;
321 }
322
323 public NoticeData[] RetrieveNotices(UUID groupID)
324 {
325 return new NoticeData[0];
326 }
327
328 public bool DeleteNotice(UUID noticeID)
329 {
330 return false;
331 }
332
333 public void DeleteOldNotices()
334 {
335 }
336 #endregion
337
338 }
339}
diff --git a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs
index 5a55b09..7b20b8c 100644
--- a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs
+++ b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs
@@ -36,13 +36,14 @@ using OpenSim.Framework;
36 36
37namespace OpenSim.Tests.Common 37namespace OpenSim.Tests.Common
38{ 38{
39/*
39 public class TestHttpClientContext: IHttpClientContext 40 public class TestHttpClientContext: IHttpClientContext
40 { 41 {
41 /// <summary> 42 /// <summary>
42 /// Bodies of responses from the server. 43 /// Bodies of responses from the server.
43 /// </summary> 44 /// </summary>
44 public string ResponseBody 45 public string ResponseBody
45 { 46 {
46 get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); } 47 get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); }
47 } 48 }
48 49
@@ -55,8 +56,8 @@ namespace OpenSim.Tests.Common
55 56
56 public bool IsSecured { get; set; } 57 public bool IsSecured { get; set; }
57 58
58 public bool Secured 59 public bool Secured
59 { 60 {
60 get { return IsSecured; } 61 get { return IsSecured; }
61 set { IsSecured = value; } 62 set { IsSecured = value; }
62 } 63 }
@@ -66,7 +67,7 @@ namespace OpenSim.Tests.Common
66 Secured = secured; 67 Secured = secured;
67 } 68 }
68 69
69 public void Disconnect(SocketError error) 70 public void Disconnect(SocketError error)
70 { 71 {
71// Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error); 72// Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error);
72 } 73 }
@@ -75,18 +76,18 @@ namespace OpenSim.Tests.Common
75 public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");} 76 public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");}
76 public void Respond(string body) { Console.WriteLine("xxx");} 77 public void Respond(string body) { Console.WriteLine("xxx");}
77 78
78 public void Send(byte[] buffer) 79 public void Send(byte[] buffer)
79 { 80 {
80 // Getting header data here 81 // Getting header data here
81// Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer)); 82// Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer));
82 } 83 }
83 84
84 public void Send(byte[] buffer, int offset, int size) 85 public void Send(byte[] buffer, int offset, int size)
85 { 86 {
86// Util.PrintCallStack(); 87// Util.PrintCallStack();
87// 88//
88// Console.WriteLine( 89// Console.WriteLine(
89// "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}", 90// "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}",
90// offset, size, Encoding.UTF8.GetString(buffer)); 91// offset, size, Encoding.UTF8.GetString(buffer));
91 92
92 m_responseStream.Write(buffer, offset, size); 93 m_responseStream.Write(buffer, offset, size);
@@ -107,4 +108,5 @@ namespace OpenSim.Tests.Common
107 /// </summary> 108 /// </summary>
108 public event EventHandler<RequestEventArgs> RequestReceived = delegate { }; 109 public event EventHandler<RequestEventArgs> RequestReceived = delegate { };
109 } 110 }
111*/
110} \ No newline at end of file 112} \ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs
index b868895..4c5ea4a 100644
--- a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs
+++ b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs
@@ -33,88 +33,89 @@ using HttpServer.FormDecoders;
33 33
34namespace OpenSim.Tests.Common 34namespace OpenSim.Tests.Common
35{ 35{
36/*
36 public class TestHttpRequest: IHttpRequest 37 public class TestHttpRequest: IHttpRequest
37 { 38 {
38 private string _uriPath; 39 private string _uriPath;
39 public bool BodyIsComplete 40 public bool BodyIsComplete
40 { 41 {
41 get { return true; } 42 get { return true; }
42 } 43 }
43 public string[] AcceptTypes 44 public string[] AcceptTypes
44 { 45 {
45 get {return _acceptTypes; } 46 get {return _acceptTypes; }
46 } 47 }
47 private string[] _acceptTypes; 48 private string[] _acceptTypes;
48 public Stream Body 49 public Stream Body
49 { 50 {
50 get { return _body; } 51 get { return _body; }
51 set { _body = value;} 52 set { _body = value;}
52 } 53 }
53 private Stream _body; 54 private Stream _body;
54 public ConnectionType Connection 55 public ConnectionType Connection
55 { 56 {
56 get { return _connection; } 57 get { return _connection; }
57 set { _connection = value; } 58 set { _connection = value; }
58 } 59 }
59 private ConnectionType _connection; 60 private ConnectionType _connection;
60 public int ContentLength 61 public int ContentLength
61 { 62 {
62 get { return _contentLength; } 63 get { return _contentLength; }
63 set { _contentLength = value; } 64 set { _contentLength = value; }
64 } 65 }
65 private int _contentLength; 66 private int _contentLength;
66 public NameValueCollection Headers 67 public NameValueCollection Headers
67 { 68 {
68 get { return _headers; } 69 get { return _headers; }
69 } 70 }
70 private NameValueCollection _headers = new NameValueCollection(); 71 private NameValueCollection _headers = new NameValueCollection();
71 72
72 public string HttpVersion { get; set; } 73 public string HttpVersion { get; set; }
73 74
74 public string Method 75 public string Method
75 { 76 {
76 get { return _method; } 77 get { return _method; }
77 set { _method = value; } 78 set { _method = value; }
78 } 79 }
79 private string _method = null; 80 private string _method = null;
80 public HttpInput QueryString 81 public HttpInput QueryString
81 { 82 {
82 get { return _queryString; } 83 get { return _queryString; }
83 } 84 }
84 private HttpInput _queryString = null; 85 private HttpInput _queryString = null;
85 public Uri Uri 86 public Uri Uri
86 { 87 {
87 get { return _uri; } 88 get { return _uri; }
88 set { _uri = value; } 89 set { _uri = value; }
89 } 90 }
90 private Uri _uri = null; 91 private Uri _uri = null;
91 public string[] UriParts 92 public string[] UriParts
92 { 93 {
93 get { return _uri.Segments; } 94 get { return _uri.Segments; }
94 } 95 }
95 public HttpParam Param 96 public HttpParam Param
96 { 97 {
97 get { return null; } 98 get { return null; }
98 } 99 }
99 public HttpForm Form 100 public HttpForm Form
100 { 101 {
101 get { return null; } 102 get { return null; }
102 } 103 }
103 public bool IsAjax 104 public bool IsAjax
104 { 105 {
105 get { return false; } 106 get { return false; }
106 } 107 }
107 public RequestCookies Cookies 108 public RequestCookies Cookies
108 { 109 {
109 get { return null; } 110 get { return null; }
110 } 111 }
111 112
112 public TestHttpRequest() 113 public TestHttpRequest()
113 { 114 {
114 HttpVersion = "HTTP/1.1"; 115 HttpVersion = "HTTP/1.1";
115 } 116 }
116 117
117 public TestHttpRequest(string contentEncoding, string contentType, string userAgent, 118 public TestHttpRequest(string contentEncoding, string contentType, string userAgent,
118 string remoteAddr, string remotePort, string[] acceptTypes, 119 string remoteAddr, string remotePort, string[] acceptTypes,
119 ConnectionType connectionType, int contentLength, Uri uri) : base() 120 ConnectionType connectionType, int contentLength, Uri uri) : base()
120 { 121 {
@@ -136,7 +137,7 @@ namespace OpenSim.Tests.Common
136 { 137 {
137 _headers.Add(name, value); 138 _headers.Add(name, value);
138 } 139 }
139 public int AddToBody(byte[] bytes, int offset, int length) 140 public int AddToBody(byte[] bytes, int offset, int length)
140 { 141 {
141 return 0; 142 return 0;
142 } 143 }
@@ -167,8 +168,9 @@ namespace OpenSim.Tests.Common
167 set 168 set
168 { 169 {
169 _uriPath = value; 170 _uriPath = value;
170 171
171 } 172 }
172 } 173 }
173 } 174 }
175*/
174} \ No newline at end of file 176} \ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs
index ff47c10..190f6d5 100644
--- a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs
@@ -33,9 +33,10 @@ using HttpServer;
33 33
34namespace OpenSim.Tests.Common 34namespace OpenSim.Tests.Common
35{ 35{
36/*
36 public class TestHttpResponse: IHttpResponse 37 public class TestHttpResponse: IHttpResponse
37 { 38 {
38 public Stream Body 39 public Stream Body
39 { 40 {
40 get { return _body; } 41 get { return _body; }
41 42
@@ -43,14 +44,14 @@ namespace OpenSim.Tests.Common
43 } 44 }
44 private Stream _body; 45 private Stream _body;
45 46
46 public string ProtocolVersion 47 public string ProtocolVersion
47 { 48 {
48 get { return _protocolVersion; } 49 get { return _protocolVersion; }
49 set { _protocolVersion = value; } 50 set { _protocolVersion = value; }
50 } 51 }
51 private string _protocolVersion; 52 private string _protocolVersion;
52 53
53 public bool Chunked 54 public bool Chunked
54 { 55 {
55 get { return _chunked; } 56 get { return _chunked; }
56 57
@@ -58,7 +59,7 @@ namespace OpenSim.Tests.Common
58 } 59 }
59 private bool _chunked; 60 private bool _chunked;
60 61
61 public ConnectionType Connection 62 public ConnectionType Connection
62 { 63 {
63 get { return _connection; } 64 get { return _connection; }
64 65
@@ -66,7 +67,7 @@ namespace OpenSim.Tests.Common
66 } 67 }
67 private ConnectionType _connection; 68 private ConnectionType _connection;
68 69
69 public Encoding Encoding 70 public Encoding Encoding
70 { 71 {
71 get { return _encoding; } 72 get { return _encoding; }
72 73
@@ -74,7 +75,7 @@ namespace OpenSim.Tests.Common
74 } 75 }
75 private Encoding _encoding; 76 private Encoding _encoding;
76 77
77 public int KeepAlive 78 public int KeepAlive
78 { 79 {
79 get { return _keepAlive; } 80 get { return _keepAlive; }
80 81
@@ -82,7 +83,7 @@ namespace OpenSim.Tests.Common
82 } 83 }
83 private int _keepAlive; 84 private int _keepAlive;
84 85
85 public HttpStatusCode Status 86 public HttpStatusCode Status
86 { 87 {
87 get { return _status; } 88 get { return _status; }
88 89
@@ -90,7 +91,7 @@ namespace OpenSim.Tests.Common
90 } 91 }
91 private HttpStatusCode _status; 92 private HttpStatusCode _status;
92 93
93 public string Reason 94 public string Reason
94 { 95 {
95 get { return _reason; } 96 get { return _reason; }
96 97
@@ -98,7 +99,7 @@ namespace OpenSim.Tests.Common
98 } 99 }
99 private string _reason; 100 private string _reason;
100 101
101 public long ContentLength 102 public long ContentLength
102 { 103 {
103 get { return _contentLength; } 104 get { return _contentLength; }
104 105
@@ -106,7 +107,7 @@ namespace OpenSim.Tests.Common
106 } 107 }
107 private long _contentLength; 108 private long _contentLength;
108 109
109 public string ContentType 110 public string ContentType
110 { 111 {
111 get { return _contentType; } 112 get { return _contentType; }
112 113
@@ -114,19 +115,19 @@ namespace OpenSim.Tests.Common
114 } 115 }
115 private string _contentType; 116 private string _contentType;
116 117
117 public bool HeadersSent 118 public bool HeadersSent
118 { 119 {
119 get { return _headersSent; } 120 get { return _headersSent; }
120 } 121 }
121 private bool _headersSent; 122 private bool _headersSent;
122 123
123 public bool Sent 124 public bool Sent
124 { 125 {
125 get { return _sent; } 126 get { return _sent; }
126 } 127 }
127 private bool _sent; 128 private bool _sent;
128 129
129 public ResponseCookies Cookies 130 public ResponseCookies Cookies
130 { 131 {
131 get { return _cookies; } 132 get { return _cookies; }
132 } 133 }
@@ -140,26 +141,26 @@ namespace OpenSim.Tests.Common
140 141
141 public void AddHeader(string name, string value) {} 142 public void AddHeader(string name, string value) {}
142 143
143 public void Send() 144 public void Send()
144 { 145 {
145 if (!_headersSent) SendHeaders(); 146 if (!_headersSent) SendHeaders();
146 if (_sent) throw new InvalidOperationException("stuff already sent"); 147 if (_sent) throw new InvalidOperationException("stuff already sent");
147 _sent = true; 148 _sent = true;
148 } 149 }
149 150
150 public void SendBody(byte[] buffer, int offset, int count) 151 public void SendBody(byte[] buffer, int offset, int count)
151 { 152 {
152 if (!_headersSent) SendHeaders(); 153 if (!_headersSent) SendHeaders();
153 _sent = true; 154 _sent = true;
154 } 155 }
155 156
156 public void SendBody(byte[] buffer) 157 public void SendBody(byte[] buffer)
157 { 158 {
158 if (!_headersSent) SendHeaders(); 159 if (!_headersSent) SendHeaders();
159 _sent = true; 160 _sent = true;
160 } 161 }
161 162
162 public void SendHeaders() 163 public void SendHeaders()
163 { 164 {
164 if (_headersSent) throw new InvalidOperationException("headers already sent"); 165 if (_headersSent) throw new InvalidOperationException("headers already sent");
165 _headersSent = true; 166 _headersSent = true;
@@ -168,4 +169,5 @@ namespace OpenSim.Tests.Common
168 public void Redirect(Uri uri) {} 169 public void Redirect(Uri uri) {}
169 public void Redirect(string url) {} 170 public void Redirect(string url) {}
170 } 171 }
172*/
171} \ No newline at end of file 173} \ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index c97a765..0ff6f7f 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common
43 public class TestInventoryDataPlugin : IInventoryDataPlugin 43 public class TestInventoryDataPlugin : IInventoryDataPlugin
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 /// <value> 47 /// <value>
48 /// Inventory folders 48 /// Inventory folders
49 /// </value> 49 /// </value>
@@ -85,9 +85,9 @@ namespace OpenSim.Tests.Common
85 public List<InventoryItemBase> getInventoryInFolder(UUID folderID) 85 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
86 { 86 {
87// InventoryFolderBase folder = m_folders[folderID]; 87// InventoryFolderBase folder = m_folders[folderID];
88 88
89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID); 89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
90 90
91 List<InventoryItemBase> items = new List<InventoryItemBase>(); 91 List<InventoryItemBase> items = new List<InventoryItemBase>();
92 92
93 foreach (InventoryItemBase item in m_items.Values) 93 foreach (InventoryItemBase item in m_items.Values)
@@ -98,7 +98,7 @@ namespace OpenSim.Tests.Common
98 items.Add(item); 98 items.Add(item);
99 } 99 }
100 } 100 }
101 101
102 return items; 102 return items;
103 } 103 }
104 104
@@ -107,7 +107,7 @@ namespace OpenSim.Tests.Common
107 public InventoryFolderBase getUserRootFolder(UUID user) 107 public InventoryFolderBase getUserRootFolder(UUID user)
108 { 108 {
109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user); 109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
110 110
111 InventoryFolderBase folder = null; 111 InventoryFolderBase folder = null;
112 m_rootFolders.TryGetValue(user, out folder); 112 m_rootFolders.TryGetValue(user, out folder);
113 113
@@ -117,9 +117,9 @@ namespace OpenSim.Tests.Common
117 public List<InventoryFolderBase> getInventoryFolders(UUID parentID) 117 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
118 { 118 {
119// InventoryFolderBase parentFolder = m_folders[parentID]; 119// InventoryFolderBase parentFolder = m_folders[parentID];
120 120
121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID); 121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
122 122
123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
124 124
125 foreach (InventoryFolderBase folder in m_folders.Values) 125 foreach (InventoryFolderBase folder in m_folders.Values)
@@ -127,9 +127,9 @@ namespace OpenSim.Tests.Common
127 if (folder.ParentID == parentID) 127 if (folder.ParentID == parentID)
128 { 128 {
129// m_log.DebugFormat( 129// m_log.DebugFormat(
130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}", 130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID); 131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
132 132
133 folders.Add(folder); 133 folders.Add(folder);
134 } 134 }
135 } 135 }
@@ -153,9 +153,9 @@ namespace OpenSim.Tests.Common
153 public void addInventoryFolder(InventoryFolderBase folder) 153 public void addInventoryFolder(InventoryFolderBase folder)
154 { 154 {
155// m_log.DebugFormat( 155// m_log.DebugFormat(
156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}", 156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
157// folder.Name, folder.ID, (AssetType)folder.Type); 157// folder.Name, folder.ID, (AssetType)folder.Type);
158 158
159 m_folders[folder.ID] = folder; 159 m_folders[folder.ID] = folder;
160 160
161 if (folder.ParentID == UUID.Zero) 161 if (folder.ParentID == UUID.Zero)
@@ -183,30 +183,30 @@ namespace OpenSim.Tests.Common
183 m_folders.Remove(folderId); 183 m_folders.Remove(folderId);
184 } 184 }
185 185
186 public void addInventoryItem(InventoryItemBase item) 186 public void addInventoryItem(InventoryItemBase item)
187 { 187 {
188 InventoryFolderBase folder = m_folders[item.Folder]; 188 InventoryFolderBase folder = m_folders[item.Folder];
189 189
190// m_log.DebugFormat( 190// m_log.DebugFormat(
191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID); 191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
192 192
193 m_items[item.ID] = item; 193 m_items[item.ID] = item;
194 } 194 }
195 195
196 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); } 196 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
197 197
198 public void deleteInventoryItem(UUID itemId) 198 public void deleteInventoryItem(UUID itemId)
199 { 199 {
200 if (m_items.ContainsKey(itemId)) 200 if (m_items.ContainsKey(itemId))
201 m_items.Remove(itemId); 201 m_items.Remove(itemId);
202 } 202 }
203 203
204 public InventoryItemBase getInventoryItem(UUID itemId) 204 public InventoryItemBase getInventoryItem(UUID itemId)
205 { 205 {
206 if (m_items.ContainsKey(itemId)) 206 if (m_items.ContainsKey(itemId))
207 return m_items[itemId]; 207 return m_items[itemId];
208 else 208 else
209 return null; 209 return null;
210 } 210 }
211 211
212 public InventoryItemBase queryInventoryItem(UUID item) 212 public InventoryItemBase queryInventoryItem(UUID item)
diff --git a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
index 26887c9..388b56b 100644
--- a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
+++ b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
@@ -43,8 +43,8 @@ namespace OpenSim.Tests.Common
43 { 43 {
44 public List<Packet> PacketsSent { get; private set; } 44 public List<Packet> PacketsSent { get; private set; }
45 45
46 public TestLLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) 46 public TestLLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
47 : base(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager) 47 : base(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager)
48 { 48 {
49 PacketsSent = new List<Packet>(); 49 PacketsSent = new List<Packet>();
50 } 50 }
@@ -73,7 +73,7 @@ namespace OpenSim.Tests.Common
73//// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive 73//// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive
74//// /// </summary> 74//// /// </summary>
75//// protected Queue<ChunkSenderTuple> m_chunksToLoad = new Queue<ChunkSenderTuple>(); 75//// protected Queue<ChunkSenderTuple> m_chunksToLoad = new Queue<ChunkSenderTuple>();
76// 76//
77//// protected override void BeginReceive() 77//// protected override void BeginReceive()
78//// { 78//// {
79//// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException) 79//// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException)
@@ -83,29 +83,29 @@ namespace OpenSim.Tests.Common
83//// throw new SocketException(); 83//// throw new SocketException();
84//// } 84//// }
85//// } 85//// }
86// 86//
87//// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender) 87//// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender)
88//// { 88//// {
89//// numBytes = 0; 89//// numBytes = 0;
90//// 90////
91//// //m_log.Debug("Queue size " + m_chunksToLoad.Count); 91//// //m_log.Debug("Queue size " + m_chunksToLoad.Count);
92//// 92////
93//// if (m_chunksToLoad.Count <= 0) 93//// if (m_chunksToLoad.Count <= 0)
94//// return false; 94//// return false;
95//// 95////
96//// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue(); 96//// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue();
97//// RecvBuffer = tuple.Data; 97//// RecvBuffer = tuple.Data;
98//// numBytes = tuple.Data.Length; 98//// numBytes = tuple.Data.Length;
99//// epSender = tuple.Sender; 99//// epSender = tuple.Sender;
100//// 100////
101//// return true; 101//// return true;
102//// } 102//// }
103// 103//
104//// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) 104//// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
105//// { 105//// {
106//// // Don't do anything just yet 106//// // Don't do anything just yet
107//// } 107//// }
108// 108//
109// /// <summary> 109// /// <summary>
110// /// Signal that this chunk should throw an exception on Socket.BeginReceive() 110// /// Signal that this chunk should throw an exception on Socket.BeginReceive()
111// /// </summary> 111// /// </summary>
@@ -116,7 +116,7 @@ namespace OpenSim.Tests.Common
116// tuple.BeginReceiveException = true; 116// tuple.BeginReceiveException = true;
117// m_chunksToLoad.Enqueue(tuple); 117// m_chunksToLoad.Enqueue(tuple);
118// } 118// }
119// 119//
120// /// <summary> 120// /// <summary>
121// /// Load some data to be received by the LLUDPServer on the next receive call 121// /// Load some data to be received by the LLUDPServer on the next receive call
122// /// </summary> 122// /// </summary>
@@ -126,7 +126,7 @@ namespace OpenSim.Tests.Common
126// { 126// {
127// m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender)); 127// m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender));
128// } 128// }
129// 129//
130// /// <summary> 130// /// <summary>
131// /// Load a packet to be received by the LLUDPServer on the next receive call 131// /// Load a packet to be received by the LLUDPServer on the next receive call
132// /// </summary> 132// /// </summary>
@@ -135,7 +135,7 @@ namespace OpenSim.Tests.Common
135// { 135// {
136// LoadReceive(packet.ToBytes(), epSender); 136// LoadReceive(packet.ToBytes(), epSender);
137// } 137// }
138// 138//
139// /// <summary> 139// /// <summary>
140// /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send 140// /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send
141// /// </summary> 141// /// </summary>
@@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common
147//// OnReceivedData(result); 147//// OnReceivedData(result);
148// } 148// }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Record the data and sender tuple 152 /// Record the data and sender tuple
153 /// </summary> 153 /// </summary>
@@ -156,13 +156,13 @@ namespace OpenSim.Tests.Common
156 public byte[] Data; 156 public byte[] Data;
157 public EndPoint Sender; 157 public EndPoint Sender;
158 public bool BeginReceiveException; 158 public bool BeginReceiveException;
159 159
160 public ChunkSenderTuple(byte[] data, EndPoint sender) 160 public ChunkSenderTuple(byte[] data, EndPoint sender)
161 { 161 {
162 Data = data; 162 Data = data;
163 Sender = sender; 163 Sender = sender;
164 } 164 }
165 165
166 public ChunkSenderTuple(EndPoint sender) 166 public ChunkSenderTuple(EndPoint sender)
167 { 167 {
168 Sender = sender; 168 Sender = sender;
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index 89ebcd5..05db03fe 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common
65 { 65 {
66 return m_parcels; 66 return m_parcels;
67 } 67 }
68 68
69 public void Clear(bool setupDefaultParcel) 69 public void Clear(bool setupDefaultParcel)
70 { 70 {
71 m_parcels.Clear(); 71 m_parcels.Clear();
@@ -96,6 +96,11 @@ namespace OpenSim.Tests.Common
96 return GetNoLand(); 96 return GetNoLand();
97 } 97 }
98 98
99 public ILandObject GetLandObject(UUID ID)
100 {
101 return GetNoLand();
102 }
103
99 public ILandObject GetLandObject(float x, float y) 104 public ILandObject GetLandObject(float x, float y)
100 { 105 {
101 return GetNoLand(); 106 return GetNoLand();
@@ -104,6 +109,7 @@ namespace OpenSim.Tests.Common
104 public bool IsLandPrimCountTainted() { return false; } 109 public bool IsLandPrimCountTainted() { return false; }
105 public bool IsForcefulBansAllowed() { return false; } 110 public bool IsForcefulBansAllowed() { return false; }
106 public void UpdateLandObject(int localID, LandData data) {} 111 public void UpdateLandObject(int localID, LandData data) {}
112 public void SendParcelsOverlay(IClientAPI client) {}
107 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {} 113 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {}
108 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {} 114 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
109 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {} 115 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}
@@ -111,5 +117,6 @@ namespace OpenSim.Tests.Common
111 117
112 public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {} 118 public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
113 public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {} 119 public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
120 public void sendClientInitialLandInfo(IClientAPI remoteClient) { }
114 } 121 }
115} \ No newline at end of file 122} \ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 1a93c9f..0b3d446 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Tests.Common
41 public class TestScene : Scene 41 public class TestScene : Scene
42 { 42 {
43 public TestScene( 43 public TestScene(
44 RegionInfo regInfo, AgentCircuitManager authen, 44 RegionInfo regInfo, AgentCircuitManager authen,
45 ISimulationDataService simDataService, IEstateDataService estateDataService, 45 ISimulationDataService simDataService, IEstateDataService estateDataService,
46 IConfigSource config, string simulatorVersion) 46 IConfigSource config, string simulatorVersion)
47 : base(regInfo, authen, simDataService, estateDataService, 47 : base(regInfo, authen, simDataService, estateDataService,
@@ -54,7 +54,7 @@ namespace OpenSim.Tests.Common
54 //Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName); 54 //Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName);
55 Console.WriteLine("TestScene destructor called"); 55 Console.WriteLine("TestScene destructor called");
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Temporarily override session authentication for tests (namely teleport). 59 /// Temporarily override session authentication for tests (namely teleport).
60 /// </summary> 60 /// </summary>
@@ -68,7 +68,7 @@ namespace OpenSim.Tests.Common
68 reason = String.Empty; 68 reason = String.Empty;
69 return true; 69 return true;
70 } 70 }
71 71
72 public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter 72 public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
73 { 73 {
74 get { return m_asyncSceneObjectDeleter; } 74 get { return m_asyncSceneObjectDeleter; }
diff --git a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
index 2b272e6..77f1793 100644
--- a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Tests.Common
89 m_allItems[item.inventoryID] = item.Clone(); 89 m_allItems[item.inventoryID] = item.Clone();
90 90
91// Console.WriteLine( 91// Console.WriteLine(
92// "Added item {0} {1}, folder {2}, creator {3}, owner {4}", 92// "Added item {0} {1}, folder {2}, creator {3}, owner {4}",
93// item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID); 93// item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID);
94 94
95 return true; 95 return true;
@@ -123,8 +123,8 @@ namespace OpenSim.Tests.Common
123 123
124 public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); } 124 public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); }
125 125
126 public bool MoveFolder(string id, string newParent) 126 public bool MoveFolder(string id, string newParent)
127 { 127 {
128 // Don't use GetFolders() here - it takes a clone! 128 // Don't use GetFolders() here - it takes a clone!
129 XInventoryFolder folder = m_allFolders[new UUID(id)]; 129 XInventoryFolder folder = m_allFolders[new UUID(id)];
130 130
@@ -133,11 +133,11 @@ namespace OpenSim.Tests.Common
133 133
134 folder.parentFolderID = new UUID(newParent); 134 folder.parentFolderID = new UUID(newParent);
135 135
136// XInventoryFolder[] newParentFolders 136// XInventoryFolder[] newParentFolders
137// = GetFolders(new string[] { "folderID" }, new string[] { folder.parentFolderID.ToString() }); 137// = GetFolders(new string[] { "folderID" }, new string[] { folder.parentFolderID.ToString() });
138 138
139// Console.WriteLine( 139// Console.WriteLine(
140// "Moved folder {0} {1}, to {2} {3}", 140// "Moved folder {0} {1}, to {2} {3}",
141// folder.folderName, folder.folderID, newParentFolders[0].folderName, folder.parentFolderID); 141// folder.folderName, folder.folderID, newParentFolders[0].folderName, folder.parentFolderID);
142 142
143 // TODO: Really need to implement folder version incrementing, though this should be common code anyway, 143 // TODO: Really need to implement folder version incrementing, though this should be common code anyway,