diff options
3 files changed, 25 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 2196d25..0914bfb 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using log4net; | ||
29 | using NUnit.Framework; | 30 | using NUnit.Framework; |
30 | using NUnit.Framework.SyntaxHelpers; | 31 | using NUnit.Framework.SyntaxHelpers; |
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
@@ -161,8 +162,11 @@ namespace OpenSim.Framework.Communications.Tests | |||
161 | /// <summary> | 162 | /// <summary> |
162 | /// Test purging an inventory folder | 163 | /// Test purging an inventory folder |
163 | /// </summary> | 164 | /// </summary> |
165 | [Test] | ||
164 | public void TestPurgeFolder() | 166 | public void TestPurgeFolder() |
165 | { | 167 | { |
168 | //log4net.Config.XmlConfigurator.Configure(); | ||
169 | |||
166 | IUserDataPlugin userDataPlugin = new TestUserDataPlugin(); | 170 | IUserDataPlugin userDataPlugin = new TestUserDataPlugin(); |
167 | IInventoryDataPlugin inventoryDataPlugin = new TestInventoryDataPlugin(); | 171 | IInventoryDataPlugin inventoryDataPlugin = new TestInventoryDataPlugin(); |
168 | 172 | ||
@@ -174,6 +178,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
174 | InventoryFolderImpl rootFolder = userInfo.RootFolder; | 178 | InventoryFolderImpl rootFolder = userInfo.RootFolder; |
175 | 179 | ||
176 | userInfo.CreateFolder("folder1", folder1Id, (ushort)AssetType.Animation, rootFolder.ID); | 180 | userInfo.CreateFolder("folder1", folder1Id, (ushort)AssetType.Animation, rootFolder.ID); |
181 | Assert.That(inventoryDataPlugin.getInventoryFolder(folder1Id), Is.Not.Null); | ||
177 | 182 | ||
178 | // Test purge | 183 | // Test purge |
179 | userInfo.PurgeFolder(rootFolder.ID); | 184 | userInfo.PurgeFolder(rootFolder.ID); |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs index b073fd1..62a828e 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs | |||
@@ -135,9 +135,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
135 | 135 | ||
136 | // Check that the taken part has actually disappeared | 136 | // Check that the taken part has actually disappeared |
137 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 137 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
138 | Assert.That(retrievedPart, Is.Null); | 138 | Assert.That(retrievedPart, Is.Null); |
139 | |||
140 | //log4net.LogManager.Shutdown(); | ||
141 | } | 139 | } |
142 | } | 140 | } |
143 | } \ No newline at end of file | 141 | } \ No newline at end of file |
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs index 52b469b..808c212 100644 --- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs | |||
@@ -87,7 +87,19 @@ namespace OpenSim.Tests.Common.Mock | |||
87 | return folder; | 87 | return folder; |
88 | } | 88 | } |
89 | 89 | ||
90 | public List<InventoryFolderBase> getInventoryFolders(UUID parentID) { return null; } | 90 | public List<InventoryFolderBase> getInventoryFolders(UUID parentID) |
91 | { | ||
92 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | ||
93 | |||
94 | foreach (InventoryFolderBase folder in m_folders.Values) | ||
95 | { | ||
96 | if (folder.ParentID == parentID) | ||
97 | folders.Add(folder); | ||
98 | } | ||
99 | |||
100 | return folders; | ||
101 | } | ||
102 | |||
91 | public InventoryItemBase getInventoryItem(UUID item) { return null; } | 103 | public InventoryItemBase getInventoryItem(UUID item) { return null; } |
92 | 104 | ||
93 | public InventoryFolderBase getInventoryFolder(UUID folderId) | 105 | public InventoryFolderBase getInventoryFolder(UUID folderId) |
@@ -118,7 +130,12 @@ namespace OpenSim.Tests.Common.Mock | |||
118 | m_folders[folder.ID] = folder; | 130 | m_folders[folder.ID] = folder; |
119 | } | 131 | } |
120 | 132 | ||
121 | public void deleteInventoryFolder(UUID folder) {} | 133 | public void deleteInventoryFolder(UUID folderId) |
134 | { | ||
135 | if (m_folders.ContainsKey(folderId)) | ||
136 | m_folders.Remove(folderId); | ||
137 | } | ||
138 | |||
122 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; } | 139 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; } |
123 | } | 140 | } |
124 | } | 141 | } |