diff options
author | Justin Clark-Casey (justincc) | 2013-02-28 20:57:03 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-28 20:57:03 +0000 |
commit | 14684116f8ef23892b71ef16759224a536ac27bf (patch) | |
tree | 4857f32a20f03c2f7e42e6d00cf0e91b8d615b2f /OpenSim/Tests/Common/Mock | |
parent | Robust.HG.ini.example updated to get an [Hypergrid] section too. (diff) | |
download | opensim-SC_OLD-14684116f8ef23892b71ef16759224a536ac27bf.zip opensim-SC_OLD-14684116f8ef23892b71ef16759224a536ac27bf.tar.gz opensim-SC_OLD-14684116f8ef23892b71ef16759224a536ac27bf.tar.bz2 opensim-SC_OLD-14684116f8ef23892b71ef16759224a536ac27bf.tar.xz |
Add regression tests for llGetNotecardLine()
Diffstat (limited to 'OpenSim/Tests/Common/Mock')
-rw-r--r-- | OpenSim/Tests/Common/Mock/MockScriptEngine.cs | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs index 6a53fe7..b444241 100644 --- a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs +++ b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | ||
34 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
36 | using OpenSim.Region.ScriptEngine.Interfaces; | 37 | using OpenSim.Region.ScriptEngine.Interfaces; |
@@ -110,8 +111,11 @@ namespace OpenSim.Tests.Common | |||
110 | { | 111 | { |
111 | // Console.WriteLine("Posting event {0} for {1}", name, itemID); | 112 | // Console.WriteLine("Posting event {0} for {1}", name, itemID); |
112 | 113 | ||
113 | EventParams evParams = new EventParams(name, args, null); | 114 | return PostScriptEvent(itemID, new EventParams(name, args, null)); |
115 | } | ||
114 | 116 | ||
117 | public bool PostScriptEvent(UUID itemID, EventParams evParams) | ||
118 | { | ||
115 | List<EventParams> eventsForItem; | 119 | List<EventParams> eventsForItem; |
116 | 120 | ||
117 | if (!PostedEvents.ContainsKey(itemID)) | 121 | if (!PostedEvents.ContainsKey(itemID)) |
@@ -132,9 +136,22 @@ namespace OpenSim.Tests.Common | |||
132 | return true; | 136 | return true; |
133 | } | 137 | } |
134 | 138 | ||
139 | public bool PostObjectEvent(uint localID, EventParams evParams) | ||
140 | { | ||
141 | return PostObjectEvent(m_scene.GetSceneObjectPart(localID), evParams); | ||
142 | } | ||
143 | |||
135 | public bool PostObjectEvent(UUID itemID, string name, object[] args) | 144 | public bool PostObjectEvent(UUID itemID, string name, object[] args) |
136 | { | 145 | { |
137 | throw new System.NotImplementedException (); | 146 | return PostObjectEvent(m_scene.GetSceneObjectPart(itemID), new EventParams(name, args, null)); |
147 | } | ||
148 | |||
149 | private bool PostObjectEvent(SceneObjectPart part, EventParams evParams) | ||
150 | { | ||
151 | foreach (TaskInventoryItem item in part.Inventory.GetInventoryItems(InventoryType.LSL)) | ||
152 | PostScriptEvent(item.ItemID, evParams); | ||
153 | |||
154 | return true; | ||
138 | } | 155 | } |
139 | 156 | ||
140 | public void SuspendScript(UUID itemID) | 157 | public void SuspendScript(UUID itemID) |
@@ -187,16 +204,6 @@ namespace OpenSim.Tests.Common | |||
187 | throw new System.NotImplementedException (); | 204 | throw new System.NotImplementedException (); |
188 | } | 205 | } |
189 | 206 | ||
190 | public bool PostScriptEvent(UUID itemID,EventParams parms) | ||
191 | { | ||
192 | throw new System.NotImplementedException (); | ||
193 | } | ||
194 | |||
195 | public bool PostObjectEvent (uint localID, EventParams parms) | ||
196 | { | ||
197 | throw new System.NotImplementedException (); | ||
198 | } | ||
199 | |||
200 | public DetectParams GetDetectParams(UUID item, int number) | 207 | public DetectParams GetDetectParams(UUID item, int number) |
201 | { | 208 | { |
202 | throw new System.NotImplementedException (); | 209 | throw new System.NotImplementedException (); |