diff options
author | Oren Hurvitz | 2014-05-05 11:06:49 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-05-06 07:28:44 +0100 |
commit | 1e5cff32fc41356971d6ad601cbee7ad62472c76 (patch) | |
tree | be61c0ae3f814ec2a54d1b0ef63d42f86fce2600 /OpenSim/Region/Framework/Scenes/Tests | |
parent | Log whenever an inventory operation is blocked because the item/folder isn't ... (diff) | |
download | opensim-SC_OLD-1e5cff32fc41356971d6ad601cbee7ad62472c76.zip opensim-SC_OLD-1e5cff32fc41356971d6ad601cbee7ad62472c76.tar.gz opensim-SC_OLD-1e5cff32fc41356971d6ad601cbee7ad62472c76.tar.bz2 opensim-SC_OLD-1e5cff32fc41356971d6ad601cbee7ad62472c76.tar.xz |
Show more meaningful error messages when failed to give an item to another user
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs index e50b4da..0736278 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs | |||
@@ -95,7 +95,9 @@ namespace OpenSim.Region.Framework.Tests | |||
95 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); | 95 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); |
96 | InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID); | 96 | InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID); |
97 | 97 | ||
98 | scene.GiveInventoryItem(user2.PrincipalID, user1.PrincipalID, item1.ID); | 98 | string message; |
99 | |||
100 | scene.GiveInventoryItem(user2.PrincipalID, user1.PrincipalID, item1.ID, out message); | ||
99 | 101 | ||
100 | InventoryItemBase retrievedItem1 | 102 | InventoryItemBase retrievedItem1 |
101 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, user2.PrincipalID, "Notecards/item1"); | 103 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, user2.PrincipalID, "Notecards/item1"); |
@@ -103,7 +105,7 @@ namespace OpenSim.Region.Framework.Tests | |||
103 | Assert.That(retrievedItem1, Is.Not.Null); | 105 | Assert.That(retrievedItem1, Is.Not.Null); |
104 | 106 | ||
105 | // Try giving back the freshly received item | 107 | // Try giving back the freshly received item |
106 | scene.GiveInventoryItem(user1.PrincipalID, user2.PrincipalID, retrievedItem1.ID); | 108 | scene.GiveInventoryItem(user1.PrincipalID, user2.PrincipalID, retrievedItem1.ID, out message); |
107 | 109 | ||
108 | List<InventoryItemBase> reretrievedItems | 110 | List<InventoryItemBase> reretrievedItems |
109 | = UserInventoryHelpers.GetInventoryItems(scene.InventoryService, user1.PrincipalID, "Notecards/item1"); | 111 | = UserInventoryHelpers.GetInventoryItems(scene.InventoryService, user1.PrincipalID, "Notecards/item1"); |
@@ -123,7 +125,7 @@ namespace OpenSim.Region.Framework.Tests | |||
123 | InventoryFolderBase folder1 | 125 | InventoryFolderBase folder1 |
124 | = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, user1.PrincipalID, "folder1", false); | 126 | = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, user1.PrincipalID, "folder1", false); |
125 | 127 | ||
126 | scene.GiveInventoryFolder(user2.PrincipalID, user1.PrincipalID, folder1.ID, UUID.Zero); | 128 | scene.GiveInventoryFolder(null, user2.PrincipalID, user1.PrincipalID, folder1.ID, UUID.Zero); |
127 | 129 | ||
128 | InventoryFolderBase retrievedFolder1 | 130 | InventoryFolderBase retrievedFolder1 |
129 | = UserInventoryHelpers.GetInventoryFolder(scene.InventoryService, user2.PrincipalID, "folder1"); | 131 | = UserInventoryHelpers.GetInventoryFolder(scene.InventoryService, user2.PrincipalID, "folder1"); |
@@ -131,7 +133,7 @@ namespace OpenSim.Region.Framework.Tests | |||
131 | Assert.That(retrievedFolder1, Is.Not.Null); | 133 | Assert.That(retrievedFolder1, Is.Not.Null); |
132 | 134 | ||
133 | // Try giving back the freshly received folder | 135 | // Try giving back the freshly received folder |
134 | scene.GiveInventoryFolder(user1.PrincipalID, user2.PrincipalID, retrievedFolder1.ID, UUID.Zero); | 136 | scene.GiveInventoryFolder(null, user1.PrincipalID, user2.PrincipalID, retrievedFolder1.ID, UUID.Zero); |
135 | 137 | ||
136 | List<InventoryFolderBase> reretrievedFolders | 138 | List<InventoryFolderBase> reretrievedFolders |
137 | = UserInventoryHelpers.GetInventoryFolders(scene.InventoryService, user1.PrincipalID, "folder1"); | 139 | = UserInventoryHelpers.GetInventoryFolders(scene.InventoryService, user1.PrincipalID, "folder1"); |