diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index 9d9fc51..25679a6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | |||
@@ -52,14 +52,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
52 | /// Tests for OSSL NPC API | 52 | /// Tests for OSSL NPC API |
53 | /// </summary> | 53 | /// </summary> |
54 | [TestFixture] | 54 | [TestFixture] |
55 | public class OSSL_NpcApiAppearanceTest | 55 | public class OSSL_NpcApiAppearanceTest : OpenSimTestCase |
56 | { | 56 | { |
57 | protected Scene m_scene; | 57 | protected Scene m_scene; |
58 | protected XEngine.XEngine m_engine; | 58 | protected XEngine.XEngine m_engine; |
59 | 59 | ||
60 | [SetUp] | 60 | [SetUp] |
61 | public void SetUp() | 61 | public override void SetUp() |
62 | { | 62 | { |
63 | base.SetUp(); | ||
64 | |||
63 | IConfigSource initConfigSource = new IniConfigSource(); | 65 | IConfigSource initConfigSource = new IniConfigSource(); |
64 | IConfig config = initConfigSource.AddConfig("XEngine"); | 66 | IConfig config = initConfigSource.AddConfig("XEngine"); |
65 | config.Set("Enabled", "true"); | 67 | config.Set("Enabled", "true"); |
@@ -68,7 +70,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
68 | config = initConfigSource.AddConfig("NPC"); | 70 | config = initConfigSource.AddConfig("NPC"); |
69 | config.Set("Enabled", "true"); | 71 | config.Set("Enabled", "true"); |
70 | 72 | ||
71 | m_scene = SceneHelpers.SetupScene(); | 73 | m_scene = new SceneHelpers().SetupScene(); |
72 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new AvatarFactoryModule(), new NPCModule()); | 74 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new AvatarFactoryModule(), new NPCModule()); |
73 | 75 | ||
74 | m_engine = new XEngine.XEngine(); | 76 | m_engine = new XEngine.XEngine(); |
@@ -95,19 +97,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
95 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); | 97 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); |
96 | sp.Appearance.AvatarHeight = newHeight; | 98 | sp.Appearance.AvatarHeight = newHeight; |
97 | 99 | ||
98 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); | 100 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10); |
99 | SceneObjectPart part = so.RootPart; | 101 | SceneObjectPart part = so.RootPart; |
100 | m_scene.AddSceneObject(so); | 102 | m_scene.AddSceneObject(so); |
101 | 103 | ||
102 | SceneObjectGroup otherSo = SceneHelpers.CreateSceneObject(1, otherUserId); | 104 | SceneObjectGroup otherSo = SceneHelpers.CreateSceneObject(1, otherUserId, 0x20); |
103 | SceneObjectPart otherPart = otherSo.RootPart; | 105 | SceneObjectPart otherPart = otherSo.RootPart; |
104 | m_scene.AddSceneObject(otherSo); | 106 | m_scene.AddSceneObject(otherSo); |
105 | 107 | ||
106 | OSSL_Api osslApi = new OSSL_Api(); | 108 | OSSL_Api osslApi = new OSSL_Api(); |
107 | osslApi.Initialize(m_engine, part, part.LocalId, part.UUID); | 109 | osslApi.Initialize(m_engine, part, null); |
108 | 110 | ||
109 | OSSL_Api otherOsslApi = new OSSL_Api(); | 111 | OSSL_Api otherOsslApi = new OSSL_Api(); |
110 | otherOsslApi.Initialize(m_engine, otherPart, otherPart.LocalId, otherPart.UUID); | 112 | otherOsslApi.Initialize(m_engine, otherPart, null); |
111 | 113 | ||
112 | string notecardName = "appearanceNc"; | 114 | string notecardName = "appearanceNc"; |
113 | osslApi.osOwnerSaveAppearance(notecardName); | 115 | osslApi.osOwnerSaveAppearance(notecardName); |
@@ -146,12 +148,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
146 | 148 | ||
147 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); | 149 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); |
148 | sp.Appearance.AvatarHeight = newHeight; | 150 | sp.Appearance.AvatarHeight = newHeight; |
149 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); | 151 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10); |
150 | SceneObjectPart part = so.RootPart; | 152 | SceneObjectPart part = so.RootPart; |
151 | m_scene.AddSceneObject(so); | 153 | m_scene.AddSceneObject(so); |
152 | 154 | ||
153 | OSSL_Api osslApi = new OSSL_Api(); | 155 | OSSL_Api osslApi = new OSSL_Api(); |
154 | osslApi.Initialize(m_engine, part, part.LocalId, part.UUID); | 156 | osslApi.Initialize(m_engine, part, null); |
155 | 157 | ||
156 | string notecardName = "appearanceNc"; | 158 | string notecardName = "appearanceNc"; |
157 | osslApi.osOwnerSaveAppearance(notecardName); | 159 | osslApi.osOwnerSaveAppearance(notecardName); |