diff options
author | Justin Clark-Casey (justincc) | 2010-08-24 17:10:52 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-24 17:10:52 +0100 |
commit | 46d06b6c4c858779472220db88dc64bae4489c38 (patch) | |
tree | e1bc988cae95c198ac35c92b8efa3a48afbf32e7 | |
parent | minor: stop test using obsolete property (diff) | |
download | opensim-SC_OLD-46d06b6c4c858779472220db88dc64bae4489c38.zip opensim-SC_OLD-46d06b6c4c858779472220db88dc64bae4489c38.tar.gz opensim-SC_OLD-46d06b6c4c858779472220db88dc64bae4489c38.tar.bz2 opensim-SC_OLD-46d06b6c4c858779472220db88dc64bae4489c38.tar.xz |
add test to check move of task item to user inventory when a target folder is explicitly given
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index ed2f324..da8199d 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -95,6 +95,32 @@ namespace OpenSim.Region.Framework.Tests | |||
95 | /// </summary> | 95 | /// </summary> |
96 | /// This should place it in the most suitable user folder. | 96 | /// This should place it in the most suitable user folder. |
97 | [Test] | 97 | [Test] |
98 | public void TestMoveTaskInventoryItem() | ||
99 | { | ||
100 | TestHelper.InMethod(); | ||
101 | // log4net.Config.XmlConfigurator.Configure(); | ||
102 | |||
103 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | ||
104 | UserAccount user1 = CreateUser(scene); | ||
105 | SceneObjectGroup sog1 = CreateSO1(scene, user1.PrincipalID); | ||
106 | SceneObjectPart sop1 = sog1.RootPart; | ||
107 | TaskInventoryItem sopItem1 = CreateSOItem1(scene, sop1); | ||
108 | InventoryFolderBase folder | ||
109 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; | ||
110 | |||
111 | // Perform test | ||
112 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); | ||
113 | |||
114 | InventoryItemBase ncUserItem | ||
115 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); | ||
116 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); | ||
117 | } | ||
118 | |||
119 | /// <summary> | ||
120 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. | ||
121 | /// </summary> | ||
122 | /// This should place it in the most suitable user folder. | ||
123 | [Test] | ||
98 | public void TestMoveTaskInventoryItemNoParent() | 124 | public void TestMoveTaskInventoryItemNoParent() |
99 | { | 125 | { |
100 | TestHelper.InMethod(); | 126 | TestHelper.InMethod(); |