mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Reduce coupling in regression test task inventory creation methods to make them usable in tests with no scene present
This commit is contained in:
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine);
|
||||
|
||||
m_so = SceneHelpers.AddSceneObject(m_scene);
|
||||
m_scriptItem = TaskInventoryHelpers.AddScript(m_scene, m_so.RootPart);
|
||||
m_scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, m_so.RootPart);
|
||||
|
||||
// This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm.
|
||||
// Possibly this could be done and we could obtain it directly from the MockScriptEngine.
|
||||
@@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
string[] ncLines = { "One", "Twoè", "Three" };
|
||||
|
||||
TaskInventoryItem ncItem
|
||||
= TaskInventoryHelpers.AddNotecard(m_scene, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines));
|
||||
= TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines));
|
||||
|
||||
AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]);
|
||||
AssertValidNotecardLine(ncItem.Name, 2, ncLines[2]);
|
||||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
TaskInventoryItem ncItem = TaskInventoryHelpers.AddScript(m_scene, m_so.RootPart, "nc1", "Not important");
|
||||
TaskInventoryItem ncItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, m_so.RootPart, "nc1", "Not important");
|
||||
|
||||
AssertInValidNotecardLine(ncItem.Name, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user