diff options
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestClient.cs')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index d26e3f7..41402a4 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -61,6 +61,7 @@ namespace OpenSim.Tests.Common.Mock | |||
61 | // Test client specific events - for use by tests to implement some IClientAPI behaviour. | 61 | // Test client specific events - for use by tests to implement some IClientAPI behaviour. |
62 | public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion; | 62 | public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion; |
63 | public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour; | 63 | public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour; |
64 | public event Action<GridInstantMessage> OnReceivedInstantMessage; | ||
64 | 65 | ||
65 | // disable warning: public events, part of the public API | 66 | // disable warning: public events, part of the public API |
66 | #pragma warning disable 67 | 67 | #pragma warning disable 67 |
@@ -484,6 +485,18 @@ namespace OpenSim.Tests.Common.Mock | |||
484 | OnCompleteMovementToRegion(this, true); | 485 | OnCompleteMovementToRegion(this, true); |
485 | } | 486 | } |
486 | 487 | ||
488 | /// <summary> | ||
489 | /// Emulate sending an IM from the viewer to the simulator. | ||
490 | /// </summary> | ||
491 | /// <param name='im'></param> | ||
492 | public void HandleImprovedInstantMessage(GridInstantMessage im) | ||
493 | { | ||
494 | ImprovedInstantMessage handlerInstantMessage = OnInstantMessage; | ||
495 | |||
496 | if (handlerInstantMessage != null) | ||
497 | handlerInstantMessage(this, im); | ||
498 | } | ||
499 | |||
487 | public virtual void ActivateGesture(UUID assetId, UUID gestureId) | 500 | public virtual void ActivateGesture(UUID assetId, UUID gestureId) |
488 | { | 501 | { |
489 | } | 502 | } |
@@ -538,7 +551,8 @@ namespace OpenSim.Tests.Common.Mock | |||
538 | 551 | ||
539 | public void SendInstantMessage(GridInstantMessage im) | 552 | public void SendInstantMessage(GridInstantMessage im) |
540 | { | 553 | { |
541 | 554 | if (OnReceivedInstantMessage != null) | |
555 | OnReceivedInstantMessage(im); | ||
542 | } | 556 | } |
543 | 557 | ||
544 | public void SendGenericMessage(string method, UUID invoice, List<string> message) | 558 | public void SendGenericMessage(string method, UUID invoice, List<string> message) |