aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-10 20:57:15 +0000
committerJustin Clarke Casey2008-12-10 20:57:15 +0000
commitc9ae8fce5efba118b3c79c6b352996467be7cda5 (patch)
treeebc1689f956b63e3919a073d2b98cbbd23c9e373 /OpenSim/Region
parent* Delete empty unused test directories (diff)
downloadopensim-SC_OLD-c9ae8fce5efba118b3c79c6b352996467be7cda5.zip
opensim-SC_OLD-c9ae8fce5efba118b3c79c6b352996467be7cda5.tar.gz
opensim-SC_OLD-c9ae8fce5efba118b3c79c6b352996467be7cda5.tar.bz2
opensim-SC_OLD-c9ae8fce5efba118b3c79c6b352996467be7cda5.tar.xz
* refactor: Move test infrastructure code to its own package so that it can be reused by more than Environment tests
* This shuffles the test packages in prebuild.xml below it so they can all potentially reference it
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/EntityListTests.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestAssetDataPlugin.cs53
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestClient.cs953
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs50
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestInventoryDataPlugin.cs118
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs52
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestScene.cs55
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestUserDataPlugin.cs123
11 files changed, 5 insertions, 1405 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Tests/EntityListTests.cs b/OpenSim/Region/Environment/Scenes/Tests/EntityListTests.cs
index c8f86f3..d79d003 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/EntityListTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/EntityListTests.cs
@@ -32,10 +32,11 @@ using System.Text;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using Nini.Config; 33using Nini.Config;
34using NUnit.Framework; 34using NUnit.Framework;
35using OpenMetaverse;
35using OpenSim.Framework; 36using OpenSim.Framework;
36using OpenSim.Framework.Communications; 37using OpenSim.Framework.Communications;
37using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
38using OpenMetaverse; 39using OpenSim.Tests.Infra;
39 40
40namespace OpenSim.Region.Environment.Scenes.Tests 41namespace OpenSim.Region.Environment.Scenes.Tests
41{ 42{
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
index 9e6e4a7..e8c3b96 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
@@ -34,6 +34,7 @@ using OpenSim.Framework.Communications;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
35using OpenSim.Region.Communications.Local; 35using OpenSim.Region.Communications.Local;
36using OpenSim.Region.Environment.Scenes; 36using OpenSim.Region.Environment.Scenes;
37using OpenSim.Tests.Infra;
37 38
38namespace OpenSim.Region.Environment.Scenes.Tests 39namespace OpenSim.Region.Environment.Scenes.Tests
39{ 40{
diff --git a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
index a19dbf7..c4c8d3e 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
@@ -30,6 +30,7 @@ using NUnit.Framework.SyntaxHelpers;
30using OpenMetaverse; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Tests.Infra;
33 34
34namespace OpenSim.Region.Environment.Scenes.Tests 35namespace OpenSim.Region.Environment.Scenes.Tests
35{ 36{
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
index 985c8a3..be06fe4 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs
@@ -33,6 +33,7 @@ using OpenSim.Framework.Communications.Cache;
33using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
34using OpenSim.Region.Physics.Manager; 34using OpenSim.Region.Physics.Manager;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
36using OpenSim.Tests.Infra;
36 37
37namespace OpenSim.Region.Environment.Scenes.Tests 38namespace OpenSim.Region.Environment.Scenes.Tests
38{ 39{
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestAssetDataPlugin.cs b/OpenSim/Region/Environment/Scenes/Tests/TestAssetDataPlugin.cs
deleted file mode 100644
index 9aeb5fa..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestAssetDataPlugin.cs
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29using OpenSim.Framework;
30using OpenSim.Framework.Communications;
31
32namespace OpenSim.Region.Environment.Scenes.Tests
33{
34 /// <summary>
35 /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
36 /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
37 /// tests are single threaded.
38 /// </summary>
39 public class TestAssetDataPlugin : IAssetProviderPlugin
40 {
41 public string Version { get { return "0"; } }
42 public string Name { get { return "TestAssetDataPlugin"; } }
43
44 public void Initialise() {}
45 public void Dispose() {}
46
47 public AssetBase FetchAsset(UUID uuid) { return null; }
48 public void CreateAsset(AssetBase asset) {}
49 public void UpdateAsset(AssetBase asset) {}
50 public bool ExistsAsset(UUID uuid) { return false; }
51 public void Initialise(string connect) {}
52 }
53}
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestClient.cs b/OpenSim/Region/Environment/Scenes/Tests/TestClient.cs
deleted file mode 100644
index cecb115..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestClient.cs
+++ /dev/null
@@ -1,953 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Net;
31using OpenMetaverse;
32using OpenMetaverse.Packets;
33using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes;
35
36namespace OpenSim.Region.Environment.Scenes.Tests
37{
38 public class TestClient : IClientAPI
39 {
40 private Scene m_scene;
41
42// disable warning: public events, part of the public API
43#pragma warning disable 67
44
45 public event Action<IClientAPI> OnLogout;
46 public event ObjectPermissions OnObjectPermissions;
47
48 public event MoneyTransferRequest OnMoneyTransferRequest;
49 public event ParcelBuy OnParcelBuy;
50 public event Action<IClientAPI> OnConnectionClosed;
51
52 public event ImprovedInstantMessage OnInstantMessage;
53 public event ChatMessage OnChatFromClient;
54 public event TextureRequest OnRequestTexture;
55 public event RezObject OnRezObject;
56 public event ModifyTerrain OnModifyTerrain;
57 public event BakeTerrain OnBakeTerrain;
58 public event SetAppearance OnSetAppearance;
59 public event AvatarNowWearing OnAvatarNowWearing;
60 public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
61 public event UUIDNameRequest OnDetachAttachmentIntoInv;
62 public event ObjectAttach OnObjectAttach;
63 public event ObjectDeselect OnObjectDetach;
64 public event ObjectDrop OnObjectDrop;
65 public event StartAnim OnStartAnim;
66 public event StopAnim OnStopAnim;
67 public event LinkObjects OnLinkObjects;
68 public event DelinkObjects OnDelinkObjects;
69 public event RequestMapBlocks OnRequestMapBlocks;
70 public event RequestMapName OnMapNameRequest;
71 public event TeleportLocationRequest OnTeleportLocationRequest;
72 public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
73 public event DisconnectUser OnDisconnectUser;
74 public event RequestAvatarProperties OnRequestAvatarProperties;
75 public event SetAlwaysRun OnSetAlwaysRun;
76
77 public event DeRezObject OnDeRezObject;
78 public event Action<IClientAPI> OnRegionHandShakeReply;
79 public event GenericCall2 OnRequestWearables;
80 public event GenericCall2 OnCompleteMovementToRegion;
81 public event UpdateAgent OnAgentUpdate;
82 public event AgentRequestSit OnAgentRequestSit;
83 public event AgentSit OnAgentSit;
84 public event AvatarPickerRequest OnAvatarPickerRequest;
85 public event Action<IClientAPI> OnRequestAvatarsData;
86 public event AddNewPrim OnAddPrim;
87 public event RequestGodlikePowers OnRequestGodlikePowers;
88 public event GodKickUser OnGodKickUser;
89 public event ObjectDuplicate OnObjectDuplicate;
90 public event GrabObject OnGrabObject;
91 public event ObjectSelect OnDeGrabObject;
92 public event MoveObject OnGrabUpdate;
93 public event ViewerEffectEventHandler OnViewerEffect;
94
95 public event FetchInventory OnAgentDataUpdateRequest;
96 public event FetchInventory OnUserInfoRequest;
97 public event TeleportLocationRequest OnSetStartLocationRequest;
98
99 public event UpdateShape OnUpdatePrimShape;
100 public event ObjectExtraParams OnUpdateExtraParams;
101 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
102 public event ObjectSelect OnObjectSelect;
103 public event GenericCall7 OnObjectDescription;
104 public event GenericCall7 OnObjectName;
105 public event GenericCall7 OnObjectClickAction;
106 public event GenericCall7 OnObjectMaterial;
107 public event UpdatePrimFlags OnUpdatePrimFlags;
108 public event UpdatePrimTexture OnUpdatePrimTexture;
109 public event UpdateVector OnUpdatePrimGroupPosition;
110 public event UpdateVector OnUpdatePrimSinglePosition;
111 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
112 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
113 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
114 public event UpdateVector OnUpdatePrimScale;
115 public event UpdateVector OnUpdatePrimGroupScale;
116 public event StatusChange OnChildAgentStatus;
117 public event GenericCall2 OnStopMovement;
118 public event Action<UUID> OnRemoveAvatar;
119
120 public event CreateNewInventoryItem OnCreateNewInventoryItem;
121 public event CreateInventoryFolder OnCreateNewInventoryFolder;
122 public event UpdateInventoryFolder OnUpdateInventoryFolder;
123 public event MoveInventoryFolder OnMoveInventoryFolder;
124 public event RemoveInventoryFolder OnRemoveInventoryFolder;
125 public event RemoveInventoryItem OnRemoveInventoryItem;
126 public event FetchInventoryDescendents OnFetchInventoryDescendents;
127 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
128 public event FetchInventory OnFetchInventory;
129 public event RequestTaskInventory OnRequestTaskInventory;
130 public event UpdateInventoryItem OnUpdateInventoryItem;
131 public event CopyInventoryItem OnCopyInventoryItem;
132 public event MoveInventoryItem OnMoveInventoryItem;
133 public event UDPAssetUploadRequest OnAssetUploadRequest;
134 public event RequestTerrain OnRequestTerrain;
135 public event RequestTerrain OnUploadTerrain;
136 public event XferReceive OnXferReceive;
137 public event RequestXfer OnRequestXfer;
138 public event ConfirmXfer OnConfirmXfer;
139 public event AbortXfer OnAbortXfer;
140 public event RezScript OnRezScript;
141 public event UpdateTaskInventory OnUpdateTaskInventory;
142 public event MoveTaskInventory OnMoveTaskItem;
143 public event RemoveTaskInventory OnRemoveTaskItem;
144 public event RequestAsset OnRequestAsset;
145 public event GenericMessage OnGenericMessage;
146 public event UUIDNameRequest OnNameFromUUIDRequest;
147 public event UUIDNameRequest OnUUIDGroupNameRequest;
148
149 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
150 public event ParcelDivideRequest OnParcelDivideRequest;
151 public event ParcelJoinRequest OnParcelJoinRequest;
152 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
153 public event ParcelAbandonRequest OnParcelAbandonRequest;
154 public event ParcelGodForceOwner OnParcelGodForceOwner;
155 public event ParcelReclaim OnParcelReclaim;
156 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
157 public event ParcelAccessListRequest OnParcelAccessListRequest;
158 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
159 public event ParcelSelectObjects OnParcelSelectObjects;
160 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
161 public event ObjectDeselect OnObjectDeselect;
162 public event RegionInfoRequest OnRegionInfoRequest;
163 public event EstateCovenantRequest OnEstateCovenantRequest;
164 public event EstateChangeInfo OnEstateChangeInfo;
165
166 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
167
168 public event FriendActionDelegate OnApproveFriendRequest;
169 public event FriendActionDelegate OnDenyFriendRequest;
170 public event FriendshipTermination OnTerminateFriendship;
171
172 public event EconomyDataRequest OnEconomyDataRequest;
173 public event MoneyBalanceRequest OnMoneyBalanceRequest;
174 public event UpdateAvatarProperties OnUpdateAvatarProperties;
175
176 public event ObjectIncludeInSearch OnObjectIncludeInSearch;
177 public event UUIDNameRequest OnTeleportHomeRequest;
178
179 public event ScriptAnswer OnScriptAnswer;
180 public event RequestPayPrice OnRequestPayPrice;
181 public event ObjectSaleInfo OnObjectSaleInfo;
182 public event ObjectBuy OnObjectBuy;
183 public event BuyObjectInventory OnBuyObjectInventory;
184 public event AgentSit OnUndo;
185
186 public event ForceReleaseControls OnForceReleaseControls;
187
188 public event GodLandStatRequest OnLandStatRequest;
189 public event RequestObjectPropertiesFamily OnObjectGroupRequest;
190
191 public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
192 public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
193 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
194 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
195 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
196 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
197 public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
198 public event EstateRestartSimRequest OnEstateRestartSimRequest;
199 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
200 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
201 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
202 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
203 public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
204 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
205 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
206 public event ScriptReset OnScriptReset;
207 public event GetScriptRunning OnGetScriptRunning;
208 public event SetScriptRunning OnSetScriptRunning;
209 public event UpdateVector OnAutoPilotGo;
210
211 public event TerrainUnacked OnUnackedTerrain;
212
213 public event RegionHandleRequest OnRegionHandleRequest;
214 public event ParcelInfoRequest OnParcelInfoRequest;
215
216 public event ActivateGesture OnActivateGesture;
217 public event DeactivateGesture OnDeactivateGesture;
218 public event ObjectOwner OnObjectOwner;
219
220 public event DirPlacesQuery OnDirPlacesQuery;
221 public event DirFindQuery OnDirFindQuery;
222 public event DirLandQuery OnDirLandQuery;
223 public event DirPopularQuery OnDirPopularQuery;
224 public event DirClassifiedQuery OnDirClassifiedQuery;
225 public event EventInfoRequest OnEventInfoRequest;
226 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
227
228 public event MapItemRequest OnMapItemRequest;
229
230 public event OfferCallingCard OnOfferCallingCard;
231 public event AcceptCallingCard OnAcceptCallingCard;
232 public event DeclineCallingCard OnDeclineCallingCard;
233
234 public event SoundTrigger OnSoundTrigger;
235
236#pragma warning restore 67
237
238 /// <value>
239 /// This agent's UUID
240 /// </value>
241 private UUID myID;
242
243 private Vector3 startPos = new Vector3(128, 128, 2);
244
245 public virtual Vector3 StartPos
246 {
247 get { return startPos; }
248 set { }
249 }
250
251 public virtual UUID AgentId
252 {
253 get { return myID; }
254 }
255
256 public UUID SessionId
257 {
258 get { return UUID.Zero; }
259 }
260
261 public UUID SecureSessionId
262 {
263 get { return UUID.Zero; }
264 }
265
266 public virtual string FirstName
267 {
268 get { return m_firstName; }
269 }
270 private string m_firstName;
271
272 public virtual string LastName
273 {
274 get { return m_lastName; }
275 }
276 private string m_lastName;
277
278 public virtual String Name
279 {
280 get { return FirstName + " " + LastName; }
281 }
282
283 public bool IsActive
284 {
285 get { return true; }
286 set { }
287 }
288
289 public UUID ActiveGroupId
290 {
291 get { return UUID.Zero; }
292 }
293
294 public string ActiveGroupName
295 {
296 get { return String.Empty; }
297 }
298
299 public ulong ActiveGroupPowers
300 {
301 get { return 0; }
302 }
303
304 public bool IsGroupMember(UUID groupID)
305 {
306 return false;
307 }
308
309 public ulong GetGroupPowers(UUID groupID)
310 {
311 return 0;
312 }
313
314 public virtual int NextAnimationSequenceNumber
315 {
316 get { return 1; }
317 }
318
319 public IScene Scene
320 {
321 get { return m_scene; }
322 }
323
324 public bool SendLogoutPacketWhenClosing
325 {
326 set { }
327 }
328
329 /// <summary>
330 /// Constructor
331 /// </summary>
332 /// <param name="agentData"></param>
333 public TestClient(AgentCircuitData agentData)
334 {
335 myID = agentData.AgentID;
336 m_firstName = agentData.firstname;
337 m_lastName = agentData.lastname;
338 }
339
340 public virtual void ActivateGesture(UUID assetId, UUID gestureId)
341 {
342 }
343
344 public virtual void SendWearables(AvatarWearable[] wearables, int serial)
345 {
346 }
347
348 public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
349 {
350 }
351
352 public virtual void Kick(string message)
353 {
354 }
355
356 public virtual void SendStartPingCheck(byte seq)
357 {
358 }
359
360 public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
361 {
362 }
363
364 public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
365 {
366
367 }
368
369 public virtual void SendKillObject(ulong regionHandle, uint localID)
370 {
371 }
372
373 public virtual void SetChildAgentThrottle(byte[] throttle)
374 {
375 }
376 public byte[] GetThrottlesPacked(float multiplier)
377 {
378 return new byte[0];
379 }
380
381
382 public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
383 {
384 }
385
386 public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
387 UUID fromAgentID, byte source, byte audible)
388 {
389 }
390
391 public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
392 UUID fromAgentID, byte source, byte audible)
393 {
394 }
395
396 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
397 {
398
399 }
400
401 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
402 {
403
404 }
405
406 public void SendGenericMessage(string method, List<string> message)
407 {
408
409 }
410
411 public virtual void SendLayerData(float[] map)
412 {
413 }
414
415 public virtual void SendLayerData(int px, int py, float[] map)
416 {
417 }
418 public virtual void SendLayerData(int px, int py, float[] map, bool track)
419 {
420 }
421
422 public virtual void SendWindData(Vector2[] windSpeeds) { }
423
424 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
425 {
426 }
427
428 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
429 {
430 }
431
432 public virtual AgentCircuitData RequestClientInfo()
433 {
434 return new AgentCircuitData();
435 }
436
437 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
438 IPEndPoint newRegionExternalEndPoint, string capsURL)
439 {
440 }
441
442 public virtual void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
443 {
444 }
445
446 public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
447 {
448 }
449
450 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
451 uint locationID, uint flags, string capsURL)
452 {
453 }
454
455 public virtual void SendTeleportFailed(string reason)
456 {
457 }
458
459 public virtual void SendTeleportLocationStart()
460 {
461 }
462
463 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
464 {
465 }
466
467 public virtual void SendPayPrice(UUID objectID, int[] payPrice)
468 {
469 }
470
471 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
472 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
473 {
474 }
475
476 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
477 Vector3 position, Vector3 velocity, Quaternion rotation)
478 {
479 }
480
481 public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
482 {
483 }
484
485 public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
486 {
487 }
488
489 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
490 {
491 }
492
493 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
494 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
495 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
496 UUID objectID, UUID ownerID, string text, byte[] color,
497 uint parentID,
498 byte[] particleSystem, byte clickAction, byte material)
499 {
500 }
501 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
502 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
503 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
504 UUID objectID, UUID ownerID, string text, byte[] color,
505 uint parentID,
506 byte[] particleSystem, byte clickAction, byte material, byte[] textureanimation,
507 bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
508 {
509 }
510 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
511 Vector3 position, Quaternion rotation, Vector3 velocity,
512 Vector3 rotationalvelocity, byte state, UUID AssetId,
513 UUID ownerID, int attachPoint)
514 {
515 }
516
517 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
518 List<InventoryItemBase> items,
519 List<InventoryFolderBase> folders,
520 bool fetchFolders,
521 bool fetchItems)
522 {
523 }
524
525 public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
526 {
527 }
528
529 public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
530 {
531 }
532
533 public virtual void SendRemoveInventoryItem(UUID itemID)
534 {
535 }
536
537 /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
538 public virtual void SendBulkUpdateInventory(InventoryItemBase item)
539 {
540 }
541
542 public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
543 {}
544
545 public UUID GetDefaultAnimation(string name)
546 {
547 return UUID.Zero;
548 }
549
550 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
551 {
552 }
553
554 public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
555 {
556 }
557
558 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
559 {
560 }
561
562 public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
563 int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
564 int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
565 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
566 {
567 }
568
569 public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
570 {
571 }
572
573 public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
574 {
575 }
576
577 public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain,
578 byte flags)
579 {
580 }
581
582 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
583 {
584 }
585
586 public void SendAttachedSoundGainChange(UUID objectID, float gain)
587 {
588
589 }
590
591 public void SendAlertMessage(string message)
592 {
593 }
594
595 public void SendAgentAlertMessage(string message, bool modal)
596 {
597 }
598
599 public void SendSystemAlertMessage(string message)
600 {
601 }
602
603 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
604 string url)
605 {
606 }
607
608 public virtual void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
609 {
610 if (OnRegionHandShakeReply != null)
611 {
612 OnRegionHandShakeReply(this);
613 }
614
615 if (OnCompleteMovementToRegion != null)
616 {
617 OnCompleteMovementToRegion();
618 }
619 }
620 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
621 {
622 }
623
624 public void SendConfirmXfer(ulong xferID, uint PacketID)
625 {
626 }
627
628 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
629 {
630 }
631
632 public void SendInitiateDownload(string simFileName, string clientFileName)
633 {
634 }
635
636 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
637 {
638 }
639
640 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
641 {
642 }
643
644 public void SendImageNotFound(UUID imageid)
645 {
646 }
647
648 public void SendShutdownConnectionNotice()
649 {
650 }
651
652 public void SendSimStats(SimStats stats)
653 {
654 }
655
656 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
657 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
658 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
659 UUID LastOwnerID, string ObjectName, string Description)
660 {
661 }
662
663 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
664 UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
665 UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
666 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
667 uint BaseMask, byte saleType, int salePrice)
668 {
669 }
670
671 public void SendAgentOffline(UUID[] agentIDs)
672 {
673
674 }
675
676 public void SendAgentOnline(UUID[] agentIDs)
677 {
678
679 }
680
681 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
682 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
683 {
684 }
685
686 public void SendAdminResponse(UUID Token, uint AdminLevel)
687 {
688
689 }
690
691 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
692 {
693
694 }
695
696 public bool AddMoney(int debit)
697 {
698 return false;
699 }
700
701 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
702 {
703 }
704
705 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
706 {
707 }
708
709 public void SendViewerTime(int phase)
710 {
711 }
712
713 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
714 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
715 UUID partnerID)
716 {
717 }
718
719 public void SetDebugPacketLevel(int newDebug)
720 {
721 }
722
723 public void InPacket(object NewPack)
724 {
725 }
726
727 public void ProcessInPacket(Packet NewPack)
728 {
729 }
730
731 public void Close(bool ShutdownCircuit)
732 {
733 }
734
735 public void Stop()
736 {
737 }
738
739 private uint m_circuitCode;
740
741 public uint CircuitCode
742 {
743 get { return m_circuitCode; }
744 set { m_circuitCode = value; }
745 }
746
747 public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
748 {
749
750 }
751 public void SendLogoutPacket()
752 {
753 }
754
755 public void Terminate()
756 {
757 }
758
759 public ClientInfo GetClientInfo()
760 {
761 return null;
762 }
763
764 public void SetClientInfo(ClientInfo info)
765 {
766 }
767
768 public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question)
769 {
770 }
771 public void SendHealth(float health)
772 {
773 }
774
775 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
776 {
777 }
778
779 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
780 {
781 }
782
783 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
784 {
785 }
786
787 public void SendEstateCovenantInformation(UUID covenant)
788 {
789 }
790
791 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
792 {
793 }
794
795 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
796 {
797 }
798
799 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
800 {
801 }
802
803 public void SendForceClientSelectObjects(List<uint> objectIDs)
804 {
805 }
806
807 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
808 {
809 }
810
811 public void SendLandParcelOverlay(byte[] data, int sequence_id)
812 {
813 }
814
815 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
816 {
817 }
818
819 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType,
820 string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
821 {
822 }
823
824 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
825 {
826 }
827
828 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
829 {
830 }
831
832 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
833 {
834 }
835
836 public void SendAsset(AssetRequestToClient req)
837 {
838 }
839
840 public void SendTexture(AssetBase TextureAsset)
841 {
842
843 }
844
845 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
846 {
847 }
848
849 public void SendClearFollowCamProperties (UUID objectID)
850 {
851 }
852
853 public void SendRegionHandle (UUID regoinID, ulong handle)
854 {
855 }
856
857 public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
858 {
859 }
860
861 public void SetClientOption(string option, string value)
862 {
863 }
864
865 public string GetClientOption(string option)
866 {
867 return string.Empty;
868 }
869
870 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
871 {
872 }
873
874 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
875 {
876 }
877
878 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
879 {
880 }
881
882 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
883 {
884 }
885
886 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
887 {
888 }
889
890 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
891 {
892 }
893
894 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
895 {
896 }
897
898 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
899 {
900 }
901
902 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
903 {
904 }
905
906 public void KillEndDone()
907 {
908 }
909
910 public void SendEventInfoReply (EventData info)
911 {
912 }
913
914 public void SendOfferCallingCard (UUID destID, UUID transactionID)
915 {
916 }
917
918 public void SendAcceptCallingCard (UUID transactionID)
919 {
920 }
921
922 public void SendDeclineCallingCard (UUID transactionID)
923 {
924 }
925
926 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
927 {
928 }
929
930 public void SendJoinGroupReply(UUID groupID, bool success)
931 {
932 }
933
934 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool succss)
935 {
936 }
937
938 public void SendLeaveGroupReply(UUID groupID, bool success)
939 {
940 }
941
942 public void SendTerminateFriend(UUID exFriendID)
943 {
944 }
945
946 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
947 {
948 //throw new NotImplementedException();
949 return false;
950 }
951
952 }
953}
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
deleted file mode 100644
index cf7ba19..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Framework;
29using OpenSim.Framework.Communications;
30using OpenSim.Framework.Communications.Cache;
31using OpenSim.Framework.Servers;
32using OpenSim.Region.Communications.Local;
33
34namespace OpenSim.Region.Environment.Scenes.Tests
35{
36 public class TestCommunicationsManager : CommunicationsManager
37 {
38 public TestCommunicationsManager()
39 : base(null, null, null, false, null)
40 {
41 LocalInventoryService lis = new LocalInventoryService();
42 m_interServiceInventoryService = lis;
43 AddInventoryService(lis);
44
45 LocalUserServices lus = new LocalUserServices(991, 992, lis);
46 m_userService = lus;
47 m_userAdminService = lus;
48 }
49 }
50}
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestInventoryDataPlugin.cs b/OpenSim/Region/Environment/Scenes/Tests/TestInventoryDataPlugin.cs
deleted file mode 100644
index 45fc36e..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestInventoryDataPlugin.cs
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework;
32
33namespace OpenSim.Region.Environment.Scenes.Tests
34{
35 /// <summary>
36 /// In memory inventory data plugin for test purposes. Could be another dll when properly filled out and when the
37 /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
38 /// tests are single threaded.
39 /// </summary>
40 public class TestInventoryDataPlugin : IInventoryDataPlugin
41 {
42 /// <value>
43 /// Known inventory folders
44 /// </value>
45 private Dictionary<UUID, InventoryFolderBase> m_folders = new Dictionary<UUID, InventoryFolderBase>();
46
47 /// <value>
48 /// User root folders
49 /// </value>
50 private Dictionary<UUID, InventoryFolderBase> m_rootFolders = new Dictionary<UUID, InventoryFolderBase>();
51
52 public string Version { get { return "0"; } }
53 public string Name { get { return "TestInventoryDataPlugin"; } }
54
55 public void Initialise() {}
56 public void Initialise(string connect) {}
57 public void Dispose() {}
58
59 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
60 {
61 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
62
63 foreach (InventoryFolderBase folder in m_folders.Values)
64 {
65 if (folder.ParentID == parentID)
66 {
67 folders.AddRange(getFolderHierarchy(folder.ID));
68 folders.Add(folder);
69 }
70 }
71
72 return folders;
73 }
74
75 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
76 {
77 return new List<InventoryItemBase>();
78 }
79
80 public List<InventoryFolderBase> getUserRootFolders(UUID user) { return null; }
81
82 public InventoryFolderBase getUserRootFolder(UUID user)
83 {
84 InventoryFolderBase folder = null;
85 m_rootFolders.TryGetValue(user, out folder);
86
87 return folder;
88 }
89
90 public List<InventoryFolderBase> getInventoryFolders(UUID parentID) { return null; }
91 public InventoryItemBase getInventoryItem(UUID item) { return null; }
92
93 public InventoryFolderBase getInventoryFolder(UUID folderId)
94 {
95 InventoryFolderBase folder = null;
96 m_folders.TryGetValue(folderId, out folder);
97
98 return folder;
99 }
100
101 public void addInventoryItem(InventoryItemBase item) {}
102 public void updateInventoryItem(InventoryItemBase item) {}
103 public void deleteInventoryItem(UUID item) {}
104
105 public void addInventoryFolder(InventoryFolderBase folder)
106 {
107 m_folders[folder.ID] = folder;
108
109 if (folder.ParentID == UUID.Zero)
110 m_rootFolders[folder.Owner] = folder;
111 }
112
113 public void updateInventoryFolder(InventoryFolderBase folder) {}
114 public void moveInventoryFolder(InventoryFolderBase folder) {}
115 public void deleteInventoryFolder(UUID folder) {}
116 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; }
117 }
118}
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs b/OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs
deleted file mode 100644
index 2bc8974..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using OpenMetaverse;
30using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces;
32
33namespace OpenSim.Region.Environment.Scenes.Tests
34{
35 /// <summary>
36 /// Land channel for test purposes
37 /// </summary>
38 public class TestLandChannel : ILandChannel
39 {
40 public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; }
41 public List<ILandObject> AllParcels() { return null; }
42 public ILandObject GetLandObject(int x, int y) { return null; }
43 public ILandObject GetLandObject(float x, float y) { return null; }
44 public bool IsLandPrimCountTainted() { return false; }
45 public bool IsForcefulBansAllowed() { return false; }
46 public void UpdateLandObject(int localID, LandData data) {}
47 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {}
48 public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
49 public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}
50 public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {}
51 }
52}
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestScene.cs b/OpenSim/Region/Environment/Scenes/Tests/TestScene.cs
deleted file mode 100644
index 744af7d..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestScene.cs
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using Nini.Config;
29using OpenSim.Framework;
30using OpenSim.Framework.Communications;
31using OpenSim.Framework.Communications.Cache;
32using OpenSim.Framework.Servers;
33using OpenSim.Region.Environment.Scenes;
34
35namespace OpenSim.Region.Environment.Scenes.Tests
36{
37 public class TestScene : Scene
38 {
39 public TestScene(
40 RegionInfo regInfo, AgentCircuitManager authen,
41 CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
42 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
43 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
44 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
45 : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, moduleLoader,
46 dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
47 {
48 }
49
50 public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
51 {
52 get { return m_asyncSceneObjectDeleter; }
53 }
54 }
55}
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestUserDataPlugin.cs b/OpenSim/Region/Environment/Scenes/Tests/TestUserDataPlugin.cs
deleted file mode 100644
index 224c7c3..0000000
--- a/OpenSim/Region/Environment/Scenes/Tests/TestUserDataPlugin.cs
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework;
32
33namespace OpenSim.Region.Environment.Scenes.Tests
34{
35 /// <summary>
36 /// In memory user data provider. Might be quite useful as a proper user data plugin, though getting mono addins
37 /// to load any plugins when running unit tests has proven impossible so far. Currently no locking since unit
38 /// tests are single threaded.
39 /// </summary>
40 public class TestUserDataPlugin : IUserDataPlugin
41 {
42 public string Version { get { return "0"; } }
43 public string Name { get { return "TestUserDataPlugin"; } }
44
45 /// <summary>
46 /// User profiles keyed by name
47 /// </summary>
48 private Dictionary<string, UserProfileData> m_userProfilesByName = new Dictionary<string, UserProfileData>();
49
50 /// <summary>
51 /// User profiles keyed by uuid
52 /// </summary>
53 private Dictionary<UUID, UserProfileData> m_userProfilesByUuid = new Dictionary<UUID, UserProfileData>();
54
55 public void Initialise() {}
56 public void Dispose() {}
57
58 public void AddNewUserProfile(UserProfileData user)
59 {
60 UpdateUserProfile(user);
61 }
62
63 public UserProfileData GetUserByUUID(UUID user)
64 {
65 UserProfileData userProfile = null;
66 m_userProfilesByUuid.TryGetValue(user, out userProfile);
67
68 return userProfile;
69 }
70
71 public UserProfileData GetUserByName(string fname, string lname)
72 {
73 UserProfileData userProfile = null;
74 m_userProfilesByName.TryGetValue(fname + " " + lname, out userProfile);
75
76 return userProfile;
77 }
78
79 public bool UpdateUserProfile(UserProfileData user)
80 {
81 m_userProfilesByUuid[user.ID] = user;
82 m_userProfilesByName[user.FirstName + " " + user.SurName] = user;
83
84 return true;
85 }
86
87 public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query) { return null; }
88
89 public UserAgentData GetAgentByUUID(UUID user) { return null; }
90
91 public UserAgentData GetAgentByName(string name) { return null; }
92
93 public UserAgentData GetAgentByName(string fname, string lname) { return null; }
94
95 public void StoreWebLoginKey(UUID agentID, UUID webLoginKey) {}
96
97 public void AddNewUserAgent(UserAgentData agent) {}
98
99 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) {}
100
101 public void RemoveUserFriend(UUID friendlistowner, UUID friend) {}
102
103 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) {}
104
105 public List<FriendListItem> GetUserFriendList(UUID friendlistowner) { return null; }
106
107 public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids) { return null; }
108
109 public bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; }
110
111 public bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return false; }
112
113 public void Initialise(string connect) { return; }
114
115 public AvatarAppearance GetUserAppearance(UUID user) { return null; }
116
117 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {}
118
119 public void ResetAttachments(UUID userID) {}
120
121 public void LogoutUsers(UUID regionID) {}
122 }
123} \ No newline at end of file