diff options
Merge branch 'master' into test-merge0418
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | 60 |
1 files changed, 7 insertions, 53 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index c76a30a..8d53cf1 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
66 | config.AddConfig("Modules"); | 66 | config.AddConfig("Modules"); |
67 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 67 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
68 | 68 | ||
69 | m_scene = SceneSetupHelpers.SetupScene("Inventory"); | 69 | m_scene = SceneSetupHelpers.SetupScene(); |
70 | SceneSetupHelpers.SetupSceneModules(m_scene, config, m_iam); | 70 | SceneSetupHelpers.SetupSceneModules(m_scene, config, m_iam); |
71 | 71 | ||
72 | // Create user | 72 | // Create user |
@@ -87,41 +87,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
87 | // log4net.Config.XmlConfigurator.Configure(); | 87 | // log4net.Config.XmlConfigurator.Configure(); |
88 | 88 | ||
89 | // Create asset | 89 | // Create asset |
90 | SceneObjectGroup object1; | 90 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); |
91 | { | 91 | object1.AbsolutePosition = new Vector3(15, 30, 45); |
92 | string partName = "Object1"; | 92 | |
93 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | 93 | SceneObjectGroup object2 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); |
94 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | 94 | object2.AbsolutePosition = new Vector3(25, 50, 75); |
95 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
96 | Quaternion rotationOffset = Quaternion.Identity; | ||
97 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
98 | |||
99 | SceneObjectPart part1 | ||
100 | = new SceneObjectPart( | ||
101 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
102 | part1.Scale = new Vector3(1, 1, 1); | ||
103 | part1.Name = partName; | ||
104 | |||
105 | object1 = new SceneObjectGroup(part1); | ||
106 | } | ||
107 | |||
108 | SceneObjectGroup object2; | ||
109 | { | ||
110 | string partName = "Object2"; | ||
111 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
112 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
113 | Vector3 groupPosition = new Vector3(20, 40, 60); | ||
114 | Quaternion rotationOffset = Quaternion.Identity; | ||
115 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
116 | |||
117 | SceneObjectPart part1 | ||
118 | = new SceneObjectPart( | ||
119 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
120 | part1.Scale = new Vector3(1, 1, 1); | ||
121 | part1.Name = partName; | ||
122 | |||
123 | object2 = new SceneObjectGroup(part1); | ||
124 | } | ||
125 | 95 | ||
126 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); | 96 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); |
127 | 97 | ||
@@ -173,23 +143,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
173 | // log4net.Config.XmlConfigurator.Configure(); | 143 | // log4net.Config.XmlConfigurator.Configure(); |
174 | 144 | ||
175 | // Create asset | 145 | // Create asset |
176 | SceneObjectGroup object1; | 146 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40); |
177 | SceneObjectPart part1; | ||
178 | { | ||
179 | string partName = "My Little Dog Object"; | ||
180 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
181 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
182 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
183 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | ||
184 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
185 | |||
186 | part1 | ||
187 | = new SceneObjectPart( | ||
188 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
189 | part1.Name = partName; | ||
190 | |||
191 | object1 = new SceneObjectGroup(part1); | ||
192 | } | ||
193 | 147 | ||
194 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 148 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
195 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 149 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |