Exemplo n.º 1
0
        public void constructor3()
        {
            transport.is_server = false;
            String    uri    = "tcp://localhost:4008?filter=KeepAlive";
            KeepAlive filter = newKeepAlive(uri);

            filter.SetSession(session);

            Assert.AreSame(transport.GetSession(), filter);
            Assert.AreSame(filter.GetSession(), session);
            Assert.AreEqual(filter.GetServer(), false);
            Assert.AreEqual(filter.GetCount(), 4);
            Assert.AreEqual(filter.GetDelay(), 15);
        }
Exemplo n.º 2
0
        public void constructor2()
        {
            transport.is_server = true;
            String    uri    = "tcp://localhost:4008?filter=KeepAlive&KeepAlive.delay=20&KeepAlive.count=5";
            KeepAlive filter = newKeepAlive(uri);

            filter.SetSession(session);

            Assert.AreSame(transport.GetSession(), filter);
            Assert.AreSame(filter.GetSession(), session);
            Assert.AreEqual(filter.GetServer(), true);
            Assert.AreEqual(filter.GetCount(), 5);
            Assert.AreEqual(filter.GetDelay(), 20);
        }