示例#1
0
        public void testStartStop()
        {
            var nmsSession = new NmsSession(BROKER_URL, new TestApplication());

            // TODO We may have to remove the '\' in the username
            Console.WriteLine(nmsSession.ReplyTo);
            Assert.IsNotNull(nmsSession.ReplyTo, "ReplyTo not set");

            nmsSession.ConsumerQueue = FER_RESPONSE;
            nmsSession.ProducerQueue = FER_COMMAND;
            nmsSession.Start();

            WaitFor(Connected, nmsSession, 3000);
            Assert.IsTrue(nmsSession.Connected, "Connection failed to start");

            nmsSession.Stop();

            WaitFor(Disconnected, nmsSession, 3000);
            Assert.IsFalse(nmsSession.Connected, "Did not disconnect");
        }
示例#2
0
 public NmsClientApp(string clientName)
 {
     this.clientName = clientName;
     nmsSession      = new NmsSession(this);
 }