aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
authorDiva Canto2011-05-21 14:07:30 -0700
committerDiva Canto2011-05-21 14:07:30 -0700
commit80457111e0779f296080f4e26c6e56ac1263cba4 (patch)
tree4a2df3859ad5f71be49a55add550c98a6af04f68 /OpenSim/Region/CoreModules/Avatar
parentHG Friends working to some extent: friendships offered and accepted correctly... (diff)
parentGet rid of OpenSim.Tests.Common.Setup subpackage in favour of just OpenSim.Te... (diff)
downloadopensim-SC-80457111e0779f296080f4e26c6e56ac1263cba4.zip
opensim-SC-80457111e0779f296080f4e26c6e56ac1263cba4.tar.gz
opensim-SC-80457111e0779f296080f4e26c6e56ac1263cba4.tar.bz2
opensim-SC-80457111e0779f296080f4e26c6e56ac1263cba4.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs13
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs25
3 files changed, 19 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index 5ba08ee..aadeedb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -44,7 +44,6 @@ using OpenSim.Region.Framework.Scenes.Serialization;
44using OpenSim.Services.Interfaces; 44using OpenSim.Services.Interfaces;
45using OpenSim.Tests.Common; 45using OpenSim.Tests.Common;
46using OpenSim.Tests.Common.Mock; 46using OpenSim.Tests.Common.Mock;
47using OpenSim.Tests.Common.Setup;
48 47
49namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests 48namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
50{ 49{
@@ -104,7 +103,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
104 Scene scene = SceneSetupHelpers.SetupScene(); 103 Scene scene = SceneSetupHelpers.SetupScene();
105 SceneSetupHelpers.SetupSceneModules(scene, archiverModule); 104 SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
106 105
107 UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); 106 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
108 107
109 MemoryStream archiveWriteStream = new MemoryStream(); 108 MemoryStream archiveWriteStream = new MemoryStream();
110 109
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 52232a0..d97311a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -44,7 +44,6 @@ using OpenSim.Region.Framework.Scenes.Serialization;
44using OpenSim.Services.Interfaces; 44using OpenSim.Services.Interfaces;
45using OpenSim.Tests.Common; 45using OpenSim.Tests.Common;
46using OpenSim.Tests.Common.Mock; 46using OpenSim.Tests.Common.Mock;
47using OpenSim.Tests.Common.Setup;
48 47
49namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests 48namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
50{ 49{
@@ -72,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
72 TestHelper.InMethod(); 71 TestHelper.InMethod();
73// log4net.Config.XmlConfigurator.Configure(); 72// log4net.Config.XmlConfigurator.Configure();
74 73
75 UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "password"); 74 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password");
76 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); 75 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream);
77 76
78 InventoryItemBase coaItem 77 InventoryItemBase coaItem
@@ -138,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
138 string userLastName = "Stirrup"; 137 string userLastName = "Stirrup";
139 string userPassword = "troll"; 138 string userPassword = "troll";
140 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 139 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
141 UserProfileTestUtils.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); 140 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword);
142 141
143 // Create asset 142 // Create asset
144 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); 143 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
@@ -229,7 +228,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
229 TestHelper.InMethod(); 228 TestHelper.InMethod();
230// log4net.Config.XmlConfigurator.Configure(); 229// log4net.Config.XmlConfigurator.Configure();
231 230
232 UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood"); 231 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood");
233 232
234 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream); 233 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream);
235 InventoryItemBase foundItem1 234 InventoryItemBase foundItem1
@@ -261,8 +260,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
261 TestHelper.InMethod(); 260 TestHelper.InMethod();
262// log4net.Config.XmlConfigurator.Configure(); 261// log4net.Config.XmlConfigurator.Configure();
263 262
264 UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaMT, "meowfood"); 263 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "meowfood");
265 UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaLL2, "hampshire"); 264 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL2, "hampshire");
266 265
267 m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream); 266 m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream);
268 InventoryItemBase foundItem1 267 InventoryItemBase foundItem1
@@ -294,7 +293,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
294 TestHelper.InMethod(); 293 TestHelper.InMethod();
295// log4net.Config.XmlConfigurator.Configure(); 294// log4net.Config.XmlConfigurator.Configure();
296 295
297 UserProfileTestUtils.CreateUserWithInventory(m_scene, m_uaMT, "password"); 296 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "password");
298 m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "password", m_iarStream); 297 m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "password", m_iarStream);
299 298
300 InventoryItemBase foundItem1 299 InventoryItemBase foundItem1
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs
index c7dae52..127d5f8 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs
@@ -44,7 +44,6 @@ using OpenSim.Region.Framework.Scenes.Serialization;
44using OpenSim.Services.Interfaces; 44using OpenSim.Services.Interfaces;
45using OpenSim.Tests.Common; 45using OpenSim.Tests.Common;
46using OpenSim.Tests.Common.Mock; 46using OpenSim.Tests.Common.Mock;
47using OpenSim.Tests.Common.Setup;
48 47
49namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests 48namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
50{ 49{
@@ -71,7 +70,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
71 string userLastName = "Stirrup"; 70 string userLastName = "Stirrup";
72 string userPassword = "troll"; 71 string userPassword = "troll";
73 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 72 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
74 UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); 73 UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword);
75 74
76 // Create asset 75 // Create asset
77 SceneObjectGroup object1; 76 SceneObjectGroup object1;
@@ -184,8 +183,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
184 183
185 SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); 184 SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
186 185
187 UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "meowfood"); 186 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "meowfood");
188 UserProfileTestUtils.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); 187 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
189 188
190 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream); 189 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream);
191 InventoryItemBase foundItem1 190 InventoryItemBase foundItem1
@@ -194,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
194 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 193 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
195 194
196 // Now try loading to a root child folder 195 // Now try loading to a root child folder
197 UserInventoryTestUtils.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xA"); 196 UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xA");
198 MemoryStream archiveReadStream = new MemoryStream(m_iarStream.ToArray()); 197 MemoryStream archiveReadStream = new MemoryStream(m_iarStream.ToArray());
199 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "xA", "meowfood", archiveReadStream); 198 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "xA", "meowfood", archiveReadStream);
200 199
@@ -203,7 +202,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
203 Assert.That(foundItem2, Is.Not.Null, "Didn't find loaded item 2"); 202 Assert.That(foundItem2, Is.Not.Null, "Didn't find loaded item 2");
204 203
205 // Now try loading to a more deeply nested folder 204 // Now try loading to a more deeply nested folder
206 UserInventoryTestUtils.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xB/xC"); 205 UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xB/xC");
207 archiveReadStream = new MemoryStream(archiveReadStream.ToArray()); 206 archiveReadStream = new MemoryStream(archiveReadStream.ToArray());
208 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "xB/xC", "meowfood", archiveReadStream); 207 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "xB/xC", "meowfood", archiveReadStream);
209 208
@@ -226,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
226 Scene scene = SceneSetupHelpers.SetupScene(); 225 Scene scene = SceneSetupHelpers.SetupScene();
227 SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); 226 SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
228 227
229 UserProfileTestUtils.CreateUserWithInventory(scene, m_uaMT, "password"); 228 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password");
230 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/Objects", "password", m_iarStream); 229 archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/Objects", "password", m_iarStream);
231 230
232 InventoryItemBase foundItem1 231 InventoryItemBase foundItem1
@@ -255,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
255 string userFirstName = "Jock"; 254 string userFirstName = "Jock";
256 string userLastName = "Stirrup"; 255 string userLastName = "Stirrup";
257 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 256 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
258 UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); 257 UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood");
259 258
260 // Create asset 259 // Create asset
261 SceneObjectGroup object1; 260 SceneObjectGroup object1;
@@ -328,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
328// log4net.Config.XmlConfigurator.Configure(); 327// log4net.Config.XmlConfigurator.Configure();
329 328
330 Scene scene = SceneSetupHelpers.SetupScene(); 329 Scene scene = SceneSetupHelpers.SetupScene();
331 UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); 330 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
332 331
333 Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); 332 Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>();
334 HashSet<InventoryNodeBase> nodesLoaded = new HashSet<InventoryNodeBase>(); 333 HashSet<InventoryNodeBase> nodesLoaded = new HashSet<InventoryNodeBase>();
@@ -395,13 +394,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
395 //log4net.Config.XmlConfigurator.Configure(); 394 //log4net.Config.XmlConfigurator.Configure();
396 395
397 Scene scene = SceneSetupHelpers.SetupScene(); 396 Scene scene = SceneSetupHelpers.SetupScene();
398 UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); 397 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
399 398
400 string folder1ExistingName = "a"; 399 string folder1ExistingName = "a";
401 string folder2Name = "b"; 400 string folder2Name = "b";
402 401
403 InventoryFolderBase folder1 402 InventoryFolderBase folder1
404 = UserInventoryTestUtils.CreateInventoryFolder( 403 = UserInventoryHelpers.CreateInventoryFolder(
405 scene.InventoryService, ua1.PrincipalID, folder1ExistingName); 404 scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
406 405
407 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); 406 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
@@ -446,13 +445,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
446// log4net.Config.XmlConfigurator.Configure(); 445// log4net.Config.XmlConfigurator.Configure();
447 446
448 Scene scene = SceneSetupHelpers.SetupScene(); 447 Scene scene = SceneSetupHelpers.SetupScene();
449 UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); 448 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
450 449
451 string folder1ExistingName = "a"; 450 string folder1ExistingName = "a";
452 string folder2Name = "b"; 451 string folder2Name = "b";
453 452
454 InventoryFolderBase folder1 453 InventoryFolderBase folder1
455 = UserInventoryTestUtils.CreateInventoryFolder( 454 = UserInventoryHelpers.CreateInventoryFolder(
456 scene.InventoryService, ua1.PrincipalID, folder1ExistingName); 455 scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
457 456
458 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); 457 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());