diff options
author | Justin Clark-Casey (justincc) | 2011-03-09 23:58:26 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-09 23:58:26 +0000 |
commit | fa1996155e26847a508739e512513cf1f52b687e (patch) | |
tree | ed5a7ca0399e6eb9c2b45d1665747c67e8ccee7b /OpenSim/Region/CoreModules | |
parent | minor: change the order of some default iar setup in test case (diff) | |
download | opensim-SC-fa1996155e26847a508739e512513cf1f52b687e.zip opensim-SC-fa1996155e26847a508739e512513cf1f52b687e.tar.gz opensim-SC-fa1996155e26847a508739e512513cf1f52b687e.tar.bz2 opensim-SC-fa1996155e26847a508739e512513cf1f52b687e.tar.xz |
Make the item created in the default test iar an object rather than a script
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index 5ec7bc4..ca5bc53 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
73 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 73 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
74 | FirstName = "Lord", | 74 | FirstName = "Lord", |
75 | LastName = "Lucan" }; | 75 | LastName = "Lucan" }; |
76 | protected string m_item1Name = "b.lsl"; | 76 | protected string m_item1Name = "Ray Gun Item"; |
77 | 77 | ||
78 | [SetUp] | 78 | [SetUp] |
79 | public void SetUp() | 79 | public void SetUp() |
@@ -96,10 +96,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
96 | 96 | ||
97 | MemoryStream archiveWriteStream = new MemoryStream(); | 97 | MemoryStream archiveWriteStream = new MemoryStream(); |
98 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); | 98 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); |
99 | |||
100 | // Create asset | ||
101 | SceneObjectGroup object1; | ||
102 | SceneObjectPart part1; | ||
103 | { | ||
104 | string partName = "Ray Gun Object"; | ||
105 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
106 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
107 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
108 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | ||
109 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
110 | |||
111 | part1 | ||
112 | = new SceneObjectPart( | ||
113 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
114 | part1.Name = partName; | ||
115 | |||
116 | object1 = new SceneObjectGroup(part1); | ||
117 | scene.AddNewSceneObject(object1, false); | ||
118 | } | ||
119 | |||
120 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | ||
121 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | ||
122 | scene.AssetService.Store(asset1); | ||
99 | 123 | ||
124 | // Create item | ||
100 | InventoryItemBase item1 = new InventoryItemBase(); | 125 | InventoryItemBase item1 = new InventoryItemBase(); |
101 | item1.Name = m_item1Name; | 126 | item1.Name = m_item1Name; |
102 | item1.AssetID = UUID.Random(); | 127 | item1.AssetID = asset1.FullID; |
103 | item1.GroupID = UUID.Random(); | 128 | item1.GroupID = UUID.Random(); |
104 | item1.CreatorIdAsUuid = m_ua2.PrincipalID; | 129 | item1.CreatorIdAsUuid = m_ua2.PrincipalID; |
105 | item1.Owner = UUID.Zero; | 130 | item1.Owner = UUID.Zero; |