diff options
author | Diva Canto | 2017-05-01 16:49:42 -0700 |
---|---|---|
committer | Diva Canto | 2017-05-01 16:49:42 -0700 |
commit | 9c82ff76730c9eff80cace1ddece0148d8d0a7ee (patch) | |
tree | 0dda87eac67e84218d16a66f137459e1b2d1bf84 /OpenSim/Tests/Permissions/Common.cs | |
parent | Added some indirect transfer tests -- Take Copy by another avatar (diff) | |
download | opensim-SC-9c82ff76730c9eff80cace1ddece0148d8d0a7ee.zip opensim-SC-9c82ff76730c9eff80cace1ddece0148d8d0a7ee.tar.gz opensim-SC-9c82ff76730c9eff80cace1ddece0148d8d0a7ee.tar.bz2 opensim-SC-9c82ff76730c9eff80cace1ddece0148d8d0a7ee.tar.xz |
Shuffle some code around
Diffstat (limited to 'OpenSim/Tests/Permissions/Common.cs')
-rw-r--r-- | OpenSim/Tests/Permissions/Common.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Tests/Permissions/Common.cs b/OpenSim/Tests/Permissions/Common.cs index e62991b..f93c120 100644 --- a/OpenSim/Tests/Permissions/Common.cs +++ b/OpenSim/Tests/Permissions/Common.cs | |||
@@ -286,6 +286,26 @@ namespace OpenSim.Tests.Permissions | |||
286 | return clone; | 286 | return clone; |
287 | } | 287 | } |
288 | 288 | ||
289 | public void DeleteObjectsFolders() | ||
290 | { | ||
291 | // Delete everything in A2 and A3's Objects folders, so we can restart | ||
292 | for (int i = 1; i < 3; i++) | ||
293 | { | ||
294 | InventoryFolderBase objsFolder = UserInventoryHelpers.GetInventoryFolder(Common.TheScene.InventoryService, Common.TheAvatars[i].UUID, "Objects"); | ||
295 | Assert.That(objsFolder, Is.Not.Null); | ||
296 | |||
297 | List<InventoryItemBase> items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[i].UUID, objsFolder.ID); | ||
298 | List<UUID> ids = new List<UUID>(); | ||
299 | foreach (InventoryItemBase it in items) | ||
300 | ids.Add(it.ID); | ||
301 | |||
302 | Common.TheScene.InventoryService.DeleteItems(Common.TheAvatars[i].UUID, ids); | ||
303 | items = Common.TheScene.InventoryService.GetFolderItems(Common.TheAvatars[i].UUID, objsFolder.ID); | ||
304 | Assert.That(items.Count, Is.EqualTo(0), "A" + (i + 1)); | ||
305 | } | ||
306 | |||
307 | } | ||
308 | |||
289 | public string IdStr(InventoryItemBase item) | 309 | public string IdStr(InventoryItemBase item) |
290 | { | 310 | { |
291 | return item.Owner.ToString().Substring(34) + " : " + item.Name; | 311 | return item.Owner.ToString().Substring(34) + " : " + item.Name; |