aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Tests/Cache
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Tests/Cache')
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
index d73d3d5..f209fd4 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
@@ -112,5 +112,32 @@ namespace OpenSim.Framework.Communications.Tests
112 Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null); 112 Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null);
113 Assert.That(userInfo.RootFolder.SubFolders.ContainsKey(folderId), Is.True); 113 Assert.That(userInfo.RootFolder.SubFolders.ContainsKey(folderId), Is.True);
114 } 114 }
115
116 /// <summary>
117 /// Test retrieving a child folder
118 /// </summary>
119 [Test]
120 public void TestGetChildFolder()
121 {
122 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000005");
123
124 CommunicationsManager commsManager = new TestCommunicationsManager();
125 LocalUserServices lus = (LocalUserServices)commsManager.UserService;
126 lus.AddPlugin(new TestUserDataPlugin());
127 ((LocalInventoryService)commsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin());
128
129 lus.AddUser("Bill", "Bailey", "troll", "bill@bailey.com", 1000, 1000, userId);
130
131 commsManager.UserProfileCacheService.RequestInventoryForUser(userId);
132
133 CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
134
135 UUID folderId = UUID.Parse("00000000-0000-0000-0000-000000000011");
136
137 Assert.That(userInfo.RootFolder.GetChildFolder(folderId), Is.Null);
138 userInfo.CreateFolder("testFolder", folderId, (ushort)AssetType.Animation, userInfo.RootFolder.ID);
139
140 Assert.That(userInfo.RootFolder.GetChildFolder(folderId), Is.Not.Null);
141 }
115 } 142 }
116} 143}