create TestGetInventoryItem()

This commit is contained in:
Justin Clark-Casey (justincc)
2011-06-04 00:51:49 +01:00
parent 1543fd7fff
commit 896f039513
3 changed files with 53 additions and 14 deletions

View File

@@ -52,6 +52,25 @@ namespace OpenSim.Region.Framework.Tests
[TestFixture]
public class UserInventoryTests
{
[Test]
public void TestGiveInventoryItem()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
Scene scene = SceneSetupHelpers.SetupScene();
UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene);
InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID);
scene.GiveInventoryItem(user2.PrincipalID, user1.PrincipalID, item1.ID);
InventoryItemBase retrievedItem1
= UserInventoryHelpers.GetInventoryItem(scene.InventoryService, user2.PrincipalID, "Objects/item1");
Assert.That(retrievedItem1, Is.Not.Null);
}
[Test]
public void TestGiveInventoryFolder()
{