diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 6632643..a229e2a 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
74 | } | 74 | } |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Test moving an inventory folder | 77 | /// Test creating an inventory folder |
78 | /// </summary> | 78 | /// </summary> |
79 | [Test] | 79 | [Test] |
80 | public void TestCreateFolder() | 80 | public void TestCreateFolder() |
@@ -89,7 +89,18 @@ namespace OpenSim.Framework.Communications.Tests | |||
89 | UUID folderId = UUID.Parse("00000000-0000-0000-0000-000000000010"); | 89 | UUID folderId = UUID.Parse("00000000-0000-0000-0000-000000000010"); |
90 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.False); | 90 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.False); |
91 | 91 | ||
92 | userInfo.CreateFolder("testFolder", folderId, (ushort)AssetType.Animation, userInfo.RootFolder.ID); | 92 | // 1: Try a folder create that should fail because the parent id given does not exist |
93 | UUID missingFolderId = UUID.Random(); | ||
94 | |||
95 | Assert.That( | ||
96 | userInfo.CreateFolder("testFolder1", folderId, (ushort)AssetType.Animation, missingFolderId), Is.False); | ||
97 | Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Null); | ||
98 | Assert.That(userInfo.RootFolder.ContainsChildFolder(missingFolderId), Is.False); | ||
99 | Assert.That(userInfo.RootFolder.FindFolder(folderId), Is.Null); | ||
100 | |||
101 | // 2: Try a folder create that should work | ||
102 | Assert.That( | ||
103 | userInfo.CreateFolder("testFolder2", folderId, (ushort)AssetType.Animation, userInfo.RootFolder.ID), Is.True); | ||
93 | Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null); | 104 | Assert.That(inventoryDataPlugin.getInventoryFolder(folderId), Is.Not.Null); |
94 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.True); | 105 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.True); |
95 | } | 106 | } |