From b16abc8166c29585cb76cc55c3bdd76e5833cb4f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 5 Jan 2017 19:07:37 +0000 Subject: Massive tab and trailing space cleanup --- OpenSim/Tests/Clients/Grid/GridClient.cs | 8 +-- OpenSim/Tests/Common/DatabaseTestAttribute.cs | 6 +- OpenSim/Tests/Common/Helpers/AssetHelpers.cs | 32 ++++----- .../Common/Helpers/BaseRequestHandlerHelpers.cs | 2 +- OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs | 2 +- .../Tests/Common/Helpers/EntityTransferHelpers.cs | 10 +-- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 66 +++++++++--------- .../Tests/Common/Helpers/TaskInventoryHelpers.cs | 12 ++-- OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs | 4 +- .../Tests/Common/Helpers/UserInventoryHelpers.cs | 16 ++--- OpenSim/Tests/Common/LongRunningAttribute.cs | 4 +- OpenSim/Tests/Common/Mock/BaseAssetRepository.cs | 8 +-- .../Common/Mock/MockGroupsServicesConnector.cs | 28 ++++---- OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 24 +++---- OpenSim/Tests/Common/Mock/MockScriptEngine.cs | 8 +-- OpenSim/Tests/Common/Mock/TestClient.cs | 22 +++--- .../Tests/Common/Mock/TestEventQueueGetModule.cs | 10 +-- OpenSim/Tests/Common/Mock/TestHttpClientContext.cs | 14 ++-- OpenSim/Tests/Common/Mock/TestHttpRequest.cs | 80 +++++++++++----------- OpenSim/Tests/Common/Mock/TestHttpResponse.cs | 36 +++++----- .../Tests/Common/Mock/TestInventoryDataPlugin.cs | 40 +++++------ OpenSim/Tests/Common/Mock/TestLLUDPServer.cs | 26 +++---- OpenSim/Tests/Common/Mock/TestLandChannel.cs | 2 +- OpenSim/Tests/Common/Mock/TestScene.cs | 6 +- .../Tests/Common/Mock/TestXInventoryDataPlugin.cs | 10 +-- OpenSim/Tests/Common/TestHelpers.cs | 8 +-- OpenSim/Tests/Robust/Clients/Grid/GridClient.cs | 4 +- .../Robust/Clients/Inventory/InventoryClient.cs | 4 +- .../Tests/Stress/VectorRenderModuleStressTests.cs | 4 +- 29 files changed, 248 insertions(+), 248 deletions(-) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Clients/Grid/GridClient.cs b/OpenSim/Tests/Clients/Grid/GridClient.cs index fed7a16..7d3aee3 100644 --- a/OpenSim/Tests/Clients/Grid/GridClient.cs +++ b/OpenSim/Tests/Clients/Grid/GridClient.cs @@ -47,7 +47,7 @@ namespace OpenSim.Tests.Clients.GridClient // private static readonly ILog m_log = // LogManager.GetLogger( // MethodBase.GetCurrentMethod().DeclaringType); - + public static void Main(string[] args) { ConsoleAppender consoleAppender = new ConsoleAppender(); @@ -62,7 +62,7 @@ namespace OpenSim.Tests.Clients.GridClient GridRegion r2 = CreateRegion("Test Region 2", 1001, 1000); GridRegion r3 = CreateRegion("Test Region 3", 1005, 1000); - Console.WriteLine("[GRID CLIENT]: *** Registering region 1"); + Console.WriteLine("[GRID CLIENT]: *** Registering region 1"); string msg = m_Connector.RegisterRegion(UUID.Zero, r1); if (msg == String.Empty) Console.WriteLine("[GRID CLIENT]: Successfully registered region 1"); @@ -149,7 +149,7 @@ namespace OpenSim.Tests.Clients.GridClient Console.WriteLine("[GRID CLIENT]: GetRegionsByName returned " + regions.Count + " regions"); Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)"); - regions = m_Connector.GetRegionRange(UUID.Zero, + regions = m_Connector.GetRegionRange(UUID.Zero, (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002), (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) ); if (regions == null) @@ -198,7 +198,7 @@ namespace OpenSim.Tests.Clients.GridClient region.ExternalHostName = "127.0.0.1"; region.HttpPort = 9000; region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000); - + return region; } } diff --git a/OpenSim/Tests/Common/DatabaseTestAttribute.cs b/OpenSim/Tests/Common/DatabaseTestAttribute.cs index d027d59..d6a03cd 100644 --- a/OpenSim/Tests/Common/DatabaseTestAttribute.cs +++ b/OpenSim/Tests/Common/DatabaseTestAttribute.cs @@ -32,13 +32,13 @@ using NUnit.Framework; namespace OpenSim.Tests.Common { - [AttributeUsage(AttributeTargets.All, - AllowMultiple=false, + [AttributeUsage(AttributeTargets.All, + AllowMultiple=false, Inherited=true)] public class DatabaseTestAttribute : LongRunningAttribute { public DatabaseTestAttribute() : base("Database") - { + { } } } \ No newline at end of file diff --git a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs index 7af8bed..974da4c 100644 --- a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs @@ -66,7 +66,7 @@ namespace OpenSim.Tests.Common { return CreateAsset(assetId, AssetType.Notecard, text, UUID.Random()); } - + // /// // /// Create and store a notecard asset with a random uuid and dummy text. // /// @@ -92,7 +92,7 @@ namespace OpenSim.Tests.Common { return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), sog); } - + /// /// Create an asset from the given object. /// @@ -102,12 +102,12 @@ namespace OpenSim.Tests.Common public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) { return CreateAsset( - assetUuid, - AssetType.Object, - Encoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)), + assetUuid, + AssetType.Object, + Encoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)), sog.OwnerID); } - + /// /// Create an asset from the given scene object. /// @@ -120,8 +120,8 @@ namespace OpenSim.Tests.Common public static AssetBase CreateAsset(int assetUuidTail, CoalescedSceneObjects coa) { return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), coa); - } - + } + /// /// Create an asset from the given scene object. /// @@ -131,12 +131,12 @@ namespace OpenSim.Tests.Common public static AssetBase CreateAsset(UUID assetUuid, CoalescedSceneObjects coa) { return CreateAsset( - assetUuid, - AssetType.Object, - Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)), + assetUuid, + AssetType.Object, + Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)), coa.CreatorId); - } - + } + /// /// Create an asset from the given data. /// @@ -148,7 +148,7 @@ namespace OpenSim.Tests.Common return CreateAsset(assetUuid, assetType, anc.AssetData, creatorID); } - + /// /// Create an asset from the given data. /// @@ -158,9 +158,9 @@ namespace OpenSim.Tests.Common asset.Data = data; return asset; } - + public static string ReadAssetAsString(IAssetService assetService, UUID uuid) - { + { byte[] assetData = assetService.GetData(uuid.ToString()); return Encoding.ASCII.GetString(assetData); } diff --git a/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs b/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs index 82ecf9a..b27c719 100644 --- a/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs @@ -59,7 +59,7 @@ namespace OpenSim.Tests.Common Assert.AreEqual(m_emptyStringArray, handler.SplitParams(null), "Failed on null."); Assert.AreEqual(m_emptyStringArray, handler.SplitParams(""), "Failed on empty path."); Assert.AreEqual(m_emptyStringArray, handler.SplitParams("corruptUrl"), "Failed on corrupt url."); - + Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath), "Failed on empty params."); Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath + "/"), "Failed on single slash."); diff --git a/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs b/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs index df9f6f2..753830f 100644 --- a/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs @@ -48,7 +48,7 @@ namespace OpenSim.Tests.Common { public static ScenePresence AddChildClient( Scene scene, LLUDPServer udpServer, UUID agentId, UUID sessionId, uint circuitCode) - { + { IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); UseCircuitCodePacket uccp = new UseCircuitCodePacket(); diff --git a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs index 1f6233d..b0c9596 100644 --- a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs @@ -56,7 +56,7 @@ namespace OpenSim.Tests.Common /// /// /// - /// A list that will be populated with any TestClients set up in response to + /// A list that will be populated with any TestClients set up in response to /// being informed about a destination region. /// public static void SetupInformClientOfNeighbourTriggersNeighbourClientCreate( @@ -71,7 +71,7 @@ namespace OpenSim.Tests.Common Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y); m_log.DebugFormat( - "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", + "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", x, y, neighbourExternalEndPoint); AgentCircuitData newAgent = tc.RequestClientInfo(); @@ -91,20 +91,20 @@ namespace OpenSim.Tests.Common /// /// /// - /// A list that will be populated with any TestClients set up in response to + /// A list that will be populated with any TestClients set up in response to /// being informed about a destination region. /// public static void SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement( TestClient client, List destinationClients) { - client.OnTestClientSendRegionTeleport + client.OnTestClientSendRegionTeleport += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) => { uint x, y; Util.RegionHandleToRegionLoc(regionHandle, out x, out y); m_log.DebugFormat( - "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", + "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", x, y, regionExternalEndPoint); AgentCircuitData newAgent = client.RequestClientInfo(); diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index f8485e0..fbd7e90 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -102,7 +102,7 @@ namespace OpenSim.Tests.Common m_physicsScene = StartPhysicsScene(); - SimDataService + SimDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin("OpenSim.Tests.Common.dll", null); } @@ -146,7 +146,7 @@ namespace OpenSim.Tests.Common // We must set up a console otherwise setup of some modules may fail MainConsole.Instance = new MockConsole(); - + RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); regInfo.RegionName = name; regInfo.RegionID = id; @@ -199,13 +199,13 @@ namespace OpenSim.Tests.Common m_presenceService.AddRegion(testScene); m_presenceService.RegionLoaded(testScene); testScene.AddRegionModule(m_presenceService.Name, m_presenceService); - - + + testScene.SetModuleInterfaces(); testScene.LandChannel = new TestLandChannel(testScene); testScene.LoadWorldMap(); - + testScene.LoginsEnabled = true; testScene.RegisterRegionWithGrid(); @@ -217,10 +217,10 @@ namespace OpenSim.Tests.Common private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache) { IConfigSource config = new IniConfigSource(); - config.AddConfig("Modules"); - config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); + config.AddConfig("Modules"); + config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); config.AddConfig("AssetService"); - config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); + config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); @@ -235,7 +235,7 @@ namespace OpenSim.Tests.Common cache.Initialise(cacheConfig); } - + return assetService; } @@ -257,7 +257,7 @@ namespace OpenSim.Tests.Common private static LocalInventoryServicesConnector StartInventoryService() { - IConfigSource config = new IniConfigSource(); + IConfigSource config = new IniConfigSource(); config.AddConfig("Modules"); config.AddConfig("InventoryService"); config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); @@ -266,8 +266,8 @@ namespace OpenSim.Tests.Common LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector(); inventoryService.Initialise(config); - - return inventoryService; + + return inventoryService; } private static LocalGridServicesConnector StartGridService() @@ -282,7 +282,7 @@ namespace OpenSim.Tests.Common LocalGridServicesConnector gridService = new LocalGridServicesConnector(); gridService.Initialise(config); - + return gridService; } @@ -303,7 +303,7 @@ namespace OpenSim.Tests.Common LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector(); userAccountService.Initialise(config); - + return userAccountService; } @@ -328,7 +328,7 @@ namespace OpenSim.Tests.Common LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector(); presenceService.Initialise(config); - + return presenceService; } @@ -384,8 +384,8 @@ namespace OpenSim.Tests.Common /// /// /// If called directly, then all the modules must be shared modules. - /// - /// We are emulating here the normal calls made to setup region modules + /// + /// We are emulating here the normal calls made to setup region modules /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). /// TODO: Need to reuse normal runtime module code. /// @@ -655,7 +655,7 @@ namespace OpenSim.Tests.Common return so; } - + /// /// Create a scene object part. /// @@ -664,10 +664,10 @@ namespace OpenSim.Tests.Common /// /// public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId) - { + { return new SceneObjectPart( - ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) - { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) }; + ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) + { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) }; } /// @@ -682,10 +682,10 @@ namespace OpenSim.Tests.Common /// /// public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) - { + { return CreateSceneObject(parts, ownerId, 0x1); } - + /// /// Create a scene object but do not add it to the scene. /// @@ -697,10 +697,10 @@ namespace OpenSim.Tests.Common /// /// public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail) - { + { return CreateSceneObject(parts, ownerId, "", uuidTail); - } - + } + /// /// Create a scene object but do not add it to the scene. /// @@ -718,22 +718,22 @@ namespace OpenSim.Tests.Common /// /// public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail) - { + { string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail); - - SceneObjectGroup sog + + SceneObjectGroup sog = new SceneObjectGroup( CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId)); - + if (parts > 1) for (int i = 2; i <= parts; i++) sog.AddPart( CreateSceneObjectPart( - string.Format("{0}Part{1}", partNamePrefix, i), + string.Format("{0}Part{1}", partNamePrefix, i), new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)), ownerId)); - + return sog; - } + } } } diff --git a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs index 3a3b33a..e3110f6 100644 --- a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs @@ -78,12 +78,12 @@ namespace OpenSim.Tests.Common = AssetHelpers.CreateAsset(assetID, AssetType.Notecard, nc.AssetData, UUID.Zero); assetService.Store(ncAsset); - TaskInventoryItem ncItem - = new TaskInventoryItem + TaskInventoryItem ncItem + = new TaskInventoryItem { Name = itemName, AssetID = assetID, ItemID = itemID, Type = (int)AssetType.Notecard, InvType = (int)InventoryType.Notecard }; - part.Inventory.AddInventoryItem(ncItem, true); - + part.Inventory.AddInventoryItem(ncItem, true); + return ncItem; } @@ -119,7 +119,7 @@ namespace OpenSim.Tests.Common { return AddScript(assetService, part, UUID.Random(), UUID.Random(), scriptName, scriptSource); } - + /// /// Add a simple script to the given part. /// @@ -145,7 +145,7 @@ namespace OpenSim.Tests.Common = AssetHelpers.CreateAsset(assetId, AssetType.LSLText, ast.AssetData, UUID.Zero); assetService.Store(asset); TaskInventoryItem item - = new TaskInventoryItem + = new TaskInventoryItem { Name = scriptName, AssetID = assetId, ItemID = itemId, Type = (int)AssetType.LSLText, InvType = (int)InventoryType.LSL }; part.Inventory.AddInventoryItem(item, true); diff --git a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs index c62b58e..e6af34b 100644 --- a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs @@ -83,7 +83,7 @@ namespace OpenSim.Tests.Common // /// // /// // public static CachedUserInfo CreateUserWithInventory( -// CommunicationsManager commsManager, string firstName, string lastName, +// CommunicationsManager commsManager, string firstName, string lastName, // UUID userId, OnInventoryReceivedDelegate callback) // { // return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); @@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common CreateUserWithInventory(scene, ua, pw); return ua; } - + public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw) { // FIXME: This should really be set up by UserAccount itself diff --git a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs index e7e145a..5a46201 100644 --- a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs @@ -101,7 +101,7 @@ namespace OpenSim.Tests.Common Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId) { return AddInventoryItem( - scene, itemName, itemId, itemType, asset, userId, + scene, itemName, itemId, itemType, asset, userId, scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name); } @@ -128,7 +128,7 @@ namespace OpenSim.Tests.Common item.Owner = userId; item.AssetType = asset.Type; item.InvType = (int)itemType; - item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All | + item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All | (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); item.CurrentPermissions = (uint)OpenMetaverse.PermissionMask.All | (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); @@ -211,7 +211,7 @@ namespace OpenSim.Tests.Common /// /// /// If true, then folders in the path which already the same name are - /// used. This applies to the terminal folder as well. + /// used. This applies to the terminal folder as well. /// If false, then all folders in the path are created, even if there is already a folder at a particular /// level with the same name. /// @@ -236,7 +236,7 @@ namespace OpenSim.Tests.Common /// /// /// If true, then folders in the path which already the same name are - /// used. This applies to the terminal folder as well. + /// used. This applies to the terminal folder as well. /// If false, then all folders in the path are created, even if there is already a folder at a particular /// level with the same name. /// @@ -259,7 +259,7 @@ namespace OpenSim.Tests.Common /// Create inventory folders starting from a given parent folder /// /// - /// If any stem of the path names folders that already exist then these are not recreated. This includes the + /// If any stem of the path names folders that already exist then these are not recreated. This includes the /// final folder. /// TODO: May need to make it an option to create duplicate folders. /// @@ -271,7 +271,7 @@ namespace OpenSim.Tests.Common /// /// /// If true, then folders in the path which already the same name are - /// used. This applies to the terminal folder as well. + /// used. This applies to the terminal folder as well. /// If false, then all folders in the path are created, even if there is already a folder at a particular /// level with the same name. /// @@ -299,10 +299,10 @@ namespace OpenSim.Tests.Common else folderIdForCreate = folderId; - folder + folder = new InventoryFolderBase( folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0); - + inventoryService.AddFolder(folder); } // else diff --git a/OpenSim/Tests/Common/LongRunningAttribute.cs b/OpenSim/Tests/Common/LongRunningAttribute.cs index 9831ea8..6013fcb 100644 --- a/OpenSim/Tests/Common/LongRunningAttribute.cs +++ b/OpenSim/Tests/Common/LongRunningAttribute.cs @@ -35,11 +35,11 @@ namespace OpenSim.Tests.Common [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LongRunningAttribute : CategoryAttribute + public class LongRunningAttribute : CategoryAttribute { public LongRunningAttribute() : this("Long Running Test") { - + } protected LongRunningAttribute(string category) : base(category) diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs index cb4fb80..d0430ff 100644 --- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs +++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs @@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common { protected Dictionary Assets = new Dictionary(); - public AssetBase FetchAsset(UUID uuid) + public AssetBase FetchAsset(UUID uuid) { if (AssetsExist(new[] { uuid })[0]) return Assets[uuid]; @@ -44,17 +44,17 @@ namespace OpenSim.Tests.Common return null; } - public void CreateAsset(AssetBase asset) + public void CreateAsset(AssetBase asset) { Assets[asset.FullID] = asset; } - public void UpdateAsset(AssetBase asset) + public void UpdateAsset(AssetBase asset) { CreateAsset(asset); } - public bool[] AssetsExist(UUID[] uuids) + public bool[] AssetsExist(UUID[] uuids) { return Array.ConvertAll(uuids, id => Assets.ContainsKey(id)); } diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs index 7f530d0..e9deac7 100644 --- a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs +++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs @@ -85,8 +85,8 @@ namespace OpenSim.Tests.Common { } - public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, - int membershipFee, bool openEnrollment, bool allowPublish, + public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, + int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID) { XGroup group = new XGroup() @@ -118,13 +118,13 @@ namespace OpenSim.Tests.Common } } - public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, - UUID insigniaID, int membershipFee, bool openEnrollment, + public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, + UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) { } - public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, + public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers) { } @@ -133,7 +133,7 @@ namespace OpenSim.Tests.Common { } - public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, + public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers) { } @@ -144,7 +144,7 @@ namespace OpenSim.Tests.Common if (group == null) - m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: No group found with ID {0}", groupID); + m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: No group found with ID {0}", groupID); return group; } @@ -152,7 +152,7 @@ namespace OpenSim.Tests.Common public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID groupID, string groupName) { m_log.DebugFormat( - "[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}", + "[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}", groupID, groupName); XGroup xg = GetXGroup(groupID, groupName); @@ -194,7 +194,7 @@ namespace OpenSim.Tests.Common public void SetAgentGroupInfo(UUID requestingAgentID, UUID agentID, UUID groupID, bool acceptNotices, bool listInProfile) { m_log.DebugFormat( - "[MOCK GROUPS SERVICES CONNECTOR]: SetAgentGroupInfo, requestingAgentID {0}, agentID {1}, groupID {2}, acceptNotices {3}, listInProfile {4}", + "[MOCK GROUPS SERVICES CONNECTOR]: SetAgentGroupInfo, requestingAgentID {0}, agentID {1}, groupID {2}, acceptNotices {3}, listInProfile {4}", requestingAgentID, agentID, groupID, acceptNotices, listInProfile); XGroup group = GetXGroup(groupID, null); @@ -228,7 +228,7 @@ namespace OpenSim.Tests.Common public void AddAgentToGroup(UUID requestingAgentID, UUID agentID, UUID groupID, UUID roleID) { m_log.DebugFormat( - "[MOCK GROUPS SERVICES CONNECTOR]: AddAgentToGroup, requestingAgentID {0}, agentID {1}, groupID {2}, roleID {3}", + "[MOCK GROUPS SERVICES CONNECTOR]: AddAgentToGroup, requestingAgentID {0}, agentID {1}, groupID {2}, roleID {3}", requestingAgentID, agentID, groupID, roleID); XGroup group = GetXGroup(groupID, null); @@ -348,7 +348,7 @@ namespace OpenSim.Tests.Common return notices; } - + public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID) { m_log.DebugFormat( @@ -378,14 +378,14 @@ namespace OpenSim.Tests.Common return gni; } } - + return null; } - + public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket) { m_log.DebugFormat( - "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}", + "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}", requestingAgentID, groupID, noticeID, fromName, subject, message, binaryBucket.Length); XGroup group = GetXGroup(groupID, null); diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 8daa19d..a73a0b8 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs @@ -174,15 +174,15 @@ namespace OpenSim.Data.Null public class NullDataStore : ISimulationDataStore { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected Dictionary m_regionSettings = new Dictionary(); protected Dictionary m_sceneObjectParts = new Dictionary(); - protected Dictionary> m_primItems + protected Dictionary> m_primItems = new Dictionary>(); protected Dictionary m_terrains = new Dictionary(); protected Dictionary m_bakedterrains = new Dictionary(); protected Dictionary m_landData = new Dictionary(); - + public void Initialise(string dbfile) { return; @@ -196,14 +196,14 @@ namespace OpenSim.Data.Null { 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 RemoveRegionWindlightSettings(UUID regionID) { } @@ -238,7 +238,7 @@ namespace OpenSim.Data.Null if (rs == null) rs = new RegionSettings(); - + return rs; } @@ -250,9 +250,9 @@ namespace OpenSim.Data.Null foreach (SceneObjectPart prim in obj.Parts) { // m_log.DebugFormat( -// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", +// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", // prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); - + m_sceneObjectParts[prim.UUID] = prim; } } @@ -266,7 +266,7 @@ namespace OpenSim.Data.Null if (part.ParentGroup.UUID == obj) { // m_log.DebugFormat( -// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", +// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", // part.Name, part.UUID, obj, regionUUID); m_sceneObjectParts.Remove(part.UUID); } @@ -281,7 +281,7 @@ namespace OpenSim.Data.Null public List LoadObjects(UUID regionUUID) { Dictionary objects = new Dictionary(); - + // Create all of the SOGs from the root prims first foreach (SceneObjectPart prim in m_sceneObjectParts.Values) { @@ -318,10 +318,10 @@ namespace OpenSim.Data.Null } } } - + // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that // way! - + return new List(objects.Values); } diff --git a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs index b6f5760..9d426f6 100644 --- a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs +++ b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs @@ -40,7 +40,7 @@ using OpenSim.Region.ScriptEngine.Shared; namespace OpenSim.Tests.Common { public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine - { + { public IConfigSource ConfigSource { get; private set; } public IConfig Config { get; private set; } @@ -89,7 +89,7 @@ namespace OpenSim.Tests.Common { } - public string Name { get { return "Mock Script Engine"; } } + public string Name { get { return "Mock Script Engine"; } } public string ScriptEngineName { get { return Name; } } public Type ReplaceableInterface { get { return null; } } @@ -200,7 +200,7 @@ namespace OpenSim.Tests.Common { throw new System.NotImplementedException (); } - + public IScriptWorkItem QueueEventHandler(object parms) { throw new System.NotImplementedException (); @@ -258,7 +258,7 @@ namespace OpenSim.Tests.Common public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } } - public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } } + public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } } public void ClearPostedEvents() { diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index f407e5a..e2f57b5 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -321,7 +321,7 @@ namespace OpenSim.Tests.Common public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; - + public event FindAgentUpdate OnFindAgent; public event TrackAgentUpdate OnTrackAgent; public event NewUserReport OnUserReport; @@ -673,7 +673,7 @@ namespace OpenSim.Tests.Common { AgentCircuitData agentData = new AgentCircuitData(); agentData.AgentID = AgentId; - agentData.SessionID = SessionId; + agentData.SessionID = SessionId; agentData.SecureSessionID = UUID.Zero; agentData.circuitcode = m_circuitCode; agentData.child = false; @@ -713,7 +713,7 @@ namespace OpenSim.Tests.Common public virtual void SendTeleportFailed(string reason) { m_log.DebugFormat( - "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}", + "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}", m_firstName, m_lastName, m_scene.Name, reason); } @@ -781,7 +781,7 @@ namespace OpenSim.Tests.Common public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, - int version, + int version, bool fetchFolders, bool fetchItems) { @@ -881,7 +881,7 @@ namespace OpenSim.Tests.Common OnRegionHandShakeReply(this); } } - + public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) { } @@ -1314,7 +1314,7 @@ namespace OpenSim.Tests.Common 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) { } @@ -1334,7 +1334,7 @@ namespace OpenSim.Tests.Common { } - public void Disconnect() + public void Disconnect() { } @@ -1343,19 +1343,19 @@ namespace OpenSim.Tests.Common if (OnReceivedSendRebakeAvatarTextures != null) OnReceivedSendRebakeAvatarTextures(textureID); } - + 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) { } diff --git a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs index bc30945..3e00d82 100644 --- a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs +++ b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs @@ -46,7 +46,7 @@ namespace OpenSim.Tests.Common { public class TestEventQueueGetModule : IEventQueue, INonSharedRegionModule { - public class Event + public class Event { public string Name { get; set; } public object[] Args { get; set; } @@ -64,7 +64,7 @@ namespace OpenSim.Tests.Common public void Close() {} - public void AddRegion(Scene scene) + public void AddRegion(Scene scene) { Events = new Dictionary>(); scene.RegisterModuleInterface(this); @@ -138,12 +138,12 @@ namespace OpenSim.Tests.Common } public void ChatterboxInvitation( - UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName, - byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl, + UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName, + byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket) { AddEvent( - toAgent, "ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, + toAgent, "ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, timeStamp, offline, parentEstateID, position, ttl, transactionID, fromGroup, binaryBucket); } diff --git a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs index be437dc..7b20b8c 100644 --- a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs +++ b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs @@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common /// Bodies of responses from the server. /// public string ResponseBody - { + { get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); } } @@ -56,8 +56,8 @@ namespace OpenSim.Tests.Common public bool IsSecured { get; set; } - public bool Secured - { + public bool Secured + { get { return IsSecured; } set { IsSecured = value; } } @@ -67,7 +67,7 @@ namespace OpenSim.Tests.Common Secured = secured; } - public void Disconnect(SocketError error) + public void Disconnect(SocketError error) { // Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error); } @@ -76,18 +76,18 @@ namespace OpenSim.Tests.Common public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");} public void Respond(string body) { Console.WriteLine("xxx");} - public void Send(byte[] buffer) + public void Send(byte[] buffer) { // Getting header data here // Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer)); } - public void Send(byte[] buffer, int offset, int size) + public void Send(byte[] buffer, int offset, int size) { // Util.PrintCallStack(); // // Console.WriteLine( -// "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}", +// "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}", // offset, size, Encoding.UTF8.GetString(buffer)); m_responseStream.Write(buffer, offset, size); diff --git a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs index d07287d..4c5ea4a 100644 --- a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs +++ b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs @@ -37,85 +37,85 @@ namespace OpenSim.Tests.Common public class TestHttpRequest: IHttpRequest { private string _uriPath; - public bool BodyIsComplete - { - get { return true; } + public bool BodyIsComplete + { + get { return true; } } - public string[] AcceptTypes - { + public string[] AcceptTypes + { get {return _acceptTypes; } } private string[] _acceptTypes; - public Stream Body - { - get { return _body; } - set { _body = value;} + public Stream Body + { + get { return _body; } + set { _body = value;} } private Stream _body; - public ConnectionType Connection - { + public ConnectionType Connection + { get { return _connection; } set { _connection = value; } } private ConnectionType _connection; - public int ContentLength - { + public int ContentLength + { get { return _contentLength; } set { _contentLength = value; } } private int _contentLength; - public NameValueCollection Headers - { + public NameValueCollection Headers + { get { return _headers; } } private NameValueCollection _headers = new NameValueCollection(); public string HttpVersion { get; set; } - public string Method - { + public string Method + { get { return _method; } set { _method = value; } } private string _method = null; - public HttpInput QueryString - { + public HttpInput QueryString + { get { return _queryString; } } private HttpInput _queryString = null; - public Uri Uri - { + public Uri Uri + { get { return _uri; } - set { _uri = value; } + set { _uri = value; } } private Uri _uri = null; - public string[] UriParts - { + public string[] UriParts + { get { return _uri.Segments; } } - public HttpParam Param - { - get { return null; } + public HttpParam Param + { + get { return null; } } - public HttpForm Form - { - get { return null; } + public HttpForm Form + { + get { return null; } } - public bool IsAjax - { - get { return false; } + public bool IsAjax + { + get { return false; } } - public RequestCookies Cookies - { - get { return null; } + public RequestCookies Cookies + { + get { return null; } } - public TestHttpRequest() + public TestHttpRequest() { HttpVersion = "HTTP/1.1"; } - public TestHttpRequest(string contentEncoding, string contentType, string userAgent, + public TestHttpRequest(string contentEncoding, string contentType, string userAgent, string remoteAddr, string remotePort, string[] acceptTypes, ConnectionType connectionType, int contentLength, Uri uri) : base() { @@ -137,7 +137,7 @@ namespace OpenSim.Tests.Common { _headers.Add(name, value); } - public int AddToBody(byte[] bytes, int offset, int length) + public int AddToBody(byte[] bytes, int offset, int length) { return 0; } @@ -168,7 +168,7 @@ namespace OpenSim.Tests.Common set { _uriPath = value; - + } } } diff --git a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs index c344fb8..190f6d5 100644 --- a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs +++ b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs @@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common /* public class TestHttpResponse: IHttpResponse { - public Stream Body + public Stream Body { get { return _body; } @@ -44,14 +44,14 @@ namespace OpenSim.Tests.Common } private Stream _body; - public string ProtocolVersion - { + public string ProtocolVersion + { get { return _protocolVersion; } set { _protocolVersion = value; } } private string _protocolVersion; - public bool Chunked + public bool Chunked { get { return _chunked; } @@ -59,7 +59,7 @@ namespace OpenSim.Tests.Common } private bool _chunked; - public ConnectionType Connection + public ConnectionType Connection { get { return _connection; } @@ -67,7 +67,7 @@ namespace OpenSim.Tests.Common } private ConnectionType _connection; - public Encoding Encoding + public Encoding Encoding { get { return _encoding; } @@ -75,7 +75,7 @@ namespace OpenSim.Tests.Common } private Encoding _encoding; - public int KeepAlive + public int KeepAlive { get { return _keepAlive; } @@ -83,7 +83,7 @@ namespace OpenSim.Tests.Common } private int _keepAlive; - public HttpStatusCode Status + public HttpStatusCode Status { get { return _status; } @@ -91,7 +91,7 @@ namespace OpenSim.Tests.Common } private HttpStatusCode _status; - public string Reason + public string Reason { get { return _reason; } @@ -99,7 +99,7 @@ namespace OpenSim.Tests.Common } private string _reason; - public long ContentLength + public long ContentLength { get { return _contentLength; } @@ -107,7 +107,7 @@ namespace OpenSim.Tests.Common } private long _contentLength; - public string ContentType + public string ContentType { get { return _contentType; } @@ -115,19 +115,19 @@ namespace OpenSim.Tests.Common } private string _contentType; - public bool HeadersSent + public bool HeadersSent { get { return _headersSent; } } private bool _headersSent; - public bool Sent + public bool Sent { get { return _sent; } } private bool _sent; - public ResponseCookies Cookies + public ResponseCookies Cookies { get { return _cookies; } } @@ -141,26 +141,26 @@ namespace OpenSim.Tests.Common public void AddHeader(string name, string value) {} - public void Send() + public void Send() { if (!_headersSent) SendHeaders(); if (_sent) throw new InvalidOperationException("stuff already sent"); _sent = true; } - public void SendBody(byte[] buffer, int offset, int count) + public void SendBody(byte[] buffer, int offset, int count) { if (!_headersSent) SendHeaders(); _sent = true; } - public void SendBody(byte[] buffer) + public void SendBody(byte[] buffer) { if (!_headersSent) SendHeaders(); _sent = true; } - public void SendHeaders() + public void SendHeaders() { if (_headersSent) throw new InvalidOperationException("headers already sent"); _headersSent = true; diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs index c97a765..0ff6f7f 100644 --- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs @@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common public class TestInventoryDataPlugin : IInventoryDataPlugin { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + /// /// Inventory folders /// @@ -85,9 +85,9 @@ namespace OpenSim.Tests.Common public List getInventoryInFolder(UUID 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) @@ -98,7 +98,7 @@ namespace OpenSim.Tests.Common items.Add(item); } } - + return items; } @@ -107,7 +107,7 @@ namespace OpenSim.Tests.Common 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); @@ -117,9 +117,9 @@ namespace OpenSim.Tests.Common 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) @@ -127,9 +127,9 @@ namespace OpenSim.Tests.Common if (folder.ParentID == parentID) { // m_log.DebugFormat( -// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}", +// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}", // folder.Name, folder.ID, parentFolder.Name, parentFolder.ID); - + folders.Add(folder); } } @@ -153,9 +153,9 @@ namespace OpenSim.Tests.Common public void addInventoryFolder(InventoryFolderBase folder) { // m_log.DebugFormat( -// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}", +// "[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) @@ -183,30 +183,30 @@ namespace OpenSim.Tests.Common m_folders.Remove(folderId); } - public void addInventoryItem(InventoryItemBase item) + public void addInventoryItem(InventoryItemBase item) { 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; } - + public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); } - - public void deleteInventoryItem(UUID itemId) + + public void deleteInventoryItem(UUID itemId) { if (m_items.ContainsKey(itemId)) m_items.Remove(itemId); } - - public InventoryItemBase getInventoryItem(UUID itemId) + + public InventoryItemBase getInventoryItem(UUID itemId) { if (m_items.ContainsKey(itemId)) return m_items[itemId]; else - return null; + return null; } public InventoryItemBase queryInventoryItem(UUID item) diff --git a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs index b2c6a8c..388b56b 100644 --- a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs +++ b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs @@ -73,7 +73,7 @@ namespace OpenSim.Tests.Common //// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive //// /// //// protected Queue m_chunksToLoad = new Queue(); -// +// //// protected override void BeginReceive() //// { //// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException) @@ -83,29 +83,29 @@ namespace OpenSim.Tests.Common //// throw new SocketException(); //// } //// } -// +// //// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender) //// { //// numBytes = 0; //// //// //m_log.Debug("Queue size " + m_chunksToLoad.Count); -//// +//// //// if (m_chunksToLoad.Count <= 0) //// return false; -//// +//// //// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue(); //// RecvBuffer = tuple.Data; //// numBytes = tuple.Data.Length; //// epSender = tuple.Sender; -//// +//// //// return true; //// } -// +// //// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) //// { //// // Don't do anything just yet //// } -// +// // /// // /// Signal that this chunk should throw an exception on Socket.BeginReceive() // /// @@ -116,7 +116,7 @@ namespace OpenSim.Tests.Common // tuple.BeginReceiveException = true; // m_chunksToLoad.Enqueue(tuple); // } -// +// // /// // /// Load some data to be received by the LLUDPServer on the next receive call // /// @@ -126,7 +126,7 @@ namespace OpenSim.Tests.Common // { // m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender)); // } -// +// // /// // /// Load a packet to be received by the LLUDPServer on the next receive call // /// @@ -135,7 +135,7 @@ namespace OpenSim.Tests.Common // { // LoadReceive(packet.ToBytes(), epSender); // } -// +// // /// // /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send // /// @@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common //// OnReceivedData(result); // } } - + /// /// Record the data and sender tuple /// @@ -156,13 +156,13 @@ namespace OpenSim.Tests.Common public byte[] Data; public EndPoint Sender; public bool BeginReceiveException; - + public ChunkSenderTuple(byte[] data, EndPoint sender) { Data = data; Sender = sender; } - + public ChunkSenderTuple(EndPoint sender) { Sender = sender; diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs index 23258ad..3d44a33 100644 --- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs +++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs @@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common { return m_parcels; } - + public void Clear(bool setupDefaultParcel) { m_parcels.Clear(); diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 1a93c9f..0b3d446 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -41,7 +41,7 @@ namespace OpenSim.Tests.Common public class TestScene : Scene { public TestScene( - RegionInfo regInfo, AgentCircuitManager authen, + RegionInfo regInfo, AgentCircuitManager authen, ISimulationDataService simDataService, IEstateDataService estateDataService, IConfigSource config, string simulatorVersion) : base(regInfo, authen, simDataService, estateDataService, @@ -54,7 +54,7 @@ namespace OpenSim.Tests.Common //Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName); Console.WriteLine("TestScene destructor called"); } - + /// /// Temporarily override session authentication for tests (namely teleport). /// @@ -68,7 +68,7 @@ namespace OpenSim.Tests.Common reason = String.Empty; return true; } - + public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter { get { return m_asyncSceneObjectDeleter; } diff --git a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs index 2b272e6..77f1793 100644 --- a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs @@ -89,7 +89,7 @@ namespace OpenSim.Tests.Common m_allItems[item.inventoryID] = item.Clone(); // Console.WriteLine( -// "Added item {0} {1}, folder {2}, creator {3}, owner {4}", +// "Added item {0} {1}, folder {2}, creator {3}, owner {4}", // item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID); return true; @@ -123,8 +123,8 @@ namespace OpenSim.Tests.Common public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); } - public bool MoveFolder(string id, string newParent) - { + public bool MoveFolder(string id, string newParent) + { // Don't use GetFolders() here - it takes a clone! XInventoryFolder folder = m_allFolders[new UUID(id)]; @@ -133,11 +133,11 @@ namespace OpenSim.Tests.Common folder.parentFolderID = new UUID(newParent); -// XInventoryFolder[] newParentFolders +// XInventoryFolder[] newParentFolders // = GetFolders(new string[] { "folderID" }, new string[] { folder.parentFolderID.ToString() }); // Console.WriteLine( -// "Moved folder {0} {1}, to {2} {3}", +// "Moved folder {0} {1}, to {2} {3}", // folder.folderName, folder.folderID, newParentFolders[0].folderName, folder.parentFolderID); // TODO: Really need to implement folder version incrementing, though this should be common code anyway, diff --git a/OpenSim/Tests/Common/TestHelpers.cs b/OpenSim/Tests/Common/TestHelpers.cs index 6bf23f8..2b2af34 100644 --- a/OpenSim/Tests/Common/TestHelpers.cs +++ b/OpenSim/Tests/Common/TestHelpers.cs @@ -81,9 +81,9 @@ namespace OpenSim.Tests.Common return false; } - + /// - /// A debugging method that can be used to print out which test method you are in + /// A debugging method that can be used to print out which test method you are in /// public static void InMethod() { @@ -129,7 +129,7 @@ namespace OpenSim.Tests.Common { string rawUuid = stem.PadRight(32, '0'); - return UUID.Parse(rawUuid); + return UUID.Parse(rawUuid); } /// @@ -158,7 +158,7 @@ namespace OpenSim.Tests.Common { string rawUuid = stem.PadLeft(32, '0'); - return UUID.Parse(rawUuid); + return UUID.Parse(rawUuid); } } } diff --git a/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs b/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs index 671aca7..1549851 100644 --- a/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs +++ b/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs @@ -95,7 +95,7 @@ namespace Robust.Tests Assert.AreNotEqual(regions, null, "GetRegionsByName failed"); Assert.AreEqual(regions.Count, 3, "GetRegionsByName should return 3"); - regions = m_Connector.GetRegionRange(UUID.Zero, + regions = m_Connector.GetRegionRange(UUID.Zero, (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002), (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) ); Assert.AreNotEqual(regions, null, "GetRegionRange failed"); @@ -126,7 +126,7 @@ namespace Robust.Tests region.ExternalHostName = "127.0.0.1"; region.HttpPort = 9000; region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000); - + return region; } } diff --git a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs index d5c7dcb..fe46a4f 100644 --- a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs +++ b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs @@ -176,7 +176,7 @@ namespace Robust.Tests Assert.NotNull(items, "(Repeat) Failed to get multiple items"); Assert.IsTrue(items.Length == 2, "(Repeat) Requested 2 items, but didn't receive 2 items"); - // This item doesn't exist, but [0] does, and it's cached. + // This item doesn't exist, but [0] does, and it's cached. uuids[1] = new UUID("bb000000-0000-0000-0000-0000000000bb"); // Fetching should return 2 items, but [1] should be null items = m_Connector.GetMultipleItems(m_userID, uuids); @@ -185,7 +185,7 @@ namespace Robust.Tests Assert.AreEqual("Test Notecard 1", items[0].Name, "(Three times) Wrong name for Notecard 1"); Assert.IsNull(items[1], "(Three times) Expecting 2nd item to be null"); - // Now both don't exist + // Now both don't exist uuids[0] = new UUID("aa000000-0000-0000-0000-0000000000aa"); items = m_Connector.GetMultipleItems(m_userID, uuids); Assert.Null(items[0], "Request to multiple non-existent items is supposed to return null [0]"); diff --git a/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs b/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs index 0ab407e..5e6a638 100644 --- a/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs +++ b/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs @@ -105,7 +105,7 @@ namespace OpenSim.Tests.Stress public void Draw() { SceneObjectGroup so = SceneHelpers.AddSceneObject(m_tests.Scene); - + while (Ready) { UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; @@ -120,7 +120,7 @@ namespace OpenSim.Tests.Stress string.Format("PenColour BLACK; MoveTo 40,220; FontSize 32; Text {0};", text), "", 0); - + Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); Pass++; -- cgit v1.1