diff options
author | Melanie | 2009-10-02 08:23:38 +0100 |
---|---|---|
committer | Melanie | 2009-10-02 08:23:38 +0100 |
commit | 31d8cec0f8cd47ff445edc7771e5e73825a57927 (patch) | |
tree | a2d60604317739fa530502c40ffc71bab2a5c494 /OpenSim/Tests/Common | |
parent | Restore the missing image handling to the image manager. The missing (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.zip opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.gz opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.bz2 opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.xz |
Merge branch 'master' into diva-textures
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r-- | OpenSim/Tests/Common/LongRunningAttribute.cs | 2 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestAssetService.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | 6 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestLandChannel.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestScene.cs | 6 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs | 76 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 29 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs | 8 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 14 |
11 files changed, 130 insertions, 27 deletions
diff --git a/OpenSim/Tests/Common/LongRunningAttribute.cs b/OpenSim/Tests/Common/LongRunningAttribute.cs index 37cbbcd..9831ea8 100644 --- a/OpenSim/Tests/Common/LongRunningAttribute.cs +++ b/OpenSim/Tests/Common/LongRunningAttribute.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common | |||
43 | } | 43 | } |
44 | 44 | ||
45 | protected LongRunningAttribute(string category) : base(category) | 45 | protected LongRunningAttribute(string category) : base(category) |
46 | { | 46 | { |
47 | } | 47 | } |
48 | } | 48 | } |
49 | } | 49 | } |
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 | |||
39 | /// tests are single threaded. | 39 | /// tests are single threaded. |
40 | /// </summary> | 40 | /// </summary> |
41 | public class TestAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin | 41 | public class TestAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin |
42 | { | 42 | { |
43 | public string Version { get { return "0"; } } | 43 | public string Version { get { return "0"; } } |
44 | public string Name { get { return "TestAssetDataPlugin"; } } | 44 | public string Name { get { return "TestAssetDataPlugin"; } } |
45 | 45 | ||
@@ -59,6 +59,6 @@ namespace OpenSim.Tests.Common.Mock | |||
59 | assets.Add(asset); | 59 | assets.Add(asset); |
60 | } | 60 | } |
61 | 61 | ||
62 | public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); } | 62 | public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); } |
63 | } | 63 | } |
64 | } \ No newline at end of file | 64 | } \ 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 | |||
49 | if (Assets.ContainsKey(id)) | 49 | if (Assets.ContainsKey(id)) |
50 | asset = Assets[id]; | 50 | asset = Assets[id]; |
51 | else | 51 | else |
52 | asset = null; | 52 | asset = null; |
53 | 53 | ||
54 | return asset; | 54 | return asset; |
55 | } | 55 | } |
@@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common.Mock | |||
65 | } | 65 | } |
66 | 66 | ||
67 | public bool Get(string id, object sender, AssetRetrieved handler) | 67 | public bool Get(string id, object sender, AssetRetrieved handler) |
68 | { | 68 | { |
69 | handler(id, sender, Get(id)); | 69 | handler(id, sender, Get(id)); |
70 | 70 | ||
71 | return true; | 71 | return true; |
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs index 4313c96..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 | |||
56 | 56 | ||
57 | public TestCommunicationsManager(NetworkServersInfo serversInfo) | 57 | public TestCommunicationsManager(NetworkServersInfo serversInfo) |
58 | : base(serversInfo, null) | 58 | : base(serversInfo, null) |
59 | { | 59 | { |
60 | 60 | ||
61 | LocalUserServices lus = new LocalUserServices(991, 992, this); | 61 | LocalUserServices lus = new LocalUserServices(991, 992, this); |
62 | lus.AddPlugin(new TemporaryUserProfilePlugin()); | 62 | lus.AddPlugin(new TemporaryUserProfilePlugin()); |
@@ -65,8 +65,6 @@ namespace OpenSim.Tests.Common.Mock | |||
65 | m_userService = lus; | 65 | m_userService = lus; |
66 | m_userAdminService = lus; | 66 | m_userAdminService = lus; |
67 | 67 | ||
68 | LocalBackEndServices gs = new LocalBackEndServices(); | ||
69 | m_gridService = gs; | ||
70 | } | 68 | } |
71 | } | 69 | } |
72 | } | 70 | } |
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 | |||
52 | //// <value> | 52 | //// <value> |
53 | /// Inventory items | 53 | /// Inventory items |
54 | /// </value> | 54 | /// </value> |
55 | private Dictionary<UUID, InventoryItemBase> m_items = new Dictionary<UUID, InventoryItemBase>(); | 55 | private Dictionary<UUID, InventoryItemBase> m_items = new Dictionary<UUID, InventoryItemBase>(); |
56 | 56 | ||
57 | /// <value> | 57 | /// <value> |
58 | /// User root folders | 58 | /// User root folders |
@@ -120,7 +120,7 @@ namespace OpenSim.Tests.Common.Mock | |||
120 | } | 120 | } |
121 | 121 | ||
122 | return folders; | 122 | return folders; |
123 | } | 123 | } |
124 | 124 | ||
125 | public InventoryFolderBase getInventoryFolder(UUID folderId) | 125 | public InventoryFolderBase getInventoryFolder(UUID folderId) |
126 | { | 126 | { |
@@ -191,7 +191,7 @@ namespace OpenSim.Tests.Common.Mock | |||
191 | public InventoryItemBase queryInventoryItem(UUID item) | 191 | public InventoryItemBase queryInventoryItem(UUID item) |
192 | { | 192 | { |
193 | return null; | 193 | return null; |
194 | } | 194 | } |
195 | 195 | ||
196 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; } | 196 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; } |
197 | } | 197 | } |
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; | |||
31 | using OpenSim.Region.Framework.Interfaces; | 31 | using OpenSim.Region.Framework.Interfaces; |
32 | 32 | ||
33 | namespace OpenSim.Tests.Common.Mock | 33 | namespace OpenSim.Tests.Common.Mock |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Land channel for test purposes | 36 | /// Land channel for test purposes |
37 | /// </summary> | 37 | /// </summary> |
@@ -40,7 +40,7 @@ namespace OpenSim.Tests.Common.Mock | |||
40 | public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; } | 40 | public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; } |
41 | public List<ILandObject> AllParcels() { return null; } | 41 | public List<ILandObject> AllParcels() { return null; } |
42 | public ILandObject GetLandObject(int x, int y) { return null; } | 42 | public ILandObject GetLandObject(int x, int y) { return null; } |
43 | public ILandObject GetLandObject(int localID) { return null; } | 43 | public ILandObject GetLandObject(int localID) { return null; } |
44 | public ILandObject GetLandObject(float x, float y) { return null; } | 44 | public ILandObject GetLandObject(float x, float y) { return null; } |
45 | public bool IsLandPrimCountTainted() { return false; } | 45 | public bool IsLandPrimCountTainted() { return false; } |
46 | public bool IsForcefulBansAllowed() { return false; } | 46 | 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; | |||
35 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
36 | 36 | ||
37 | namespace OpenSim.Tests.Common.Mock | 37 | namespace OpenSim.Tests.Common.Mock |
38 | { | 38 | { |
39 | public class TestScene : Scene | 39 | public class TestScene : Scene |
40 | { | 40 | { |
41 | public TestScene( | 41 | public TestScene( |
42 | RegionInfo regInfo, AgentCircuitManager authen, | 42 | RegionInfo regInfo, AgentCircuitManager authen, |
43 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager, | 43 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager, |
@@ -60,7 +60,7 @@ namespace OpenSim.Tests.Common.Mock | |||
60 | { | 60 | { |
61 | reason = String.Empty; | 61 | reason = String.Empty; |
62 | return true; | 62 | return true; |
63 | } | 63 | } |
64 | 64 | ||
65 | public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter | 65 | public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter |
66 | { | 66 | { |
diff --git a/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs b/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs new file mode 100644 index 0000000..eaf8b39 --- /dev/null +++ b/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using NUnit.Framework; | ||
32 | using OpenSim.Framework; | ||
33 | using OpenSim.Framework.Servers; | ||
34 | using OpenSim.Framework.Servers.HttpServer; | ||
35 | using OpenSim.Tests.Common.Mock; | ||
36 | |||
37 | namespace OpenSim.Tests.Common.Setup | ||
38 | { | ||
39 | public class BaseRequestHandlerTestHelper | ||
40 | { | ||
41 | private static string[] m_emptyStringArray = new string[] { }; | ||
42 | |||
43 | public static void BaseTestGetParams(BaseRequestHandler handler, string assetsPath) | ||
44 | { | ||
45 | Assert.AreEqual(String.Empty, handler.GetParam(null), "Failed on null path."); | ||
46 | Assert.AreEqual(String.Empty, handler.GetParam(""), "Failed on empty path."); | ||
47 | Assert.AreEqual(String.Empty, handler.GetParam("s"), "Failed on short url."); | ||
48 | Assert.AreEqual(String.Empty, handler.GetParam("corruptUrl"), "Failed on corruptUrl."); | ||
49 | |||
50 | Assert.AreEqual(String.Empty, handler.GetParam(assetsPath)); | ||
51 | Assert.AreEqual("/", handler.GetParam(assetsPath + "/")); | ||
52 | Assert.AreEqual("/a", handler.GetParam(assetsPath + "/a")); | ||
53 | Assert.AreEqual("/b/", handler.GetParam(assetsPath + "/b/")); | ||
54 | Assert.AreEqual("/c/d", handler.GetParam(assetsPath + "/c/d")); | ||
55 | Assert.AreEqual("/e/f/", handler.GetParam(assetsPath + "/e/f/")); | ||
56 | } | ||
57 | |||
58 | public static void BaseTestSplitParams(BaseRequestHandler handler, string assetsPath) | ||
59 | { | ||
60 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(null), "Failed on null."); | ||
61 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(""), "Failed on empty path."); | ||
62 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams("corruptUrl"), "Failed on corrupt url."); | ||
63 | |||
64 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath), "Failed on empty params."); | ||
65 | Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath + "/"), "Failed on single slash."); | ||
66 | |||
67 | Assert.AreEqual(new string[] { "a" }, handler.SplitParams(assetsPath + "/a"), "Failed on first segment."); | ||
68 | Assert.AreEqual(new string[] { "b" }, handler.SplitParams(assetsPath + "/b/"), "Failed on second slash."); | ||
69 | Assert.AreEqual(new string[] { "c", "d" }, handler.SplitParams(assetsPath + "/c/d"), "Failed on second segment."); | ||
70 | Assert.AreEqual(new string[] { "e", "f" }, handler.SplitParams(assetsPath + "/e/f/"), "Failed on trailing slash."); | ||
71 | } | ||
72 | |||
73 | public static byte[] EmptyByteArray = new byte[] {}; | ||
74 | |||
75 | } | ||
76 | } | ||
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 0d8baad..53f24d9 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -44,6 +44,7 @@ using OpenSim.Region.CoreModules.Agent.Capabilities; | |||
44 | using OpenSim.Region.CoreModules.Avatar.Gods; | 44 | using OpenSim.Region.CoreModules.Avatar.Gods; |
45 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset; | 45 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset; |
46 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; | 46 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; |
47 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; | ||
47 | using OpenSim.Services.Interfaces; | 48 | using OpenSim.Services.Interfaces; |
48 | using OpenSim.Tests.Common.Mock; | 49 | using OpenSim.Tests.Common.Mock; |
49 | 50 | ||
@@ -58,6 +59,7 @@ namespace OpenSim.Tests.Common.Setup | |||
58 | // CommunicationsManager. | 59 | // CommunicationsManager. |
59 | private static ISharedRegionModule m_assetService = null; | 60 | private static ISharedRegionModule m_assetService = null; |
60 | private static ISharedRegionModule m_inventoryService = null; | 61 | private static ISharedRegionModule m_inventoryService = null; |
62 | private static ISharedRegionModule m_gridService = null; | ||
61 | private static TestCommunicationsManager commsManager = null; | 63 | private static TestCommunicationsManager commsManager = null; |
62 | 64 | ||
63 | /// <summary> | 65 | /// <summary> |
@@ -110,6 +112,7 @@ namespace OpenSim.Tests.Common.Setup | |||
110 | return SetupScene(name, id, x, y, cm, ""); | 112 | return SetupScene(name, id, x, y, cm, ""); |
111 | } | 113 | } |
112 | 114 | ||
115 | |||
113 | /// <summary> | 116 | /// <summary> |
114 | /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions | 117 | /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions |
115 | /// or a different, to get a brand new scene with new shared region modules. | 118 | /// or a different, to get a brand new scene with new shared region modules. |
@@ -176,6 +179,9 @@ namespace OpenSim.Tests.Common.Setup | |||
176 | StartInventoryService(testScene, true); | 179 | StartInventoryService(testScene, true); |
177 | else | 180 | else |
178 | StartInventoryService(testScene, false); | 181 | StartInventoryService(testScene, false); |
182 | if (realServices.Contains("grid")) | ||
183 | StartGridService(testScene, true); | ||
184 | |||
179 | } | 185 | } |
180 | // If not, make sure the shared module gets references to this new scene | 186 | // If not, make sure the shared module gets references to this new scene |
181 | else | 187 | else |
@@ -241,6 +247,29 @@ namespace OpenSim.Tests.Common.Setup | |||
241 | m_inventoryService = inventoryService; | 247 | m_inventoryService = inventoryService; |
242 | } | 248 | } |
243 | 249 | ||
250 | private static void StartGridService(Scene testScene, bool real) | ||
251 | { | ||
252 | IConfigSource config = new IniConfigSource(); | ||
253 | config.AddConfig("Modules"); | ||
254 | config.AddConfig("GridService"); | ||
255 | config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); | ||
256 | config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData"); | ||
257 | if (real) | ||
258 | config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); | ||
259 | if (m_gridService == null) | ||
260 | { | ||
261 | ISharedRegionModule gridService = new LocalGridServicesConnector(); | ||
262 | gridService.Initialise(config); | ||
263 | m_gridService = gridService; | ||
264 | } | ||
265 | //else | ||
266 | // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService"); | ||
267 | m_gridService.AddRegion(testScene); | ||
268 | m_gridService.RegionLoaded(testScene); | ||
269 | //testScene.AddRegionModule(m_gridService.Name, m_gridService); | ||
270 | } | ||
271 | |||
272 | |||
244 | /// <summary> | 273 | /// <summary> |
245 | /// Setup modules for a scene using their default settings. | 274 | /// Setup modules for a scene using their default settings. |
246 | /// </summary> | 275 | /// </summary> |
diff --git a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs index 3528072..7e0c567 100644 --- a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs | |||
@@ -31,10 +31,10 @@ using OpenSim.Framework; | |||
31 | using OpenSim.Services.Interfaces; | 31 | using OpenSim.Services.Interfaces; |
32 | 32 | ||
33 | namespace OpenSim.Tests.Common | 33 | namespace OpenSim.Tests.Common |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Utility functions for carrying out user inventory related tests. | 36 | /// Utility functions for carrying out user inventory related tests. |
37 | /// </summary> | 37 | /// </summary> |
38 | public static class UserInventoryTestUtils | 38 | public static class UserInventoryTestUtils |
39 | { | 39 | { |
40 | public static readonly string PATH_DELIMITER = "/"; | 40 | public static readonly string PATH_DELIMITER = "/"; |
@@ -78,7 +78,7 @@ namespace OpenSim.Tests.Common | |||
78 | /// </param> | 78 | /// </param> |
79 | /// <returns> | 79 | /// <returns> |
80 | /// The folder created. If the path contains multiple folders then the last one created is returned. | 80 | /// The folder created. If the path contains multiple folders then the last one created is returned. |
81 | /// </returns> | 81 | /// </returns> |
82 | public static InventoryFolderBase CreateInventoryFolder( | 82 | public static InventoryFolderBase CreateInventoryFolder( |
83 | IInventoryService inventoryService, InventoryFolderBase parentFolder, string path) | 83 | IInventoryService inventoryService, InventoryFolderBase parentFolder, string path) |
84 | { | 84 | { |
@@ -91,7 +91,7 @@ namespace OpenSim.Tests.Common | |||
91 | if (components.Length > 1) | 91 | if (components.Length > 1) |
92 | return CreateInventoryFolder(inventoryService, newFolder, components[1]); | 92 | return CreateInventoryFolder(inventoryService, newFolder, components[1]); |
93 | else | 93 | else |
94 | return newFolder; | 94 | return newFolder; |
95 | } | 95 | } |
96 | } | 96 | } |
97 | } \ No newline at end of file | 97 | } \ No newline at end of file |
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index 4ad9926..3ca44a1 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | |||
@@ -31,12 +31,12 @@ using OpenSim.Framework.Communications.Cache; | |||
31 | using OpenSim.Region.Communications.Local; | 31 | using OpenSim.Region.Communications.Local; |
32 | 32 | ||
33 | namespace OpenSim.Tests.Common.Setup | 33 | namespace OpenSim.Tests.Common.Setup |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Utility functions for carrying out user profile related tests. | 36 | /// Utility functions for carrying out user profile related tests. |
37 | /// </summary> | 37 | /// </summary> |
38 | public static class UserProfileTestUtils | 38 | public static class UserProfileTestUtils |
39 | { | 39 | { |
40 | /// <summary> | 40 | /// <summary> |
41 | /// Create a test user with a standard inventory | 41 | /// Create a test user with a standard inventory |
42 | /// </summary> | 42 | /// </summary> |
@@ -51,7 +51,7 @@ namespace OpenSim.Tests.Common.Setup | |||
51 | { | 51 | { |
52 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); | 52 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); |
53 | return CreateUserWithInventory(commsManager, userId, callback); | 53 | return CreateUserWithInventory(commsManager, userId, callback); |
54 | } | 54 | } |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// Create a test user with a standard inventory | 57 | /// Create a test user with a standard inventory |
@@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common.Setup | |||
65 | /// <returns></returns> | 65 | /// <returns></returns> |
66 | public static CachedUserInfo CreateUserWithInventory( | 66 | public static CachedUserInfo CreateUserWithInventory( |
67 | CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback) | 67 | CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback) |
68 | { | 68 | { |
69 | return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback); | 69 | return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback); |
70 | } | 70 | } |
71 | 71 | ||
@@ -84,8 +84,8 @@ namespace OpenSim.Tests.Common.Setup | |||
84 | public static CachedUserInfo CreateUserWithInventory( | 84 | public static CachedUserInfo CreateUserWithInventory( |
85 | CommunicationsManager commsManager, string firstName, string lastName, | 85 | CommunicationsManager commsManager, string firstName, string lastName, |
86 | UUID userId, OnInventoryReceivedDelegate callback) | 86 | UUID userId, OnInventoryReceivedDelegate callback) |
87 | { | 87 | { |
88 | LocalUserServices lus = (LocalUserServices)commsManager.UserService; | 88 | LocalUserServices lus = (LocalUserServices)commsManager.UserService; |
89 | lus.AddUser(firstName, lastName, "troll", "bill@bailey.com", 1000, 1000, userId); | 89 | lus.AddUser(firstName, lastName, "troll", "bill@bailey.com", 1000, 1000, userId); |
90 | 90 | ||
91 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); | 91 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); |
@@ -93,6 +93,6 @@ namespace OpenSim.Tests.Common.Setup | |||
93 | userInfo.FetchInventory(); | 93 | userInfo.FetchInventory(); |
94 | 94 | ||
95 | return userInfo; | 95 | return userInfo; |
96 | } | 96 | } |
97 | } | 97 | } |
98 | } | 98 | } |