diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index 83ac239..ad55c44 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
66 | } | 66 | } |
67 | 67 | ||
68 | /// <summary> | 68 | /// <summary> |
69 | /// Create a new subfolder. This exists only in the cache. | 69 | /// Create a new subfolder. |
70 | /// </summary> | 70 | /// </summary> |
71 | /// <param name="folderID"></param> | 71 | /// <param name="folderID"></param> |
72 | /// <param name="folderName"></param> | 72 | /// <param name="folderName"></param> |
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 054c746..d73d3d5 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | |||
@@ -89,8 +89,28 @@ namespace OpenSim.Framework.Communications.Tests | |||
89 | /// Test moving an inventory folder | 89 | /// Test moving an inventory folder |
90 | /// </summary> | 90 | /// </summary> |
91 | [Test] | 91 | [Test] |
92 | public void TestMoveFolder() | 92 | public void TestCreateFolder() |
93 | { | 93 | { |
94 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000004"); | ||
95 | |||
96 | CommunicationsManager commsManager = new TestCommunicationsManager(); | ||
97 | LocalUserServices lus = (LocalUserServices)commsManager.UserService; | ||
98 | lus.AddPlugin(new TestUserDataPlugin()); | ||
99 | TestInventoryDataPlugin inventoryDataPlugin = new TestInventoryDataPlugin(); | ||
100 | ((LocalInventoryService)commsManager.InventoryService).AddPlugin(inventoryDataPlugin); | ||
101 | |||
102 | lus.AddUser("Bill", "Bailey", "troll", "bill@bailey.com", 1000, 1000, userId); | ||
103 | |||
104 | commsManager.UserProfileCacheService.RequestInventoryForUser(userId); | ||
105 | |||
106 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); | ||
107 | |||
108 | UUID folderId = UUID.Parse("00000000-0000-0000-0000-000000000010"); | ||
109 | Assert.That(userInfo.RootFolder.SubFolders.ContainsKey(folderId), Is.False); | ||
110 | |||
111 | userInfo.CreateFolder("testFolder", folderId, (ushort)AssetType.Animation, userInfo.RootFolder.ID); | ||
112 | Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null); | ||
113 | Assert.That(userInfo.RootFolder.SubFolders.ContainsKey(folderId), Is.True); | ||
94 | } | 114 | } |
95 | } | 115 | } |
96 | } | 116 | } |