diff options
author | Justin Clarke Casey | 2008-12-12 19:04:10 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-12 19:04:10 +0000 |
commit | f8ce49875597bafb39642b62e2a61b644ecf489a (patch) | |
tree | 7b65a8cc89481e857e08f8347d844efc4c8baa90 /OpenSim/Framework/Communications/Tests/Cache | |
parent | * Add file missing from last commit (diff) | |
download | opensim-SC-f8ce49875597bafb39642b62e2a61b644ecf489a.zip opensim-SC-f8ce49875597bafb39642b62e2a61b644ecf489a.tar.gz opensim-SC-f8ce49875597bafb39642b62e2a61b644ecf489a.tar.bz2 opensim-SC-f8ce49875597bafb39642b62e2a61b644ecf489a.tar.xz |
* extend user profile create folder test to check that one can't create a folder with a non-existant parent folder id
Diffstat (limited to 'OpenSim/Framework/Communications/Tests/Cache')
-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 | } |