aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
index 83f0686..10c275e 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
@@ -59,19 +59,24 @@ namespace OpenSim.Region.Framework.Tests
59// log4net.Config.XmlConfigurator.Configure(); 59// log4net.Config.XmlConfigurator.Configure();
60 60
61 Scene scene = SceneSetupHelpers.SetupScene(); 61 Scene scene = SceneSetupHelpers.SetupScene();
62 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 62 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, 1001);
63 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene); 63 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, 1002);
64 InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID); 64 InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID);
65 65
66 scene.GiveInventoryItem(user2.PrincipalID, user1.PrincipalID, item1.ID); 66 scene.GiveInventoryItem(user2.PrincipalID, user1.PrincipalID, item1.ID);
67 67
68 InventoryItemBase retrievedItem1 68 InventoryItemBase retrievedItem1
69 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, user2.PrincipalID, "Objects/item1"); 69 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, user2.PrincipalID, "Notecards/item1");
70 70
71 Assert.That(retrievedItem1, Is.Not.Null); 71 Assert.That(retrievedItem1, Is.Not.Null);
72 72
73 // Try giving back the freshly received item 73 // Try giving back the freshly received item
74 //scene.GiveInventoryItem(user1.PrincipalID, user2.PrincipalID, retrievedItem1.ID); 74 scene.GiveInventoryItem(user1.PrincipalID, user2.PrincipalID, retrievedItem1.ID);
75
76 List<InventoryItemBase> reretrievedItems
77 = UserInventoryHelpers.GetInventoryItems(scene.InventoryService, user1.PrincipalID, "Notecards/item1");
78
79 Assert.That(reretrievedItems.Count, Is.EqualTo(2));
75 } 80 }
76 81
77 [Test] 82 [Test]
@@ -81,8 +86,8 @@ namespace OpenSim.Region.Framework.Tests
81// log4net.Config.XmlConfigurator.Configure(); 86// log4net.Config.XmlConfigurator.Configure();
82 87
83 Scene scene = SceneSetupHelpers.SetupScene(); 88 Scene scene = SceneSetupHelpers.SetupScene();
84 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 89 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, 1001);
85 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene); 90 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, 1002);
86 InventoryFolderBase folder1 91 InventoryFolderBase folder1
87 = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, user1.PrincipalID, "folder1"); 92 = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, user1.PrincipalID, "folder1");
88 93