diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs index f247a0b..5abfe9a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests | |||
44 | /// XEngine tests. | 44 | /// XEngine tests. |
45 | /// </summary> | 45 | /// </summary> |
46 | [TestFixture] | 46 | [TestFixture] |
47 | public class XEngineTest | 47 | public class XEngineTest : OpenSimTestCase |
48 | { | 48 | { |
49 | private TestScene m_scene; | 49 | private TestScene m_scene; |
50 | private XEngine m_xEngine; | 50 | private XEngine m_xEngine; |
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests | |||
90 | // log4net.Config.XmlConfigurator.Configure(); | 90 | // log4net.Config.XmlConfigurator.Configure(); |
91 | 91 | ||
92 | UUID userId = TestHelpers.ParseTail(0x1); | 92 | UUID userId = TestHelpers.ParseTail(0x1); |
93 | // UUID objectId = TestHelpers.ParseTail(0x2); | 93 | // UUID objectId = TestHelpers.ParseTail(0x100); |
94 | // UUID itemId = TestHelpers.ParseTail(0x3); | 94 | // UUID itemId = TestHelpers.ParseTail(0x3); |
95 | string itemName = "TestStartScript() Item"; | 95 | string itemName = "TestStartScript() Item"; |
96 | 96 | ||
@@ -105,12 +105,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests | |||
105 | 105 | ||
106 | m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; | 106 | m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; |
107 | 107 | ||
108 | m_scene.RezNewScript(userId, itemTemplate); | 108 | SceneObjectPart partWhereRezzed = m_scene.RezNewScript(userId, itemTemplate); |
109 | 109 | ||
110 | m_chatEvent.WaitOne(60000); | 110 | m_chatEvent.WaitOne(60000); |
111 | 111 | ||
112 | Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); | 112 | Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); |
113 | Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); | 113 | Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); |
114 | |||
115 | bool running; | ||
116 | TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); | ||
117 | Assert.That( | ||
118 | SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True); | ||
119 | Assert.That(running, Is.True); | ||
114 | } | 120 | } |
115 | 121 | ||
116 | private void OnChatFromWorld(object sender, OSChatMessage oscm) | 122 | private void OnChatFromWorld(object sender, OSChatMessage oscm) |