diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Tests/Common/Helpers | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Tests/Common/Helpers')
8 files changed, 72 insertions, 72 deletions
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 | |||
66 | { | 66 | { |
67 | return CreateAsset(assetId, AssetType.Notecard, text, UUID.Random()); | 67 | return CreateAsset(assetId, AssetType.Notecard, text, UUID.Random()); |
68 | } | 68 | } |
69 | 69 | ||
70 | // /// <summary> | 70 | // /// <summary> |
71 | // /// Create and store a notecard asset with a random uuid and dummy text. | 71 | // /// Create and store a notecard asset with a random uuid and dummy text. |
72 | // /// </summary> | 72 | // /// </summary> |
@@ -92,7 +92,7 @@ namespace OpenSim.Tests.Common | |||
92 | { | 92 | { |
93 | return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), sog); | 93 | return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), sog); |
94 | } | 94 | } |
95 | 95 | ||
96 | /// <summary> | 96 | /// <summary> |
97 | /// Create an asset from the given object. | 97 | /// Create an asset from the given object. |
98 | /// </summary> | 98 | /// </summary> |
@@ -102,12 +102,12 @@ namespace OpenSim.Tests.Common | |||
102 | public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) | 102 | public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) |
103 | { | 103 | { |
104 | return CreateAsset( | 104 | return CreateAsset( |
105 | assetUuid, | 105 | assetUuid, |
106 | AssetType.Object, | 106 | AssetType.Object, |
107 | Encoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)), | 107 | Encoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)), |
108 | sog.OwnerID); | 108 | sog.OwnerID); |
109 | } | 109 | } |
110 | 110 | ||
111 | /// <summary> | 111 | /// <summary> |
112 | /// Create an asset from the given scene object. | 112 | /// Create an asset from the given scene object. |
113 | /// </summary> | 113 | /// </summary> |
@@ -120,8 +120,8 @@ namespace OpenSim.Tests.Common | |||
120 | public static AssetBase CreateAsset(int assetUuidTail, CoalescedSceneObjects coa) | 120 | public static AssetBase CreateAsset(int assetUuidTail, CoalescedSceneObjects coa) |
121 | { | 121 | { |
122 | return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), coa); | 122 | return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), coa); |
123 | } | 123 | } |
124 | 124 | ||
125 | /// <summary> | 125 | /// <summary> |
126 | /// Create an asset from the given scene object. | 126 | /// Create an asset from the given scene object. |
127 | /// </summary> | 127 | /// </summary> |
@@ -131,12 +131,12 @@ namespace OpenSim.Tests.Common | |||
131 | public static AssetBase CreateAsset(UUID assetUuid, CoalescedSceneObjects coa) | 131 | public static AssetBase CreateAsset(UUID assetUuid, CoalescedSceneObjects coa) |
132 | { | 132 | { |
133 | return CreateAsset( | 133 | return CreateAsset( |
134 | assetUuid, | 134 | assetUuid, |
135 | AssetType.Object, | 135 | AssetType.Object, |
136 | Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)), | 136 | Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)), |
137 | coa.CreatorId); | 137 | coa.CreatorId); |
138 | } | 138 | } |
139 | 139 | ||
140 | /// <summary> | 140 | /// <summary> |
141 | /// Create an asset from the given data. | 141 | /// Create an asset from the given data. |
142 | /// </summary> | 142 | /// </summary> |
@@ -148,7 +148,7 @@ namespace OpenSim.Tests.Common | |||
148 | 148 | ||
149 | return CreateAsset(assetUuid, assetType, anc.AssetData, creatorID); | 149 | return CreateAsset(assetUuid, assetType, anc.AssetData, creatorID); |
150 | } | 150 | } |
151 | 151 | ||
152 | /// <summary> | 152 | /// <summary> |
153 | /// Create an asset from the given data. | 153 | /// Create an asset from the given data. |
154 | /// </summary> | 154 | /// </summary> |
@@ -158,9 +158,9 @@ namespace OpenSim.Tests.Common | |||
158 | asset.Data = data; | 158 | asset.Data = data; |
159 | return asset; | 159 | return asset; |
160 | } | 160 | } |
161 | 161 | ||
162 | public static string ReadAssetAsString(IAssetService assetService, UUID uuid) | 162 | public static string ReadAssetAsString(IAssetService assetService, UUID uuid) |
163 | { | 163 | { |
164 | byte[] assetData = assetService.GetData(uuid.ToString()); | 164 | byte[] assetData = assetService.GetData(uuid.ToString()); |
165 | return Encoding.ASCII.GetString(assetData); | 165 | return Encoding.ASCII.GetString(assetData); |
166 | } | 166 | } |
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 | |||
59 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(null), "Failed on null."); | 59 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(null), "Failed on null."); |
60 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(""), "Failed on empty path."); | 60 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(""), "Failed on empty path."); |
61 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams("corruptUrl"), "Failed on corrupt url."); | 61 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams("corruptUrl"), "Failed on corrupt url."); |
62 | 62 | ||
63 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath), "Failed on empty params."); | 63 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath), "Failed on empty params."); |
64 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath + "/"), "Failed on single slash."); | 64 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath + "/"), "Failed on single slash."); |
65 | 65 | ||
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 | |||
48 | { | 48 | { |
49 | public static ScenePresence AddChildClient( | 49 | public static ScenePresence AddChildClient( |
50 | Scene scene, LLUDPServer udpServer, UUID agentId, UUID sessionId, uint circuitCode) | 50 | Scene scene, LLUDPServer udpServer, UUID agentId, UUID sessionId, uint circuitCode) |
51 | { | 51 | { |
52 | IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); | 52 | IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); |
53 | 53 | ||
54 | UseCircuitCodePacket uccp = new UseCircuitCodePacket(); | 54 | 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 | |||
56 | /// </summary> | 56 | /// </summary> |
57 | /// <param name='tc'></param> | 57 | /// <param name='tc'></param> |
58 | /// <param name='neighbourTcs'> | 58 | /// <param name='neighbourTcs'> |
59 | /// A list that will be populated with any TestClients set up in response to | 59 | /// A list that will be populated with any TestClients set up in response to |
60 | /// being informed about a destination region. | 60 | /// being informed about a destination region. |
61 | /// </param> | 61 | /// </param> |
62 | public static void SetupInformClientOfNeighbourTriggersNeighbourClientCreate( | 62 | public static void SetupInformClientOfNeighbourTriggersNeighbourClientCreate( |
@@ -71,7 +71,7 @@ namespace OpenSim.Tests.Common | |||
71 | Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y); | 71 | Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y); |
72 | 72 | ||
73 | m_log.DebugFormat( | 73 | m_log.DebugFormat( |
74 | "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", | 74 | "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", |
75 | x, y, neighbourExternalEndPoint); | 75 | x, y, neighbourExternalEndPoint); |
76 | 76 | ||
77 | AgentCircuitData newAgent = tc.RequestClientInfo(); | 77 | AgentCircuitData newAgent = tc.RequestClientInfo(); |
@@ -91,20 +91,20 @@ namespace OpenSim.Tests.Common | |||
91 | /// </summary> | 91 | /// </summary> |
92 | /// <param name='tc'></param> | 92 | /// <param name='tc'></param> |
93 | /// <param name='neighbourTcs'> | 93 | /// <param name='neighbourTcs'> |
94 | /// A list that will be populated with any TestClients set up in response to | 94 | /// A list that will be populated with any TestClients set up in response to |
95 | /// being informed about a destination region. | 95 | /// being informed about a destination region. |
96 | /// </param> | 96 | /// </param> |
97 | public static void SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement( | 97 | public static void SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement( |
98 | TestClient client, List<TestClient> destinationClients) | 98 | TestClient client, List<TestClient> destinationClients) |
99 | { | 99 | { |
100 | client.OnTestClientSendRegionTeleport | 100 | client.OnTestClientSendRegionTeleport |
101 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) => | 101 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) => |
102 | { | 102 | { |
103 | uint x, y; | 103 | uint x, y; |
104 | Util.RegionHandleToRegionLoc(regionHandle, out x, out y); | 104 | Util.RegionHandleToRegionLoc(regionHandle, out x, out y); |
105 | 105 | ||
106 | m_log.DebugFormat( | 106 | m_log.DebugFormat( |
107 | "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", | 107 | "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", |
108 | x, y, regionExternalEndPoint); | 108 | x, y, regionExternalEndPoint); |
109 | 109 | ||
110 | AgentCircuitData newAgent = client.RequestClientInfo(); | 110 | 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 | |||
102 | 102 | ||
103 | m_physicsScene = StartPhysicsScene(); | 103 | m_physicsScene = StartPhysicsScene(); |
104 | 104 | ||
105 | SimDataService | 105 | SimDataService |
106 | = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); | 106 | = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); |
107 | } | 107 | } |
108 | 108 | ||
@@ -146,7 +146,7 @@ namespace OpenSim.Tests.Common | |||
146 | 146 | ||
147 | // We must set up a console otherwise setup of some modules may fail | 147 | // We must set up a console otherwise setup of some modules may fail |
148 | MainConsole.Instance = new MockConsole(); | 148 | MainConsole.Instance = new MockConsole(); |
149 | 149 | ||
150 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); | 150 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); |
151 | regInfo.RegionName = name; | 151 | regInfo.RegionName = name; |
152 | regInfo.RegionID = id; | 152 | regInfo.RegionID = id; |
@@ -199,13 +199,13 @@ namespace OpenSim.Tests.Common | |||
199 | m_presenceService.AddRegion(testScene); | 199 | m_presenceService.AddRegion(testScene); |
200 | m_presenceService.RegionLoaded(testScene); | 200 | m_presenceService.RegionLoaded(testScene); |
201 | testScene.AddRegionModule(m_presenceService.Name, m_presenceService); | 201 | testScene.AddRegionModule(m_presenceService.Name, m_presenceService); |
202 | 202 | ||
203 | 203 | ||
204 | testScene.SetModuleInterfaces(); | 204 | testScene.SetModuleInterfaces(); |
205 | 205 | ||
206 | testScene.LandChannel = new TestLandChannel(testScene); | 206 | testScene.LandChannel = new TestLandChannel(testScene); |
207 | testScene.LoadWorldMap(); | 207 | testScene.LoadWorldMap(); |
208 | 208 | ||
209 | testScene.LoginsEnabled = true; | 209 | testScene.LoginsEnabled = true; |
210 | testScene.RegisterRegionWithGrid(); | 210 | testScene.RegisterRegionWithGrid(); |
211 | 211 | ||
@@ -217,10 +217,10 @@ namespace OpenSim.Tests.Common | |||
217 | private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache) | 217 | private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache) |
218 | { | 218 | { |
219 | IConfigSource config = new IniConfigSource(); | 219 | IConfigSource config = new IniConfigSource(); |
220 | config.AddConfig("Modules"); | 220 | config.AddConfig("Modules"); |
221 | config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); | 221 | config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); |
222 | config.AddConfig("AssetService"); | 222 | config.AddConfig("AssetService"); |
223 | config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); | 223 | config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); |
224 | config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); | 224 | config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); |
225 | 225 | ||
226 | LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); | 226 | LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); |
@@ -235,7 +235,7 @@ namespace OpenSim.Tests.Common | |||
235 | 235 | ||
236 | cache.Initialise(cacheConfig); | 236 | cache.Initialise(cacheConfig); |
237 | } | 237 | } |
238 | 238 | ||
239 | return assetService; | 239 | return assetService; |
240 | } | 240 | } |
241 | 241 | ||
@@ -257,7 +257,7 @@ namespace OpenSim.Tests.Common | |||
257 | 257 | ||
258 | private static LocalInventoryServicesConnector StartInventoryService() | 258 | private static LocalInventoryServicesConnector StartInventoryService() |
259 | { | 259 | { |
260 | IConfigSource config = new IniConfigSource(); | 260 | IConfigSource config = new IniConfigSource(); |
261 | config.AddConfig("Modules"); | 261 | config.AddConfig("Modules"); |
262 | config.AddConfig("InventoryService"); | 262 | config.AddConfig("InventoryService"); |
263 | config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); | 263 | config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); |
@@ -266,8 +266,8 @@ namespace OpenSim.Tests.Common | |||
266 | 266 | ||
267 | LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector(); | 267 | LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector(); |
268 | inventoryService.Initialise(config); | 268 | inventoryService.Initialise(config); |
269 | 269 | ||
270 | return inventoryService; | 270 | return inventoryService; |
271 | } | 271 | } |
272 | 272 | ||
273 | private static LocalGridServicesConnector StartGridService() | 273 | private static LocalGridServicesConnector StartGridService() |
@@ -282,7 +282,7 @@ namespace OpenSim.Tests.Common | |||
282 | 282 | ||
283 | LocalGridServicesConnector gridService = new LocalGridServicesConnector(); | 283 | LocalGridServicesConnector gridService = new LocalGridServicesConnector(); |
284 | gridService.Initialise(config); | 284 | gridService.Initialise(config); |
285 | 285 | ||
286 | return gridService; | 286 | return gridService; |
287 | } | 287 | } |
288 | 288 | ||
@@ -303,7 +303,7 @@ namespace OpenSim.Tests.Common | |||
303 | 303 | ||
304 | LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector(); | 304 | LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector(); |
305 | userAccountService.Initialise(config); | 305 | userAccountService.Initialise(config); |
306 | 306 | ||
307 | return userAccountService; | 307 | return userAccountService; |
308 | } | 308 | } |
309 | 309 | ||
@@ -328,7 +328,7 @@ namespace OpenSim.Tests.Common | |||
328 | 328 | ||
329 | LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector(); | 329 | LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector(); |
330 | presenceService.Initialise(config); | 330 | presenceService.Initialise(config); |
331 | 331 | ||
332 | return presenceService; | 332 | return presenceService; |
333 | } | 333 | } |
334 | 334 | ||
@@ -384,8 +384,8 @@ namespace OpenSim.Tests.Common | |||
384 | /// </summary> | 384 | /// </summary> |
385 | /// <remarks> | 385 | /// <remarks> |
386 | /// If called directly, then all the modules must be shared modules. | 386 | /// If called directly, then all the modules must be shared modules. |
387 | /// | 387 | /// |
388 | /// We are emulating here the normal calls made to setup region modules | 388 | /// We are emulating here the normal calls made to setup region modules |
389 | /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). | 389 | /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). |
390 | /// TODO: Need to reuse normal runtime module code. | 390 | /// TODO: Need to reuse normal runtime module code. |
391 | /// </remarks> | 391 | /// </remarks> |
@@ -655,7 +655,7 @@ namespace OpenSim.Tests.Common | |||
655 | 655 | ||
656 | return so; | 656 | return so; |
657 | } | 657 | } |
658 | 658 | ||
659 | /// <summary> | 659 | /// <summary> |
660 | /// Create a scene object part. | 660 | /// Create a scene object part. |
661 | /// </summary> | 661 | /// </summary> |
@@ -664,10 +664,10 @@ namespace OpenSim.Tests.Common | |||
664 | /// <param name="ownerId"></param> | 664 | /// <param name="ownerId"></param> |
665 | /// <returns></returns> | 665 | /// <returns></returns> |
666 | public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId) | 666 | public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId) |
667 | { | 667 | { |
668 | return new SceneObjectPart( | 668 | return new SceneObjectPart( |
669 | ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 669 | ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
670 | { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) }; | 670 | { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) }; |
671 | } | 671 | } |
672 | 672 | ||
673 | /// <summary> | 673 | /// <summary> |
@@ -682,10 +682,10 @@ namespace OpenSim.Tests.Common | |||
682 | /// <param name="ownerId"></param> | 682 | /// <param name="ownerId"></param> |
683 | /// <returns></returns> | 683 | /// <returns></returns> |
684 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) | 684 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) |
685 | { | 685 | { |
686 | return CreateSceneObject(parts, ownerId, 0x1); | 686 | return CreateSceneObject(parts, ownerId, 0x1); |
687 | } | 687 | } |
688 | 688 | ||
689 | /// <summary> | 689 | /// <summary> |
690 | /// Create a scene object but do not add it to the scene. | 690 | /// Create a scene object but do not add it to the scene. |
691 | /// </summary> | 691 | /// </summary> |
@@ -697,10 +697,10 @@ namespace OpenSim.Tests.Common | |||
697 | /// </param> | 697 | /// </param> |
698 | /// <returns></returns> | 698 | /// <returns></returns> |
699 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail) | 699 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail) |
700 | { | 700 | { |
701 | return CreateSceneObject(parts, ownerId, "", uuidTail); | 701 | return CreateSceneObject(parts, ownerId, "", uuidTail); |
702 | } | 702 | } |
703 | 703 | ||
704 | /// <summary> | 704 | /// <summary> |
705 | /// Create a scene object but do not add it to the scene. | 705 | /// Create a scene object but do not add it to the scene. |
706 | /// </summary> | 706 | /// </summary> |
@@ -718,22 +718,22 @@ namespace OpenSim.Tests.Common | |||
718 | /// </param> | 718 | /// </param> |
719 | /// <returns></returns> | 719 | /// <returns></returns> |
720 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail) | 720 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail) |
721 | { | 721 | { |
722 | string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail); | 722 | string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail); |
723 | 723 | ||
724 | SceneObjectGroup sog | 724 | SceneObjectGroup sog |
725 | = new SceneObjectGroup( | 725 | = new SceneObjectGroup( |
726 | CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId)); | 726 | CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId)); |
727 | 727 | ||
728 | if (parts > 1) | 728 | if (parts > 1) |
729 | for (int i = 2; i <= parts; i++) | 729 | for (int i = 2; i <= parts; i++) |
730 | sog.AddPart( | 730 | sog.AddPart( |
731 | CreateSceneObjectPart( | 731 | CreateSceneObjectPart( |
732 | string.Format("{0}Part{1}", partNamePrefix, i), | 732 | string.Format("{0}Part{1}", partNamePrefix, i), |
733 | new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)), | 733 | new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)), |
734 | ownerId)); | 734 | ownerId)); |
735 | 735 | ||
736 | return sog; | 736 | return sog; |
737 | } | 737 | } |
738 | } | 738 | } |
739 | } | 739 | } |
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 | |||
78 | = AssetHelpers.CreateAsset(assetID, AssetType.Notecard, nc.AssetData, UUID.Zero); | 78 | = AssetHelpers.CreateAsset(assetID, AssetType.Notecard, nc.AssetData, UUID.Zero); |
79 | assetService.Store(ncAsset); | 79 | assetService.Store(ncAsset); |
80 | 80 | ||
81 | TaskInventoryItem ncItem | 81 | TaskInventoryItem ncItem |
82 | = new TaskInventoryItem | 82 | = new TaskInventoryItem |
83 | { Name = itemName, AssetID = assetID, ItemID = itemID, | 83 | { Name = itemName, AssetID = assetID, ItemID = itemID, |
84 | Type = (int)AssetType.Notecard, InvType = (int)InventoryType.Notecard }; | 84 | Type = (int)AssetType.Notecard, InvType = (int)InventoryType.Notecard }; |
85 | part.Inventory.AddInventoryItem(ncItem, true); | 85 | part.Inventory.AddInventoryItem(ncItem, true); |
86 | 86 | ||
87 | return ncItem; | 87 | return ncItem; |
88 | } | 88 | } |
89 | 89 | ||
@@ -119,7 +119,7 @@ namespace OpenSim.Tests.Common | |||
119 | { | 119 | { |
120 | return AddScript(assetService, part, UUID.Random(), UUID.Random(), scriptName, scriptSource); | 120 | return AddScript(assetService, part, UUID.Random(), UUID.Random(), scriptName, scriptSource); |
121 | } | 121 | } |
122 | 122 | ||
123 | /// <summary> | 123 | /// <summary> |
124 | /// Add a simple script to the given part. | 124 | /// Add a simple script to the given part. |
125 | /// </summary> | 125 | /// </summary> |
@@ -145,7 +145,7 @@ namespace OpenSim.Tests.Common | |||
145 | = AssetHelpers.CreateAsset(assetId, AssetType.LSLText, ast.AssetData, UUID.Zero); | 145 | = AssetHelpers.CreateAsset(assetId, AssetType.LSLText, ast.AssetData, UUID.Zero); |
146 | assetService.Store(asset); | 146 | assetService.Store(asset); |
147 | TaskInventoryItem item | 147 | TaskInventoryItem item |
148 | = new TaskInventoryItem | 148 | = new TaskInventoryItem |
149 | { Name = scriptName, AssetID = assetId, ItemID = itemId, | 149 | { Name = scriptName, AssetID = assetId, ItemID = itemId, |
150 | Type = (int)AssetType.LSLText, InvType = (int)InventoryType.LSL }; | 150 | Type = (int)AssetType.LSLText, InvType = (int)InventoryType.LSL }; |
151 | part.Inventory.AddInventoryItem(item, true); | 151 | 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 | |||
83 | // /// </param> | 83 | // /// </param> |
84 | // /// <returns></returns> | 84 | // /// <returns></returns> |
85 | // public static CachedUserInfo CreateUserWithInventory( | 85 | // public static CachedUserInfo CreateUserWithInventory( |
86 | // CommunicationsManager commsManager, string firstName, string lastName, | 86 | // CommunicationsManager commsManager, string firstName, string lastName, |
87 | // UUID userId, OnInventoryReceivedDelegate callback) | 87 | // UUID userId, OnInventoryReceivedDelegate callback) |
88 | // { | 88 | // { |
89 | // return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); | 89 | // return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); |
@@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common | |||
147 | CreateUserWithInventory(scene, ua, pw); | 147 | CreateUserWithInventory(scene, ua, pw); |
148 | return ua; | 148 | return ua; |
149 | } | 149 | } |
150 | 150 | ||
151 | public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw) | 151 | public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw) |
152 | { | 152 | { |
153 | // FIXME: This should really be set up by UserAccount itself | 153 | // 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 | |||
101 | Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId) | 101 | Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId) |
102 | { | 102 | { |
103 | return AddInventoryItem( | 103 | return AddInventoryItem( |
104 | scene, itemName, itemId, itemType, asset, userId, | 104 | scene, itemName, itemId, itemType, asset, userId, |
105 | scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name); | 105 | scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name); |
106 | } | 106 | } |
107 | 107 | ||
@@ -128,7 +128,7 @@ namespace OpenSim.Tests.Common | |||
128 | item.Owner = userId; | 128 | item.Owner = userId; |
129 | item.AssetType = asset.Type; | 129 | item.AssetType = asset.Type; |
130 | item.InvType = (int)itemType; | 130 | item.InvType = (int)itemType; |
131 | item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All | | 131 | item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All | |
132 | (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); | 132 | (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); |
133 | item.CurrentPermissions = (uint)OpenMetaverse.PermissionMask.All | | 133 | item.CurrentPermissions = (uint)OpenMetaverse.PermissionMask.All | |
134 | (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); | 134 | (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); |
@@ -211,7 +211,7 @@ namespace OpenSim.Tests.Common | |||
211 | /// </param> | 211 | /// </param> |
212 | /// <param name="useExistingFolders"> | 212 | /// <param name="useExistingFolders"> |
213 | /// If true, then folders in the path which already the same name are | 213 | /// If true, then folders in the path which already the same name are |
214 | /// used. This applies to the terminal folder as well. | 214 | /// used. This applies to the terminal folder as well. |
215 | /// If false, then all folders in the path are created, even if there is already a folder at a particular | 215 | /// If false, then all folders in the path are created, even if there is already a folder at a particular |
216 | /// level with the same name. | 216 | /// level with the same name. |
217 | /// </param> | 217 | /// </param> |
@@ -236,7 +236,7 @@ namespace OpenSim.Tests.Common | |||
236 | /// </param> | 236 | /// </param> |
237 | /// <param name="useExistingFolders"> | 237 | /// <param name="useExistingFolders"> |
238 | /// If true, then folders in the path which already the same name are | 238 | /// If true, then folders in the path which already the same name are |
239 | /// used. This applies to the terminal folder as well. | 239 | /// used. This applies to the terminal folder as well. |
240 | /// If false, then all folders in the path are created, even if there is already a folder at a particular | 240 | /// If false, then all folders in the path are created, even if there is already a folder at a particular |
241 | /// level with the same name. | 241 | /// level with the same name. |
242 | /// </param> | 242 | /// </param> |
@@ -259,7 +259,7 @@ namespace OpenSim.Tests.Common | |||
259 | /// Create inventory folders starting from a given parent folder | 259 | /// Create inventory folders starting from a given parent folder |
260 | /// </summary> | 260 | /// </summary> |
261 | /// <remarks> | 261 | /// <remarks> |
262 | /// If any stem of the path names folders that already exist then these are not recreated. This includes the | 262 | /// If any stem of the path names folders that already exist then these are not recreated. This includes the |
263 | /// final folder. | 263 | /// final folder. |
264 | /// TODO: May need to make it an option to create duplicate folders. | 264 | /// TODO: May need to make it an option to create duplicate folders. |
265 | /// </remarks> | 265 | /// </remarks> |
@@ -271,7 +271,7 @@ namespace OpenSim.Tests.Common | |||
271 | /// </param> | 271 | /// </param> |
272 | /// <param name="useExistingFolders"> | 272 | /// <param name="useExistingFolders"> |
273 | /// If true, then folders in the path which already the same name are | 273 | /// If true, then folders in the path which already the same name are |
274 | /// used. This applies to the terminal folder as well. | 274 | /// used. This applies to the terminal folder as well. |
275 | /// If false, then all folders in the path are created, even if there is already a folder at a particular | 275 | /// If false, then all folders in the path are created, even if there is already a folder at a particular |
276 | /// level with the same name. | 276 | /// level with the same name. |
277 | /// </param> | 277 | /// </param> |
@@ -299,10 +299,10 @@ namespace OpenSim.Tests.Common | |||
299 | else | 299 | else |
300 | folderIdForCreate = folderId; | 300 | folderIdForCreate = folderId; |
301 | 301 | ||
302 | folder | 302 | folder |
303 | = new InventoryFolderBase( | 303 | = new InventoryFolderBase( |
304 | folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0); | 304 | folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0); |
305 | 305 | ||
306 | inventoryService.AddFolder(folder); | 306 | inventoryService.AddFolder(folder); |
307 | } | 307 | } |
308 | // else | 308 | // else |