diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Tests')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | 22 |
1 files changed, 21 insertions, 1 deletions
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 | } |