diff options
author | Justin Clark-Casey (justincc) | 2011-06-04 00:51:49 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-06-04 00:51:49 +0100 |
commit | 896f039513398a46458b18ef49f52a9a3ac43659 (patch) | |
tree | feabf11001d4ec6499718ca6bad9183e6eb347e0 /OpenSim/Region/Framework | |
parent | extend TestGiveInventoryFolder() to check for the receipt by user 2 (diff) | |
download | opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.zip opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.tar.gz opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.tar.bz2 opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.tar.xz |
create TestGetInventoryItem()
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs index c6bd296..bacf7c1 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs | |||
@@ -53,6 +53,25 @@ namespace OpenSim.Region.Framework.Tests | |||
53 | public class UserInventoryTests | 53 | public class UserInventoryTests |
54 | { | 54 | { |
55 | [Test] | 55 | [Test] |
56 | public void TestGiveInventoryItem() | ||
57 | { | ||
58 | TestHelper.InMethod(); | ||
59 | // log4net.Config.XmlConfigurator.Configure(); | ||
60 | |||
61 | Scene scene = SceneSetupHelpers.SetupScene(); | ||
62 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | ||
63 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene); | ||
64 | InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID); | ||
65 | |||
66 | scene.GiveInventoryItem(user2.PrincipalID, user1.PrincipalID, item1.ID); | ||
67 | |||
68 | InventoryItemBase retrievedItem1 | ||
69 | = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, user2.PrincipalID, "Objects/item1"); | ||
70 | |||
71 | Assert.That(retrievedItem1, Is.Not.Null); | ||
72 | } | ||
73 | |||
74 | [Test] | ||
56 | public void TestGiveInventoryFolder() | 75 | public void TestGiveInventoryFolder() |
57 | { | 76 | { |
58 | TestHelper.InMethod(); | 77 | TestHelper.InMethod(); |