diff options
author | Diva Canto | 2015-05-10 21:49:24 -0700 |
---|---|---|
committer | Diva Canto | 2015-05-10 21:49:24 -0700 |
commit | eb9b16d2849de438f20bb269ef3ea93e33f4d18d (patch) | |
tree | 928b4b92efa3d7fc42fd431fecdd0fa5895bbebb /OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs | |
parent | Added this form that comes handy for testing the grid service in Robust. (diff) | |
download | opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.zip opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.tar.gz opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.tar.bz2 opensim-SC_OLD-eb9b16d2849de438f20bb269ef3ea93e33f4d18d.tar.xz |
Added simple test for IM in Robust too.
Changed Inventory data to use the mock one in Common Tests. (but still not inventory tests)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs (renamed from OpenSim/Tests/Clients/InstantMessage/IMClient.cs) | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/OpenSim/Tests/Clients/InstantMessage/IMClient.cs b/OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs index e7304a2..8f312eb 100644 --- a/OpenSim/Tests/Clients/InstantMessage/IMClient.cs +++ b/OpenSim/Tests/Robust/Clients/InstantMessage/IMClient.cs | |||
@@ -28,47 +28,30 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using System.Reflection; | ||
32 | 31 | ||
33 | using OpenMetaverse; | 32 | using OpenMetaverse; |
34 | using log4net; | 33 | using NUnit.Framework; |
35 | using log4net.Appender; | ||
36 | using log4net.Layout; | ||
37 | 34 | ||
38 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
39 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
40 | using OpenSim.Services.Connectors.InstantMessage; | 37 | using OpenSim.Services.Connectors.InstantMessage; |
41 | 38 | ||
42 | namespace OpenSim.Tests.Clients.InstantMessage | 39 | namespace Robust.Tests |
43 | { | 40 | { |
41 | [TestFixture] | ||
44 | public class IMClient | 42 | public class IMClient |
45 | { | 43 | { |
46 | private static readonly ILog m_log = | 44 | [Test] |
47 | LogManager.GetLogger( | 45 | public void HGIM_001() |
48 | MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
50 | public static void Main(string[] args) | ||
51 | { | 46 | { |
52 | ConsoleAppender consoleAppender = new ConsoleAppender(); | ||
53 | consoleAppender.Layout = | ||
54 | new PatternLayout("%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"); | ||
55 | log4net.Config.BasicConfigurator.Configure(consoleAppender); | ||
56 | |||
57 | string serverURI = "http://127.0.0.1:8002"; | ||
58 | GridInstantMessage im = new GridInstantMessage(); | 47 | GridInstantMessage im = new GridInstantMessage(); |
59 | im.fromAgentID = new Guid(); | 48 | im.fromAgentID = new Guid(); |
60 | im.toAgentID = new Guid(); | 49 | im.toAgentID = new Guid(); |
61 | im.message = "Hello"; | 50 | im.message = "Hello"; |
62 | im.imSessionID = new Guid(); | 51 | im.imSessionID = new Guid(); |
63 | 52 | ||
64 | bool success = InstantMessageServiceConnector.SendInstantMessage(serverURI, im); | 53 | bool success = InstantMessageServiceConnector.SendInstantMessage(DemonServer.Address, im); |
65 | 54 | Assert.IsFalse(success, "Sending of IM succeeded, but it should have failed"); | |
66 | if (success) | ||
67 | m_log.InfoFormat("[IM CLIENT]: Successfully IMed {0}", serverURI); | ||
68 | else | ||
69 | m_log.InfoFormat("[IM CLIENT]: failed to IM {0}", serverURI); | ||
70 | |||
71 | System.Console.WriteLine("\n"); | ||
72 | } | 55 | } |
73 | 56 | ||
74 | } | 57 | } |