From bec39938491a2be01805627018c07430d0df4710 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 11 Dec 2008 18:07:23 +0000
Subject: * Fold mock classes into existing OpenSim/Tests/Common assembly
rather than sprouting another one
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 53 ++
OpenSim/Tests/Common/Mock/TestClient.cs | 953 +++++++++++++++++++++
.../Tests/Common/Mock/TestCommunicationsManager.cs | 50 ++
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 118 +++
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 52 ++
OpenSim/Tests/Common/Mock/TestScene.cs | 56 ++
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 123 +++
7 files changed, 1405 insertions(+)
create mode 100644 OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestClient.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestLandChannel.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestScene.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
new file mode 100644
index 0000000..f44339a
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Framework.Communications;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ ///
+ /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
+ /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
+ /// tests are single threaded.
+ ///
+ public class TestAssetDataPlugin : IAssetProviderPlugin
+ {
+ public string Version { get { return "0"; } }
+ public string Name { get { return "TestAssetDataPlugin"; } }
+
+ public void Initialise() {}
+ public void Dispose() {}
+
+ public AssetBase FetchAsset(UUID uuid) { return null; }
+ public void CreateAsset(AssetBase asset) {}
+ public void UpdateAsset(AssetBase asset) {}
+ public bool ExistsAsset(UUID uuid) { return false; }
+ public void Initialise(string connect) {}
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
new file mode 100644
index 0000000..9b44ac4
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -0,0 +1,953 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Net;
+using OpenMetaverse;
+using OpenMetaverse.Packets;
+using OpenSim.Framework;
+using OpenSim.Region.Environment.Scenes;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestClient : IClientAPI
+ {
+ private Scene m_scene;
+
+// disable warning: public events, part of the public API
+#pragma warning disable 67
+
+ public event Action OnLogout;
+ public event ObjectPermissions OnObjectPermissions;
+
+ public event MoneyTransferRequest OnMoneyTransferRequest;
+ public event ParcelBuy OnParcelBuy;
+ public event Action OnConnectionClosed;
+
+ public event ImprovedInstantMessage OnInstantMessage;
+ public event ChatMessage OnChatFromClient;
+ public event TextureRequest OnRequestTexture;
+ public event RezObject OnRezObject;
+ public event ModifyTerrain OnModifyTerrain;
+ public event BakeTerrain OnBakeTerrain;
+ public event SetAppearance OnSetAppearance;
+ public event AvatarNowWearing OnAvatarNowWearing;
+ public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
+ public event UUIDNameRequest OnDetachAttachmentIntoInv;
+ public event ObjectAttach OnObjectAttach;
+ public event ObjectDeselect OnObjectDetach;
+ public event ObjectDrop OnObjectDrop;
+ public event StartAnim OnStartAnim;
+ public event StopAnim OnStopAnim;
+ public event LinkObjects OnLinkObjects;
+ public event DelinkObjects OnDelinkObjects;
+ public event RequestMapBlocks OnRequestMapBlocks;
+ public event RequestMapName OnMapNameRequest;
+ public event TeleportLocationRequest OnTeleportLocationRequest;
+ public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
+ public event DisconnectUser OnDisconnectUser;
+ public event RequestAvatarProperties OnRequestAvatarProperties;
+ public event SetAlwaysRun OnSetAlwaysRun;
+
+ public event DeRezObject OnDeRezObject;
+ public event Action OnRegionHandShakeReply;
+ public event GenericCall2 OnRequestWearables;
+ public event GenericCall2 OnCompleteMovementToRegion;
+ public event UpdateAgent OnAgentUpdate;
+ public event AgentRequestSit OnAgentRequestSit;
+ public event AgentSit OnAgentSit;
+ public event AvatarPickerRequest OnAvatarPickerRequest;
+ public event Action OnRequestAvatarsData;
+ public event AddNewPrim OnAddPrim;
+ public event RequestGodlikePowers OnRequestGodlikePowers;
+ public event GodKickUser OnGodKickUser;
+ public event ObjectDuplicate OnObjectDuplicate;
+ public event GrabObject OnGrabObject;
+ public event ObjectSelect OnDeGrabObject;
+ public event MoveObject OnGrabUpdate;
+ public event ViewerEffectEventHandler OnViewerEffect;
+
+ public event FetchInventory OnAgentDataUpdateRequest;
+ public event FetchInventory OnUserInfoRequest;
+ public event TeleportLocationRequest OnSetStartLocationRequest;
+
+ public event UpdateShape OnUpdatePrimShape;
+ public event ObjectExtraParams OnUpdateExtraParams;
+ public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
+ public event ObjectSelect OnObjectSelect;
+ public event GenericCall7 OnObjectDescription;
+ public event GenericCall7 OnObjectName;
+ public event GenericCall7 OnObjectClickAction;
+ public event GenericCall7 OnObjectMaterial;
+ public event UpdatePrimFlags OnUpdatePrimFlags;
+ public event UpdatePrimTexture OnUpdatePrimTexture;
+ public event UpdateVector OnUpdatePrimGroupPosition;
+ public event UpdateVector OnUpdatePrimSinglePosition;
+ public event UpdatePrimRotation OnUpdatePrimGroupRotation;
+ public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
+ public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
+ public event UpdateVector OnUpdatePrimScale;
+ public event UpdateVector OnUpdatePrimGroupScale;
+ public event StatusChange OnChildAgentStatus;
+ public event GenericCall2 OnStopMovement;
+ public event Action OnRemoveAvatar;
+
+ public event CreateNewInventoryItem OnCreateNewInventoryItem;
+ public event CreateInventoryFolder OnCreateNewInventoryFolder;
+ public event UpdateInventoryFolder OnUpdateInventoryFolder;
+ public event MoveInventoryFolder OnMoveInventoryFolder;
+ public event RemoveInventoryFolder OnRemoveInventoryFolder;
+ public event RemoveInventoryItem OnRemoveInventoryItem;
+ public event FetchInventoryDescendents OnFetchInventoryDescendents;
+ public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
+ public event FetchInventory OnFetchInventory;
+ public event RequestTaskInventory OnRequestTaskInventory;
+ public event UpdateInventoryItem OnUpdateInventoryItem;
+ public event CopyInventoryItem OnCopyInventoryItem;
+ public event MoveInventoryItem OnMoveInventoryItem;
+ public event UDPAssetUploadRequest OnAssetUploadRequest;
+ public event RequestTerrain OnRequestTerrain;
+ public event RequestTerrain OnUploadTerrain;
+ public event XferReceive OnXferReceive;
+ public event RequestXfer OnRequestXfer;
+ public event ConfirmXfer OnConfirmXfer;
+ public event AbortXfer OnAbortXfer;
+ public event RezScript OnRezScript;
+ public event UpdateTaskInventory OnUpdateTaskInventory;
+ public event MoveTaskInventory OnMoveTaskItem;
+ public event RemoveTaskInventory OnRemoveTaskItem;
+ public event RequestAsset OnRequestAsset;
+ public event GenericMessage OnGenericMessage;
+ public event UUIDNameRequest OnNameFromUUIDRequest;
+ public event UUIDNameRequest OnUUIDGroupNameRequest;
+
+ public event ParcelPropertiesRequest OnParcelPropertiesRequest;
+ public event ParcelDivideRequest OnParcelDivideRequest;
+ public event ParcelJoinRequest OnParcelJoinRequest;
+ public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
+ public event ParcelAbandonRequest OnParcelAbandonRequest;
+ public event ParcelGodForceOwner OnParcelGodForceOwner;
+ public event ParcelReclaim OnParcelReclaim;
+ public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
+ public event ParcelAccessListRequest OnParcelAccessListRequest;
+ public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
+ public event ParcelSelectObjects OnParcelSelectObjects;
+ public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
+ public event ObjectDeselect OnObjectDeselect;
+ public event RegionInfoRequest OnRegionInfoRequest;
+ public event EstateCovenantRequest OnEstateCovenantRequest;
+ public event EstateChangeInfo OnEstateChangeInfo;
+
+ public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
+
+ public event FriendActionDelegate OnApproveFriendRequest;
+ public event FriendActionDelegate OnDenyFriendRequest;
+ public event FriendshipTermination OnTerminateFriendship;
+
+ public event EconomyDataRequest OnEconomyDataRequest;
+ public event MoneyBalanceRequest OnMoneyBalanceRequest;
+ public event UpdateAvatarProperties OnUpdateAvatarProperties;
+
+ public event ObjectIncludeInSearch OnObjectIncludeInSearch;
+ public event UUIDNameRequest OnTeleportHomeRequest;
+
+ public event ScriptAnswer OnScriptAnswer;
+ public event RequestPayPrice OnRequestPayPrice;
+ public event ObjectSaleInfo OnObjectSaleInfo;
+ public event ObjectBuy OnObjectBuy;
+ public event BuyObjectInventory OnBuyObjectInventory;
+ public event AgentSit OnUndo;
+
+ public event ForceReleaseControls OnForceReleaseControls;
+
+ public event GodLandStatRequest OnLandStatRequest;
+ public event RequestObjectPropertiesFamily OnObjectGroupRequest;
+
+ public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
+ public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
+ public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
+ public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
+ public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
+ public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
+ public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
+ public event EstateRestartSimRequest OnEstateRestartSimRequest;
+ public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
+ public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
+ public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
+ public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
+ public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
+ public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
+ public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
+ public event ScriptReset OnScriptReset;
+ public event GetScriptRunning OnGetScriptRunning;
+ public event SetScriptRunning OnSetScriptRunning;
+ public event UpdateVector OnAutoPilotGo;
+
+ public event TerrainUnacked OnUnackedTerrain;
+
+ public event RegionHandleRequest OnRegionHandleRequest;
+ public event ParcelInfoRequest OnParcelInfoRequest;
+
+ public event ActivateGesture OnActivateGesture;
+ public event DeactivateGesture OnDeactivateGesture;
+ public event ObjectOwner OnObjectOwner;
+
+ public event DirPlacesQuery OnDirPlacesQuery;
+ public event DirFindQuery OnDirFindQuery;
+ public event DirLandQuery OnDirLandQuery;
+ public event DirPopularQuery OnDirPopularQuery;
+ public event DirClassifiedQuery OnDirClassifiedQuery;
+ public event EventInfoRequest OnEventInfoRequest;
+ public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
+
+ public event MapItemRequest OnMapItemRequest;
+
+ public event OfferCallingCard OnOfferCallingCard;
+ public event AcceptCallingCard OnAcceptCallingCard;
+ public event DeclineCallingCard OnDeclineCallingCard;
+
+ public event SoundTrigger OnSoundTrigger;
+
+#pragma warning restore 67
+
+ ///
+ /// This agent's UUID
+ ///
+ private UUID myID;
+
+ private Vector3 startPos = new Vector3(128, 128, 2);
+
+ public virtual Vector3 StartPos
+ {
+ get { return startPos; }
+ set { }
+ }
+
+ public virtual UUID AgentId
+ {
+ get { return myID; }
+ }
+
+ public UUID SessionId
+ {
+ get { return UUID.Zero; }
+ }
+
+ public UUID SecureSessionId
+ {
+ get { return UUID.Zero; }
+ }
+
+ public virtual string FirstName
+ {
+ get { return m_firstName; }
+ }
+ private string m_firstName;
+
+ public virtual string LastName
+ {
+ get { return m_lastName; }
+ }
+ private string m_lastName;
+
+ public virtual String Name
+ {
+ get { return FirstName + " " + LastName; }
+ }
+
+ public bool IsActive
+ {
+ get { return true; }
+ set { }
+ }
+
+ public UUID ActiveGroupId
+ {
+ get { return UUID.Zero; }
+ }
+
+ public string ActiveGroupName
+ {
+ get { return String.Empty; }
+ }
+
+ public ulong ActiveGroupPowers
+ {
+ get { return 0; }
+ }
+
+ public bool IsGroupMember(UUID groupID)
+ {
+ return false;
+ }
+
+ public ulong GetGroupPowers(UUID groupID)
+ {
+ return 0;
+ }
+
+ public virtual int NextAnimationSequenceNumber
+ {
+ get { return 1; }
+ }
+
+ public IScene Scene
+ {
+ get { return m_scene; }
+ }
+
+ public bool SendLogoutPacketWhenClosing
+ {
+ set { }
+ }
+
+ ///
+ /// Constructor
+ ///
+ ///
+ public TestClient(AgentCircuitData agentData)
+ {
+ myID = agentData.AgentID;
+ m_firstName = agentData.firstname;
+ m_lastName = agentData.lastname;
+ }
+
+ public virtual void ActivateGesture(UUID assetId, UUID gestureId)
+ {
+ }
+
+ public virtual void SendWearables(AvatarWearable[] wearables, int serial)
+ {
+ }
+
+ public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
+ {
+ }
+
+ public virtual void Kick(string message)
+ {
+ }
+
+ public virtual void SendStartPingCheck(byte seq)
+ {
+ }
+
+ public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data)
+ {
+ }
+
+ public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
+ {
+
+ }
+
+ public virtual void SendKillObject(ulong regionHandle, uint localID)
+ {
+ }
+
+ public virtual void SetChildAgentThrottle(byte[] throttle)
+ {
+ }
+ public byte[] GetThrottlesPacked(float multiplier)
+ {
+ return new byte[0];
+ }
+
+
+ public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
+ {
+ }
+
+ public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
+ UUID fromAgentID, byte source, byte audible)
+ {
+ }
+
+ public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
+ UUID fromAgentID, byte source, byte audible)
+ {
+ }
+
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
+ {
+
+ }
+
+ public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
+ {
+
+ }
+
+ public void SendGenericMessage(string method, List message)
+ {
+
+ }
+
+ public virtual void SendLayerData(float[] map)
+ {
+ }
+
+ public virtual void SendLayerData(int px, int py, float[] map)
+ {
+ }
+ public virtual void SendLayerData(int px, int py, float[] map, bool track)
+ {
+ }
+
+ public virtual void SendWindData(Vector2[] windSpeeds) { }
+
+ public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
+ {
+ }
+
+ public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
+ {
+ }
+
+ public virtual AgentCircuitData RequestClientInfo()
+ {
+ return new AgentCircuitData();
+ }
+
+ public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
+ IPEndPoint newRegionExternalEndPoint, string capsURL)
+ {
+ }
+
+ public virtual void SendMapBlock(List mapBlocks, uint flag)
+ {
+ }
+
+ public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
+ {
+ }
+
+ public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
+ uint locationID, uint flags, string capsURL)
+ {
+ }
+
+ public virtual void SendTeleportFailed(string reason)
+ {
+ }
+
+ public virtual void SendTeleportLocationStart()
+ {
+ }
+
+ public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
+ {
+ }
+
+ public virtual void SendPayPrice(UUID objectID, int[] payPrice)
+ {
+ }
+
+ public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
+ uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
+ {
+ }
+
+ public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
+ Vector3 position, Vector3 velocity, Quaternion rotation)
+ {
+ }
+
+ public virtual void SendCoarseLocationUpdate(List CoarseLocations)
+ {
+ }
+
+ public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
+ {
+ }
+
+ public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
+ {
+ }
+
+ public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
+ PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
+ Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
+ UUID objectID, UUID ownerID, string text, byte[] color,
+ uint parentID,
+ byte[] particleSystem, byte clickAction, byte material)
+ {
+ }
+ public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
+ PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
+ Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
+ UUID objectID, UUID ownerID, string text, byte[] color,
+ uint parentID,
+ byte[] particleSystem, byte clickAction, byte material, byte[] textureanimation,
+ bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
+ {
+ }
+ public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
+ Vector3 position, Quaternion rotation, Vector3 velocity,
+ Vector3 rotationalvelocity, byte state, UUID AssetId,
+ UUID ownerID, int attachPoint)
+ {
+ }
+
+ public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
+ List items,
+ List folders,
+ bool fetchFolders,
+ bool fetchItems)
+ {
+ }
+
+ public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
+ {
+ }
+
+ public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
+ {
+ }
+
+ public virtual void SendRemoveInventoryItem(UUID itemID)
+ {
+ }
+
+ /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase)
+ public virtual void SendBulkUpdateInventory(InventoryItemBase item)
+ {
+ }
+
+ public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
+ {}
+
+ public UUID GetDefaultAnimation(string name)
+ {
+ return UUID.Zero;
+ }
+
+ public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
+ {
+ }
+
+ public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
+ {
+ }
+
+ public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
+ {
+ }
+
+ public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
+ int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
+ int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
+ int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
+ {
+ }
+
+ public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
+ {
+ }
+
+ public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
+ {
+ }
+
+ public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain,
+ byte flags)
+ {
+ }
+
+ public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
+ {
+ }
+
+ public void SendAttachedSoundGainChange(UUID objectID, float gain)
+ {
+
+ }
+
+ public void SendAlertMessage(string message)
+ {
+ }
+
+ public void SendAgentAlertMessage(string message, bool modal)
+ {
+ }
+
+ public void SendSystemAlertMessage(string message)
+ {
+ }
+
+ public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
+ string url)
+ {
+ }
+
+ public virtual void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
+ {
+ if (OnRegionHandShakeReply != null)
+ {
+ OnRegionHandShakeReply(this);
+ }
+
+ if (OnCompleteMovementToRegion != null)
+ {
+ OnCompleteMovementToRegion();
+ }
+ }
+ public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
+ {
+ }
+
+ public void SendConfirmXfer(ulong xferID, uint PacketID)
+ {
+ }
+
+ public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
+ {
+ }
+
+ public void SendInitiateDownload(string simFileName, string clientFileName)
+ {
+ }
+
+ public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
+ {
+ }
+
+ public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
+ {
+ }
+
+ public void SendImageNotFound(UUID imageid)
+ {
+ }
+
+ public void SendShutdownConnectionNotice()
+ {
+ }
+
+ public void SendSimStats(SimStats stats)
+ {
+ }
+
+ public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
+ uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
+ uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
+ UUID LastOwnerID, string ObjectName, string Description)
+ {
+ }
+
+ public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
+ UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
+ UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
+ string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
+ uint BaseMask, byte saleType, int salePrice)
+ {
+ }
+
+ public void SendAgentOffline(UUID[] agentIDs)
+ {
+
+ }
+
+ public void SendAgentOnline(UUID[] agentIDs)
+ {
+
+ }
+
+ public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
+ Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
+ {
+ }
+
+ public void SendAdminResponse(UUID Token, uint AdminLevel)
+ {
+
+ }
+
+ public void SendGroupMembership(GroupMembershipData[] GroupMembership)
+ {
+
+ }
+
+ public bool AddMoney(int debit)
+ {
+ return false;
+ }
+
+ public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
+ {
+ }
+
+ public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
+ {
+ }
+
+ public void SendViewerTime(int phase)
+ {
+ }
+
+ public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
+ string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
+ UUID partnerID)
+ {
+ }
+
+ public void SetDebugPacketLevel(int newDebug)
+ {
+ }
+
+ public void InPacket(object NewPack)
+ {
+ }
+
+ public void ProcessInPacket(Packet NewPack)
+ {
+ }
+
+ public void Close(bool ShutdownCircuit)
+ {
+ }
+
+ public void Stop()
+ {
+ }
+
+ private uint m_circuitCode;
+
+ public uint CircuitCode
+ {
+ get { return m_circuitCode; }
+ set { m_circuitCode = value; }
+ }
+
+ public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
+ {
+
+ }
+ public void SendLogoutPacket()
+ {
+ }
+
+ public void Terminate()
+ {
+ }
+
+ public ClientInfo GetClientInfo()
+ {
+ return null;
+ }
+
+ public void SetClientInfo(ClientInfo info)
+ {
+ }
+
+ public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question)
+ {
+ }
+ public void SendHealth(float health)
+ {
+ }
+
+ public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
+ {
+ }
+
+ public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
+ {
+ }
+
+ public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
+ {
+ }
+
+ public void SendEstateCovenantInformation(UUID covenant)
+ {
+ }
+
+ public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
+ {
+ }
+
+ public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
+ {
+ }
+
+ public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID)
+ {
+ }
+
+ public void SendForceClientSelectObjects(List objectIDs)
+ {
+ }
+
+ public void SendLandObjectOwners(Dictionary ownersAndCount)
+ {
+ }
+
+ public void SendLandParcelOverlay(byte[] data, int sequence_id)
+ {
+ }
+
+ public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
+ {
+ }
+
+ public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType,
+ string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
+ {
+ }
+
+ public void SendGroupNameReply(UUID groupLLUID, string GroupName)
+ {
+ }
+
+ public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
+ {
+ }
+
+ public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
+ {
+ }
+
+ public void SendAsset(AssetRequestToClient req)
+ {
+ }
+
+ public void SendTexture(AssetBase TextureAsset)
+ {
+
+ }
+
+ public void SendSetFollowCamProperties (UUID objectID, SortedDictionary parameters)
+ {
+ }
+
+ public void SendClearFollowCamProperties (UUID objectID)
+ {
+ }
+
+ public void SendRegionHandle (UUID regoinID, ulong handle)
+ {
+ }
+
+ public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
+ {
+ }
+
+ public void SetClientOption(string option, string value)
+ {
+ }
+
+ public string GetClientOption(string option)
+ {
+ return string.Empty;
+ }
+
+ public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
+ {
+ }
+
+ public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
+ {
+ }
+
+ public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
+ {
+ }
+
+ public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
+ {
+ }
+
+ public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
+ {
+ }
+
+ public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
+ {
+ }
+
+ public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
+ {
+ }
+
+ public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
+ {
+ }
+
+ public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
+ {
+ }
+
+ public void KillEndDone()
+ {
+ }
+
+ public void SendEventInfoReply (EventData info)
+ {
+ }
+
+ public void SendOfferCallingCard (UUID destID, UUID transactionID)
+ {
+ }
+
+ public void SendAcceptCallingCard (UUID transactionID)
+ {
+ }
+
+ public void SendDeclineCallingCard (UUID transactionID)
+ {
+ }
+
+ public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
+ {
+ }
+
+ public void SendJoinGroupReply(UUID groupID, bool success)
+ {
+ }
+
+ public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool succss)
+ {
+ }
+
+ public void SendLeaveGroupReply(UUID groupID, bool success)
+ {
+ }
+
+ public void SendTerminateFriend(UUID exFriendID)
+ {
+ }
+
+ public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
+ {
+ //throw new NotImplementedException();
+ return false;
+ }
+
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
new file mode 100644
index 0000000..a6a025b
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using OpenSim.Framework;
+using OpenSim.Framework.Communications;
+using OpenSim.Framework.Communications.Cache;
+using OpenSim.Framework.Servers;
+using OpenSim.Region.Communications.Local;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestCommunicationsManager : CommunicationsManager
+ {
+ public TestCommunicationsManager()
+ : base(null, null, null, false, null)
+ {
+ LocalInventoryService lis = new LocalInventoryService();
+ m_interServiceInventoryService = lis;
+ AddInventoryService(lis);
+
+ LocalUserServices lus = new LocalUserServices(991, 992, lis);
+ m_userService = lus;
+ m_userAdminService = lus;
+ }
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
new file mode 100644
index 0000000..9e2116a
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ ///
+ /// In memory inventory data plugin for test purposes. Could be another dll when properly filled out and when the
+ /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
+ /// tests are single threaded.
+ ///
+ public class TestInventoryDataPlugin : IInventoryDataPlugin
+ {
+ ///
+ /// Known inventory folders
+ ///
+ private Dictionary m_folders = new Dictionary();
+
+ ///
+ /// User root folders
+ ///
+ private Dictionary m_rootFolders = new Dictionary();
+
+ public string Version { get { return "0"; } }
+ public string Name { get { return "TestInventoryDataPlugin"; } }
+
+ public void Initialise() {}
+ public void Initialise(string connect) {}
+ public void Dispose() {}
+
+ public List getFolderHierarchy(UUID parentID)
+ {
+ List folders = new List();
+
+ foreach (InventoryFolderBase folder in m_folders.Values)
+ {
+ if (folder.ParentID == parentID)
+ {
+ folders.AddRange(getFolderHierarchy(folder.ID));
+ folders.Add(folder);
+ }
+ }
+
+ return folders;
+ }
+
+ public List getInventoryInFolder(UUID folderID)
+ {
+ return new List();
+ }
+
+ public List getUserRootFolders(UUID user) { return null; }
+
+ public InventoryFolderBase getUserRootFolder(UUID user)
+ {
+ InventoryFolderBase folder = null;
+ m_rootFolders.TryGetValue(user, out folder);
+
+ return folder;
+ }
+
+ public List getInventoryFolders(UUID parentID) { return null; }
+ public InventoryItemBase getInventoryItem(UUID item) { return null; }
+
+ public InventoryFolderBase getInventoryFolder(UUID folderId)
+ {
+ InventoryFolderBase folder = null;
+ m_folders.TryGetValue(folderId, out folder);
+
+ return folder;
+ }
+
+ public void addInventoryItem(InventoryItemBase item) {}
+ public void updateInventoryItem(InventoryItemBase item) {}
+ public void deleteInventoryItem(UUID item) {}
+
+ public void addInventoryFolder(InventoryFolderBase folder)
+ {
+ m_folders[folder.ID] = folder;
+
+ if (folder.ParentID == UUID.Zero)
+ m_rootFolders[folder.Owner] = folder;
+ }
+
+ public void updateInventoryFolder(InventoryFolderBase folder) {}
+ public void moveInventoryFolder(InventoryFolderBase folder) {}
+ public void deleteInventoryFolder(UUID folder) {}
+ public List fetchActiveGestures(UUID avatarID) { return null; }
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
new file mode 100644
index 0000000..5e9b9ff
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Region.Environment.Interfaces;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ ///
+ /// Land channel for test purposes
+ ///
+ public class TestLandChannel : ILandChannel
+ {
+ public List ParcelsNearPoint(Vector3 position) { return null; }
+ public List AllParcels() { return null; }
+ public ILandObject GetLandObject(int x, int y) { return null; }
+ public ILandObject GetLandObject(float x, float y) { return null; }
+ public bool IsLandPrimCountTainted() { return false; }
+ public bool IsForcefulBansAllowed() { return false; }
+ public void UpdateLandObject(int localID, LandData data) {}
+ public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {}
+ public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
+ public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}
+ public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {}
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
new file mode 100644
index 0000000..6b176a1
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using Nini.Config;
+using OpenSim.Framework;
+using OpenSim.Framework.Communications;
+using OpenSim.Framework.Communications.Cache;
+using OpenSim.Framework.Servers;
+using OpenSim.Region.Environment;
+using OpenSim.Region.Environment.Scenes;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestScene : Scene
+ {
+ public TestScene(
+ RegionInfo regInfo, AgentCircuitManager authen,
+ CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
+ AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
+ ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
+ bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
+ : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, moduleLoader,
+ dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
+ {
+ }
+
+ public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
+ {
+ get { return m_asyncSceneObjectDeleter; }
+ }
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
new file mode 100644
index 0000000..a5e2a37
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ ///
+ /// In memory user data provider. Might be quite useful as a proper user data plugin, though getting mono addins
+ /// to load any plugins when running unit tests has proven impossible so far. Currently no locking since unit
+ /// tests are single threaded.
+ ///
+ public class TestUserDataPlugin : IUserDataPlugin
+ {
+ public string Version { get { return "0"; } }
+ public string Name { get { return "TestUserDataPlugin"; } }
+
+ ///
+ /// User profiles keyed by name
+ ///
+ private Dictionary m_userProfilesByName = new Dictionary();
+
+ ///
+ /// User profiles keyed by uuid
+ ///
+ private Dictionary m_userProfilesByUuid = new Dictionary();
+
+ public void Initialise() {}
+ public void Dispose() {}
+
+ public void AddNewUserProfile(UserProfileData user)
+ {
+ UpdateUserProfile(user);
+ }
+
+ public UserProfileData GetUserByUUID(UUID user)
+ {
+ UserProfileData userProfile = null;
+ m_userProfilesByUuid.TryGetValue(user, out userProfile);
+
+ return userProfile;
+ }
+
+ public UserProfileData GetUserByName(string fname, string lname)
+ {
+ UserProfileData userProfile = null;
+ m_userProfilesByName.TryGetValue(fname + " " + lname, out userProfile);
+
+ return userProfile;
+ }
+
+ public bool UpdateUserProfile(UserProfileData user)
+ {
+ m_userProfilesByUuid[user.ID] = user;
+ m_userProfilesByName[user.FirstName + " " + user.SurName] = user;
+
+ return true;
+ }
+
+ public List GeneratePickerResults(UUID queryID, string query) { return null; }
+
+ public UserAgentData GetAgentByUUID(UUID user) { return null; }
+
+ public UserAgentData GetAgentByName(string name) { return null; }
+
+ public UserAgentData GetAgentByName(string fname, string lname) { return null; }
+
+ public void StoreWebLoginKey(UUID agentID, UUID webLoginKey) {}
+
+ public void AddNewUserAgent(UserAgentData agent) {}
+
+ public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) {}
+
+ public void RemoveUserFriend(UUID friendlistowner, UUID friend) {}
+
+ public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) {}
+
+ public List GetUserFriendList(UUID friendlistowner) { return null; }
+
+ public Dictionary GetFriendRegionInfos(List uuids) { return null; }
+
+ public bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; }
+
+ public bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return false; }
+
+ public void Initialise(string connect) { return; }
+
+ public AvatarAppearance GetUserAppearance(UUID user) { return null; }
+
+ public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {}
+
+ public void ResetAttachments(UUID userID) {}
+
+ public void LogoutUsers(UUID regionID) {}
+ }
+}
\ No newline at end of file
--
cgit v1.1
From 7bbab121589a6e42e7744ffad37b35e62775b2f9 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 12 Dec 2008 19:24:45 +0000
Subject: * Add user info move inventory folder test
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 9e2116a..52b469b 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -111,7 +111,13 @@ namespace OpenSim.Tests.Common.Mock
}
public void updateInventoryFolder(InventoryFolderBase folder) {}
- public void moveInventoryFolder(InventoryFolderBase folder) {}
+
+ public void moveInventoryFolder(InventoryFolderBase folder)
+ {
+ // Simple replace
+ m_folders[folder.ID] = folder;
+ }
+
public void deleteInventoryFolder(UUID folder) {}
public List fetchActiveGestures(UUID avatarID) { return null; }
}
--
cgit v1.1
From 1531035b14367cfa44986e4a733524391d58af93 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 12 Dec 2008 20:04:58 +0000
Subject: * Actually properly enable the purge folders test and correct some
problems
---
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 52b469b..808c212 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -87,7 +87,19 @@ namespace OpenSim.Tests.Common.Mock
return folder;
}
- public List getInventoryFolders(UUID parentID) { return null; }
+ public List getInventoryFolders(UUID parentID)
+ {
+ List folders = new List();
+
+ foreach (InventoryFolderBase folder in m_folders.Values)
+ {
+ if (folder.ParentID == parentID)
+ folders.Add(folder);
+ }
+
+ return folders;
+ }
+
public InventoryItemBase getInventoryItem(UUID item) { return null; }
public InventoryFolderBase getInventoryFolder(UUID folderId)
@@ -118,7 +130,12 @@ namespace OpenSim.Tests.Common.Mock
m_folders[folder.ID] = folder;
}
- public void deleteInventoryFolder(UUID folder) {}
+ public void deleteInventoryFolder(UUID folderId)
+ {
+ if (m_folders.ContainsKey(folderId))
+ m_folders.Remove(folderId);
+ }
+
public List fetchActiveGestures(UUID avatarID) { return null; }
}
}
--
cgit v1.1
From b1f018aa2600281cc379128f17c3c141b478f39d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 12 Dec 2008 20:43:42 +0000
Subject: * Create update folder test * Correct small logic elidation
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 808c212..8e19aec 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -122,12 +122,15 @@ namespace OpenSim.Tests.Common.Mock
m_rootFolders[folder.Owner] = folder;
}
- public void updateInventoryFolder(InventoryFolderBase folder) {}
+ public void updateInventoryFolder(InventoryFolderBase folder)
+ {
+ m_folders[folder.ID] = folder;
+ }
public void moveInventoryFolder(InventoryFolderBase folder)
{
// Simple replace
- m_folders[folder.ID] = folder;
+ updateInventoryFolder(folder);
}
public void deleteInventoryFolder(UUID folderId)
--
cgit v1.1
From 008e1fe8df1862a8a3a8edfaf39d4cd9f57ad52b Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 14 Dec 2008 05:49:07 +0000
Subject: Plumb the TP-Sending packets
---
OpenSim/Tests/Common/Mock/TestClient.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 9b44ac4..1bcf829 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -233,6 +233,9 @@ namespace OpenSim.Tests.Common.Mock
public event SoundTrigger OnSoundTrigger;
+ public event StartLure OnStartLure;
+ public event TeleportLureRequest OnTeleportLureRequest;
+
#pragma warning restore 67
///
--
cgit v1.1
From 119104e35bc02e15a1ce08175ca6408fb8e9f7be Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Sun, 21 Dec 2008 00:11:54 +0000
Subject: * Re-implement packet tracking in IClientAPI so we can see what's
going on in the client network in the simstats manager. This makes packets
in per second, packets out per second, and unacked bytes work again in the
simulator stats section.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 1bcf829..70a2d11 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -235,6 +235,7 @@ namespace OpenSim.Tests.Common.Mock
public event StartLure OnStartLure;
public event TeleportLureRequest OnTeleportLureRequest;
+ public event NetworkStats OnNetworkStatsUpdate;
#pragma warning restore 67
--
cgit v1.1
From fc053a6af8cf2f9dc158d8bc3d3ff5597d50b69f Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 23 Dec 2008 18:16:30 +0000
Subject: Plumb in the 4 missing classified events and the 3 packet methods
---
OpenSim/Tests/Common/Mock/TestClient.cs | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 70a2d11..e7cdee9 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -237,6 +237,11 @@ namespace OpenSim.Tests.Common.Mock
public event TeleportLureRequest OnTeleportLureRequest;
public event NetworkStats OnNetworkStatsUpdate;
+ public event ClassifiedInfoRequest OnClassifiedInfoRequest;
+ public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
+ public event ClassifiedDelete OnClassifiedDelete;
+ public event ClassifiedDelete OnClassifiedGodDelete;
+
#pragma warning restore 67
///
@@ -953,5 +958,13 @@ namespace OpenSim.Tests.Common.Mock
return false;
}
+ public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
+ {
+ }
+
+ public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price)
+ {
+ }
+
}
}
--
cgit v1.1
From 318de200bd398d41b246126f541cd10ac7785b77 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 23 Dec 2008 23:41:46 +0000
Subject: Plumb in EventNotification* and EventGodDelete
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index e7cdee9..cb26366 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -242,6 +242,10 @@ namespace OpenSim.Tests.Common.Mock
public event ClassifiedDelete OnClassifiedDelete;
public event ClassifiedDelete OnClassifiedGodDelete;
+ public event EventNotificationAddRequest OnEventNotificationAddRequest;
+ public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
+ public event EventGodDelete OnEventGodDelete;
+
#pragma warning restore 67
///
--
cgit v1.1
From 23844a9073e28fb8c74424812603027586bdb4df Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 25 Dec 2008 20:28:13 +0000
Subject: Plumb the profile reply packets for picks, classifieds and notes
---
OpenSim/Tests/Common/Mock/TestClient.cs | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index cb26366..fe93d6b 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -970,5 +970,22 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void SendAgentDropGroup(UUID groupID)
+ {
+ }
+
+ public void SendAvatarNotesReply(UUID targetID, string text)
+ {
+ }
+
+ public void SendAvatarPicksReply(UUID targetID, Dictionary picks)
+ {
+ }
+
+ public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds)
+ {
+ }
+
+
}
}
--
cgit v1.1
From 7beb8a5abb801c285d16a5b1e4d8538d0381c671 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sat, 3 Jan 2009 20:45:33 +0000
Subject: Plumb the remaining dwell packets
---
OpenSim/Tests/Common/Mock/TestClient.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index fe93d6b..83bd9d9 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -246,6 +246,8 @@ namespace OpenSim.Tests.Common.Mock
public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
public event EventGodDelete OnEventGodDelete;
+ public event ParcelDwellRequest OnParcelDwellRequest;
+
#pragma warning restore 67
///
@@ -986,6 +988,8 @@ namespace OpenSim.Tests.Common.Mock
{
}
-
+ public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
+ {
+ }
}
}
--
cgit v1.1
From 0b8d22ab544910a2b9b89b4bee2926a90b0da63f Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 5 Jan 2009 16:30:35 +0000
Subject: * Check in login service tests beachhead
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index a6a025b..472645c 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -36,7 +36,12 @@ namespace OpenSim.Tests.Common.Mock
public class TestCommunicationsManager : CommunicationsManager
{
public TestCommunicationsManager()
- : base(null, null, null, false, null)
+ : this(null)
+ {
+ }
+
+ public TestCommunicationsManager(NetworkServersInfo serversInfo)
+ : base(serversInfo, null, null, false, null)
{
LocalInventoryService lis = new LocalInventoryService();
m_interServiceInventoryService = lis;
@@ -44,7 +49,7 @@ namespace OpenSim.Tests.Common.Mock
LocalUserServices lus = new LocalUserServices(991, 992, lis);
m_userService = lus;
- m_userAdminService = lus;
+ m_userAdminService = lus;
}
}
}
--
cgit v1.1
From 04ffcce7ea4fd303cd05e31aa8ece999c17f45b0 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 5 Jan 2009 17:38:39 +0000
Subject: * Extend stub to test the successful login of a user on the local
login service * Test does not do authentication
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 5 ++++-
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 472645c..204ebd7 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -49,7 +49,10 @@ namespace OpenSim.Tests.Common.Mock
LocalUserServices lus = new LocalUserServices(991, 992, lis);
m_userService = lus;
- m_userAdminService = lus;
+ m_userAdminService = lus;
+
+ LocalBackEndServices gs = new LocalBackEndServices();
+ m_gridService = gs;
}
}
}
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index a5e2a37..6be7b3d 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -102,7 +102,10 @@ namespace OpenSim.Tests.Common.Mock
public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) {}
- public List GetUserFriendList(UUID friendlistowner) { return null; }
+ public List GetUserFriendList(UUID friendlistowner)
+ {
+ return new List();
+ }
public Dictionary GetFriendRegionInfos(List uuids) { return null; }
--
cgit v1.1
From 0b07c9762b4c70b6d234b70fb9e591c770dc1bf1 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 5 Jan 2009 18:00:53 +0000
Subject: * Simplify test code by always setting up mock 'in memory' user and
inventory data plugins for every TestCommunicationsManager * imo the gain in
simplcity of test code outweighs the very small cost of setting up some stuff
that some tests will never use
---
.../Tests/Common/Mock/TestCommunicationsManager.cs | 23 +++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 204ebd7..c234429 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -35,6 +35,18 @@ namespace OpenSim.Tests.Common.Mock
{
public class TestCommunicationsManager : CommunicationsManager
{
+ public IUserDataPlugin UserDataPlugin
+ {
+ get { return m_userDataPlugin; }
+ }
+ private IUserDataPlugin m_userDataPlugin;
+
+ public IInventoryDataPlugin InventoryDataPlugin
+ {
+ get { return m_inventoryDataPlugin; }
+ }
+ private IInventoryDataPlugin m_inventoryDataPlugin;
+
public TestCommunicationsManager()
: this(null)
{
@@ -43,16 +55,21 @@ namespace OpenSim.Tests.Common.Mock
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, null, null, false, null)
{
+ m_userDataPlugin = new TestUserDataPlugin();
+ m_inventoryDataPlugin = new TestInventoryDataPlugin();
+
LocalInventoryService lis = new LocalInventoryService();
+ lis.AddPlugin(m_inventoryDataPlugin);
m_interServiceInventoryService = lis;
- AddInventoryService(lis);
+ AddInventoryService(lis);
LocalUserServices lus = new LocalUserServices(991, 992, lis);
+ lus.AddPlugin(m_userDataPlugin);
m_userService = lus;
- m_userAdminService = lus;
+ m_userAdminService = lus;
LocalBackEndServices gs = new LocalBackEndServices();
- m_gridService = gs;
+ m_gridService = gs;
}
}
}
--
cgit v1.1
From b6ee2f15bacda2a2c22785923b1e41639db5a6db Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 6 Jan 2009 15:09:52 +0000
Subject: * refactor: Remove the need to separately pass in the http listener
to the scene - this is always available via CommsManager
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 4 ++--
OpenSim/Tests/Common/Mock/TestScene.cs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index c234429..738bc15 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -53,8 +53,8 @@ namespace OpenSim.Tests.Common.Mock
}
public TestCommunicationsManager(NetworkServersInfo serversInfo)
- : base(serversInfo, null, null, false, null)
- {
+ : base(serversInfo, new BaseHttpServer(666), null, false, null)
+ {
m_userDataPlugin = new TestUserDataPlugin();
m_inventoryDataPlugin = new TestInventoryDataPlugin();
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 6b176a1..04b3e74 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -40,10 +40,10 @@ namespace OpenSim.Tests.Common.Mock
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
- AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
+ AssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
- : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer, moduleLoader,
+ : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
}
--
cgit v1.1
From 7c7ea57c5c2bf01280e2df03cedc999aa5e7be87 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 9 Jan 2009 02:59:56 +0000
Subject: Finish dwell sending, adding the forgotten method body. Add UserInfo
and a dummy reply to enable Hippo Viewer users to disable IM logging (option
was greyed out in OpenSim before)
---
OpenSim/Tests/Common/Mock/TestClient.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 83bd9d9..b5d6f6b 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -93,7 +93,6 @@ namespace OpenSim.Tests.Common.Mock
public event ViewerEffectEventHandler OnViewerEffect;
public event FetchInventory OnAgentDataUpdateRequest;
- public event FetchInventory OnUserInfoRequest;
public event TeleportLocationRequest OnSetStartLocationRequest;
public event UpdateShape OnUpdatePrimShape;
@@ -248,6 +247,9 @@ namespace OpenSim.Tests.Common.Mock
public event ParcelDwellRequest OnParcelDwellRequest;
+ public event UserInfoRequest OnUserInfoRequest;
+ public event UpdateUserInfo OnUpdateUserInfo;
+
#pragma warning restore 67
///
@@ -991,5 +993,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
{
}
+
+ public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
+ {
+ }
}
}
--
cgit v1.1
From d770bea2912e9fe02644183dce424193fe87ab7d Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Mon, 12 Jan 2009 15:33:56 +0000
Subject: Enhanced LoginServiceTests to test for authentication and response
Expanded TestUserDataPlugin to cover new methods
From: Arthur Rodrigo S Valadares
---
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 134 +++++++++++++++++++-----
1 file changed, 108 insertions(+), 26 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index 6be7b3d..8dccacc 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Tests.Common.Mock
/// tests are single threaded.
///
public class TestUserDataPlugin : IUserDataPlugin
- {
+ {
public string Version { get { return "0"; } }
public string Name { get { return "TestUserDataPlugin"; } }
@@ -49,64 +49,146 @@ namespace OpenSim.Tests.Common.Mock
///
/// User profiles keyed by uuid
- ///
+ ///
private Dictionary m_userProfilesByUuid = new Dictionary();
+ ///
+ /// User profiles and their agents
+ ///
+ private Dictionary m_agentByProfileUuid = new Dictionary();
+
+ ///
+ /// Friends list by uuid
+ ///
+ private Dictionary> m_friendsListByUuid = new Dictionary>();
+
public void Initialise() {}
public void Dispose() {}
-
- public void AddNewUserProfile(UserProfileData user)
+
+ public void AddNewUserProfile(UserProfileData user)
{
UpdateUserProfile(user);
}
-
- public UserProfileData GetUserByUUID(UUID user)
+
+ public UserProfileData GetUserByUUID(UUID user)
{
UserProfileData userProfile = null;
m_userProfilesByUuid.TryGetValue(user, out userProfile);
-
- return userProfile;
+
+ return userProfile;
}
- public UserProfileData GetUserByName(string fname, string lname)
- {
+ public UserProfileData GetUserByName(string fname, string lname)
+ {
UserProfileData userProfile = null;
m_userProfilesByName.TryGetValue(fname + " " + lname, out userProfile);
-
+
return userProfile;
- }
+ }
- public bool UpdateUserProfile(UserProfileData user)
- {
+ public bool UpdateUserProfile(UserProfileData user)
+ {
m_userProfilesByUuid[user.ID] = user;
m_userProfilesByName[user.FirstName + " " + user.SurName] = user;
-
+
return true;
}
public List GeneratePickerResults(UUID queryID, string query) { return null; }
- public UserAgentData GetAgentByUUID(UUID user) { return null; }
+ public UserAgentData GetAgentByUUID(UUID user)
+ {
+ UserAgentData userAgent = null;
+ m_agentByProfileUuid.TryGetValue(user, out userAgent);
- public UserAgentData GetAgentByName(string name) { return null; }
+ return userAgent;
+ }
- public UserAgentData GetAgentByName(string fname, string lname) { return null; }
+ public UserAgentData GetAgentByName(string name)
+ {
+ UserProfileData userProfile = null;
+ m_userProfilesByName.TryGetValue(name, out userProfile);
+ UserAgentData userAgent = null;
+ m_agentByProfileUuid.TryGetValue(userProfile.ID, out userAgent);
+
+ return userAgent;
+ }
+
+ public UserAgentData GetAgentByName(string fname, string lname)
+ {
+ UserProfileData userProfile = GetUserByName(fname,lname);
+ UserAgentData userAgent = null;
+ m_agentByProfileUuid.TryGetValue(userProfile.ID, out userAgent);
+
+ return userAgent;
+ }
public void StoreWebLoginKey(UUID agentID, UUID webLoginKey) {}
- public void AddNewUserAgent(UserAgentData agent) {}
+ public void AddNewUserAgent(UserAgentData agent)
+ {
+ m_agentByProfileUuid[agent.ProfileID] = agent;
+ }
+ public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
+ {
+ FriendListItem newfriend = new FriendListItem();
+ newfriend.FriendPerms = perms;
+ newfriend.Friend = friend;
+ newfriend.FriendListOwner = friendlistowner;
+
+ if (!m_friendsListByUuid.ContainsKey(friendlistowner))
+ {
+ List friendslist = new List();
+ m_friendsListByUuid[friendlistowner] = friendslist;
+
+ }
+ m_friendsListByUuid[friendlistowner].Add(newfriend);
+ }
- public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) {}
-
- public void RemoveUserFriend(UUID friendlistowner, UUID friend) {}
+ public void RemoveUserFriend(UUID friendlistowner, UUID friend)
+ {
+ if (m_friendsListByUuid.ContainsKey(friendlistowner))
+ {
+ List friendslist = m_friendsListByUuid[friendlistowner];
+ foreach (FriendListItem frienditem in friendslist)
+ {
+ if (frienditem.Friend == friend)
+ {
+ friendslist.Remove(frienditem);
+ break;
+ }
+ }
+ }
+ }
- public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) {}
+ public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
+ {
+ if (m_friendsListByUuid.ContainsKey(friendlistowner))
+ {
+ List friendslist = m_friendsListByUuid[friendlistowner];
+ foreach (FriendListItem frienditem in friendslist)
+ {
+ if (frienditem.Friend == friend)
+ {
+ frienditem.FriendPerms = perms;
+ break;
+ }
+ }
+ }
+ }
- public List GetUserFriendList(UUID friendlistowner)
+ public List GetUserFriendList(UUID friendlistowner)
{
- return new List();
+ if (m_friendsListByUuid.ContainsKey(friendlistowner))
+ {
+ return m_friendsListByUuid[friendlistowner];
+ }
+ else
+ return new List();
+
+
}
-
+
public Dictionary GetFriendRegionInfos(List uuids) { return null; }
public bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; }
--
cgit v1.1
From d4d2c1959481d6d5e04a646c0b34f954b1bc727d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 12 Jan 2009 18:45:03 +0000
Subject: * Extend PacketHandlerTest to fire in a packet. * Can't test result
yet since the Client thread handles it with unpredictable timing
---
OpenSim/Tests/Common/Mock/TestClient.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b5d6f6b..41c2eb6 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -343,6 +343,14 @@ namespace OpenSim.Tests.Common.Mock
set { }
}
+ private uint m_circuitCode;
+
+ public uint CircuitCode
+ {
+ get { return m_circuitCode; }
+ set { m_circuitCode = value; }
+ }
+
///
/// Constructor
///
@@ -753,14 +761,6 @@ namespace OpenSim.Tests.Common.Mock
{
}
- private uint m_circuitCode;
-
- public uint CircuitCode
- {
- get { return m_circuitCode; }
- set { m_circuitCode = value; }
- }
-
public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
{
--
cgit v1.1
From ade107f04f42f448d0a7b34ae552cf54c3bf4f7e Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 12 Jan 2009 19:37:56 +0000
Subject: * Separate starting a client thread into a separate Start() method
(which matches the existing Stop() and Restart() methods)
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 41c2eb6..a9ee837 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -757,6 +757,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void Start()
+ {
+ }
+
public void Stop()
{
}
--
cgit v1.1
From 9dff38ca1427e73dbf297f095a1e4c63eb994020 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Tue, 13 Jan 2009 19:55:07 +0000
Subject: * Extended TextureSenderTests and modified TestClient.cs with new
methods
From: Arthur Rodrigo S Valadares
---
OpenSim/Tests/Common/Mock/TestClient.cs | 60 ++++++++++++++++++++++-----------
1 file changed, 41 insertions(+), 19 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index a9ee837..428f599 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -39,6 +39,10 @@ namespace OpenSim.Tests.Common.Mock
{
private Scene m_scene;
+ // Mock testing variables
+ public List sentdatapkt = new List();
+ public List sentpktpkt = new List();
+
// disable warning: public events, part of the public API
#pragma warning disable 67
@@ -215,7 +219,7 @@ namespace OpenSim.Tests.Common.Mock
public event ActivateGesture OnActivateGesture;
public event DeactivateGesture OnDeactivateGesture;
public event ObjectOwner OnObjectOwner;
-
+
public event DirPlacesQuery OnDirPlacesQuery;
public event DirFindQuery OnDirFindQuery;
public event DirLandQuery OnDirLandQuery;
@@ -229,7 +233,7 @@ namespace OpenSim.Tests.Common.Mock
public event OfferCallingCard OnOfferCallingCard;
public event AcceptCallingCard OnAcceptCallingCard;
public event DeclineCallingCard OnDeclineCallingCard;
-
+
public event SoundTrigger OnSoundTrigger;
public event StartLure OnStartLure;
@@ -284,7 +288,7 @@ namespace OpenSim.Tests.Common.Mock
{
get { return m_firstName; }
}
- private string m_firstName;
+ private string m_firstName;
public virtual string LastName
{
@@ -359,7 +363,7 @@ namespace OpenSim.Tests.Common.Mock
{
myID = agentData.AgentID;
m_firstName = agentData.firstname;
- m_lastName = agentData.lastname;
+ m_lastName = agentData.lastname;
}
public virtual void ActivateGesture(UUID assetId, UUID gestureId)
@@ -420,12 +424,12 @@ namespace OpenSim.Tests.Common.Mock
public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
{
-
+
}
public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
{
-
+
}
public void SendGenericMessage(string method, List message)
@@ -563,7 +567,7 @@ namespace OpenSim.Tests.Common.Mock
public virtual void SendBulkUpdateInventory(InventoryItemBase item)
{
}
-
+
public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
{}
@@ -590,7 +594,7 @@ namespace OpenSim.Tests.Common.Mock
int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
{
}
-
+
public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
{
}
@@ -660,16 +664,34 @@ namespace OpenSim.Tests.Common.Mock
public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
{
+ ImageDataPacket im = new ImageDataPacket();
+ im.Header.Reliable = false;
+ im.ImageID.Packets = numParts;
+ im.ImageID.ID = ImageUUID;
+
+ if (ImageSize > 0)
+ im.ImageID.Size = ImageSize;
+
+ im.ImageData.Data = ImageData;
+ im.ImageID.Codec = imageCodec;
+ im.Header.Zerocoded = true;
+ sentdatapkt.Add(im);
}
-
+
public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
{
+ ImagePacketPacket im = new ImagePacketPacket();
+ im.Header.Reliable = false;
+ im.ImageID.Packet = partNumber;
+ im.ImageID.ID = imageUuid;
+ im.ImageData.Data = imageData;
+ sentpktpkt.Add(im);
}
-
+
public void SendImageNotFound(UUID imageid)
{
}
-
+
public void SendShutdownConnectionNotice()
{
}
@@ -726,10 +748,10 @@ namespace OpenSim.Tests.Common.Mock
public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
{
}
-
+
public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
{
- }
+ }
public void SendViewerTime(int phase)
{
@@ -804,11 +826,11 @@ namespace OpenSim.Tests.Common.Mock
public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
{
}
-
+
public void SendEstateCovenantInformation(UUID covenant)
{
}
-
+
public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
{
}
@@ -816,19 +838,19 @@ namespace OpenSim.Tests.Common.Mock
public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
{
}
-
+
public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID)
{
}
-
+
public void SendForceClientSelectObjects(List objectIDs)
{
}
-
+
public void SendLandObjectOwners(Dictionary ownersAndCount)
{
}
-
+
public void SendLandParcelOverlay(byte[] data, int sequence_id)
{
}
--
cgit v1.1
From 093adb2113d748f28554393cc8a6fe53502126dc Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 15 Jan 2009 21:27:55 +0000
Subject: * Add new unit test for simple teleport in a standalone. * Does not
yet check results.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 11 +++++++++++
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 3 ++-
2 files changed, 13 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 428f599..5b3b27b 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -365,6 +365,17 @@ namespace OpenSim.Tests.Common.Mock
m_firstName = agentData.firstname;
m_lastName = agentData.lastname;
}
+
+ ///
+ /// Attempt a teleport to the given region.
+ ///
+ ///
+ ///
+ ///
+ public void Teleport(ulong regionHandle, Vector3 position, Vector3 lookAt)
+ {
+ OnTeleportLocationRequest(this, regionHandle, position, lookAt, 16);
+ }
public virtual void ActivateGesture(UUID assetId, UUID gestureId)
{
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 738bc15..1663ac1 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -69,7 +69,8 @@ namespace OpenSim.Tests.Common.Mock
m_userAdminService = lus;
LocalBackEndServices gs = new LocalBackEndServices();
- m_gridService = gs;
+ m_gridService = gs;
+ m_interRegion = gs;
}
}
}
--
cgit v1.1
From eca6442bae4093019bd221e87413c74c77c4ff5d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 16 Jan 2009 21:56:13 +0000
Subject: * Rig up enough infrastructure to actually perform a successful
'standalone' teleport unit test with checks that the scene presence
disappeared from sceneA and appeared in sceneB * However, I'm not convinced
that the actual process in the test completely reflects reality, and a lot of
stuff had to be rigged up (which should get resolved over time)
---
OpenSim/Tests/Common/Mock/TestClient.cs | 79 +++++++++++++++++++++++++--------
1 file changed, 61 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 5b3b27b..6254272 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -28,6 +28,8 @@
using System;
using System.Collections.Generic;
using System.Net;
+using System.Reflection;
+using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
@@ -37,11 +39,18 @@ namespace OpenSim.Tests.Common.Mock
{
public class TestClient : IClientAPI
{
- private Scene m_scene;
-
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
// Mock testing variables
public List sentdatapkt = new List();
public List sentpktpkt = new List();
+
+ // TODO: This is a really nasty (and temporary) means of telling the test client which scene to invoke setup
+ // methods on when a teleport is requested
+ public Scene TeleportTargetScene;
+ private TestClient TeleportSceneClient;
+
+ private IScene m_scene;
// disable warning: public events, part of the public API
#pragma warning disable 67
@@ -259,7 +268,7 @@ namespace OpenSim.Tests.Common.Mock
///
/// This agent's UUID
///
- private UUID myID;
+ private UUID m_agentId;
private Vector3 startPos = new Vector3(128, 128, 2);
@@ -271,7 +280,7 @@ namespace OpenSim.Tests.Common.Mock
public virtual UUID AgentId
{
- get { return myID; }
+ get { return m_agentId; }
}
public UUID SessionId
@@ -359,11 +368,14 @@ namespace OpenSim.Tests.Common.Mock
/// Constructor
///
///
- public TestClient(AgentCircuitData agentData)
+ ///
+ public TestClient(AgentCircuitData agentData, IScene scene)
{
- myID = agentData.AgentID;
+ m_agentId = agentData.AgentID;
m_firstName = agentData.firstname;
m_lastName = agentData.lastname;
+ m_circuitCode = agentData.circuitcode;
+ m_scene = scene;
}
///
@@ -376,6 +388,11 @@ namespace OpenSim.Tests.Common.Mock
{
OnTeleportLocationRequest(this, regionHandle, position, lookAt, 16);
}
+
+ public void CompleteMovement()
+ {
+ OnCompleteMovementToRegion();
+ }
public virtual void ActivateGesture(UUID assetId, UUID gestureId)
{
@@ -465,14 +482,48 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public virtual AgentCircuitData RequestClientInfo()
+ {
+ AgentCircuitData agentData = new AgentCircuitData();
+ agentData.AgentID = AgentId;
+ agentData.SessionID = UUID.Zero;
+ agentData.SecureSessionID = UUID.Zero;
+ agentData.circuitcode = m_circuitCode;
+ agentData.child = false;
+ agentData.firstname = m_firstName;
+ agentData.lastname = m_lastName;
+ agentData.CapsPath = m_scene.GetCapsPath(m_agentId);
+ agentData.ChildrenCapSeeds = new Dictionary(m_scene.GetChildrenSeeds(m_agentId));
+
+ return agentData;
+ }
+
public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
{
+ m_log.DebugFormat("[TEST CLIENT]: Processing inform client of neighbour");
+
+ // In response to this message, we are going to make a teleport to the scene we've previous been told
+ // about by test code (this needs to be improved).
+ AgentCircuitData newAgent = RequestClientInfo();
+
+ // Stage 2: add the new client as a child agent to the scene
+ TeleportSceneClient = new TestClient(newAgent, TeleportTargetScene);
+ TeleportTargetScene.AddNewClient(TeleportSceneClient);
+ }
+
+ public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
+ uint locationID, uint flags, string capsURL)
+ {
+ m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport");
+
+ TeleportSceneClient.CompleteMovement();
+ //TeleportTargetScene.AgentCrossing(newAgent.AgentID, new Vector3(90, 90, 90), false);
}
- public virtual AgentCircuitData RequestClientInfo()
+ public virtual void SendTeleportFailed(string reason)
{
- return new AgentCircuitData();
- }
+ m_log.DebugFormat("[TEST CLIENT]: Teleport failed with reason {0}", reason);
+ }
public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
IPEndPoint newRegionExternalEndPoint, string capsURL)
@@ -487,15 +538,6 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
- uint locationID, uint flags, string capsURL)
- {
- }
-
- public virtual void SendTeleportFailed(string reason)
- {
- }
-
public virtual void SendTeleportLocationStart()
{
}
@@ -788,6 +830,7 @@ namespace OpenSim.Tests.Common.Mock
public void Close(bool ShutdownCircuit)
{
+ m_scene.RemoveClient(AgentId);
}
public void Start()
--
cgit v1.1
From 37fa6775488ab237a4537d49b92a8d52b0497b98 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 21 Jan 2009 21:14:17 +0000
Subject: * refactor: Extract caps related code from scene and put into a
region module * No functional changes in this revision
---
OpenSim/Tests/Common/Mock/TestClient.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 6254272..62350b9 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -33,6 +33,7 @@ using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
+using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Tests.Common.Mock
@@ -492,8 +493,10 @@ namespace OpenSim.Tests.Common.Mock
agentData.child = false;
agentData.firstname = m_firstName;
agentData.lastname = m_lastName;
- agentData.CapsPath = m_scene.GetCapsPath(m_agentId);
- agentData.ChildrenCapSeeds = new Dictionary(m_scene.GetChildrenSeeds(m_agentId));
+
+ ICapabilitiesModule capsModule = m_scene.RequestModuleInterface();
+ agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
+ agentData.ChildrenCapSeeds = new Dictionary(capsModule.GetChildrenSeeds(m_agentId));
return agentData;
}
--
cgit v1.1
From 884009ed33eab204588cc3978a46abff1098b832 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 22 Jan 2009 19:46:31 +0000
Subject: * Add some caps seed capability path checking to the simple non
neighbours standalone region teleport test
---
OpenSim/Tests/Common/Mock/TestClient.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 62350b9..f899375 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -270,6 +270,11 @@ namespace OpenSim.Tests.Common.Mock
/// This agent's UUID
///
private UUID m_agentId;
+
+ ///
+ /// The last caps seed url that this client was given.
+ ///
+ public string CapsSeedUrl;
private Vector3 startPos = new Vector3(128, 128, 2);
@@ -377,6 +382,7 @@ namespace OpenSim.Tests.Common.Mock
m_lastName = agentData.lastname;
m_circuitCode = agentData.circuitcode;
m_scene = scene;
+ CapsSeedUrl = agentData.CapsPath;
}
///
@@ -496,7 +502,7 @@ namespace OpenSim.Tests.Common.Mock
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface();
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
- agentData.ChildrenCapSeeds = new Dictionary(capsModule.GetChildrenSeeds(m_agentId));
+ agentData.ChildrenCapSeeds = new Dictionary(capsModule.GetChildrenSeeds(m_agentId));
return agentData;
}
@@ -519,6 +525,8 @@ namespace OpenSim.Tests.Common.Mock
{
m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport");
+ CapsSeedUrl = capsURL;
+
TeleportSceneClient.CompleteMovement();
//TeleportTargetScene.AgentCrossing(newAgent.AgentID, new Vector3(90, 90, 90), false);
}
--
cgit v1.1
From f8e45e8e981bfd87f3765d7452046515e11a9345 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Tue, 3 Feb 2009 05:20:03 +0000
Subject: Rename IAssetProviderPlugin to IAssetDataPlugin aligning with the
other data plugins.
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index f44339a..ebece27 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common.Mock
/// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
/// tests are single threaded.
///
- public class TestAssetDataPlugin : IAssetProviderPlugin
+ public class TestAssetDataPlugin : IAssetDataPlugin
{
public string Version { get { return "0"; } }
public string Name { get { return "TestAssetDataPlugin"; } }
--
cgit v1.1
From e12b0a249674bbe4b1980c74f13d8f09cc2e4432 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Tue, 3 Feb 2009 05:20:16 +0000
Subject: - move IAssetDataPlugin from OpenSim/Framework/IAssetProvider.cs to
OpenSim/Data/IAssetData.cs - remove some trailing whitespace
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index ebece27..fc84eac 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -27,7 +27,7 @@
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Framework.Communications;
+using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
{
@@ -35,7 +35,7 @@ namespace OpenSim.Tests.Common.Mock
/// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
/// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
/// tests are single threaded.
- ///
+ ///
public class TestAssetDataPlugin : IAssetDataPlugin
{
public string Version { get { return "0"; } }
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common.Mock
public void Initialise() {}
public void Dispose() {}
-
+
public AssetBase FetchAsset(UUID uuid) { return null; }
public void CreateAsset(AssetBase asset) {}
public void UpdateAsset(AssetBase asset) {}
--
cgit v1.1
From 9377c6f2b28c75a093fa554d64e0d63e6bdf2fa5 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Tue, 3 Feb 2009 05:20:26 +0000
Subject: - move OpenSim/Framework/IInventoryData.cs to
OpenSim/Data/IInventoryData.cs - trim trailing whitespace
---
.../Tests/Common/Mock/TestCommunicationsManager.cs | 23 ++++----
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 69 +++++++++++-----------
2 files changed, 47 insertions(+), 45 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 1663ac1..566d8d2 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -30,6 +30,7 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Communications.Local;
+using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
{
@@ -40,36 +41,36 @@ namespace OpenSim.Tests.Common.Mock
get { return m_userDataPlugin; }
}
private IUserDataPlugin m_userDataPlugin;
-
+
public IInventoryDataPlugin InventoryDataPlugin
{
get { return m_inventoryDataPlugin; }
}
private IInventoryDataPlugin m_inventoryDataPlugin;
-
+
public TestCommunicationsManager()
: this(null)
- {
+ {
}
-
+
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, new BaseHttpServer(666), null, false, null)
- {
+ {
m_userDataPlugin = new TestUserDataPlugin();
m_inventoryDataPlugin = new TestInventoryDataPlugin();
-
+
LocalInventoryService lis = new LocalInventoryService();
lis.AddPlugin(m_inventoryDataPlugin);
m_interServiceInventoryService = lis;
- AddInventoryService(lis);
-
+ AddInventoryService(lis);
+
LocalUserServices lus = new LocalUserServices(991, 992, lis);
lus.AddPlugin(m_userDataPlugin);
m_userService = lus;
- m_userAdminService = lus;
-
+ m_userAdminService = lus;
+
LocalBackEndServices gs = new LocalBackEndServices();
- m_gridService = gs;
+ m_gridService = gs;
m_interRegion = gs;
}
}
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 8e19aec..59d923c 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
+using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
{
@@ -43,12 +44,12 @@ namespace OpenSim.Tests.Common.Mock
/// Known inventory folders
///
private Dictionary m_folders = new Dictionary();
-
+
///
/// User root folders
///
private Dictionary m_rootFolders = new Dictionary();
-
+
public string Version { get { return "0"; } }
public string Name { get { return "TestInventoryDataPlugin"; } }
@@ -56,10 +57,10 @@ namespace OpenSim.Tests.Common.Mock
public void Initialise(string connect) {}
public void Dispose() {}
- public List getFolderHierarchy(UUID parentID)
+ public List getFolderHierarchy(UUID parentID)
{
List folders = new List();
-
+
foreach (InventoryFolderBase folder in m_folders.Values)
{
if (folder.ParentID == parentID)
@@ -68,77 +69,77 @@ namespace OpenSim.Tests.Common.Mock
folders.Add(folder);
}
}
-
+
return folders;
}
-
- public List getInventoryInFolder(UUID folderID)
- {
- return new List();
+
+ public List getInventoryInFolder(UUID folderID)
+ {
+ return new List();
}
-
+
public List getUserRootFolders(UUID user) { return null; }
-
- public InventoryFolderBase getUserRootFolder(UUID user)
- {
+
+ public InventoryFolderBase getUserRootFolder(UUID user)
+ {
InventoryFolderBase folder = null;
m_rootFolders.TryGetValue(user, out folder);
-
+
return folder;
}
-
- public List getInventoryFolders(UUID parentID)
+
+ public List getInventoryFolders(UUID parentID)
{
List folders = new List();
-
+
foreach (InventoryFolderBase folder in m_folders.Values)
{
if (folder.ParentID == parentID)
folders.Add(folder);
}
-
+
return folders;
}
-
+
public InventoryItemBase getInventoryItem(UUID item) { return null; }
-
- public InventoryFolderBase getInventoryFolder(UUID folderId)
+
+ public InventoryFolderBase getInventoryFolder(UUID folderId)
{
InventoryFolderBase folder = null;
m_folders.TryGetValue(folderId, out folder);
-
+
return folder;
}
-
+
public void addInventoryItem(InventoryItemBase item) {}
public void updateInventoryItem(InventoryItemBase item) {}
public void deleteInventoryItem(UUID item) {}
-
- public void addInventoryFolder(InventoryFolderBase folder)
+
+ public void addInventoryFolder(InventoryFolderBase folder)
{
m_folders[folder.ID] = folder;
-
+
if (folder.ParentID == UUID.Zero)
m_rootFolders[folder.Owner] = folder;
}
-
+
public void updateInventoryFolder(InventoryFolderBase folder)
{
m_folders[folder.ID] = folder;
}
-
- public void moveInventoryFolder(InventoryFolderBase folder)
+
+ public void moveInventoryFolder(InventoryFolderBase folder)
{
// Simple replace
- updateInventoryFolder(folder);
+ updateInventoryFolder(folder);
}
-
- public void deleteInventoryFolder(UUID folderId)
+
+ public void deleteInventoryFolder(UUID folderId)
{
if (m_folders.ContainsKey(folderId))
m_folders.Remove(folderId);
}
-
- public List fetchActiveGestures(UUID avatarID) { return null; }
+
+ public List fetchActiveGestures(UUID avatarID) { return null; }
}
}
--
cgit v1.1
From d3eae4073e75d1482467eee54230df141bdbb568 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Tue, 3 Feb 2009 05:20:35 +0000
Subject: - move OpenSim/Framework/IUserData.cs to OpenSim/Data/IUserData.cs -
trim trailing whitespace
---
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index 8dccacc..73e8a09 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
+using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
{
@@ -205,4 +206,4 @@ namespace OpenSim.Tests.Common.Mock
public void LogoutUsers(UUID regionID) {}
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From 9b66108081a8c8cf79faaa6c541554091c40850e Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Fri, 6 Feb 2009 16:55:34 +0000
Subject: This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only part.
This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces into
OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region modules in
OpenSim.Region.Environment.
The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.
I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++--
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 2 +-
OpenSim/Tests/Common/Mock/TestScene.cs | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f899375..5f02524 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -33,8 +33,8 @@ using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Tests.Common.Mock
{
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index 5e9b9ff..761ef44 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -28,7 +28,7 @@
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Tests.Common.Mock
{
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 04b3e74..00920c8 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -30,8 +30,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Tests.Common.Mock
{
--
cgit v1.1
From 8088802c218d7eb4a47018b5b3bb70e7463a03b1 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Mon, 9 Feb 2009 21:47:55 +0000
Subject: From Alan Webb
These changes replace all direct references to the AssetCache with
IAssetCache. There is no change to functionality. Everything works as
before.
This is laying the groundwork for making it possible to register
alternative asset caching mechanisms without disrupting other parts of
OpenSim or their dependencies upon AssetCache functionality.
---
OpenSim/Tests/Common/Mock/TestScene.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 00920c8..122e51c 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Tests.Common.Mock
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
- AssetCache assetCach, StorageManager storeManager,
+ IAssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
--
cgit v1.1
From 8645c7482d39ccc9d72cb4cfc7c68b651b3824d3 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 11 Feb 2009 19:57:45 +0000
Subject: * Change SendBulkUpdateInventory from two methods to one which
accepts an InventoryNode
---
OpenSim/Tests/Common/Mock/TestClient.cs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 5f02524..2463b3b 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -627,14 +627,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
- /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase)
- public virtual void SendBulkUpdateInventory(InventoryItemBase item)
+ public virtual void SendBulkUpdateInventory(InventoryNodeBase node)
{
}
- public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
- {}
-
public UUID GetDefaultAnimation(string name)
{
return UUID.Zero;
--
cgit v1.1
From ec07e1aad6fb3d28fcf4a3eca0becf4e0e209965 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 16 Feb 2009 18:33:05 +0000
Subject: * Iniital inventory archive test code. Doesn't actually do any
testing yet
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 566d8d2..9b92421 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -59,6 +59,10 @@ namespace OpenSim.Tests.Common.Mock
m_userDataPlugin = new TestUserDataPlugin();
m_inventoryDataPlugin = new TestInventoryDataPlugin();
+ SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
+ IAssetCache ac = new AssetCache(assetService);
+ m_assetCache = ac;
+
LocalInventoryService lis = new LocalInventoryService();
lis.AddPlugin(m_inventoryDataPlugin);
m_interServiceInventoryService = lis;
--
cgit v1.1
From 93837807ffb24e5811368063b9231a9d8b018d9d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 16 Feb 2009 19:15:16 +0000
Subject: * refactor: remove AssetCache field hanging off Scene * This is
always available at Scene.CommsManager.AssetCache
---
OpenSim/Tests/Common/Mock/TestScene.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 122e51c..12cce9d 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -39,11 +39,10 @@ namespace OpenSim.Tests.Common.Mock
{
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
- CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
- IAssetCache assetCach, StorageManager storeManager,
+ CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
- : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
+ : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
}
--
cgit v1.1
From 31307849342c36c133b5cb8039296116c5456136 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 17 Feb 2009 04:16:42 +0000
Subject: Re-add the objectID field to the anim pack, that was deemed
unneccessary and dropped nonths ago, because it is required to get smooth
region crossings with AO running. Without it, in some corner cases, anims
will continue to run in an unstoppable state.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 2463b3b..373ee13 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -443,7 +443,7 @@ namespace OpenSim.Tests.Common.Mock
}
- public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
+ public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
{
}
--
cgit v1.1
From 863556f2cc545c56599aab9d28373aa4ed83288d Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 19 Feb 2009 03:09:56 +0000
Subject: Thank you, Snowdrop, for a patch that makes the callback ID parameter
usable. Applied with formatting changes, please don't introduce K&R style
indentations into OpenSim Fixes Mantis #3190
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 373ee13..ee4aaa8 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -619,7 +619,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
+ public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackID)
{
}
--
cgit v1.1
From b5502ef3c322e787640a8a9b3cb474b2f8abaaaa Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 19 Feb 2009 18:40:32 +0000
Subject: * Extracted IAssetData and moved it to OpenSim.Framework to prepare
to get rid of ugly CoreModules dependency on AssetServer.exe * And yes, the
IAssetDataPlugin is misnomed, which became apparent on extracting it.
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index fc84eac..94604d2 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -27,7 +27,6 @@
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
{
--
cgit v1.1
From b99d9bdeb1d5177a3dfff1d402d374fbd079ebaa Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 19 Feb 2009 19:32:53 +0000
Subject: * Reverted the AssetServer fix, apparently something was dependent on
IAssetDataPlugin being in OpenSim.Data
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index 94604d2..fc84eac 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -27,6 +27,7 @@
using OpenMetaverse;
using OpenSim.Framework;
+using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
{
--
cgit v1.1
From 33330297d603a66cc157baa21c81328edc893e51 Mon Sep 17 00:00:00 2001
From: diva
Date: Fri, 20 Feb 2009 03:39:50 +0000
Subject: THE BIG ANTI-REMOTING SCHLEP -- StartRemoting is no more. Sims in
older versions will have a hard time communicating with sims on this release
and later, especially if they haven't transitioned to RESTComms at all.
There's still some cleanup to do on assorted data structures, but the main
functional change here is that sims no longer listen on remoting ports.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 9b92421..38a3033 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -75,7 +75,6 @@ namespace OpenSim.Tests.Common.Mock
LocalBackEndServices gs = new LocalBackEndServices();
m_gridService = gs;
- m_interRegion = gs;
}
}
}
--
cgit v1.1
From ed2de7ac821544751280b1310a49c2f4ba70b4c3 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 26 Feb 2009 20:11:55 +0000
Subject: Plumb in the RetrieveInstantMessages event that is sent by the viewer
when it is ready to receive offline IM
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index ee4aaa8..16c55ae 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -264,6 +264,8 @@ namespace OpenSim.Tests.Common.Mock
public event UserInfoRequest OnUserInfoRequest;
public event UpdateUserInfo OnUpdateUserInfo;
+ public event RetrieveInstantMessages OnRetrieveInstantMessages;
+
#pragma warning restore 67
///
--
cgit v1.1
From 57ab79e3312d9856a3534a1e2343b45c6cf74ac6 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Thu, 26 Feb 2009 21:29:16 +0000
Subject: * Update ScenePresenceTests to reflect current REST communication
workflow. * Fixed an issue with AssetCache where it would break unit tests
randomly.
From: Arthur Rodrigo S Valadares
---
OpenSim/Tests/Common/Mock/TestClient.cs | 58 +++++++++++++++++++--------------
1 file changed, 33 insertions(+), 25 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 16c55ae..0635aab 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using System.Net;
using System.Reflection;
+using System.Threading;
using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
@@ -41,16 +42,17 @@ namespace OpenSim.Tests.Common.Mock
public class TestClient : IClientAPI
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
// Mock testing variables
public List sentdatapkt = new List();
public List sentpktpkt = new List();
-
+ EventWaitHandle wh = new EventWaitHandle (false, EventResetMode.AutoReset, "Crossing");
+
// TODO: This is a really nasty (and temporary) means of telling the test client which scene to invoke setup
// methods on when a teleport is requested
- public Scene TeleportTargetScene;
+ public Scene TeleportTargetScene;
private TestClient TeleportSceneClient;
-
+
private IScene m_scene;
// disable warning: public events, part of the public API
@@ -272,7 +274,7 @@ namespace OpenSim.Tests.Common.Mock
/// This agent's UUID
///
private UUID m_agentId;
-
+
///
/// The last caps seed url that this client was given.
///
@@ -363,15 +365,15 @@ namespace OpenSim.Tests.Common.Mock
{
set { }
}
-
+
private uint m_circuitCode;
public uint CircuitCode
{
get { return m_circuitCode; }
set { m_circuitCode = value; }
- }
-
+ }
+
///
/// Constructor
///
@@ -386,7 +388,7 @@ namespace OpenSim.Tests.Common.Mock
m_scene = scene;
CapsSeedUrl = agentData.CapsPath;
}
-
+
///
/// Attempt a teleport to the given region.
///
@@ -395,9 +397,9 @@ namespace OpenSim.Tests.Common.Mock
///
public void Teleport(ulong regionHandle, Vector3 position, Vector3 lookAt)
{
- OnTeleportLocationRequest(this, regionHandle, position, lookAt, 16);
+ OnTeleportLocationRequest(this, regionHandle, position, lookAt, 16);
}
-
+
public void CompleteMovement()
{
OnCompleteMovementToRegion();
@@ -501,46 +503,52 @@ namespace OpenSim.Tests.Common.Mock
agentData.child = false;
agentData.firstname = m_firstName;
agentData.lastname = m_lastName;
-
+
ICapabilitiesModule capsModule = m_scene.RequestModuleInterface();
agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
agentData.ChildrenCapSeeds = new Dictionary(capsModule.GetChildrenSeeds(m_agentId));
-
+
return agentData;
}
-
+
public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
{
m_log.DebugFormat("[TEST CLIENT]: Processing inform client of neighbour");
-
+
// In response to this message, we are going to make a teleport to the scene we've previous been told
// about by test code (this needs to be improved).
- AgentCircuitData newAgent = RequestClientInfo();
-
+ AgentCircuitData newAgent = RequestClientInfo();
+
// Stage 2: add the new client as a child agent to the scene
TeleportSceneClient = new TestClient(newAgent, TeleportTargetScene);
- TeleportTargetScene.AddNewClient(TeleportSceneClient);
+ TeleportTargetScene.AddNewClient(TeleportSceneClient);
}
-
+
public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
uint locationID, uint flags, string capsURL)
- {
+ {
m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport");
-
+
CapsSeedUrl = capsURL;
-
+
TeleportSceneClient.CompleteMovement();
- //TeleportTargetScene.AgentCrossing(newAgent.AgentID, new Vector3(90, 90, 90), false);
+ //TeleportTargetScene.AgentCrossing(newAgent.AgentID, new Vector3(90, 90, 90), false);
}
public virtual void SendTeleportFailed(string reason)
{
m_log.DebugFormat("[TEST CLIENT]: Teleport failed with reason {0}", reason);
- }
+ }
public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
IPEndPoint newRegionExternalEndPoint, string capsURL)
{
+ // This is supposed to send a packet to the client telling it's ready to start region crossing.
+ // Instead I will just signal I'm ready, mimicking the communication behavior.
+ // It's ugly, but avoids needless communication setup. This is used in ScenePresenceTests.cs.
+ // Arthur V.
+
+ wh.Set();
}
public virtual void SendMapBlock(List mapBlocks, uint flag)
@@ -845,7 +853,7 @@ namespace OpenSim.Tests.Common.Mock
public void Start()
{
}
-
+
public void Stop()
{
}
--
cgit v1.1
From a2f07ecd2e248966957a8ea70d772276359b02e8 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Mon, 9 Mar 2009 07:29:34 +0000
Subject: Implemented FetchAssetMetadataSet in DB backends.
This method fetches metadata for a subset of the entries in the assets
database. This functionality is used in the ForEach calls in the asset
storage providers in AssetInventoryServer. With this implemented,
frontends such as the BrowseFrontend should now work.
- MySQL: implemented, sanity tested
- SQLite: implemented, sanity tested
- MSSQL: implemented, not tested
- NHibernate: not implemented
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index fc84eac..d6bce5b 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
@@ -48,6 +49,7 @@ namespace OpenSim.Tests.Common.Mock
public void CreateAsset(AssetBase asset) {}
public void UpdateAsset(AssetBase asset) {}
public bool ExistsAsset(UUID uuid) { return false; }
+ public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
public void Initialise(string connect) {}
}
}
--
cgit v1.1
From ae759f2d060bc53cc0b372d5584fcd4ffdd963b4 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 9 Mar 2009 19:40:32 +0000
Subject: * Add basic asset cache get test
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 37 +++++++++++++++++++-----
1 file changed, 29 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index d6bce5b..80b9ae3 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -38,18 +38,39 @@ namespace OpenSim.Tests.Common.Mock
/// tests are single threaded.
///
public class TestAssetDataPlugin : IAssetDataPlugin
- {
+ {
public string Version { get { return "0"; } }
public string Name { get { return "TestAssetDataPlugin"; } }
+
+ protected Dictionary Assets = new Dictionary();
public void Initialise() {}
+ public void Initialise(string connect) {}
public void Dispose() {}
- public AssetBase FetchAsset(UUID uuid) { return null; }
- public void CreateAsset(AssetBase asset) {}
- public void UpdateAsset(AssetBase asset) {}
- public bool ExistsAsset(UUID uuid) { return false; }
- public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
- public void Initialise(string connect) {}
+ public AssetBase FetchAsset(UUID uuid)
+ {
+ if (ExistsAsset(uuid))
+ return Assets[uuid];
+ else
+ return null;
+ }
+
+ public void CreateAsset(AssetBase asset)
+ {
+ Assets[asset.FullID] = asset;
+ }
+
+ public void UpdateAsset(AssetBase asset)
+ {
+ CreateAsset(asset);
+ }
+
+ public bool ExistsAsset(UUID uuid)
+ {
+ return Assets.ContainsKey(uuid);
+ }
+
+ public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 1121a214b9258487dae0d84dad1a0b495d2f80bd Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sat, 21 Mar 2009 17:46:58 +0000
Subject: Add a QueryItem method to the inventory subsystem. Currently
implemented for MySQL only, stubs for the others. This allows updating the
cache with a single item from the database.
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 59d923c..69b0917 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -115,6 +115,11 @@ namespace OpenSim.Tests.Common.Mock
public void updateInventoryItem(InventoryItemBase item) {}
public void deleteInventoryItem(UUID item) {}
+ public InventoryItemBase queryInventoryItem(UUID item)
+ {
+ return null;
+ }
+
public void addInventoryFolder(InventoryFolderBase folder)
{
m_folders[folder.ID] = folder;
--
cgit v1.1
From 412112acbafa6e1f111b12007fd3a81728d0b2f5 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 23 Mar 2009 00:11:34 +0000
Subject: Committing partial work on passing folders across instances. This may
crash.
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 69b0917..efe0101 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -120,6 +120,11 @@ namespace OpenSim.Tests.Common.Mock
return null;
}
+ public InventoryFolderBase queryInventoryFolder(UUID folderID)
+ {
+ return null;
+ }
+
public void addInventoryFolder(InventoryFolderBase folder)
{
m_folders[folder.ID] = folder;
--
cgit v1.1
From 37e81c7d54db5b775550db9455bcd9cdce046bc7 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 27 Mar 2009 18:51:45 +0000
Subject: Remove a hardcoded flow/dependency on the money module from
LLCLientView
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 0635aab..926d138 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1094,5 +1094,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
{
}
+
+ public void SendCreateGroupReply(UUID groupID, bool success, string message)
+ {
+ }
}
}
--
cgit v1.1
From cbef90fec6ebdbc4280b684425479a18cfca01d0 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 27 Mar 2009 22:47:41 +0000
Subject: Add the events needed for profiles. Fixes Mantis #3324
---
OpenSim/Tests/Common/Mock/TestClient.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 926d138..b4b0bea 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -268,6 +268,11 @@ namespace OpenSim.Tests.Common.Mock
public event RetrieveInstantMessages OnRetrieveInstantMessages;
+ public event PickDelete OnPickDelete;
+ public event PickGodDelete OnPickGodDelete;
+ public event PickInfoUpdate OnPickInfoUpdate;
+ public event AvatarNotesUpdate OnAvatarNotesUpdate;
+
#pragma warning restore 67
///
--
cgit v1.1
From f5812b3702f38d4535f042303eef4bd37f8a448c Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Sat, 28 Mar 2009 01:40:33 +0000
Subject: * Adds AgentUUIDs into the CourseLocationUpdate to improve
compatibility with LibOMV based clients. * Modifies the IClientAPI! So
client stacks will need to be modified!
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b4b0bea..fac0185 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -586,7 +586,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendCoarseLocationUpdate(List CoarseLocations)
+ public virtual void SendCoarseLocationUpdate(List users, List CoarseLocations)
{
}
--
cgit v1.1
From 4f6c4378dad0f4122bdab9270fd7aaf3c60beb39 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sat, 28 Mar 2009 04:21:44 +0000
Subject: Add mute list request event and dummy response
---
OpenSim/Tests/Common/Mock/TestClient.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index fac0185..f96057c 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -273,6 +273,8 @@ namespace OpenSim.Tests.Common.Mock
public event PickInfoUpdate OnPickInfoUpdate;
public event AvatarNotesUpdate OnAvatarNotesUpdate;
+ public event MuteListRequest OnMuteListRequest;
+
#pragma warning restore 67
///
@@ -1103,5 +1105,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendCreateGroupReply(UUID groupID, bool success, string message)
{
}
+
+ public void SendUseCachedMuteList()
+ {
+ }
}
}
--
cgit v1.1
From 404bfdc9a6828638b7b4f7851602e3fe77044025 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 29 Mar 2009 00:48:34 +0000
Subject: Finish the offline IM module (still needs a server). Add rudimentary
support for the mute list (no functionality yet, but allows the
RetrieveInstantMessages event to fire now).
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f96057c..b2c1423 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1109,5 +1109,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendUseCachedMuteList()
{
}
+
+ public void SendMuteListUpdate(string filename)
+ {
+ }
}
}
--
cgit v1.1
From c483206fd7ecd67ac4fc8c4e4b71f65dfd3de6c4 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 29 Mar 2009 05:42:27 +0000
Subject: Change the client API to use GridInstantMessage for the "last mile"
of IM sending. With this change, all methods that handle IM now use
GridInstantMessage rather than individual parameters.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b2c1423..780fa4e 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -468,12 +468,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
- {
-
- }
-
- public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
+ public void SendInstantMessage(GridInstantMessage im)
{
}
--
cgit v1.1
From f88d755f9679b7b8e1880c76a452bc7344f9cb30 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 30 Mar 2009 11:51:34 +0000
Subject: Add PickInfoReply packet. Fixes Mantis #3324
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 780fa4e..b47e48d 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1108,5 +1108,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendMuteListUpdate(string filename)
{
}
+
+ 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)
+ {
+ }
}
}
--
cgit v1.1
From 8136cf4075216d09738b8707258581e6db755759 Mon Sep 17 00:00:00 2001
From: Homer Horwitz
Date: Sat, 4 Apr 2009 15:43:02 +0000
Subject: Thanks jonc, for a patch that adds rendering of classic clouds. First
part of Mantis #964, the necessary clouds image will follow separately.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b47e48d..33f080f 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -491,6 +491,8 @@ namespace OpenSim.Tests.Common.Mock
public virtual void SendWindData(Vector2[] windSpeeds) { }
+ public virtual void SendCloudData(float[] cloudCover) { }
+
public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
{
}
--
cgit v1.1
From 9e51c2db95fd43aa18e66d359c15349bdc9ad8f0 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Mon, 6 Apr 2009 07:17:23 +0000
Subject: * Implements World.Parcels[] array for MRM scripting.
---
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index 761ef44..4165641 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -39,7 +39,8 @@ namespace OpenSim.Tests.Common.Mock
{
public List ParcelsNearPoint(Vector3 position) { return null; }
public List AllParcels() { return null; }
- public ILandObject GetLandObject(int x, int y) { return null; }
+ public ILandObject GetLandObject(int x, int y) { return null; }
+ public ILandObject GetLandObject(int localID) { return null; }
public ILandObject GetLandObject(float x, float y) { return null; }
public bool IsLandPrimCountTainted() { return false; }
public bool IsForcefulBansAllowed() { return false; }
--
cgit v1.1
From ed6165ab9cb0726ab4d41265b097faf1d12d15b4 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 7 Apr 2009 17:46:23 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=3227 * Implement
"Add To Outfit" * Thanks FredoChaplin
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 33f080f..e82c26d 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -74,6 +74,7 @@ namespace OpenSim.Tests.Common.Mock
public event SetAppearance OnSetAppearance;
public event AvatarNowWearing OnAvatarNowWearing;
public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
+ public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv;
public event UUIDNameRequest OnDetachAttachmentIntoInv;
public event ObjectAttach OnObjectAttach;
public event ObjectDeselect OnObjectDetach;
--
cgit v1.1
From 8e6c20b27fdb95b9008614eb36678508407a4d19 Mon Sep 17 00:00:00 2001
From: nlin
Date: Fri, 10 Apr 2009 06:39:52 +0000
Subject: Handle ObjectSpin* packets to spin physical prims on Ctrl+Shift+Drag
Addresses Mantis #3381
The current implementation works as expected if the object has no rotation or
only rotation around the Z axis; you can spin the object left or right (around
the world Z axis).
It works a little unexpectedly if the object has a non-Z-axis rotation; in this
case the body is spun about its local Z axis, not the world Z-axis. (But SL
also behaves oddly with a spin on an arbitrarily rotated object.)
---
OpenSim/Tests/Common/Mock/TestClient.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index e82c26d..4647349 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -107,6 +107,9 @@ namespace OpenSim.Tests.Common.Mock
public event GrabObject OnGrabObject;
public event ObjectSelect OnDeGrabObject;
public event MoveObject OnGrabUpdate;
+ public event SpinStart OnSpinStart;
+ public event SpinObject OnSpinUpdate;
+ public event SpinStop OnSpinStop;
public event ViewerEffectEventHandler OnViewerEffect;
public event FetchInventory OnAgentDataUpdateRequest;
--
cgit v1.1
From a0417f57913735a032270cb8ce89f7a3744f4da9 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 14 Apr 2009 03:44:27 +0000
Subject: Thank you, Fly-Man, for a patch that adds the stub to handle the
avatar interests update.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 4647349..0f75d70 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -279,6 +279,8 @@ namespace OpenSim.Tests.Common.Mock
public event MuteListRequest OnMuteListRequest;
+ public event AvatarInterestUpdate OnAvatarInterestUpdate;
+
#pragma warning restore 67
///
--
cgit v1.1
From ad2bd740574b7695a74bb65a63c4bb884cafdf7d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 14 Apr 2009 16:36:32 +0000
Subject: * refactor: rename AssetCache.Initialize() to AssetCache.Reset() to
avoid having Initialise() and Initialize() in the same class - very difficult
to read.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 38a3033..8416fb6 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -59,9 +59,8 @@ namespace OpenSim.Tests.Common.Mock
m_userDataPlugin = new TestUserDataPlugin();
m_inventoryDataPlugin = new TestInventoryDataPlugin();
- SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
- IAssetCache ac = new AssetCache(assetService);
- m_assetCache = ac;
+ SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
+ m_assetCache = new AssetCache(assetService);
LocalInventoryService lis = new LocalInventoryService();
lis.AddPlugin(m_inventoryDataPlugin);
--
cgit v1.1
From 1894157dd3608a15c3336efc2d58eee0de092610 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 14 Apr 2009 17:15:09 +0000
Subject: * Explicitly start the asset server thread so that unit tests can run
single rather than multi-threaded (which may be behind the occasional test
freezes)
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 8416fb6..3b39d36 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -61,6 +61,7 @@ namespace OpenSim.Tests.Common.Mock
SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
m_assetCache = new AssetCache(assetService);
+ m_assetCache.AssetServer.Start();
LocalInventoryService lis = new LocalInventoryService();
lis.AddPlugin(m_inventoryDataPlugin);
--
cgit v1.1
From d0744f8eca6adc2b6ae257f581792bd8eae16ea2 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 14 Apr 2009 18:49:45 +0000
Subject: * Make archiver tests pump the asset server manually instead of
starting the normal runtime thread * This may eliminate the occasional
archive test freezes, since they appeared to occur when somehow the asset
server didn't pick up on the presence of a request in the asset quque
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 3b39d36..93891c0 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -60,8 +60,7 @@ namespace OpenSim.Tests.Common.Mock
m_inventoryDataPlugin = new TestInventoryDataPlugin();
SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
- m_assetCache = new AssetCache(assetService);
- m_assetCache.AssetServer.Start();
+ m_assetCache = new AssetCache(assetService);
LocalInventoryService lis = new LocalInventoryService();
lis.AddPlugin(m_inventoryDataPlugin);
@@ -76,5 +75,13 @@ namespace OpenSim.Tests.Common.Mock
LocalBackEndServices gs = new LocalBackEndServices();
m_gridService = gs;
}
+
+ ///
+ /// Start services that take care of business using their own threads.
+ ///
+ public void StartServices()
+ {
+ m_assetCache.AssetServer.Start();
+ }
}
}
--
cgit v1.1
From fa9b9126ee85fd1124634dae41c8ac58ba4fe70f Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 15 Apr 2009 17:40:04 +0000
Subject: * Resolve unit test failure introduced in r9148 (probably) * Have the
test scene always return success for session id authentication for now
---
OpenSim/Tests/Common/Mock/TestScene.cs | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 12cce9d..0be98a2 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -46,6 +46,19 @@ namespace OpenSim.Tests.Common.Mock
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
}
+
+ ///
+ /// Temporarily override session authentication for tests (namely teleport).
+ ///
+ ///
+ /// TODO: This needs to be mocked out properly.
+ ///
+ ///
+ ///
+ public override bool AuthenticateUser(AgentCircuitData agent)
+ {
+ return true;
+ }
public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
{
--
cgit v1.1
From 7306b73f02231687577425cb2e905c51bfbfdfc1 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Wed, 15 Apr 2009 21:07:09 +0000
Subject: Commit the group deeding support, thank you, mcortez
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 0f75d70..15e92da 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -177,6 +177,7 @@ namespace OpenSim.Tests.Common.Mock
public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
public event ParcelSelectObjects OnParcelSelectObjects;
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
+ public event ParcelDeedToGroup OnParcelDeedToGroup;
public event ObjectDeselect OnObjectDeselect;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
--
cgit v1.1
From ac96722c1d6b8c6466fcd924a2d92d50853de042 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 16 Apr 2009 00:46:24 +0000
Subject: Fix build break and change some groups interfaces
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 15e92da..ff2e3ca 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -929,7 +929,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void SendLandObjectOwners(Dictionary ownersAndCount)
+ public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount)
{
}
--
cgit v1.1
From 4b85cbf0b6f31880655f07e68eb041247dedf870 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 16 Apr 2009 01:01:40 +0000
Subject: Correctly flag group owned prims in the land prim list
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index ff2e3ca..1efc3fd 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -929,7 +929,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount)
+ public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount)
{
}
--
cgit v1.1
From d91330ea35a7344af0a3a79e1dac7dee69daee22 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 20 Apr 2009 20:43:48 +0000
Subject: Add PlacesQuery packet
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 1efc3fd..a593fe4 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -282,6 +282,8 @@ namespace OpenSim.Tests.Common.Mock
public event AvatarInterestUpdate OnAvatarInterestUpdate;
+ public event PlacesQuery OnPlacesQuery;
+
#pragma warning restore 67
///
--
cgit v1.1
From 2c81e41c8a884ece643f3079349b033d03b6b774 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 22 Apr 2009 18:15:43 +0000
Subject: * Fission OGS1UserServices into user service and OGS1 user data
plugin components * Make OGS1UserServices inherit from UserManagerBase * This
allows grid mode regions to use the same user data plugin infrastructure as
grid servers and standalone OpenSims
---
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index 73e8a09..58996e2 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -86,6 +86,8 @@ namespace OpenSim.Tests.Common.Mock
return userProfile;
}
+
+ public UserProfileData GetUserByUri(Uri uri) { return null; }
public bool UpdateUserProfile(UserProfileData user)
{
--
cgit v1.1
From 342126b7b9ca386f9160daecb51ecc14487a5f9f Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 22 Apr 2009 22:19:43 +0000
Subject: * Resolve http://opensimulator.org/mantis/view.php?id=3509 by putting
some service initialization into CommsManager * What is really needed is a
plugin and interface request system as being done for region modules
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 93891c0..4ade40d 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Tests.Common.Mock
m_interServiceInventoryService = lis;
AddInventoryService(lis);
- LocalUserServices lus = new LocalUserServices(991, 992, lis);
+ LocalUserServices lus = new LocalUserServices(991, 992, this);
lus.AddPlugin(m_userDataPlugin);
m_userService = lus;
m_userAdminService = lus;
--
cgit v1.1
From ef9d140022b57b175f41602731ec73775bdf2d9c Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 23 Apr 2009 18:24:39 +0000
Subject: * Add user data plugin to store temporary profiles (which are
distinct from cached) * Plugin not yet used * Existing functionality should
not be affected in any way
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 4ade40d..9d28fc7 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -55,19 +55,19 @@ namespace OpenSim.Tests.Common.Mock
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, new BaseHttpServer(666), null, false, null)
- {
- m_userDataPlugin = new TestUserDataPlugin();
- m_inventoryDataPlugin = new TestInventoryDataPlugin();
-
+ {
SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
m_assetCache = new AssetCache(assetService);
LocalInventoryService lis = new LocalInventoryService();
+ m_inventoryDataPlugin = new TestInventoryDataPlugin();
lis.AddPlugin(m_inventoryDataPlugin);
m_interServiceInventoryService = lis;
AddInventoryService(lis);
LocalUserServices lus = new LocalUserServices(991, 992, this);
+ lus.AddPlugin(new TemporaryUserProfilePlugin());
+ m_userDataPlugin = new TestUserDataPlugin();
lus.AddPlugin(m_userDataPlugin);
m_userService = lus;
m_userAdminService = lus;
--
cgit v1.1
From 0d51c22620315f125ddbd3fe501eb93f318038d8 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 23 Apr 2009 18:57:39 +0000
Subject: * Allow interested user data plugins to store temporary user profiles
* Database and the OGS1 plugins are not interested and hence ignore these
calls
---
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index 58996e2..f376bf0 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -65,6 +65,11 @@ namespace OpenSim.Tests.Common.Mock
public void Initialise() {}
public void Dispose() {}
+
+ public void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ // Not interested
+ }
public void AddNewUserProfile(UserProfileData user)
{
--
cgit v1.1
From 334738fca96498f31842f42db974bc46da35d94a Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 30 Apr 2009 11:58:23 +0000
Subject: Thank you, mpallari, for a patch that increses efficiency by
combining avatar updates into a single packet. Applied with changes. Fixes
Mantis #3136
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index a593fe4..39520e7 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -590,7 +590,7 @@ namespace OpenSim.Tests.Common.Mock
}
public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
- Vector3 position, Vector3 velocity, Quaternion rotation)
+ Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid)
{
}
--
cgit v1.1
From 36dd346a91a4dab41e7acb5edc1a8b62f32757bc Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 4 May 2009 14:25:19 +0000
Subject: Add a method to flush the prim update buffers once a frame, since the
timer appear to be too slow to be useful, or fail too fire. I may remove the
timers as a consequence if this.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 39520e7..256d6fd 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -630,6 +630,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void FlushPrimUpdates()
+ {
+ }
+
public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
List items,
List folders,
--
cgit v1.1
From acfb5051cd328ab21aba5bfc2878ce84d496a7f1 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 4 May 2009 20:15:39 +0000
Subject: Intermediate commit. WILL NOT COMPILE!
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 9d28fc7..44efb8c 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -29,6 +29,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
+using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Communications.Local;
using OpenSim.Data;
--
cgit v1.1
From 1352a198386ef9e18c5c8b52bb6032f3264432f4 Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Wed, 6 May 2009 20:02:49 +0000
Subject: refactoring Scene.NewUserConnection() to be simpler and clearer.
---
OpenSim/Tests/Common/Mock/TestScene.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 0be98a2..670ba61 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
@@ -55,8 +56,9 @@ namespace OpenSim.Tests.Common.Mock
///
///
///
- public override bool AuthenticateUser(AgentCircuitData agent)
+ public override bool AuthenticateUser(AgentCircuitData agent, out string reason)
{
+ reason = String.Empty;
return true;
}
--
cgit v1.1
From 1b7d0a6c93eb4a056d39b9cc708283086f8e8bf8 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 12 May 2009 14:59:11 +0000
Subject: Paving the way for syncing group permissions across a grid
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 256d6fd..f607284 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1116,6 +1116,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void RefreshGroupMembership()
+ {
+ }
+
public void SendUseCachedMuteList()
{
}
--
cgit v1.1
From 40e95cab02b125a6c9ec7e90cab94c94b201f021 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Wed, 13 May 2009 17:11:53 +0000
Subject: * Added some more tests to the GetAssetStreamHandlers
---
OpenSim/Tests/Common/Mock/BaseAssetRepository.cs | 34 +++++++++
OpenSim/Tests/Common/Mock/TestAssetCache.cs | 92 ++++++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 27 +------
OpenSim/Tests/Common/Mock/TestAssetService.cs | 78 ++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs | 13 ++++
5 files changed, 218 insertions(+), 26 deletions(-)
create mode 100644 OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestAssetCache.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestAssetService.cs
create mode 100644 OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
new file mode 100644
index 0000000..acfe4fe
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -0,0 +1,34 @@
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class BaseAssetRepository
+ {
+ protected Dictionary Assets = new Dictionary();
+
+ public AssetBase FetchAsset(UUID uuid)
+ {
+ if (ExistsAsset(uuid))
+ return Assets[uuid];
+ else
+ return null;
+ }
+
+ public void CreateAsset(AssetBase asset)
+ {
+ Assets[asset.FullID] = asset;
+ }
+
+ public void UpdateAsset(AssetBase asset)
+ {
+ CreateAsset(asset);
+ }
+
+ public bool ExistsAsset(UUID uuid)
+ {
+ return Assets.ContainsKey(uuid);
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestAssetCache.cs b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
new file mode 100644
index 0000000..d621763
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenMetaverse;
+using OpenMetaverse.Packets;
+using OpenSim.Framework;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestAssetCache : BaseAssetRepository, IAssetCache
+ {
+ public void AssetReceived(AssetBase asset, bool IsTexture)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AssetNotFound(UUID assetID, bool IsTexture)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public string Version
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public string Name
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public void Initialise()
+ {
+ throw new NotImplementedException();
+ }
+
+ public IAssetServer AssetServer
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public void Initialise(ConfigSettings cs, IAssetServer server)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void ShowState()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Clear()
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool TryGetCachedAsset(UUID assetID, out AssetBase asset)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture)
+ {
+ throw new NotImplementedException();
+ }
+
+ public AssetBase GetAsset(UUID assetID, bool isTexture)
+ {
+ return FetchAsset(assetID);
+ }
+
+ public void AddAsset(AssetBase asset)
+ {
+ CreateAsset( asset );
+ }
+
+ public void ExpireAsset(UUID assetID)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index 80b9ae3..b639cc9 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -37,40 +37,15 @@ namespace OpenSim.Tests.Common.Mock
/// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
/// tests are single threaded.
///
- public class TestAssetDataPlugin : IAssetDataPlugin
+ public class TestAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin
{
public string Version { get { return "0"; } }
public string Name { get { return "TestAssetDataPlugin"; } }
-
- protected Dictionary Assets = new Dictionary();
public void Initialise() {}
public void Initialise(string connect) {}
public void Dispose() {}
- public AssetBase FetchAsset(UUID uuid)
- {
- if (ExistsAsset(uuid))
- return Assets[uuid];
- else
- return null;
- }
-
- public void CreateAsset(AssetBase asset)
- {
- Assets[asset.FullID] = asset;
- }
-
- public void UpdateAsset(AssetBase asset)
- {
- CreateAsset(asset);
- }
-
- public bool ExistsAsset(UUID uuid)
- {
- return Assets.ContainsKey(uuid);
- }
-
public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
}
}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
new file mode 100644
index 0000000..23a1137
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Data;
+using OpenSim.Services.Interfaces;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestAssetService : IAssetService
+ {
+ private readonly Dictionary Assets = new Dictionary();
+
+ public AssetBase Get(string id)
+ {
+ return Assets[ id ];
+ }
+
+ public AssetMetadata GetMetadata(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public byte[] GetData(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool Get(string id, object sender, AssetRetrieved handler)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string Store(AssetBase asset)
+ {
+ Assets[asset.ID] = asset;
+
+ return asset.ID;
+ }
+
+ public bool UpdateContent(string id, byte[] data)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool Delete(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
new file mode 100644
index 0000000..d9c96f4
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim.Framework.Servers.HttpServer;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestOSHttpResponse : OSHttpResponse
+ {
+ public override int StatusCode { get; set; }
+ public override string ContentType { get; set; }
+ }
+}
--
cgit v1.1
From c6e2fc947b72e30113e439579e8b9a52fb81e203 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 14 May 2009 08:12:23 +0000
Subject: * Changed auto-properties to properties with backing field * This
fixes mantis #3650
---
OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
index d9c96f4..9e097b8 100644
--- a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
@@ -7,7 +7,18 @@ namespace OpenSim.Tests.Common.Mock
{
public class TestOSHttpResponse : OSHttpResponse
{
- public override int StatusCode { get; set; }
- public override string ContentType { get; set; }
+ private int m_statusCode;
+ public override int StatusCode
+ {
+ get { return m_statusCode; }
+ set { m_statusCode = value; }
+ }
+
+ private string m_contentType;
+ public override string ContentType
+ {
+ get { return m_contentType; }
+ set { m_contentType = value; }
+ }
}
}
--
cgit v1.1
From 99cf8e3f5ab73c6d25506678d78f847278865630 Mon Sep 17 00:00:00 2001
From: Homer Horwitz
Date: Sat, 16 May 2009 16:01:25 +0000
Subject: Send the owner name, not the client name on SendDialog. This modifies
IClientAPI.SendDialog slightly. Fixes Mantis #3661.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f607284..00f7bb1 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -602,7 +602,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
+ public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{
}
--
cgit v1.1
From 5cfd84c92427658d88c4b36e1470744babd3d54d Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Sun, 17 May 2009 10:26:00 +0000
Subject: Update svn properties.
---
OpenSim/Tests/Common/Mock/BaseAssetRepository.cs | 66 ++++----
OpenSim/Tests/Common/Mock/TestAssetCache.cs | 184 +++++++++++------------
OpenSim/Tests/Common/Mock/TestAssetService.cs | 154 +++++++++----------
OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs | 48 +++---
4 files changed, 226 insertions(+), 226 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
index acfe4fe..b284abc 100644
--- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -1,34 +1,34 @@
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class BaseAssetRepository
- {
- protected Dictionary Assets = new Dictionary();
-
- public AssetBase FetchAsset(UUID uuid)
- {
- if (ExistsAsset(uuid))
- return Assets[uuid];
- else
- return null;
- }
-
- public void CreateAsset(AssetBase asset)
- {
- Assets[asset.FullID] = asset;
- }
-
- public void UpdateAsset(AssetBase asset)
- {
- CreateAsset(asset);
- }
-
- public bool ExistsAsset(UUID uuid)
- {
- return Assets.ContainsKey(uuid);
- }
- }
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class BaseAssetRepository
+ {
+ protected Dictionary Assets = new Dictionary();
+
+ public AssetBase FetchAsset(UUID uuid)
+ {
+ if (ExistsAsset(uuid))
+ return Assets[uuid];
+ else
+ return null;
+ }
+
+ public void CreateAsset(AssetBase asset)
+ {
+ Assets[asset.FullID] = asset;
+ }
+
+ public void UpdateAsset(AssetBase asset)
+ {
+ CreateAsset(asset);
+ }
+
+ public bool ExistsAsset(UUID uuid)
+ {
+ return Assets.ContainsKey(uuid);
+ }
+ }
}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestAssetCache.cs b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
index d621763..a9949bb 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetCache.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
@@ -1,92 +1,92 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenMetaverse;
-using OpenMetaverse.Packets;
-using OpenSim.Framework;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestAssetCache : BaseAssetRepository, IAssetCache
- {
- public void AssetReceived(AssetBase asset, bool IsTexture)
- {
- throw new NotImplementedException();
- }
-
- public void AssetNotFound(UUID assetID, bool IsTexture)
- {
- throw new NotImplementedException();
- }
-
- public void Dispose()
- {
- throw new NotImplementedException();
- }
-
- public string Version
- {
- get { throw new NotImplementedException(); }
- }
-
- public string Name
- {
- get { throw new NotImplementedException(); }
- }
-
- public void Initialise()
- {
- throw new NotImplementedException();
- }
-
- public IAssetServer AssetServer
- {
- get { throw new NotImplementedException(); }
- }
-
- public void Initialise(ConfigSettings cs, IAssetServer server)
- {
- throw new NotImplementedException();
- }
-
- public void ShowState()
- {
- throw new NotImplementedException();
- }
-
- public void Clear()
- {
- throw new NotImplementedException();
- }
-
- public bool TryGetCachedAsset(UUID assetID, out AssetBase asset)
- {
- throw new NotImplementedException();
- }
-
- public void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture)
- {
- throw new NotImplementedException();
- }
-
- public AssetBase GetAsset(UUID assetID, bool isTexture)
- {
- return FetchAsset(assetID);
- }
-
- public void AddAsset(AssetBase asset)
- {
- CreateAsset( asset );
- }
-
- public void ExpireAsset(UUID assetID)
- {
- throw new NotImplementedException();
- }
-
- public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
- {
- throw new NotImplementedException();
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenMetaverse;
+using OpenMetaverse.Packets;
+using OpenSim.Framework;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestAssetCache : BaseAssetRepository, IAssetCache
+ {
+ public void AssetReceived(AssetBase asset, bool IsTexture)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AssetNotFound(UUID assetID, bool IsTexture)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public string Version
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public string Name
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public void Initialise()
+ {
+ throw new NotImplementedException();
+ }
+
+ public IAssetServer AssetServer
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ public void Initialise(ConfigSettings cs, IAssetServer server)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void ShowState()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Clear()
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool TryGetCachedAsset(UUID assetID, out AssetBase asset)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture)
+ {
+ throw new NotImplementedException();
+ }
+
+ public AssetBase GetAsset(UUID assetID, bool isTexture)
+ {
+ return FetchAsset(assetID);
+ }
+
+ public void AddAsset(AssetBase asset)
+ {
+ CreateAsset( asset );
+ }
+
+ public void ExpireAsset(UUID assetID)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index 23a1137..91ea921 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -1,78 +1,78 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Data;
-using OpenSim.Services.Interfaces;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestAssetService : IAssetService
- {
- private readonly Dictionary Assets = new Dictionary();
-
- public AssetBase Get(string id)
- {
- return Assets[ id ];
- }
-
- public AssetMetadata GetMetadata(string id)
- {
- throw new System.NotImplementedException();
- }
-
- public byte[] GetData(string id)
- {
- throw new System.NotImplementedException();
- }
-
- public bool Get(string id, object sender, AssetRetrieved handler)
- {
- throw new NotImplementedException();
- }
-
- public string Store(AssetBase asset)
- {
- Assets[asset.ID] = asset;
-
- return asset.ID;
- }
-
- public bool UpdateContent(string id, byte[] data)
- {
- throw new System.NotImplementedException();
- }
-
- public bool Delete(string id)
- {
- throw new System.NotImplementedException();
- }
- }
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSim Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Data;
+using OpenSim.Services.Interfaces;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestAssetService : IAssetService
+ {
+ private readonly Dictionary Assets = new Dictionary();
+
+ public AssetBase Get(string id)
+ {
+ return Assets[ id ];
+ }
+
+ public AssetMetadata GetMetadata(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public byte[] GetData(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool Get(string id, object sender, AssetRetrieved handler)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string Store(AssetBase asset)
+ {
+ Assets[asset.ID] = asset;
+
+ return asset.ID;
+ }
+
+ public bool UpdateContent(string id, byte[] data)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool Delete(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+ }
}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
index 9e097b8..59d4000 100644
--- a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
@@ -1,24 +1,24 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenSim.Framework.Servers.HttpServer;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestOSHttpResponse : OSHttpResponse
- {
- private int m_statusCode;
- public override int StatusCode
- {
- get { return m_statusCode; }
- set { m_statusCode = value; }
- }
-
- private string m_contentType;
- public override string ContentType
- {
- get { return m_contentType; }
- set { m_contentType = value; }
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim.Framework.Servers.HttpServer;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestOSHttpResponse : OSHttpResponse
+ {
+ private int m_statusCode;
+ public override int StatusCode
+ {
+ get { return m_statusCode; }
+ set { m_statusCode = value; }
+ }
+
+ private string m_contentType;
+ public override string ContentType
+ {
+ get { return m_contentType; }
+ set { m_contentType = value; }
+ }
+ }
+}
--
cgit v1.1
From 23d902be42fd6d554a9098936d501609fc6e5315 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 18 May 2009 23:18:04 +0000
Subject: Remove the old asset cache and local services and the configurations
for them
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 11 -----------
1 file changed, 11 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 44efb8c..7589e3e 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -57,9 +57,6 @@ namespace OpenSim.Tests.Common.Mock
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, new BaseHttpServer(666), null, false, null)
{
- SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
- m_assetCache = new AssetCache(assetService);
-
LocalInventoryService lis = new LocalInventoryService();
m_inventoryDataPlugin = new TestInventoryDataPlugin();
lis.AddPlugin(m_inventoryDataPlugin);
@@ -76,13 +73,5 @@ namespace OpenSim.Tests.Common.Mock
LocalBackEndServices gs = new LocalBackEndServices();
m_gridService = gs;
}
-
- ///
- /// Start services that take care of business using their own threads.
- ///
- public void StartServices()
- {
- m_assetCache.AssetServer.Start();
- }
}
}
--
cgit v1.1
From e0bc5c5db2b88691c04b06be2fa73a75746126cb Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Wed, 20 May 2009 01:32:06 +0000
Subject: Add copyright headers, formatting cleanup.
---
OpenSim/Tests/Common/Mock/BaseAssetRepository.cs | 27 ++++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestAssetCache.cs | 29 +++++++++++++++++++++++-
OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs | 29 +++++++++++++++++++++++-
3 files changed, 83 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
index b284abc..cfefd38 100644
--- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -1,3 +1,30 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
diff --git a/OpenSim/Tests/Common/Mock/TestAssetCache.cs b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
index a9949bb..66886d0 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetCache.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
@@ -1,4 +1,31 @@
-using System;
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
diff --git a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
index 59d4000..581985a 100644
--- a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
@@ -1,4 +1,31 @@
-using System;
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Servers.HttpServer;
--
cgit v1.1
From 79299702579b314513652f23c2ec08b6bf687dcd Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Mon, 25 May 2009 10:40:09 +0000
Subject: letting TestClient implement IClientCore as well to fix test case
failure due to new NAT code
---
OpenSim/Tests/Common/Mock/TestClient.cs | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 00f7bb1..a028abe 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -36,10 +36,11 @@ using OpenMetaverse.Packets;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
+using OpenSim.Framework.Client;
namespace OpenSim.Tests.Common.Mock
{
- public class TestClient : IClientAPI
+ public class TestClient : IClientAPI, IClientCore
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -1131,5 +1132,25 @@ namespace OpenSim.Tests.Common.Mock
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)
{
}
+
+ public bool TryGet(out T iface)
+ {
+ iface = default(T);
+ return false;
+ }
+
+ public T Get()
+ {
+ return default(T);
+ }
+
+ public void Disconnect(string reason)
+ {
+ }
+
+ public void Disconnect()
+ {
+ }
+
}
}
--
cgit v1.1
From 840de6c036570d559ec6924cd8405d3f34a99fdd Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 1 Jun 2009 06:37:14 +0000
Subject: Minor: Change OpenSim to OpenSimulator in older copyright headers and
LICENSE.txt.
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 2 +-
OpenSim/Tests/Common/Mock/TestAssetService.cs | 2 +-
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 2 +-
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 2 +-
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 2 +-
OpenSim/Tests/Common/Mock/TestScene.cs | 2 +-
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index b639cc9..8ab72dc 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index 91ea921..d35e3ed 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index a028abe..fdca410 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 7589e3e..eb83ee6 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index efe0101..31e8e8b 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index 4165641..f7eda68 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 670ba61..3fc22ba 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index f376bf0..5188cf6 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSim Project nor the
+ * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
--
cgit v1.1
From a23d64dec1cbf88abc3c7e84664a683dee534e4a Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Wed, 10 Jun 2009 04:28:56 +0000
Subject: Formatting cleanup.
---
OpenSim/Tests/Common/Mock/TestAssetCache.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetCache.cs b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
index 66886d0..ebbea75 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetCache.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Tests.Common.Mock
public void AddAsset(AssetBase asset)
{
- CreateAsset( asset );
+ CreateAsset(asset);
}
public void ExpireAsset(UUID assetID)
--
cgit v1.1
From c13f3649d279bc6a55d8b1d268574577029f7c33 Mon Sep 17 00:00:00 2001
From: Arthur Valadares
Date: Thu, 11 Jun 2009 18:27:12 +0000
Subject: * Reinstating UserProfileCacheServiceTests. One test still fails
(TestUpdateFolder)
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 31e8e8b..442ff06 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Tests.Common.Mock
public InventoryFolderBase queryInventoryFolder(UUID folderID)
{
- return null;
+ return getInventoryFolder(folderID);
}
public void addInventoryFolder(InventoryFolderBase folder)
--
cgit v1.1
From 1adeb8ad7781beecbf1f23817eb9047e57f12027 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Fri, 19 Jun 2009 12:21:20 +0000
Subject: From: Chris Yeoh
This patch ensures that the touch positions are set during touch_end
events (currently only working for touch_start and touch events).
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index fdca410..64af13d 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -106,7 +106,7 @@ namespace OpenSim.Tests.Common.Mock
public event GodKickUser OnGodKickUser;
public event ObjectDuplicate OnObjectDuplicate;
public event GrabObject OnGrabObject;
- public event ObjectSelect OnDeGrabObject;
+ public event DeGrabObject OnDeGrabObject;
public event MoveObject OnGrabUpdate;
public event SpinStart OnSpinStart;
public event SpinObject OnSpinUpdate;
--
cgit v1.1
From 3564271c2d4f769361e36e2a10acbeb3e5f56bdf Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Wed, 1 Jul 2009 15:47:52 +0000
Subject: Restore the functionality that was removed in r9928. This lets the
load balancer plugin work again. Create a new method, GetClientEP, to
retrieve only the EndPoint for script usage. Marked the purpose of the method
in IClientAPI.cs with a warning. Also restored the corresponding
SetClientInfo functionality.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 64af13d..c76d180 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -888,6 +888,11 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public EndPoint GetClientEP()
+ {
+ return null;
+ }
+
public ClientInfo GetClientInfo()
{
return null;
--
cgit v1.1
From c310fb11f492419de60b4bf8e5bb234e4589b336 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 10 Jul 2009 02:22:26 +0000
Subject: Remove all references to HttpServer from CommsManager (all
incarnations) Change all uses of the HttpServer properties to use the new
singleton
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index eb83ee6..87751a4 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Tests.Common.Mock
}
public TestCommunicationsManager(NetworkServersInfo serversInfo)
- : base(serversInfo, new BaseHttpServer(666), null, false, null)
+ : base(serversInfo, null)
{
LocalInventoryService lis = new LocalInventoryService();
m_inventoryDataPlugin = new TestInventoryDataPlugin();
--
cgit v1.1
From acea31518b00b02e2ba8b08106a76de0fbef29ab Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 17 Jul 2009 14:58:54 +0000
Subject: fixed the bug where changing the rotation of a selection of prims in
a linkset, made each of those prims rotate around its own centre rather than
around the geometric centre of the selection like they should do (and like
the client expects). This involved adding a new
OnUpdatePrimSingleRotationPosition event to IClientAPI so that we can get the
changed position from the client. Btw adding new events to IClientAPI is
really tedious where you have to copy the change across to at least 5 or 6
other files. [Note this doesn't fix the bug where any rotation changes to the
root prim (but not the whole linkset) cause rotation errors on the child
prims.]
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index c76d180..21541e1 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -130,6 +130,7 @@ namespace OpenSim.Tests.Common.Mock
public event UpdateVector OnUpdatePrimSinglePosition;
public event UpdatePrimRotation OnUpdatePrimGroupRotation;
public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
+ public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
public event UpdateVector OnUpdatePrimScale;
public event UpdateVector OnUpdatePrimGroupScale;
--
cgit v1.1
From 08819bcbea9012d67cc4cb44e4d7ec7e5837bac6 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Sun, 19 Jul 2009 02:32:02 +0000
Subject: * Created a way that the OpenSimulator scene can ask the physics
scene to do a raycast test safely. * Test for prim obstructions between the
avatar and camera. If there are obstructions, inform the client to move the
camera closer. This makes it so that walls and objects don't obstruct your
view while you're moving around. Try walking inside a hollowed tori.
You'll see how much easier it is now because your camera automatically moves
closer so you can still see. * Created a way to know if the user's camera is
alt + cammed or just following the avatar. * Changes IClientAPI interface by
adding SendCameraConstraint(Vector4 CameraConstraint)
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 21541e1..4b59b50 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -942,6 +942,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void SendCameraConstraint(Vector4 ConstraintPlane)
+ {
+ }
+
public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount)
{
}
--
cgit v1.1
From 1f7466e5c3136d0580a21b5f2f4d8f18fa9fc72f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Aug 2009 20:04:27 +0100
Subject: test item data storage impementation (unused as of yet)
---
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 45 +++++++++++++++-------
1 file changed, 31 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 442ff06..1b14abb 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -39,12 +39,17 @@ namespace OpenSim.Tests.Common.Mock
/// tests are single threaded.
///
public class TestInventoryDataPlugin : IInventoryDataPlugin
- {
+ {
///
- /// Known inventory folders
+ /// Inventory folders
///
private Dictionary m_folders = new Dictionary();
+ ////
+ /// Inventory items
+ ///
+ private Dictionary m_items = new Dictionary();
+
///
/// User root folders
///
@@ -99,9 +104,7 @@ namespace OpenSim.Tests.Common.Mock
}
return folders;
- }
-
- public InventoryItemBase getInventoryItem(UUID item) { return null; }
+ }
public InventoryFolderBase getInventoryFolder(UUID folderId)
{
@@ -111,15 +114,6 @@ namespace OpenSim.Tests.Common.Mock
return folder;
}
- public void addInventoryItem(InventoryItemBase item) {}
- public void updateInventoryItem(InventoryItemBase item) {}
- public void deleteInventoryItem(UUID item) {}
-
- public InventoryItemBase queryInventoryItem(UUID item)
- {
- return null;
- }
-
public InventoryFolderBase queryInventoryFolder(UUID folderID)
{
return getInventoryFolder(folderID);
@@ -150,6 +144,29 @@ namespace OpenSim.Tests.Common.Mock
m_folders.Remove(folderId);
}
+ public void addInventoryItem(InventoryItemBase item) { m_items[item.ID] = item; }
+
+ public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
+
+ public void deleteInventoryItem(UUID itemId)
+ {
+ if (m_items.ContainsKey(itemId))
+ m_items.Remove(itemId);
+ }
+
+ public InventoryItemBase getInventoryItem(UUID itemId)
+ {
+ if (m_items.ContainsKey(itemId))
+ return m_items[itemId];
+ else
+ return null;
+ }
+
+ public InventoryItemBase queryInventoryItem(UUID item)
+ {
+ return null;
+ }
+
public List fetchActiveGestures(UUID avatarID) { return null; }
}
}
--
cgit v1.1
From 2b990a61bfa88e13d5ad19602e6acef751ea473c Mon Sep 17 00:00:00 2001
From: Teravus Ovares (Dan Olivares)
Date: Fri, 7 Aug 2009 20:31:48 -0400
Subject: This is the second part of the 'not crash on regionsize changes'.
This lets you configure region sizes to be smaller without crashing the
region. I remind you that regions are still square, must be a multiple of
4, and the Linden client doesn't like anything other then 256. If you set it
bigger or smaller, the terrain doesn't load in the client, the map has
issues, and god forbid you connect it to a grid that expects 256m regions.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 4b59b50..bf4ddf0 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -298,7 +298,7 @@ namespace OpenSim.Tests.Common.Mock
///
public string CapsSeedUrl;
- private Vector3 startPos = new Vector3(128, 128, 2);
+ private Vector3 startPos = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 2);
public virtual Vector3 StartPos
{
--
cgit v1.1
From a50904a68bdc215d4ccc312627d44c736a1bceb5 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 10 Aug 2009 06:41:03 -0700
Subject: More clean up from asset cache legacy. None of these classes are used
anymore.
---
OpenSim/Tests/Common/Mock/TestAssetCache.cs | 119 ----------------------------
1 file changed, 119 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/TestAssetCache.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetCache.cs b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
deleted file mode 100644
index ebbea75..0000000
--- a/OpenSim/Tests/Common/Mock/TestAssetCache.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenMetaverse;
-using OpenMetaverse.Packets;
-using OpenSim.Framework;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestAssetCache : BaseAssetRepository, IAssetCache
- {
- public void AssetReceived(AssetBase asset, bool IsTexture)
- {
- throw new NotImplementedException();
- }
-
- public void AssetNotFound(UUID assetID, bool IsTexture)
- {
- throw new NotImplementedException();
- }
-
- public void Dispose()
- {
- throw new NotImplementedException();
- }
-
- public string Version
- {
- get { throw new NotImplementedException(); }
- }
-
- public string Name
- {
- get { throw new NotImplementedException(); }
- }
-
- public void Initialise()
- {
- throw new NotImplementedException();
- }
-
- public IAssetServer AssetServer
- {
- get { throw new NotImplementedException(); }
- }
-
- public void Initialise(ConfigSettings cs, IAssetServer server)
- {
- throw new NotImplementedException();
- }
-
- public void ShowState()
- {
- throw new NotImplementedException();
- }
-
- public void Clear()
- {
- throw new NotImplementedException();
- }
-
- public bool TryGetCachedAsset(UUID assetID, out AssetBase asset)
- {
- throw new NotImplementedException();
- }
-
- public void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture)
- {
- throw new NotImplementedException();
- }
-
- public AssetBase GetAsset(UUID assetID, bool isTexture)
- {
- return FetchAsset(assetID);
- }
-
- public void AddAsset(AssetBase asset)
- {
- CreateAsset(asset);
- }
-
- public void ExpireAsset(UUID assetID)
- {
- throw new NotImplementedException();
- }
-
- public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
- {
- throw new NotImplementedException();
- }
- }
-}
--
cgit v1.1
From 5d2a157e64f19a061a37d5458b34cc563ee288a1 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 10 Aug 2009 10:48:21 -0700
Subject: First pass at cleaning up old OGS1 and Local Inventory: removed
everything-inventory in CommsManager, which wasn't actively used anymore.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 5 -----
1 file changed, 5 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 87751a4..d404344 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -57,11 +57,6 @@ namespace OpenSim.Tests.Common.Mock
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, null)
{
- LocalInventoryService lis = new LocalInventoryService();
- m_inventoryDataPlugin = new TestInventoryDataPlugin();
- lis.AddPlugin(m_inventoryDataPlugin);
- m_interServiceInventoryService = lis;
- AddInventoryService(lis);
LocalUserServices lus = new LocalUserServices(991, 992, this);
lus.AddPlugin(new TemporaryUserProfilePlugin());
--
cgit v1.1
From 18aa2ea0c5ebd8d5131902ed9856e68f46e76e11 Mon Sep 17 00:00:00 2001
From: Arthur Valadares
Date: Tue, 11 Aug 2009 12:07:54 -0300
Subject: * Improves SceneSetupHelper to allow the tester to choose a real or
mock, inventory and asset, service modules. The boolean startServices was
replaced with realServices string. If the string contains the word asset, it
will start a real asset module, if it contains inventory, it starts a real
inventory. Otherwise, it use mock (NullPlugin-like) objects, for tests that
don't really need functionality.
* SetupScene is now actually sharing the asset and inventory modules if the tester wishes to have multiple regions connected. To link regions, just start SetupScene with the same CommunicationManager for all scenes. SceneSetupHelper will hold a static reference to the modules and won't initialize them again, just run the scenes through the modules AddRegion, RegionLoaded and PostInitialize.
* With the recent changes, both asset and inventory (and in the future, user) services should always be asked from the scene, not instantiated alone. The tests should reflect this new behavior and always start a scene.
---
OpenSim/Tests/Common/Mock/TestAssetService.cs | 9 +-
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 133 ++++++++++++++++++++++
2 files changed, 140 insertions(+), 2 deletions(-)
create mode 100644 OpenSim/Tests/Common/Mock/TestInventoryService.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index d35e3ed..5f1184b 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -31,13 +31,18 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
using OpenSim.Services.Interfaces;
+using Nini.Config;
namespace OpenSim.Tests.Common.Mock
{
public class TestAssetService : IAssetService
{
- private readonly Dictionary Assets = new Dictionary();
-
+ private readonly Dictionary Assets = new Dictionary();
+
+ public TestAssetService(IConfigSource config)
+ {
+ }
+
public AssetBase Get(string id)
{
return Assets[ id ];
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
new file mode 100644
index 0000000..cf1a3a9
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim.Framework;
+using OpenMetaverse;
+using OpenSim.Services.Interfaces;
+using Nini.Config;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class TestInventoryService : IInventoryService
+ {
+ public TestInventoryService()
+ {
+ }
+
+ public TestInventoryService(IConfigSource config)
+ {
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool CreateUserInventory(UUID userId)
+ {
+ return false;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public List GetInventorySkeleton(UUID userId)
+ {
+ List folders = new List();
+ InventoryFolderBase folder = new InventoryFolderBase();
+ folder.ID = UUID.Random();
+ folder.Owner = userId;
+ folders.Add(folder);
+ return folders;
+ }
+
+ ///
+ /// Returns a list of all the active gestures in a user's inventory.
+ ///
+ ///
+ /// The of the user
+ ///
+ ///
+ /// A flat list of the gesture items.
+ ///
+ public List GetActiveGestures(UUID userId)
+ {
+ return null;
+ }
+
+ public InventoryCollection GetUserInventory(UUID userID)
+ {
+ return null;
+ }
+
+ public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
+ {
+ }
+
+ public List GetFolderItems(UUID userID, UUID folderID)
+ {
+ return null;
+ }
+
+ public bool AddFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool UpdateFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool MoveFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool PurgeFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool AddItem(InventoryItemBase item)
+ {
+ return false;
+ }
+
+ public bool UpdateItem(InventoryItemBase item)
+ {
+ return false;
+ }
+
+ public bool DeleteItem(InventoryItemBase item)
+ {
+ return false;
+ }
+
+ public InventoryItemBase QueryItem(InventoryItemBase item)
+ {
+ return null;
+ }
+
+ public InventoryFolderBase QueryFolder(InventoryFolderBase folder)
+ {
+ return null;
+ }
+
+ public bool HasInventoryForUser(UUID userID)
+ {
+ return false;
+ }
+
+ public InventoryFolderBase RequestRootFolder(UUID userID)
+ {
+ InventoryFolderBase root = new InventoryFolderBase();
+ root.ID = UUID.Random();
+ root.Owner = userID;
+ root.ParentID = UUID.Zero;
+ return root;
+ }
+ }
+}
--
cgit v1.1
From dae9a111aa826e1d5e3cc5d13b308cdcbedadfbc Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 11 Aug 2009 13:16:53 -0700
Subject: Added new operations to mock inventory service in tests.
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index cf1a3a9..0c19164 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -43,6 +43,21 @@ namespace OpenSim.Tests.Common.Mock
return folders;
}
+ public InventoryFolderBase GetRootFolder(UUID userID)
+ {
+ return new InventoryFolderBase();
+ }
+
+ public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
+ {
+ return null;
+ }
+
+ public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
+ {
+ return null;
+ }
+
///
/// Returns a list of all the active gestures in a user's inventory.
///
--
cgit v1.1
From 50f29752f5888ac194a5146c475720c29ae3f172 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 13 Aug 2009 11:48:39 +0900
Subject: Formatting cleanup. Add copyright headers.
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 29 ++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index 0c19164..6635700 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -1,4 +1,31 @@
-using System;
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework;
--
cgit v1.1
From 5246dc33dcfc51b7ebb19b269159df3991029350 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 13 Aug 2009 14:10:12 -0700
Subject: Renamed QueryItem/QueryFolder to GetItem/GetFolder. The word 'query'
starting to get on my nerves.
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index 6635700..6576533 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -148,12 +148,12 @@ namespace OpenSim.Tests.Common.Mock
return false;
}
- public InventoryItemBase QueryItem(InventoryItemBase item)
+ public InventoryItemBase GetItem(InventoryItemBase item)
{
return null;
}
- public InventoryFolderBase QueryFolder(InventoryFolderBase folder)
+ public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{
return null;
}
--
cgit v1.1
From 034c9cf606373bfa9d3f8040cd787f789e0efbf2 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 13 Aug 2009 17:34:15 -0700
Subject: Added GetAssetPermissions. Few last bugs nixed. This is ready for
testing.
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index 6576533..ba9cbe9 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -171,5 +171,10 @@ namespace OpenSim.Tests.Common.Mock
root.ParentID = UUID.Zero;
return root;
}
+
+ public int GetAssetPermissions(UUID userID, UUID assetID)
+ {
+ return 1;
+ }
}
}
--
cgit v1.1
From ff28ecee1b35ba24ec538d8ed018c764476c62b4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 14 Aug 2009 20:07:13 +0100
Subject: Re-enable TestSaveIarV0_1() Implement more parts of TestAssetService
---
OpenSim/Tests/Common/Mock/TestAssetService.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index 5f1184b..81f123a 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -45,7 +45,13 @@ namespace OpenSim.Tests.Common.Mock
public AssetBase Get(string id)
{
- return Assets[ id ];
+ AssetBase asset;
+ if (Assets.ContainsKey(id))
+ asset = Assets[id];
+ else
+ asset = null;
+
+ return asset;
}
public AssetMetadata GetMetadata(string id)
@@ -59,8 +65,10 @@ namespace OpenSim.Tests.Common.Mock
}
public bool Get(string id, object sender, AssetRetrieved handler)
- {
- throw new NotImplementedException();
+ {
+ handler(id, sender, Get(id));
+
+ return true;
}
public string Store(AssetBase asset)
--
cgit v1.1
From a42569d89675430087d32332e168429d4185311c Mon Sep 17 00:00:00 2001
From: Adam Johnson
Date: Sun, 16 Aug 2009 15:06:06 +0900
Subject: Thanks dmiles for a patch that adds PacketType.RequestMultipleObjects
Packet Handler - ref mantis #4010
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index bf4ddf0..fe31729 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -120,6 +120,7 @@ namespace OpenSim.Tests.Common.Mock
public event ObjectExtraParams OnUpdateExtraParams;
public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
public event ObjectSelect OnObjectSelect;
+ public event ObjectRequest OnObjectRequest;
public event GenericCall7 OnObjectDescription;
public event GenericCall7 OnObjectName;
public event GenericCall7 OnObjectClickAction;
--
cgit v1.1
From c5af39239f7f2a1725d9c08bea80522de8835e0f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 19 Aug 2009 00:13:51 -0700
Subject: A better purge of trash folder.
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index ba9cbe9..f770f75 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Tests.Common.Mock
return false;
}
- public bool DeleteItem(InventoryItemBase item)
+ public bool DeleteItems(UUID ownerID, List itemIDs)
{
return false;
}
--
cgit v1.1
From d519f1885f587409592cf92bc0f4ba8533a1866f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 19 Aug 2009 10:56:08 -0700
Subject: Added MoveItems, which is most useful upon viewer-delete inventory
operation. Moving a batch of items is a 1-time operation. Made it async
anyway, so that the viewer doesn't wait in case the DB layer is dumb (which
is the case currently).
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index f770f75..ee22e5e 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -143,6 +143,11 @@ namespace OpenSim.Tests.Common.Mock
return false;
}
+ public bool MoveItems(UUID ownerID, List items)
+ {
+ return false;
+ }
+
public bool DeleteItems(UUID ownerID, List itemIDs)
{
return false;
--
cgit v1.1
From b1853d9f265fb32cf51d65fdcf2d5b4741911f00 Mon Sep 17 00:00:00 2001
From: Kunnis
Date: Sun, 16 Aug 2009 23:25:12 -0500
Subject: Fixing a spot I missed in assets. Switching Grid to the new naming
schema with Store/Get
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index 8ab72dc..3981fe9 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
@@ -46,6 +47,18 @@ namespace OpenSim.Tests.Common.Mock
public void Initialise(string connect) {}
public void Dispose() {}
+ private readonly List assets = new List();
+
+ public AssetBase GetAsset(UUID uuid)
+ {
+ return assets.Find(x=>x.FullID == uuid);
+ }
+
+ public void StoreAsset(AssetBase asset)
+ {
+ assets.Add(asset);
+ }
+
public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
}
}
\ No newline at end of file
--
cgit v1.1
From b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 22 Aug 2009 10:24:26 -0700
Subject: * Fixes mantis http://opensimulator.org/mantis/view.php?id=4044.
Turns out folders were never being removed from trash when they were singled
out for purging in trash. They were being removed when Trash was purged as a
whole. That behavior is now fixed for the new InventoryService set. * Removed
left-overs from AssetInventoryServer.
---
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
index ee22e5e..5a0ee7c 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
@@ -128,6 +128,11 @@ namespace OpenSim.Tests.Common.Mock
return false;
}
+ public bool DeleteFolders(UUID ownerID, List ids)
+ {
+ return false;
+ }
+
public bool PurgeFolder(InventoryFolderBase folder)
{
return false;
--
cgit v1.1
From 7ff4c2e50b3df8ea82dc8a27f3b68657fe29226b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 28 Aug 2009 17:07:17 +0100
Subject: Pull out distinct cache system folders and drop cache methods in
InventoryCache
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 1b14abb..ce116f2 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -27,6 +27,8 @@
using System;
using System.Collections.Generic;
+using System.Reflection;
+using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
@@ -39,7 +41,9 @@ namespace OpenSim.Tests.Common.Mock
/// tests are single threaded.
///
public class TestInventoryDataPlugin : IInventoryDataPlugin
- {
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
///
/// Inventory folders
///
@@ -87,6 +91,8 @@ namespace OpenSim.Tests.Common.Mock
public InventoryFolderBase getUserRootFolder(UUID user)
{
+ m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
+
InventoryFolderBase folder = null;
m_rootFolders.TryGetValue(user, out folder);
@@ -124,7 +130,11 @@ namespace OpenSim.Tests.Common.Mock
m_folders[folder.ID] = folder;
if (folder.ParentID == UUID.Zero)
+ {
+ m_log.DebugFormat(
+ "[MOCK INV DB]: Adding root folder {0} {1} for {2}", folder.Name, folder.ID, folder.Owner);
m_rootFolders[folder.Owner] = folder;
+ }
}
public void updateInventoryFolder(InventoryFolderBase folder)
--
cgit v1.1
From 05756e1fb96aa47f9ff111dd04499934c7077731 Mon Sep 17 00:00:00 2001
From: dr scofield (aka dirk husemann)
Date: Wed, 2 Sep 2009 09:43:22 +0200
Subject: warnings safari.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index d404344..4313c96 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -43,11 +43,11 @@ namespace OpenSim.Tests.Common.Mock
}
private IUserDataPlugin m_userDataPlugin;
- public IInventoryDataPlugin InventoryDataPlugin
- {
- get { return m_inventoryDataPlugin; }
- }
- private IInventoryDataPlugin m_inventoryDataPlugin;
+ // public IInventoryDataPlugin InventoryDataPlugin
+ // {
+ // get { return m_inventoryDataPlugin; }
+ // }
+ // private IInventoryDataPlugin m_inventoryDataPlugin;
public TestCommunicationsManager()
: this(null)
--
cgit v1.1
From 304c78bbbbc9a176d70d2967a3f703f2e545565c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sun, 6 Sep 2009 19:30:03 +0100
Subject: Temporarily re-enable save iar test by manually insert the item into
the old cache during the test
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index ce116f2..a444d91 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -154,7 +154,13 @@ namespace OpenSim.Tests.Common.Mock
m_folders.Remove(folderId);
}
- public void addInventoryItem(InventoryItemBase item) { m_items[item.ID] = item; }
+ public void addInventoryItem(InventoryItemBase item)
+ {
+ m_log.DebugFormat(
+ "[MOCK INV DB]: Adding inventory item {0} {1} in {2}", item.Name, item.ID, item.Folder);
+
+ m_items[item.ID] = item;
+ }
public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
--
cgit v1.1
From 881051c8ccef7b49031d0f9a087390336ecc53b5 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sun, 6 Sep 2009 21:14:42 +0100
Subject: Convert iar write request to use inventory service requests rather
than cache
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index a444d91..daef38b 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -84,7 +84,17 @@ namespace OpenSim.Tests.Common.Mock
public List getInventoryInFolder(UUID folderID)
{
- return new List();
+ m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0}", folderID);
+
+ List items = new List();
+
+ foreach (InventoryItemBase item in m_items.Values)
+ {
+ if (item.Folder == folderID)
+ items.Add(item);
+ }
+
+ return items;
}
public List getUserRootFolders(UUID user) { return null; }
--
cgit v1.1
From 68e40a87cafcab580ab484956f187068c098e84e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 26 Sep 2009 21:29:54 -0700
Subject: Poof! on LocalBackend. CommsManager.GridServices deleted.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 2 --
1 file changed, 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 4313c96..de73663 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -65,8 +65,6 @@ namespace OpenSim.Tests.Common.Mock
m_userService = lus;
m_userAdminService = lus;
- LocalBackEndServices gs = new LocalBackEndServices();
- m_gridService = gs;
}
}
}
--
cgit v1.1
From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 1 Oct 2009 01:00:09 +0900
Subject: Formatting cleanup.
---
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 4 ++--
OpenSim/Tests/Common/Mock/TestAssetService.cs | 4 ++--
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 2 +-
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 6 +++---
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 4 ++--
OpenSim/Tests/Common/Mock/TestScene.cs | 6 +++---
6 files changed, 13 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index 3981fe9..20ea18f 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Tests.Common.Mock
/// tests are single threaded.
///
public class TestAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin
- {
+ {
public string Version { get { return "0"; } }
public string Name { get { return "TestAssetDataPlugin"; } }
@@ -59,6 +59,6 @@ namespace OpenSim.Tests.Common.Mock
assets.Add(asset);
}
- public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
+ public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
}
}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index 81f123a..317ec06 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Tests.Common.Mock
if (Assets.ContainsKey(id))
asset = Assets[id];
else
- asset = null;
+ asset = null;
return asset;
}
@@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common.Mock
}
public bool Get(string id, object sender, AssetRetrieved handler)
- {
+ {
handler(id, sender, Get(id));
return true;
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index de73663..013462e 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Tests.Common.Mock
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, null)
- {
+ {
LocalUserServices lus = new LocalUserServices(991, 992, this);
lus.AddPlugin(new TemporaryUserProfilePlugin());
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index daef38b..0c7ebca 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Tests.Common.Mock
////
/// Inventory items
///
- private Dictionary m_items = new Dictionary();
+ private Dictionary m_items = new Dictionary();
///
/// User root folders
@@ -120,7 +120,7 @@ namespace OpenSim.Tests.Common.Mock
}
return folders;
- }
+ }
public InventoryFolderBase getInventoryFolder(UUID folderId)
{
@@ -191,7 +191,7 @@ namespace OpenSim.Tests.Common.Mock
public InventoryItemBase queryInventoryItem(UUID item)
{
return null;
- }
+ }
public List fetchActiveGestures(UUID avatarID) { return null; }
}
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index f7eda68..01b5203 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -31,7 +31,7 @@ using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Tests.Common.Mock
-{
+{
///
/// Land channel for test purposes
///
@@ -40,7 +40,7 @@ namespace OpenSim.Tests.Common.Mock
public List ParcelsNearPoint(Vector3 position) { return null; }
public List AllParcels() { return null; }
public ILandObject GetLandObject(int x, int y) { return null; }
- public ILandObject GetLandObject(int localID) { return null; }
+ public ILandObject GetLandObject(int localID) { return null; }
public ILandObject GetLandObject(float x, float y) { return null; }
public bool IsLandPrimCountTainted() { return false; }
public bool IsForcefulBansAllowed() { return false; }
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 3fc22ba..22cfa2c 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -35,9 +35,9 @@ using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Tests.Common.Mock
-{
+{
public class TestScene : Scene
- {
+ {
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager,
@@ -60,7 +60,7 @@ namespace OpenSim.Tests.Common.Mock
{
reason = String.Empty;
return true;
- }
+ }
public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
{
--
cgit v1.1
From 400abed271b7d59b8038326fccfe76c28d7d1051 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 30 Sep 2009 21:23:00 +0100
Subject: Add RebakeAvatarTexturesPacket to the client view
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index fe31729..2b54890 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1163,5 +1163,9 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void SendRebakeAvatarTextures(UUID textureID)
+ {
+ }
+
}
}
--
cgit v1.1
From 3c271bf2229bc58969ca7d15b7082815f6b4c1f0 Mon Sep 17 00:00:00 2001
From: dr scofield (aka dirk husemann)
Date: Fri, 2 Oct 2009 11:26:45 +0200
Subject: fixing TestLandChannel to let it return empty List() (as
does the real LandChannel), percolating to SceneSetupHelpers.
---
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 46 +++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index 01b5203..ed30827 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -29,6 +29,8 @@ using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.CoreModules.World.Land;
namespace OpenSim.Tests.Common.Mock
{
@@ -37,11 +39,45 @@ namespace OpenSim.Tests.Common.Mock
///
public class TestLandChannel : ILandChannel
{
- public List ParcelsNearPoint(Vector3 position) { return null; }
- public List AllParcels() { return null; }
- public ILandObject GetLandObject(int x, int y) { return null; }
- public ILandObject GetLandObject(int localID) { return null; }
- public ILandObject GetLandObject(float x, float y) { return null; }
+ private Scene m_scene;
+
+ public TestLandChannel(Scene scene)
+ {
+ m_scene = scene;
+ }
+
+ public List ParcelsNearPoint(Vector3 position)
+ {
+ return new List();
+ }
+
+ public List AllParcels()
+ {
+ return new List();
+ }
+
+ protected ILandObject GetNoLand()
+ {
+ ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
+ obj.LandData.Name = "NO LAND";
+ return obj;
+ }
+
+ public ILandObject GetLandObject(int x, int y)
+ {
+ return GetNoLand();
+ }
+
+ public ILandObject GetLandObject(int localID)
+ {
+ return GetNoLand();
+ }
+
+ public ILandObject GetLandObject(float x, float y)
+ {
+ return GetNoLand();
+ }
+
public bool IsLandPrimCountTainted() { return false; }
public bool IsForcefulBansAllowed() { return false; }
public void UpdateLandObject(int localID, LandData data) {}
--
cgit v1.1
From 23a334b9f54a1ef5df3b503c165e7b76b746a2b1 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Tue, 13 Oct 2009 14:50:03 -0700
Subject: * Rewrote ClientManager to remove Lindenisms from OpenSim core,
improve performance by removing locks, and replace LLUDPClientCollection *
Removed the confusing (and LL-specific) shutdowncircuit parameter from
IClientAPI.Close() * Updated the LLUDP code to only use ClientManager instead
of trying to synchronize ClientManager and m_clients * Remove clients
asynchronously since it is a very slow operation (including a 2000ms sleep)
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 2b54890..ad90817 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -865,7 +865,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void Close(bool ShutdownCircuit)
+ public void Close()
{
m_scene.RemoveClient(AgentId);
}
--
cgit v1.1
From dc11643c007adf7a640ec4fbabe25995352aaa18 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Tue, 13 Oct 2009 17:33:45 -0700
Subject: * Consolidated adding / removing ClientManager IClientAPIs to two
places in Scene * Added some missing implementations of
IClientAPI.RemoteEndPoint * Added a ClientManager.Remove(UUID) overload *
Removed a reference to a missing project from prebuild.xml
---
OpenSim/Tests/Common/Mock/TestClient.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index ad90817..5c838c5 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -393,6 +393,11 @@ namespace OpenSim.Tests.Common.Mock
set { m_circuitCode = value; }
}
+ public IPEndPoint RemoteEndPoint
+ {
+ get { return new IPEndPoint(IPAddress.Loopback, (ushort)m_circuitCode); }
+ }
+
///
/// Constructor
///
--
cgit v1.1
From 4b75353cbf50de3cae4c48ec90b55f30c1612c92 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Thu, 15 Oct 2009 16:35:27 -0700
Subject: Object update prioritization by Jim Greensky of Intel Labs, part one.
This implements a simple distance prioritizer based on initial agent
positions. Re-prioritizing and more advanced priority algorithms will follow
soon
---
OpenSim/Tests/Common/Mock/TestClient.cs | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 5c838c5..21606e2 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -592,13 +592,11 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
- uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
+ public virtual void SendAvatarData(SendAvatarData data)
{
}
- public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
- Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid)
+ public virtual void SendAvatarTerseUpdate(SendAvatarTerseData data)
{
}
@@ -614,27 +612,11 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
- PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
- Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
- UUID objectID, UUID ownerID, string text, byte[] color,
- uint parentID,
- byte[] particleSystem, byte clickAction, byte material)
+ public virtual void SendPrimitiveToClient(SendPrimitiveData data)
{
}
- public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
- PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
- Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
- UUID objectID, UUID ownerID, string text, byte[] color,
- uint parentID,
- byte[] particleSystem, byte clickAction, byte material, byte[] textureanimation,
- bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
- {
- }
- public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
- Vector3 position, Quaternion rotation, Vector3 velocity,
- Vector3 rotationalvelocity, byte state, UUID AssetId,
- UUID ownerID, int attachPoint)
+
+ public virtual void SendPrimTerseUpdate(SendPrimitiveTerseData data)
{
}
--
cgit v1.1
From fdb2a75ad357668b860fc5055e0630ef75a3ad20 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Sat, 17 Oct 2009 18:01:22 -0700
Subject: Committing the second part of Jim Greensky @ Intel Lab's patch,
re-prioritizing updates
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 21606e2..0f642b9 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -620,6 +620,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public virtual void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
+ {
+ }
+
public void FlushPrimUpdates()
{
}
--
cgit v1.1
From 0d29614ca129a044f6fad01f5600c52a922b702c Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 19 Oct 2009 08:58:03 +0900
Subject: Formatting cleanup.
---
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index ed30827..be28c27 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -46,14 +46,14 @@ namespace OpenSim.Tests.Common.Mock
m_scene = scene;
}
- public List ParcelsNearPoint(Vector3 position)
- {
- return new List();
+ public List ParcelsNearPoint(Vector3 position)
+ {
+ return new List();
}
- public List AllParcels()
- {
- return new List();
+ public List AllParcels()
+ {
+ return new List();
}
protected ILandObject GetNoLand()
@@ -63,18 +63,18 @@ namespace OpenSim.Tests.Common.Mock
return obj;
}
- public ILandObject GetLandObject(int x, int y)
- {
+ public ILandObject GetLandObject(int x, int y)
+ {
return GetNoLand();
}
- public ILandObject GetLandObject(int localID)
- {
+ public ILandObject GetLandObject(int localID)
+ {
return GetNoLand();
}
- public ILandObject GetLandObject(float x, float y)
- {
+ public ILandObject GetLandObject(float x, float y)
+ {
return GetNoLand();
}
--
cgit v1.1
From c72f78215bb3435ee2bbb507746c23eccec4dd34 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 4 Nov 2009 01:56:19 +0000
Subject: Backport the fixes to WebFetchInventoryDescendents to the UDP
InventoryDescendents packet. Testing has shown that UDP inventory now works
flawlessly and, unlike CAPS inventory, doesn't download the entire agent
inventory on start. Neither does it incessantly re-request folder NULL_KEY.
Therefore, I have disabled CAPS inventory.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 0f642b9..9ec9311 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -631,6 +631,7 @@ namespace OpenSim.Tests.Common.Mock
public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
List items,
List folders,
+ int version,
bool fetchFolders,
bool fetchItems)
{
--
cgit v1.1
From 83b4b4440b7becb405840bc69d665e260fdecea0 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 5 Nov 2009 02:09:07 +0000
Subject: Patch by revolution, thank you. Mantis #1789 . Implement friends
permissions. Applied with major changes. Core functionality commented pending
review for possible rights escalation. No user functionality yet.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 9ec9311..27025d9 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -191,6 +191,7 @@ namespace OpenSim.Tests.Common.Mock
public event FriendActionDelegate OnApproveFriendRequest;
public event FriendActionDelegate OnDenyFriendRequest;
public event FriendshipTermination OnTerminateFriendship;
+ public event GrantUserFriendRights OnGrantUserRights;
public event EconomyDataRequest OnEconomyDataRequest;
public event MoneyBalanceRequest OnMoneyBalanceRequest;
--
cgit v1.1
From 00102e73a657e8a30b323ef68e7cba073c369197 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 11 Nov 2009 18:46:04 +0000
Subject: Add basic new uuid gatherer tests to check behaviour when the gather
seed is a missing asset
---
OpenSim/Tests/Common/Mock/TestAssetService.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index 317ec06..ff75d86 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -39,9 +39,14 @@ namespace OpenSim.Tests.Common.Mock
{
private readonly Dictionary Assets = new Dictionary();
- public TestAssetService(IConfigSource config)
- {
- }
+ public TestAssetService() {}
+
+ ///
+ /// This constructor is required if the asset service is being created reflectively (which is the case in some
+ /// tests).
+ ///
+ ///
+ public TestAssetService(IConfigSource config) {}
public AssetBase Get(string id)
{
--
cgit v1.1
From bb92ba97c6952c60f5bdd50b1c6599894bfef501 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 12 Nov 2009 18:26:22 +0000
Subject: Stop iar save failing on corrupt assets Not ideal since one will
still have to watch out for big 'corrupt asset' messages in the log, but
better than an outright fail
---
OpenSim/Tests/Common/Mock/TestAssetService.cs | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
index ff75d86..a537b97 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs
@@ -27,6 +27,8 @@
using System;
using System.Collections.Generic;
+using System.Reflection;
+using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
@@ -37,6 +39,8 @@ namespace OpenSim.Tests.Common.Mock
{
public class TestAssetService : IAssetService
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private readonly Dictionary Assets = new Dictionary();
public TestAssetService() {}
@@ -50,6 +54,8 @@ namespace OpenSim.Tests.Common.Mock
public AssetBase Get(string id)
{
+ m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
+
AssetBase asset;
if (Assets.ContainsKey(id))
asset = Assets[id];
@@ -78,6 +84,8 @@ namespace OpenSim.Tests.Common.Mock
public string Store(AssetBase asset)
{
+ m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID);
+
Assets[asset.ID] = asset;
return asset.ID;
--
cgit v1.1
From 2f092d271e80dbc7af47671fbb946de75b6110a9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 12 Nov 2009 18:44:03 +0000
Subject: Rename test services to mock services, since this is a more accurate
description remove duplicate mock inventory service
---
OpenSim/Tests/Common/Mock/MockAssetService.cs | 104 ++++++++++++
OpenSim/Tests/Common/Mock/MockInventoryService.cs | 190 ++++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestAssetService.cs | 104 ------------
OpenSim/Tests/Common/Mock/TestInventoryService.cs | 190 ----------------------
4 files changed, 294 insertions(+), 294 deletions(-)
create mode 100644 OpenSim/Tests/Common/Mock/MockAssetService.cs
create mode 100644 OpenSim/Tests/Common/Mock/MockInventoryService.cs
delete mode 100644 OpenSim/Tests/Common/Mock/TestAssetService.cs
delete mode 100644 OpenSim/Tests/Common/Mock/TestInventoryService.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockAssetService.cs b/OpenSim/Tests/Common/Mock/MockAssetService.cs
new file mode 100644
index 0000000..cb38043
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockAssetService.cs
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using log4net;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Data;
+using OpenSim.Services.Interfaces;
+using Nini.Config;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class MockAssetService : IAssetService
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ private readonly Dictionary Assets = new Dictionary();
+
+ public MockAssetService() {}
+
+ ///
+ /// This constructor is required if the asset service is being created reflectively (which is the case in some
+ /// tests).
+ ///
+ ///
+ public MockAssetService(IConfigSource config) {}
+
+ public AssetBase Get(string id)
+ {
+ m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
+
+ AssetBase asset;
+ if (Assets.ContainsKey(id))
+ asset = Assets[id];
+ else
+ asset = null;
+
+ return asset;
+ }
+
+ public AssetMetadata GetMetadata(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public byte[] GetData(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool Get(string id, object sender, AssetRetrieved handler)
+ {
+ handler(id, sender, Get(id));
+
+ return true;
+ }
+
+ public string Store(AssetBase asset)
+ {
+ m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID);
+
+ Assets[asset.ID] = asset;
+
+ return asset.ID;
+ }
+
+ public bool UpdateContent(string id, byte[] data)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public bool Delete(string id)
+ {
+ throw new System.NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/MockInventoryService.cs b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
new file mode 100644
index 0000000..1ea4bc1
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim.Framework;
+using OpenMetaverse;
+using OpenSim.Services.Interfaces;
+using Nini.Config;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class MockInventoryService : IInventoryService
+ {
+ public MockInventoryService()
+ {
+ }
+
+ public MockInventoryService(IConfigSource config)
+ {
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool CreateUserInventory(UUID userId)
+ {
+ return false;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public List GetInventorySkeleton(UUID userId)
+ {
+ List folders = new List();
+ InventoryFolderBase folder = new InventoryFolderBase();
+ folder.ID = UUID.Random();
+ folder.Owner = userId;
+ folders.Add(folder);
+ return folders;
+ }
+
+ public InventoryFolderBase GetRootFolder(UUID userID)
+ {
+ return new InventoryFolderBase();
+ }
+
+ public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
+ {
+ return null;
+ }
+
+ public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
+ {
+ return null;
+ }
+
+ ///
+ /// Returns a list of all the active gestures in a user's inventory.
+ ///
+ ///
+ /// The of the user
+ ///
+ ///
+ /// A flat list of the gesture items.
+ ///
+ public List GetActiveGestures(UUID userId)
+ {
+ return null;
+ }
+
+ public InventoryCollection GetUserInventory(UUID userID)
+ {
+ return null;
+ }
+
+ public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
+ {
+ }
+
+ public List GetFolderItems(UUID userID, UUID folderID)
+ {
+ return null;
+ }
+
+ public bool AddFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool UpdateFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool MoveFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool DeleteFolders(UUID ownerID, List ids)
+ {
+ return false;
+ }
+
+ public bool PurgeFolder(InventoryFolderBase folder)
+ {
+ return false;
+ }
+
+ public bool AddItem(InventoryItemBase item)
+ {
+ return false;
+ }
+
+ public bool UpdateItem(InventoryItemBase item)
+ {
+ return false;
+ }
+
+ public bool MoveItems(UUID ownerID, List items)
+ {
+ return false;
+ }
+
+ public bool DeleteItems(UUID ownerID, List itemIDs)
+ {
+ return false;
+ }
+
+ public InventoryItemBase GetItem(InventoryItemBase item)
+ {
+ return null;
+ }
+
+ public InventoryFolderBase GetFolder(InventoryFolderBase folder)
+ {
+ return null;
+ }
+
+ public bool HasInventoryForUser(UUID userID)
+ {
+ return false;
+ }
+
+ public InventoryFolderBase RequestRootFolder(UUID userID)
+ {
+ InventoryFolderBase root = new InventoryFolderBase();
+ root.ID = UUID.Random();
+ root.Owner = userID;
+ root.ParentID = UUID.Zero;
+ return root;
+ }
+
+ public int GetAssetPermissions(UUID userID, UUID assetID)
+ {
+ return 1;
+ }
+ }
+}
diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs
deleted file mode 100644
index a537b97..0000000
--- a/OpenSim/Tests/Common/Mock/TestAssetService.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using log4net;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Data;
-using OpenSim.Services.Interfaces;
-using Nini.Config;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestAssetService : IAssetService
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- private readonly Dictionary Assets = new Dictionary();
-
- public TestAssetService() {}
-
- ///
- /// This constructor is required if the asset service is being created reflectively (which is the case in some
- /// tests).
- ///
- ///
- public TestAssetService(IConfigSource config) {}
-
- public AssetBase Get(string id)
- {
- m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
-
- AssetBase asset;
- if (Assets.ContainsKey(id))
- asset = Assets[id];
- else
- asset = null;
-
- return asset;
- }
-
- public AssetMetadata GetMetadata(string id)
- {
- throw new System.NotImplementedException();
- }
-
- public byte[] GetData(string id)
- {
- throw new System.NotImplementedException();
- }
-
- public bool Get(string id, object sender, AssetRetrieved handler)
- {
- handler(id, sender, Get(id));
-
- return true;
- }
-
- public string Store(AssetBase asset)
- {
- m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID);
-
- Assets[asset.ID] = asset;
-
- return asset.ID;
- }
-
- public bool UpdateContent(string id, byte[] data)
- {
- throw new System.NotImplementedException();
- }
-
- public bool Delete(string id)
- {
- throw new System.NotImplementedException();
- }
- }
-}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs
deleted file mode 100644
index 5a0ee7c..0000000
--- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenSim.Framework;
-using OpenMetaverse;
-using OpenSim.Services.Interfaces;
-using Nini.Config;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestInventoryService : IInventoryService
- {
- public TestInventoryService()
- {
- }
-
- public TestInventoryService(IConfigSource config)
- {
- }
-
- ///
- ///
- ///
- ///
- ///
- public bool CreateUserInventory(UUID userId)
- {
- return false;
- }
-
- ///
- ///
- ///
- ///
- ///
- public List GetInventorySkeleton(UUID userId)
- {
- List folders = new List();
- InventoryFolderBase folder = new InventoryFolderBase();
- folder.ID = UUID.Random();
- folder.Owner = userId;
- folders.Add(folder);
- return folders;
- }
-
- public InventoryFolderBase GetRootFolder(UUID userID)
- {
- return new InventoryFolderBase();
- }
-
- public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
- {
- return null;
- }
-
- public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
- {
- return null;
- }
-
- ///
- /// Returns a list of all the active gestures in a user's inventory.
- ///
- ///
- /// The of the user
- ///
- ///
- /// A flat list of the gesture items.
- ///
- public List GetActiveGestures(UUID userId)
- {
- return null;
- }
-
- public InventoryCollection GetUserInventory(UUID userID)
- {
- return null;
- }
-
- public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
- {
- }
-
- public List GetFolderItems(UUID userID, UUID folderID)
- {
- return null;
- }
-
- public bool AddFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool UpdateFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool MoveFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool DeleteFolders(UUID ownerID, List ids)
- {
- return false;
- }
-
- public bool PurgeFolder(InventoryFolderBase folder)
- {
- return false;
- }
-
- public bool AddItem(InventoryItemBase item)
- {
- return false;
- }
-
- public bool UpdateItem(InventoryItemBase item)
- {
- return false;
- }
-
- public bool MoveItems(UUID ownerID, List items)
- {
- return false;
- }
-
- public bool DeleteItems(UUID ownerID, List itemIDs)
- {
- return false;
- }
-
- public InventoryItemBase GetItem(InventoryItemBase item)
- {
- return null;
- }
-
- public InventoryFolderBase GetFolder(InventoryFolderBase folder)
- {
- return null;
- }
-
- public bool HasInventoryForUser(UUID userID)
- {
- return false;
- }
-
- public InventoryFolderBase RequestRootFolder(UUID userID)
- {
- InventoryFolderBase root = new InventoryFolderBase();
- root.ID = UUID.Random();
- root.Owner = userID;
- root.ParentID = UUID.Zero;
- return root;
- }
-
- public int GetAssetPermissions(UUID userID, UUID assetID)
- {
- return 1;
- }
- }
-}
--
cgit v1.1
From d95df603dfc8e6a033649be669c6b54071ccb7d4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 12 Nov 2009 19:33:38 +0000
Subject: move fake user service to a separate mock user service class delete
asset cache tests shell
---
OpenSim/Tests/Common/Mock/MockUserService.cs | 123 +++++++++++++++++++++++++++
1 file changed, 123 insertions(+)
create mode 100644 OpenSim/Tests/Common/Mock/MockUserService.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserService.cs b/OpenSim/Tests/Common/Mock/MockUserService.cs
new file mode 100644
index 0000000..1e27fb7
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockUserService.cs
@@ -0,0 +1,123 @@
+
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Framework.Communications;
+using OpenSim.Framework.Communications.Cache;
+using OpenSim.Services.Interfaces;
+
+namespace OpenSim.Tests.Common
+{
+ public class MockUserService : IUserService
+ {
+ public void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserProfileData GetUserProfile(string firstName, string lastName)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserProfileData GetUserProfile(UUID userId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserProfileData GetUserProfile(Uri uri)
+ {
+ UserProfileData userProfile = new UserProfileData();
+
+// userProfile.ID = new UUID(Util.GetHashGuid(uri.ToString(), AssetCache.AssetInfo.Secret));
+
+ return userProfile;
+ }
+
+ public Uri GetUserUri(UserProfileData userProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserAgentData GetAgentByUUID(UUID userId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void ClearUserAgent(UUID avatarID)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List GenerateAgentPickerRequestResponse(UUID QueryID, string Query)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserProfileData SetupMasterUser(string firstName, string lastName)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
+ {
+ throw new NotImplementedException();
+ }
+
+ public UserProfileData SetupMasterUser(UUID userId)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool UpdateUserProfile(UserProfileData data)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void RemoveUserFriend(UUID friendlistowner, UUID friend)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List GetUserFriendList(UUID friendlistowner)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool VerifySession(UUID userID, UUID sessionID)
+ {
+ return true;
+ }
+
+ public void SetInventoryService(IInventoryService inv)
+ {
+ throw new NotImplementedException();
+ }
+
+ public virtual bool AuthenticateUserByPassword(UUID userID, string password)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
--
cgit v1.1
From b130b364032ea7cebd615dd6f60627fc69616662 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 16 Nov 2009 16:05:15 +0000
Subject: minor: add forgotton copyright header
---
OpenSim/Tests/Common/Mock/MockUserService.cs | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserService.cs b/OpenSim/Tests/Common/Mock/MockUserService.cs
index 1e27fb7..62c41c7 100644
--- a/OpenSim/Tests/Common/Mock/MockUserService.cs
+++ b/OpenSim/Tests/Common/Mock/MockUserService.cs
@@ -1,3 +1,29 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
using System;
using System.Collections.Generic;
--
cgit v1.1
From 9f5c2acd128828d220bf7e47bd4fe13d7a2a910b Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 23 Nov 2009 11:26:06 +0900
Subject: Formatting cleanup.
---
OpenSim/Tests/Common/Mock/MockUserService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserService.cs b/OpenSim/Tests/Common/Mock/MockUserService.cs
index 62c41c7..396ef25 100644
--- a/OpenSim/Tests/Common/Mock/MockUserService.cs
+++ b/OpenSim/Tests/Common/Mock/MockUserService.cs
@@ -34,7 +34,7 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Services.Interfaces;
namespace OpenSim.Tests.Common
-{
+{
public class MockUserService : IUserService
{
public void AddTemporaryUserProfile(UserProfileData userProfile)
--
cgit v1.1
From 3e4000b9d9c69a032af5ebf76cddb1726aea1994 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Nov 2009 19:56:06 +0000
Subject: Rename TestAssetDataPlugin to MockAssetDataPlugin
---
OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs | 64 ++++++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 64 ------------------------
2 files changed, 64 insertions(+), 64 deletions(-)
create mode 100644 OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
delete mode 100644 OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
new file mode 100644
index 0000000..cc1dfbf
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Data;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ ///
+ /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
+ /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
+ /// tests are single threaded.
+ ///
+ public class MockAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin
+ {
+ public string Version { get { return "0"; } }
+ public string Name { get { return "MockAssetDataPlugin"; } }
+
+ public void Initialise() {}
+ public void Initialise(string connect) {}
+ public void Dispose() {}
+
+ private readonly List assets = new List();
+
+ public AssetBase GetAsset(UUID uuid)
+ {
+ return assets.Find(x=>x.FullID == uuid);
+ }
+
+ public void StoreAsset(AssetBase asset)
+ {
+ assets.Add(asset);
+ }
+
+ public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
deleted file mode 100644
index 20ea18f..0000000
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Data;
-
-namespace OpenSim.Tests.Common.Mock
-{
- ///
- /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
- /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
- /// tests are single threaded.
- ///
- public class TestAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin
- {
- public string Version { get { return "0"; } }
- public string Name { get { return "TestAssetDataPlugin"; } }
-
- public void Initialise() {}
- public void Initialise(string connect) {}
- public void Dispose() {}
-
- private readonly List assets = new List();
-
- public AssetBase GetAsset(UUID uuid)
- {
- return assets.Find(x=>x.FullID == uuid);
- }
-
- public void StoreAsset(AssetBase asset)
- {
- assets.Add(asset);
- }
-
- public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
- }
-}
\ No newline at end of file
--
cgit v1.1
From 88b3b98811e70709536bb41410ec88509e0460a5 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 26 Dec 2009 04:12:51 +0000
Subject: Add AvatarInterestsReply
---
OpenSim/Tests/Common/Mock/TestClient.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 27025d9..6265ab7 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1159,6 +1159,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendRebakeAvatarTextures(UUID textureID)
{
}
-
+
+ public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
+ {
+ }
}
}
--
cgit v1.1
From 234d4e11059fb2e1fc9dbe879054bd84e95b502b Mon Sep 17 00:00:00 2001
From: Revolution
Date: Wed, 30 Dec 2009 21:45:10 -0600
Subject: Adds tons of packets.
Applied with change: Changed spelling to Summary (from Summery)
Signed-off-by: Melanie
---
OpenSim/Tests/Common/Mock/TestClient.cs | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 6265ab7..8da9209 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -287,6 +287,26 @@ namespace OpenSim.Tests.Common.Mock
public event AvatarInterestUpdate OnAvatarInterestUpdate;
public event PlacesQuery OnPlacesQuery;
+
+ public event FindAgentUpdate OnFindAgentEvent;
+ public event TrackAgentUpdate OnTrackAgentEvent;
+ public event NewUserReport OnUserReportEvent;
+ public event SaveStateHandler OnSaveStateEvent;
+ public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
+ public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
+ public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
+ public event FreezeUserUpdate OnParcelFreezeUserEvent;
+ public event EjectUserUpdate OnParcelEjectUserEvent;
+ public event ParcelBuyPass OnParcelBuyPass;
+ public event ParcelGodMark OnParcelGodMark;
+ public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
+ public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
+ public event SimWideDeletesDelegate OnSimWideDeletes;
+ public event SendPostcard OnSendPostcard;
+ public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
+ public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
+ public event GodlikeMessage onGodlikeMessageEvent;
+ public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
#pragma warning restore 67
@@ -1163,5 +1183,17 @@ namespace OpenSim.Tests.Common.Mock
public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
{
}
+
+ public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
+ {
+ }
+
+ public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
+ {
+ }
+
+ public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
+ {
+ }
}
}
--
cgit v1.1
From 70d5b1c34cf2eb6621f383169fdee03966850762 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 4 Jan 2010 06:10:45 +0900
Subject: Formatting cleanup. Add copyright headers.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 36 ++++++++++++++++-----------------
1 file changed, 18 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 8da9209..1a22bdc 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -289,24 +289,24 @@ namespace OpenSim.Tests.Common.Mock
public event PlacesQuery OnPlacesQuery;
public event FindAgentUpdate OnFindAgentEvent;
- public event TrackAgentUpdate OnTrackAgentEvent;
- public event NewUserReport OnUserReportEvent;
- public event SaveStateHandler OnSaveStateEvent;
- public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
- public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
- public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
- public event FreezeUserUpdate OnParcelFreezeUserEvent;
- public event EjectUserUpdate OnParcelEjectUserEvent;
- public event ParcelBuyPass OnParcelBuyPass;
- public event ParcelGodMark OnParcelGodMark;
- public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
- public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
- public event SimWideDeletesDelegate OnSimWideDeletes;
- public event SendPostcard OnSendPostcard;
- public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
- public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
- public event GodlikeMessage onGodlikeMessageEvent;
- public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
+ public event TrackAgentUpdate OnTrackAgentEvent;
+ public event NewUserReport OnUserReportEvent;
+ public event SaveStateHandler OnSaveStateEvent;
+ public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
+ public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
+ public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
+ public event FreezeUserUpdate OnParcelFreezeUserEvent;
+ public event EjectUserUpdate OnParcelEjectUserEvent;
+ public event ParcelBuyPass OnParcelBuyPass;
+ public event ParcelGodMark OnParcelGodMark;
+ public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
+ public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
+ public event SimWideDeletesDelegate OnSimWideDeletes;
+ public event SendPostcard OnSendPostcard;
+ public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
+ public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
+ public event GodlikeMessage onGodlikeMessageEvent;
+ public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
#pragma warning restore 67
--
cgit v1.1
From b67470af9106da24ed67db75cfe4787e58759385 Mon Sep 17 00:00:00 2001
From: Revolution
Date: Wed, 6 Jan 2010 19:52:10 -0600
Subject: Fixes the newly added packets as per Melanie's request.
Provisionally applied to fix the naming. Signatures are still subject to change.
Signed-off-by: Melanie
---
OpenSim/Tests/Common/Mock/TestClient.cs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 1a22bdc..b78433f 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -288,25 +288,25 @@ namespace OpenSim.Tests.Common.Mock
public event PlacesQuery OnPlacesQuery;
- public event FindAgentUpdate OnFindAgentEvent;
- public event TrackAgentUpdate OnTrackAgentEvent;
- public event NewUserReport OnUserReportEvent;
- public event SaveStateHandler OnSaveStateEvent;
+ public event FindAgentUpdate OnFindAgent;
+ public event TrackAgentUpdate OnTrackAgent;
+ public event NewUserReport OnUserReport;
+ public event SaveStateHandler OnSaveState;
public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
- public event FreezeUserUpdate OnParcelFreezeUserEvent;
- public event EjectUserUpdate OnParcelEjectUserEvent;
+ public event FreezeUserUpdate OnParcelFreezeUser;
+ public event EjectUserUpdate OnParcelEjectUser;
public event ParcelBuyPass OnParcelBuyPass;
public event ParcelGodMark OnParcelGodMark;
public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
public event SimWideDeletesDelegate OnSimWideDeletes;
public event SendPostcard OnSendPostcard;
- public event MuteListEntryUpdate OnUpdateMuteListEntryEvent;
- public event MuteListEntryRemove OnRemoveMuteListEntryEvent;
- public event GodlikeMessage onGodlikeMessageEvent;
- public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent;
+ public event MuteListEntryUpdate OnUpdateMuteListEntry;
+ public event MuteListEntryRemove OnRemoveMuteListEntry;
+ public event GodlikeMessage onGodlikeMessage;
+ public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
#pragma warning restore 67
--
cgit v1.1
From c76c80a28aabeb1cb0556ea2ebd89f6241bb7026 Mon Sep 17 00:00:00 2001
From: Revolution
Date: Fri, 8 Jan 2010 12:44:26 -0600
Subject: Adds IClientAPI voids for GroupProposals.
Signed-off-by: Melanie
---
OpenSim/Tests/Common/Mock/TestClient.cs | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b78433f..93cab0e 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1194,6 +1194,14 @@ namespace OpenSim.Tests.Common.Mock
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
{
+ }
+
+ public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
+ {
+ }
+
+ public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
+ {
}
}
}
--
cgit v1.1
From 063f106cbbc2a805dc210fe16c30741ab24876cb Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 9 Jan 2010 14:17:44 +0000
Subject: Add functionality to estate "Allowed Users" and "Allowed Groups".
Allowed users will be honored now, while allowed groups will not. This
requires additional groups module integration work
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 93cab0e..8b79502 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -924,7 +924,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
+ public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
{
}
--
cgit v1.1
From 0c2946031bccf75c28968b6adcde5cce5bc45c13 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 10 Jan 2010 19:42:36 -0800
Subject: CommunicationsManager is practically empty. Only NetworkServersInfo
is there.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 2 --
1 file changed, 2 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index 013462e..fccc282 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -62,8 +62,6 @@ namespace OpenSim.Tests.Common.Mock
lus.AddPlugin(new TemporaryUserProfilePlugin());
m_userDataPlugin = new TestUserDataPlugin();
lus.AddPlugin(m_userDataPlugin);
- m_userService = lus;
- m_userAdminService = lus;
}
}
--
cgit v1.1
From cddd48aeeaee98d14fd4ae887cdf32abc6110c40 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 10 Jan 2010 21:00:03 -0800
Subject: Some more unnecessary things deleted in Framework.Communications.
---
OpenSim/Tests/Common/Mock/MockUserService.cs | 149 ---------------------
.../Tests/Common/Mock/TestCommunicationsManager.cs | 5 -
2 files changed, 154 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/MockUserService.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserService.cs b/OpenSim/Tests/Common/Mock/MockUserService.cs
deleted file mode 100644
index 396ef25..0000000
--- a/OpenSim/Tests/Common/Mock/MockUserService.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Services.Interfaces;
-
-namespace OpenSim.Tests.Common
-{
- public class MockUserService : IUserService
- {
- public void AddTemporaryUserProfile(UserProfileData userProfile)
- {
- throw new NotImplementedException();
- }
-
- public UserProfileData GetUserProfile(string firstName, string lastName)
- {
- throw new NotImplementedException();
- }
-
- public UserProfileData GetUserProfile(UUID userId)
- {
- throw new NotImplementedException();
- }
-
- public UserProfileData GetUserProfile(Uri uri)
- {
- UserProfileData userProfile = new UserProfileData();
-
-// userProfile.ID = new UUID(Util.GetHashGuid(uri.ToString(), AssetCache.AssetInfo.Secret));
-
- return userProfile;
- }
-
- public Uri GetUserUri(UserProfileData userProfile)
- {
- throw new NotImplementedException();
- }
-
- public UserAgentData GetAgentByUUID(UUID userId)
- {
- throw new NotImplementedException();
- }
-
- public void ClearUserAgent(UUID avatarID)
- {
- throw new NotImplementedException();
- }
-
- public List GenerateAgentPickerRequestResponse(UUID QueryID, string Query)
- {
- throw new NotImplementedException();
- }
-
- public UserProfileData SetupMasterUser(string firstName, string lastName)
- {
- throw new NotImplementedException();
- }
-
- public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
- {
- throw new NotImplementedException();
- }
-
- public UserProfileData SetupMasterUser(UUID userId)
- {
- throw new NotImplementedException();
- }
-
- public bool UpdateUserProfile(UserProfileData data)
- {
- throw new NotImplementedException();
- }
-
- public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
- {
- throw new NotImplementedException();
- }
-
- public void RemoveUserFriend(UUID friendlistowner, UUID friend)
- {
- throw new NotImplementedException();
- }
-
- public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
- {
- throw new NotImplementedException();
- }
-
- public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat)
- {
- throw new NotImplementedException();
- }
-
- public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
- {
- throw new NotImplementedException();
- }
-
- public List GetUserFriendList(UUID friendlistowner)
- {
- throw new NotImplementedException();
- }
-
- public bool VerifySession(UUID userID, UUID sessionID)
- {
- return true;
- }
-
- public void SetInventoryService(IInventoryService inv)
- {
- throw new NotImplementedException();
- }
-
- public virtual bool AuthenticateUserByPassword(UUID userID, string password)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index fccc282..d4cdcd6 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -58,11 +58,6 @@ namespace OpenSim.Tests.Common.Mock
: base(serversInfo, null)
{
- LocalUserServices lus = new LocalUserServices(991, 992, this);
- lus.AddPlugin(new TemporaryUserProfilePlugin());
- m_userDataPlugin = new TestUserDataPlugin();
- lus.AddPlugin(m_userDataPlugin);
-
}
}
}
--
cgit v1.1
From 751e70af788bf27fa0401c25d899f73186c8eafa Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 10 Jan 2010 21:37:36 -0800
Subject: NetworkServersInfo removed from CommsManager.
---
OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index d4cdcd6..8e193c1 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -30,7 +30,6 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
-using OpenSim.Region.Communications.Local;
using OpenSim.Data;
namespace OpenSim.Tests.Common.Mock
--
cgit v1.1
From 001d3695683d9511446d194feeb763c437170028 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 11 Jan 2010 07:45:47 -0800
Subject: CommunicationsManager deleted.
---
.../Tests/Common/Mock/TestCommunicationsManager.cs | 62 ----------------------
OpenSim/Tests/Common/Mock/TestScene.cs | 4 +-
2 files changed, 2 insertions(+), 64 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
deleted file mode 100644
index 8e193c1..0000000
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Framework.Servers;
-using OpenSim.Framework.Servers.HttpServer;
-using OpenSim.Data;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class TestCommunicationsManager : CommunicationsManager
- {
- public IUserDataPlugin UserDataPlugin
- {
- get { return m_userDataPlugin; }
- }
- private IUserDataPlugin m_userDataPlugin;
-
- // public IInventoryDataPlugin InventoryDataPlugin
- // {
- // get { return m_inventoryDataPlugin; }
- // }
- // private IInventoryDataPlugin m_inventoryDataPlugin;
-
- public TestCommunicationsManager()
- : this(null)
- {
- }
-
- public TestCommunicationsManager(NetworkServersInfo serversInfo)
- : base(serversInfo, null)
- {
-
- }
- }
-}
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 22cfa2c..bf3825b 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -40,10 +40,10 @@ namespace OpenSim.Tests.Common.Mock
{
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
- CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager,
+ SceneCommunicationService sceneGridService, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
- : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader,
+ : base(regInfo, authen, sceneGridService, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
}
--
cgit v1.1
From c5ea783526611a968400a1936e4c6764ee1c7013 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 11 Jan 2010 07:51:33 -0800
Subject: OpenSim/Framework/Communications/Cache deleted. LibraryRootFolder
deleted.
---
OpenSim/Tests/Common/Mock/TestScene.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index bf3825b..85031f7 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -29,7 +29,7 @@ using System;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
+
using OpenSim.Framework.Servers;
using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Scenes;
--
cgit v1.1
From 04e29c1bacbc1e2df980ae15896a847ce7535da2 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 16 Jan 2010 21:42:44 -0800
Subject: Beginning of rewriting HG. Compiles, and runs, but HG functions not
restored yet.
---
OpenSim/Tests/Common/Mock/TestScene.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 85031f7..076cb7a 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Tests.Common.Mock
///
///
///
- public override bool AuthenticateUser(AgentCircuitData agent, out string reason)
+ public override bool VerifyUserPresence(AgentCircuitData agent, out string reason)
{
reason = String.Empty;
return true;
--
cgit v1.1
From 027ad495677ddaa3b05b268d167faa514954085e Mon Sep 17 00:00:00 2001
From: Teravus Ovares (Dan Olivares)
Date: Tue, 26 Jan 2010 12:23:06 -0500
Subject: * Fix Endlines in Mock/TestClient.cs
---
OpenSim/Tests/Common/Mock/TestClient.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 8b79502..b5eaf43 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1194,14 +1194,14 @@ namespace OpenSim.Tests.Common.Mock
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
{
- }
-
- public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
- {
- }
-
- public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
- {
+ }
+
+ public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
+ {
+ }
+
+ public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
+ {
}
}
}
--
cgit v1.1
From 5001f61c08fea2ebfcb2590be69073d04d129d70 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 29 Jan 2010 18:59:41 -0800
Subject: * HGGridConnector is no longer necessary. * Handle logout properly.
This needed an addition to IClientAPI, because of how the logout packet is
currently being handled -- the agent is being removed from the scene before
the different event handlers are executed, which is broken.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 8b79502..0e32950 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -365,7 +365,11 @@ namespace OpenSim.Tests.Common.Mock
get { return true; }
set { }
}
-
+ public bool IsLoggingOut
+ {
+ get { return false; }
+ set { }
+ }
public UUID ActiveGroupId
{
get { return UUID.Zero; }
@@ -1194,14 +1198,14 @@ namespace OpenSim.Tests.Common.Mock
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
{
- }
-
- public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
- {
- }
-
- public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
- {
+ }
+
+ public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
+ {
+ }
+
+ public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
+ {
}
}
}
--
cgit v1.1
From 9821c4f566e11c75c8d87721777480c5b2e2bd4e Mon Sep 17 00:00:00 2001
From: Revolution
Date: Sun, 14 Feb 2010 15:41:57 -0600
Subject: Revolution is on the roll again! :)
Fixes: Undo, T-pose of others on login, modifiedBulletX works again, feet now stand on the ground instead of in the ground, adds checks to CombatModule. Adds: Redo, Land Undo, checks to agentUpdate (so one can not fall off of a region), more vehicle parts. Finishes almost all of LSL (1 function left, 2 events).
Direct flames and kudos to Revolution, please
Signed-off-by: Melanie
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b5eaf43..7dab6a1 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -206,6 +206,8 @@ namespace OpenSim.Tests.Common.Mock
public event ObjectBuy OnObjectBuy;
public event BuyObjectInventory OnBuyObjectInventory;
public event AgentSit OnUndo;
+ public event AgentSit OnRedo;
+ public event LandUndo OnLandUndo;
public event ForceReleaseControls OnForceReleaseControls;
--
cgit v1.1
From bb171717ceaef37b022a135209c2e0bf031d21f9 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 21 Feb 2010 15:38:52 -0800
Subject: Deleted obsolete files in the Data layer. Compiles.
---
OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs | 216 ------------------------
1 file changed, 216 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
deleted file mode 100644
index 5188cf6..0000000
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Data;
-
-namespace OpenSim.Tests.Common.Mock
-{
- ///
- /// In memory user data provider. Might be quite useful as a proper user data plugin, though getting mono addins
- /// to load any plugins when running unit tests has proven impossible so far. Currently no locking since unit
- /// tests are single threaded.
- ///
- public class TestUserDataPlugin : IUserDataPlugin
- {
- public string Version { get { return "0"; } }
- public string Name { get { return "TestUserDataPlugin"; } }
-
- ///
- /// User profiles keyed by name
- ///
- private Dictionary m_userProfilesByName = new Dictionary();
-
- ///
- /// User profiles keyed by uuid
- ///
- private Dictionary m_userProfilesByUuid = new Dictionary();
-
- ///
- /// User profiles and their agents
- ///
- private Dictionary m_agentByProfileUuid = new Dictionary();
-
- ///
- /// Friends list by uuid
- ///
- private Dictionary> m_friendsListByUuid = new Dictionary>();
-
- public void Initialise() {}
- public void Dispose() {}
-
- public void AddTemporaryUserProfile(UserProfileData userProfile)
- {
- // Not interested
- }
-
- public void AddNewUserProfile(UserProfileData user)
- {
- UpdateUserProfile(user);
- }
-
- public UserProfileData GetUserByUUID(UUID user)
- {
- UserProfileData userProfile = null;
- m_userProfilesByUuid.TryGetValue(user, out userProfile);
-
- return userProfile;
- }
-
- public UserProfileData GetUserByName(string fname, string lname)
- {
- UserProfileData userProfile = null;
- m_userProfilesByName.TryGetValue(fname + " " + lname, out userProfile);
-
- return userProfile;
- }
-
- public UserProfileData GetUserByUri(Uri uri) { return null; }
-
- public bool UpdateUserProfile(UserProfileData user)
- {
- m_userProfilesByUuid[user.ID] = user;
- m_userProfilesByName[user.FirstName + " " + user.SurName] = user;
-
- return true;
- }
-
- public List GeneratePickerResults(UUID queryID, string query) { return null; }
-
- public UserAgentData GetAgentByUUID(UUID user)
- {
- UserAgentData userAgent = null;
- m_agentByProfileUuid.TryGetValue(user, out userAgent);
-
- return userAgent;
- }
-
- public UserAgentData GetAgentByName(string name)
- {
- UserProfileData userProfile = null;
- m_userProfilesByName.TryGetValue(name, out userProfile);
- UserAgentData userAgent = null;
- m_agentByProfileUuid.TryGetValue(userProfile.ID, out userAgent);
-
- return userAgent;
- }
-
- public UserAgentData GetAgentByName(string fname, string lname)
- {
- UserProfileData userProfile = GetUserByName(fname,lname);
- UserAgentData userAgent = null;
- m_agentByProfileUuid.TryGetValue(userProfile.ID, out userAgent);
-
- return userAgent;
- }
-
- public void StoreWebLoginKey(UUID agentID, UUID webLoginKey) {}
-
- public void AddNewUserAgent(UserAgentData agent)
- {
- m_agentByProfileUuid[agent.ProfileID] = agent;
- }
- public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
- {
- FriendListItem newfriend = new FriendListItem();
- newfriend.FriendPerms = perms;
- newfriend.Friend = friend;
- newfriend.FriendListOwner = friendlistowner;
-
- if (!m_friendsListByUuid.ContainsKey(friendlistowner))
- {
- List friendslist = new List();
- m_friendsListByUuid[friendlistowner] = friendslist;
-
- }
- m_friendsListByUuid[friendlistowner].Add(newfriend);
- }
-
- public void RemoveUserFriend(UUID friendlistowner, UUID friend)
- {
- if (m_friendsListByUuid.ContainsKey(friendlistowner))
- {
- List friendslist = m_friendsListByUuid[friendlistowner];
- foreach (FriendListItem frienditem in friendslist)
- {
- if (frienditem.Friend == friend)
- {
- friendslist.Remove(frienditem);
- break;
- }
- }
- }
- }
-
- public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
- {
- if (m_friendsListByUuid.ContainsKey(friendlistowner))
- {
- List friendslist = m_friendsListByUuid[friendlistowner];
- foreach (FriendListItem frienditem in friendslist)
- {
- if (frienditem.Friend == friend)
- {
- frienditem.FriendPerms = perms;
- break;
- }
- }
- }
- }
-
- public List GetUserFriendList(UUID friendlistowner)
- {
- if (m_friendsListByUuid.ContainsKey(friendlistowner))
- {
- return m_friendsListByUuid[friendlistowner];
- }
- else
- return new List();
-
-
- }
-
- public Dictionary GetFriendRegionInfos(List uuids) { return null; }
-
- public bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; }
-
- public bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return false; }
-
- public void Initialise(string connect) { return; }
-
- public AvatarAppearance GetUserAppearance(UUID user) { return null; }
-
- public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {}
-
- public void ResetAttachments(UUID userID) {}
-
- public void LogoutUsers(UUID regionID) {}
- }
-}
--
cgit v1.1
From 5c5966545d14de43500b95109e8ce81058ebe2c3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 28 Feb 2010 12:07:38 -0800
Subject: Initial Online friends notification seems to be working reliably now.
All this needs more testing, but everything is there.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 873b3ac..803b352 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Tests.Common.Mock
public event DeRezObject OnDeRezObject;
public event Action OnRegionHandShakeReply;
public event GenericCall2 OnRequestWearables;
- public event GenericCall2 OnCompleteMovementToRegion;
+ public event GenericCall1 OnCompleteMovementToRegion;
public event UpdateAgent OnAgentUpdate;
public event AgentRequestSit OnAgentRequestSit;
public event AgentSit OnAgentSit;
@@ -453,7 +453,7 @@ namespace OpenSim.Tests.Common.Mock
public void CompleteMovement()
{
- OnCompleteMovementToRegion();
+ OnCompleteMovementToRegion(this);
}
public virtual void ActivateGesture(UUID assetId, UUID gestureId)
@@ -752,7 +752,7 @@ namespace OpenSim.Tests.Common.Mock
if (OnCompleteMovementToRegion != null)
{
- OnCompleteMovementToRegion();
+ OnCompleteMovementToRegion(this);
}
}
public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
--
cgit v1.1
From 44e7224b86dbcd369ce2569328e3b00fc3b209ab Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 28 Feb 2010 22:47:31 +0000
Subject: Add missing ChangeUserRights packet sender
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 803b352..c424183 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1209,5 +1209,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
{
}
+
+ public void SendChangeUserRights(UUID friendID, int rights)
+ {
+ }
}
}
--
cgit v1.1
From 86c621fdc77fadb898cf53578e83746cd8f8711b Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 28 Feb 2010 22:56:31 +0000
Subject: Change the signature of SendChangeUserRights, because we have to send
this to both parties
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index c424183..6403c1b 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1210,7 +1210,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void SendChangeUserRights(UUID friendID, int rights)
+ public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
}
--
cgit v1.1
From 2dcf73dd93f2bc8993c2f534ef5ee8c72e24d0f3 Mon Sep 17 00:00:00 2001
From: unknown
Date: Sat, 6 Mar 2010 14:13:12 -0600
Subject: - supporting llTextBox
Signed-off-by: Melanie
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 6403c1b..7b46e95 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1213,5 +1213,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
--
cgit v1.1
From 98f91a252cade093894511110157d7fcd7e4487e Mon Sep 17 00:00:00 2001
From: unknown
Date: Mon, 8 Mar 2010 01:19:45 -0600
Subject: - parcel blocking, region crossing blocking, teleport blocking
Signed-off-by: Melanie
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 7b46e95..5fff279 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -96,6 +96,7 @@ namespace OpenSim.Tests.Common.Mock
public event Action OnRegionHandShakeReply;
public event GenericCall2 OnRequestWearables;
public event GenericCall1 OnCompleteMovementToRegion;
+ public event UpdateAgent OnPreAgentUpdate;
public event UpdateAgent OnAgentUpdate;
public event AgentRequestSit OnAgentRequestSit;
public event AgentSit OnAgentSit;
--
cgit v1.1
From f2de50bb14bd8215ea98c79c79aabe1e6b4f2780 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 12 Mar 2010 19:31:14 +0000
Subject: Fix tests broken in 88771aeed3d45e60a18aa9a810eeb37b8e5def12 Adds
MockUserAccountService and connects it up Stops services being carried over
between tests since this leads to hard to find bugs Improves information and
error reporting when loading plugins
---
.../Tests/Common/Mock/MockUserAccountService.cs | 45 ++++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestScene.cs | 4 +-
2 files changed, 47 insertions(+), 2 deletions(-)
create mode 100644 OpenSim/Tests/Common/Mock/MockUserAccountService.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserAccountService.cs b/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
new file mode 100644
index 0000000..f5d758a
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System.Collections.Generic;
+using Nini.Config;
+using OpenMetaverse;
+using OpenSim.Services.Interfaces;
+
+namespace OpenSim.Tests.Common.Mock
+{
+ public class MockUserAccountService : IUserAccountService
+ {
+ public MockUserAccountService(IConfigSource config) {}
+
+ public UserAccount GetUserAccount(UUID scopeID, UUID userID) { return new UserAccount(); }
+ public UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName) { return new UserAccount(); }
+ public UserAccount GetUserAccount(UUID scopeID, string Email) { return new UserAccount(); }
+ public List GetUserAccounts(UUID scopeID, string query) { return new List(); }
+ public bool StoreUserAccount(UserAccount data) { return true; }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 076cb7a..01f2c14 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -65,6 +65,6 @@ namespace OpenSim.Tests.Common.Mock
public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
{
get { return m_asyncSceneObjectDeleter; }
- }
+ }
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From aad17e751383069b799c6a78a3ac4e0ca1020a4d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 12 Mar 2010 20:29:17 +0000
Subject: Simplify database setup and remove migration problems by moving all
sqlite config-include settings to a separate file for standalone Update
information in StandaloneCommon.ini.example to reflect this Remove
ISharedRegionModule interfaces from all SimianGrid connector classes
temporarily since this stopped standalone from working (due to absence of
AssetURI settings, etc.). Solution here may be to create separate region
module connectors as done by local/grid/hypergrid so that loading can be
controlled via include files Or otherwise work out how to stop these modules
from being loaded for all OpenSim invocations
---
OpenSim/Tests/Common/Mock/MockUserAccountService.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserAccountService.cs b/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
index f5d758a..0769c7a 100644
--- a/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
+++ b/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
@@ -34,6 +34,7 @@ namespace OpenSim.Tests.Common.Mock
{
public class MockUserAccountService : IUserAccountService
{
+
public MockUserAccountService(IConfigSource config) {}
public UserAccount GetUserAccount(UUID scopeID, UUID userID) { return new UserAccount(); }
--
cgit v1.1
From ec637e2b8c089efc16bbb9faae0a1e3cf939db41 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 31 Mar 2010 04:20:20 +0100
Subject: Committing the LightShare code, which was developed by TomMeta of
Meta7. This allows scripts to set WindLight parameters for clients connecting
to a region. Currently, this is only supported by the Meta7 viewer.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 5fff279..f015db2 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -518,7 +518,7 @@ namespace OpenSim.Tests.Common.Mock
}
- public void SendGenericMessage(string method, List message)
+ public void SendGenericMessage(string method, List message)
{
}
--
cgit v1.1
From 3f6c4c150e3910e79ee3dc94f9304c16265512c0 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Thu, 8 Apr 2010 12:31:44 -0700
Subject: * Adds IAssetService.GetCached() to allow asset fetching from the
local cache only * Adds GetTextureModule that implements the "GetTexture"
capability, aka HTTP texture fetching. This is a significantly optimized path
that does not require any server-side JPEG2000 decoding, texture priority
queue, or UDP file transfer * Sanity check for null reference in
LLClientView.RefreshGroupMembership()
---
OpenSim/Tests/Common/Mock/MockAssetService.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockAssetService.cs b/OpenSim/Tests/Common/Mock/MockAssetService.cs
index cb38043..4118308 100644
--- a/OpenSim/Tests/Common/Mock/MockAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/MockAssetService.cs
@@ -65,6 +65,11 @@ namespace OpenSim.Tests.Common.Mock
return asset;
}
+ public AssetBase GetCached(string id)
+ {
+ return Get(id);
+ }
+
public AssetMetadata GetMetadata(string id)
{
throw new System.NotImplementedException();
--
cgit v1.1
From 3d0860ae616749518a40c6f6088d2644d589daf9 Mon Sep 17 00:00:00 2001
From: dahlia
Date: Mon, 12 Apr 2010 17:10:51 -0700
Subject: thanks lkalif for Mantis #4676 - a patch that adds support for
inventory links
Signed-off-by: dahlia
---
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f015db2..b07a072 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -141,6 +141,7 @@ namespace OpenSim.Tests.Common.Mock
public event Action OnRemoveAvatar;
public event CreateNewInventoryItem OnCreateNewInventoryItem;
+ public event LinkInventoryItem OnLinkInventoryItem;
public event CreateInventoryFolder OnCreateNewInventoryFolder;
public event UpdateInventoryFolder OnUpdateInventoryFolder;
public event MoveInventoryFolder OnMoveInventoryFolder;
--
cgit v1.1
From 60357d3778c95a47481f790803b7af39c70cde9c Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 9 May 2010 17:56:52 +0100
Subject: Implement the "delete" path for assets. Adds a new option to allow
remote asset deletion in robust handler.
---
OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
index cc1dfbf..4a15cf2 100644
--- a/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs
@@ -60,5 +60,10 @@ namespace OpenSim.Tests.Common.Mock
}
public List FetchAssetMetadataSet(int start, int count) { return new List(count); }
+
+ public bool Delete(string id)
+ {
+ return false;
+ }
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From bf5c81d77e492cd6df5517ecab32cd64168b01c2 Mon Sep 17 00:00:00 2001
From: unknown
Date: Wed, 12 May 2010 15:59:48 -0700
Subject: * Initial commit of the slimupdates2 rewrite. This pass maintains the
original behavior of avatar update sending and has a simplified set of
IClientAPI methods for sending avatar/prim updates
---
OpenSim/Tests/Common/Mock/TestClient.cs | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b07a072..edb7642 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -621,14 +621,6 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendAvatarData(SendAvatarData data)
- {
- }
-
- public virtual void SendAvatarTerseUpdate(SendAvatarTerseData data)
- {
- }
-
public virtual void SendCoarseLocationUpdate(List users, List CoarseLocations)
{
}
@@ -641,15 +633,15 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendPrimitiveToClient(SendPrimitiveData data)
+ public void SendAvatarDataImmediate(ISceneEntity avatar)
{
}
- public virtual void SendPrimTerseUpdate(SendPrimitiveTerseData data)
+ public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
}
- public virtual void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
+ public void ReprioritizeUpdates(UpdatePriorityHandler handler)
{
}
--
cgit v1.1
From 4c740e1717f8071d48e34c584728fddcf05afdb2 Mon Sep 17 00:00:00 2001
From: OpenSim Master
Date: Thu, 29 Apr 2010 11:57:30 -0700
Subject: Implements three new OSSL functions for parcel management:
osParcelJoin joins parcels in an area, osParcelSubdivide splits parcels in an
area, osParcelSetDetails sets parcel name, description, owner and group
owner. Join and Subdivide methods in LandChannel are exposed.
---
OpenSim/Tests/Common/Mock/TestLandChannel.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index be28c27..159764c 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -85,5 +85,9 @@ namespace OpenSim.Tests.Common.Mock
public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {}
public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {}
public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {}
+
+ public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
+ public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {}
+
}
}
--
cgit v1.1
From 93ef65c69055157e0b7d51e544abe5a1035f40f0 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Fri, 21 May 2010 13:55:36 -0700
Subject: * Moving all of the prioritization/reprioritization code into a new
file Prioritizer.cs * Simplified the interest management code to make it
easier to add new policies. Prioritization and reprioritization share code
paths now * Improved the distance and front back policies to always give your
avatar the highest priority
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index edb7642..6b0efe9 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -641,7 +641,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public void ReprioritizeUpdates(UpdatePriorityHandler handler)
+ public void ReprioritizeUpdates()
{
}
--
cgit v1.1
From 4e45718833f72b9149aed6d503e967b8916e5d08 Mon Sep 17 00:00:00 2001
From: Mikko Pallari
Date: Thu, 15 Apr 2010 08:23:51 +0300
Subject: Added overload of SendGenericMessage to LLClientView with string list
as parameter. Now modules themselfs don't necessarily need to convert strings
to byte arrays. Added this as it was removed in LightShare patch.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 6b0efe9..94d9d72 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -519,6 +519,11 @@ namespace OpenSim.Tests.Common.Mock
}
+ public void SendGenericMessage(string method, List message)
+ {
+
+ }
+
public void SendGenericMessage(string method, List message)
{
--
cgit v1.1
From df2bcf7b6b0f558078cab12e48904b8b61766c58 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Jun 2010 20:56:24 +0100
Subject: remove pointless mock user account service since the real one can now
be easily configured for test purposes
---
.../Tests/Common/Mock/MockUserAccountService.cs | 46 ----------------------
1 file changed, 46 deletions(-)
delete mode 100644 OpenSim/Tests/Common/Mock/MockUserAccountService.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockUserAccountService.cs b/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
deleted file mode 100644
index 0769c7a..0000000
--- a/OpenSim/Tests/Common/Mock/MockUserAccountService.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System.Collections.Generic;
-using Nini.Config;
-using OpenMetaverse;
-using OpenSim.Services.Interfaces;
-
-namespace OpenSim.Tests.Common.Mock
-{
- public class MockUserAccountService : IUserAccountService
- {
-
- public MockUserAccountService(IConfigSource config) {}
-
- public UserAccount GetUserAccount(UUID scopeID, UUID userID) { return new UserAccount(); }
- public UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName) { return new UserAccount(); }
- public UserAccount GetUserAccount(UUID scopeID, string Email) { return new UserAccount(); }
- public List GetUserAccounts(UUID scopeID, string query) { return new List(); }
- public bool StoreUserAccount(UserAccount data) { return true; }
- }
-}
\ No newline at end of file
--
cgit v1.1
From c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 12 Jun 2010 01:25:25 +0100
Subject: Move "StopFlying()" into LLSpace. Try to reinstate the carefully
crafted packet we used to send before slimupdates and explicitly send it
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 94d9d72..496cfb8 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1216,5 +1216,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
+
+ public void StopFlying(ISceneEntity presence)
+ {
+ }
}
}
--
cgit v1.1
From 71c8bbaf2c768167e377e86ae7137a86c0bb36d0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Jun 2010 17:37:28 +0100
Subject: Fix problem where iar load would duplicate huge number of folders
This was http://opensimulator.org/mantis/view.php?id=4770
Extend unit tests to check for this scenario too
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 0c7ebca..fecb73f 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Tests.Common.Mock
public List getInventoryInFolder(UUID folderID)
{
- m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0}", folderID);
+// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0}", folderID);
List items = new List();
@@ -101,7 +101,7 @@ namespace OpenSim.Tests.Common.Mock
public InventoryFolderBase getUserRootFolder(UUID user)
{
- m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
+// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
InventoryFolderBase folder = null;
m_rootFolders.TryGetValue(user, out folder);
@@ -141,8 +141,8 @@ namespace OpenSim.Tests.Common.Mock
if (folder.ParentID == UUID.Zero)
{
- m_log.DebugFormat(
- "[MOCK INV DB]: Adding root folder {0} {1} for {2}", folder.Name, folder.ID, folder.Owner);
+// m_log.DebugFormat(
+// "[MOCK INV DB]: Adding root folder {0} {1} for {2}", folder.Name, folder.ID, folder.Owner);
m_rootFolders[folder.Owner] = folder;
}
}
@@ -166,8 +166,8 @@ namespace OpenSim.Tests.Common.Mock
public void addInventoryItem(InventoryItemBase item)
{
- m_log.DebugFormat(
- "[MOCK INV DB]: Adding inventory item {0} {1} in {2}", item.Name, item.ID, item.Folder);
+// m_log.DebugFormat(
+// "[MOCK INV DB]: Adding inventory item {0} {1} in {2}", item.Name, item.ID, item.Folder);
m_items[item.ID] = item;
}
--
cgit v1.1
From e1ea82b329b9346ccacb1edd25a0e2b44f07e8c8 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 14 Jul 2010 19:51:12 +0100
Subject: Major attachments cleanup. Remove unused AttachObject ClientView
method Clean up use of AttachObject throughout, reduce number of overloads
and number of parameters
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ----
1 file changed, 4 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 496cfb8..999cf5e 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -630,10 +630,6 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
- {
- }
-
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{
}
--
cgit v1.1
From feba3164af384371ecb21b21edba1f7045e1939c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 13 Aug 2010 21:19:32 +0100
Subject: minor: remove mono compiler warning
---
OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index fecb73f..7c4f689 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common.Mock
///
public class TestInventoryDataPlugin : IInventoryDataPlugin
{
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
/// Inventory folders
--
cgit v1.1
From 77de28965ae5fc6de3c60a28ce7d4e59643a2a70 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 16 Aug 2010 11:33:59 -0700
Subject: Work on TeleportStart: renamed method from TeleportLocationStart to
TeleportStart, and now sending this upon all teleports, not just some, and in
the right place (EntityTransferModule).
---
OpenSim/Tests/Common/Mock/TestClient.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 999cf5e..0dee374 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -614,7 +614,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
- public virtual void SendTeleportLocationStart()
+ public virtual void SendTeleportStart(uint flags)
{
}
--
cgit v1.1
From a8b80ef800e78d9fa321bc2388b4d8336f454b1d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 16 Aug 2010 11:39:46 -0700
Subject: Added SendTeleportProgress to IClientAPI. Ya know what that means...
8 files affected.
---
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 0dee374..e46f9b7 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -618,6 +618,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void SendTeleportProgress(uint flags, string message)
+ {
+ }
+
public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
{
}
--
cgit v1.1
From 289c21099cf3ce0a2e3392436541b67d0961d8e8 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 24 Aug 2010 16:50:31 +0100
Subject: Add automated test at the opensim 'api' level to check that a given
item goes to the correct directory
Also removes some mono compiler warnings
---
OpenSim/Tests/Common/Mock/MockInventoryService.cs | 12 +++------
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 31 ++++++++++++++++++----
2 files changed, 30 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockInventoryService.cs b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
index 1ea4bc1..4ac1078 100644
--- a/OpenSim/Tests/Common/Mock/MockInventoryService.cs
+++ b/OpenSim/Tests/Common/Mock/MockInventoryService.cs
@@ -37,13 +37,9 @@ namespace OpenSim.Tests.Common.Mock
{
public class MockInventoryService : IInventoryService
{
- public MockInventoryService()
- {
- }
+ public MockInventoryService() {}
- public MockInventoryService(IConfigSource config)
- {
- }
+ public MockInventoryService(IConfigSource config) {}
///
///
@@ -140,7 +136,7 @@ namespace OpenSim.Tests.Common.Mock
public bool AddItem(InventoryItemBase item)
{
- return false;
+ return true;
}
public bool UpdateItem(InventoryItemBase item)
@@ -187,4 +183,4 @@ namespace OpenSim.Tests.Common.Mock
return 1;
}
}
-}
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 7c4f689..ed0b1a6 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common.Mock
///
public class TestInventoryDataPlugin : IInventoryDataPlugin
{
-// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
/// Inventory folders
@@ -84,14 +84,19 @@ namespace OpenSim.Tests.Common.Mock
public List getInventoryInFolder(UUID folderID)
{
-// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0}", folderID);
+ InventoryFolderBase folder = m_folders[folderID];
+
+ m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
List items = new List();
foreach (InventoryItemBase item in m_items.Values)
{
if (item.Folder == folderID)
+ {
+ m_log.DebugFormat("[MOCK INV DB]: getInventoryInFolder() adding item {0}", item.Name);
items.Add(item);
+ }
}
return items;
@@ -101,7 +106,7 @@ namespace OpenSim.Tests.Common.Mock
public InventoryFolderBase getUserRootFolder(UUID user)
{
-// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
+ m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
InventoryFolderBase folder = null;
m_rootFolders.TryGetValue(user, out folder);
@@ -111,12 +116,22 @@ namespace OpenSim.Tests.Common.Mock
public List getInventoryFolders(UUID parentID)
{
+ InventoryFolderBase parentFolder = m_folders[parentID];
+
+ m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
+
List folders = new List();
foreach (InventoryFolderBase folder in m_folders.Values)
{
if (folder.ParentID == parentID)
+ {
+ m_log.DebugFormat(
+ "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
+ folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
+
folders.Add(folder);
+ }
}
return folders;
@@ -137,6 +152,10 @@ namespace OpenSim.Tests.Common.Mock
public void addInventoryFolder(InventoryFolderBase folder)
{
+ m_log.DebugFormat(
+ "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
+ folder.Name, folder.ID, (AssetType)folder.Type);
+
m_folders[folder.ID] = folder;
if (folder.ParentID == UUID.Zero)
@@ -166,8 +185,10 @@ namespace OpenSim.Tests.Common.Mock
public void addInventoryItem(InventoryItemBase item)
{
-// m_log.DebugFormat(
-// "[MOCK INV DB]: Adding inventory item {0} {1} in {2}", item.Name, item.ID, item.Folder);
+ InventoryFolderBase folder = m_folders[item.Folder];
+
+ m_log.DebugFormat(
+ "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
m_items[item.ID] = item;
}
--
cgit v1.1
From 86937d0a0f5572b002cdb6efc499c234b2a9bd1b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Aug 2010 23:22:49 +0100
Subject: allow inventory path specified in "load iar" to start with a / (e.g.
/Objects is now valid where it wasn't before)
---
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index ed0b1a6..b70b47d 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Tests.Common.Mock
{
InventoryFolderBase folder = m_folders[folderID];
- m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
+// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
List items = new List();
@@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Mock
{
if (item.Folder == folderID)
{
- m_log.DebugFormat("[MOCK INV DB]: getInventoryInFolder() adding item {0}", item.Name);
+// m_log.DebugFormat("[MOCK INV DB]: getInventoryInFolder() adding item {0}", item.Name);
items.Add(item);
}
}
@@ -106,7 +106,7 @@ namespace OpenSim.Tests.Common.Mock
public InventoryFolderBase getUserRootFolder(UUID user)
{
- m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
+// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
InventoryFolderBase folder = null;
m_rootFolders.TryGetValue(user, out folder);
@@ -118,7 +118,7 @@ namespace OpenSim.Tests.Common.Mock
{
InventoryFolderBase parentFolder = m_folders[parentID];
- m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
+// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
List folders = new List();
@@ -126,9 +126,9 @@ namespace OpenSim.Tests.Common.Mock
{
if (folder.ParentID == parentID)
{
- m_log.DebugFormat(
- "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
- folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
+// m_log.DebugFormat(
+// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
+// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
folders.Add(folder);
}
@@ -152,9 +152,9 @@ namespace OpenSim.Tests.Common.Mock
public void addInventoryFolder(InventoryFolderBase folder)
{
- m_log.DebugFormat(
- "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
- folder.Name, folder.ID, (AssetType)folder.Type);
+// m_log.DebugFormat(
+// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
+// folder.Name, folder.ID, (AssetType)folder.Type);
m_folders[folder.ID] = folder;
@@ -187,8 +187,8 @@ namespace OpenSim.Tests.Common.Mock
{
InventoryFolderBase folder = m_folders[item.Folder];
- m_log.DebugFormat(
- "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
+// m_log.DebugFormat(
+// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
m_items[item.ID] = item;
}
--
cgit v1.1
From 953b7f491798e97b7b36808e716975b22d80114b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 6 Sep 2010 23:00:24 +0100
Subject: Add test to check persistence of newly added pre-linked objects
Added a MockRegionDataPlugin to do in-memory persistence for tests since adding this to OpenSim.Data.Null.NullDataStore doesn't seem appropriate
NullDataStore can do nothing because OpenSim only ever retrieve region objects from the database on startup. Adding an in-memory store here would be unecessary overhead.
---
OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 149 ++++++++++++++++++++++
OpenSim/Tests/Common/Mock/TestScene.cs | 8 +-
2 files changed, 155 insertions(+), 2 deletions(-)
create mode 100644 OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
new file mode 100644
index 0000000..1c139c5
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System.Reflection;
+using System.Collections.Generic;
+using log4net;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+
+namespace OpenSim.Data.Null
+{
+ ///
+ /// Mock region data plugin. This obeys the api contract for persistence but stores everything in memory, so that
+ /// tests can check correct persistence.
+ ///
+ public class NullDataStore : IRegionDataStore
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ protected Dictionary m_regionSettings = new Dictionary();
+ protected Dictionary m_sceneObjects = new Dictionary();
+ protected Dictionary> m_primItems
+ = new Dictionary>();
+ protected Dictionary m_terrains = new Dictionary();
+ protected Dictionary m_landData = new Dictionary();
+
+ public void Initialise(string dbfile)
+ {
+ return;
+ }
+
+ public void Dispose()
+ {
+ }
+
+ public void StoreRegionSettings(RegionSettings rs)
+ {
+ m_regionSettings[rs.RegionUUID] = rs;
+ }
+
+ public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
+ {
+ //This connector doesn't support the windlight module yet
+ //Return default LL windlight settings
+ return new RegionLightShareData();
+ }
+
+ public void StoreRegionWindlightSettings(RegionLightShareData wl)
+ {
+ //This connector doesn't support the windlight module yet
+ }
+
+ public RegionSettings LoadRegionSettings(UUID regionUUID)
+ {
+ RegionSettings rs = null;
+ m_regionSettings.TryGetValue(regionUUID, out rs);
+ return rs;
+ }
+
+ public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
+ {
+ m_log.DebugFormat(
+ "[MOCK REGION DATA PLUGIN]: Storing object {0} {1} in {2}", obj.Name, obj.UUID, regionUUID);
+ m_sceneObjects[obj.UUID] = obj;
+ }
+
+ public void RemoveObject(UUID obj, UUID regionUUID)
+ {
+ m_log.DebugFormat(
+ "[MOCK REGION DATA PLUGIN]: Removing object {0} from {1}", obj, regionUUID);
+
+ if (m_sceneObjects.ContainsKey(obj))
+ m_sceneObjects.Remove(obj);
+ }
+
+ // see IRegionDatastore
+ public void StorePrimInventory(UUID primID, ICollection items)
+ {
+ m_primItems[primID] = items;
+ }
+
+ public List LoadObjects(UUID regionUUID)
+ {
+ m_log.DebugFormat(
+ "[MOCK REGION DATA PLUGIN]: Loading objects from {0}", regionUUID);
+
+ return new List(m_sceneObjects.Values);
+ }
+
+ public void StoreTerrain(double[,] ter, UUID regionID)
+ {
+ m_terrains[regionID] = ter;
+ }
+
+ public double[,] LoadTerrain(UUID regionID)
+ {
+ if (m_terrains.ContainsKey(regionID))
+ return m_terrains[regionID];
+ else
+ return null;
+ }
+
+ public void RemoveLandObject(UUID globalID)
+ {
+ if (m_landData.ContainsKey(globalID))
+ m_landData.Remove(globalID);
+ }
+
+ public void StoreLandObject(ILandObject land)
+ {
+ m_landData[land.LandData.GlobalID] = land.LandData;
+ }
+
+ public List LoadLandObjects(UUID regionUUID)
+ {
+ return new List(m_landData.Values);
+ }
+
+ public void Shutdown()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 01f2c14..615e519 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -29,7 +29,6 @@ using System;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
-
using OpenSim.Framework.Servers;
using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Scenes;
@@ -49,6 +48,11 @@ namespace OpenSim.Tests.Common.Mock
}
///
+ /// Allow retrieval for test check purposes
+ ///
+ public StorageManager StorageManager { get { return m_storageManager; } }
+
+ ///
/// Temporarily override session authentication for tests (namely teleport).
///
///
--
cgit v1.1
From 11f4a65f42dea66091cb08423479fa6ae46c98aa Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 7 Sep 2010 00:34:06 +0100
Subject: Fix deletion persistence when freshly delinked prims are removed
Previously, Scene.Inventory.DeRezObjects() forced the persistence of prims before deletion.
This is necessary so that freshly delinked prims can be deleted (otherwise they remain as parts of their old group and reappear on server restart).
However, DeRezObjects() deleted to user inventory, which is required by llDie() or direct region module unlink and deletion.
Therefore, forced persistence has been pushed down into Scene.UnlinkSceneObject() to be more general, this is still on the DeRezObjects() path.
Uncommented TestDelinkPersistence() since this now passes.
Tests required considerable elaboration of MockRegionDataPlugin to reflect underlying storing of parts.
---
OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 80 ++++++++++++++++++----
.../Tests/Common/Mock/TestInventoryDataPlugin.cs | 2 +-
2 files changed, 68 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Tests/Common/Mock')
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
index 1c139c5..2a055cc 100644
--- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Data.Null
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary m_regionSettings = new Dictionary();
- protected Dictionary m_sceneObjects = new Dictionary();
+ protected Dictionary m_sceneObjectParts = new Dictionary();
protected Dictionary