diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 0914bfb..41c8e3c 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | |||
@@ -122,6 +122,38 @@ namespace OpenSim.Framework.Communications.Tests | |||
122 | Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null); | 122 | Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null); |
123 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.True); | 123 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.True); |
124 | } | 124 | } |
125 | |||
126 | /// <summary> | ||
127 | /// Test updating a folder | ||
128 | /// </summary> | ||
129 | [Test] | ||
130 | public void TestUpdateFolder() | ||
131 | { | ||
132 | IUserDataPlugin userDataPlugin = new TestUserDataPlugin(); | ||
133 | IInventoryDataPlugin inventoryDataPlugin = new TestInventoryDataPlugin(); | ||
134 | |||
135 | CommunicationsManager commsManager | ||
136 | = UserProfileTestUtils.SetupServices(userDataPlugin, inventoryDataPlugin); | ||
137 | CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); | ||
138 | |||
139 | UUID folder1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | ||
140 | InventoryFolderImpl rootFolder = userInfo.RootFolder; | ||
141 | |||
142 | userInfo.CreateFolder("folder1", folder1Id, (ushort)AssetType.Animation, rootFolder.ID); | ||
143 | |||
144 | // 1: Test updates that don't involve moving the folder | ||
145 | string newFolderName1 = "newFolderName1"; | ||
146 | ushort folderType1 = (ushort)AssetType.Texture; | ||
147 | userInfo.UpdateFolder(newFolderName1, folder1Id, folderType1, rootFolder.ID); | ||
148 | |||
149 | InventoryFolderImpl folder1 = rootFolder.GetChildFolder(folder1Id); | ||
150 | Assert.That(newFolderName1, Is.EqualTo(folder1.Name)); | ||
151 | Assert.That(folderType1, Is.EqualTo((ushort)folder1.Type)); | ||
152 | |||
153 | InventoryFolderBase dataFolder1 = inventoryDataPlugin.getInventoryFolder(folder1Id); | ||
154 | Assert.That(newFolderName1, Is.EqualTo(dataFolder1.Name)); | ||
155 | Assert.That(folderType1, Is.EqualTo((ushort)dataFolder1.Type)); | ||
156 | } | ||
125 | 157 | ||
126 | /// <summary> | 158 | /// <summary> |
127 | /// Test moving an inventory folder | 159 | /// Test moving an inventory folder |