aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Tests/Cache
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-11 20:36:46 +0000
committerJustin Clarke Casey2008-12-11 20:36:46 +0000
commitf23856a575bf6c72de56a1eee60eca72f1724df0 (patch)
tree718c0825cae4a9ba99b799363e64ce3aa45d8b7f /OpenSim/Framework/Communications/Tests/Cache
parentafter much discussion, and overwhelming +1 on the -dev list, switch the (diff)
downloadopensim-SC_OLD-f23856a575bf6c72de56a1eee60eca72f1724df0.zip
opensim-SC_OLD-f23856a575bf6c72de56a1eee60eca72f1724df0.tar.gz
opensim-SC_OLD-f23856a575bf6c72de56a1eee60eca72f1724df0.tar.bz2
opensim-SC_OLD-f23856a575bf6c72de56a1eee60eca72f1724df0.tar.xz
* Add get child folder test
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}