diff options
author | Justin Clark-Casey (justincc) | 2009-11-12 19:08:00 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-12 19:08:00 +0000 |
commit | ed1089d892d05c732536be2f870217d673b972d6 (patch) | |
tree | d1e83fa6fac581b6bab77729e95e079b8751a16c /OpenSim/Region/CoreModules | |
parent | Rename test services to mock services, since this is a more accurate description (diff) | |
download | opensim-SC_OLD-ed1089d892d05c732536be2f870217d673b972d6.zip opensim-SC_OLD-ed1089d892d05c732536be2f870217d673b972d6.tar.gz opensim-SC_OLD-ed1089d892d05c732536be2f870217d673b972d6.tar.bz2 opensim-SC_OLD-ed1089d892d05c732536be2f870217d673b972d6.tar.xz |
refactor some test asset creation into a helper class
remove mono compiler warning
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index ed3ed18..f8a010c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -29,7 +29,6 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Text; | ||
33 | using System.Threading; | 32 | using System.Threading; |
34 | using NUnit.Framework; | 33 | using NUnit.Framework; |
35 | using NUnit.Framework.SyntaxHelpers; | 34 | using NUnit.Framework.SyntaxHelpers; |
@@ -122,8 +121,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
122 | } | 121 | } |
123 | 122 | ||
124 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 123 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
125 | AssetBase asset1 = new AssetBase(asset1Id, asset1Id.ToString(), (sbyte)AssetType.Object); | 124 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
126 | asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1)); | ||
127 | scene.AssetService.Store(asset1); | 125 | scene.AssetService.Store(asset1); |
128 | 126 | ||
129 | // Create item | 127 | // Create item |
@@ -338,8 +336,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
338 | } | 336 | } |
339 | 337 | ||
340 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 338 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
341 | AssetBase asset1 = new AssetBase(asset1Id, String.Empty, (sbyte)AssetType.Object); | 339 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
342 | asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1)); | ||
343 | scene.AssetService.Store(asset1); | 340 | scene.AssetService.Store(asset1); |
344 | 341 | ||
345 | // Create item | 342 | // Create item |
@@ -366,9 +363,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
366 | 363 | ||
367 | archiverModule.DearchiveInventory(userFirstName, userLastName, "Scripts", userPassword, archiveReadStream); | 364 | archiverModule.DearchiveInventory(userFirstName, userLastName, "Scripts", userPassword, archiveReadStream); |
368 | 365 | ||
369 | CachedUserInfo userInfo | ||
370 | = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); | ||
371 | |||
372 | InventoryItemBase foundItem1 | 366 | InventoryItemBase foundItem1 |
373 | = InventoryArchiveUtils.FindItemByPath( | 367 | = InventoryArchiveUtils.FindItemByPath( |
374 | scene.InventoryService, userId, "Scripts/Objects/" + humanEscapedItemName); | 368 | scene.InventoryService, userId, "Scripts/Objects/" + humanEscapedItemName); |