コード例 #1
0
        public void Clientup5()
        {
            transport.is_server = false;
            session.password    = "******";
            PwAuth pwAuth = newPwAuth("tcp://host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.UP);
        }
コード例 #2
0
        public void Clientup4()
        {
            transport.is_server = false;
            session.user        = "******";
            PwAuth pwAuth = newPwAuth("tcp://host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.UP);
        }
コード例 #3
0
        public void Clientup6()
        {
            transport.is_server = false;
            session.user        = "******";
            session.password    = new Exception("password failed");
            PwAuth pwAuth = newPwAuth("tcp://host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.UP);
        }
コード例 #4
0
        public void Serverup1()
        {
            transport.is_server = true;

            PwAuth pwAuth = newPwAuth("tcp://host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.UP);

            Assert.IsTrue(session.up);
        }
コード例 #5
0
        public void Clientdown1()
        {
            transport.is_server = false;

            PwAuth pwAuth = newPwAuth("tcp://host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.DOWN);

            Assert.IsFalse(session.up);
        }
コード例 #6
0
        public void Serverdown1()
        {
            transport.is_server = true;

            PwAuth pwAuth = newPwAuth("tcp://host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.DOWN);

            Assert.IsFalse(session.up);
            Assert.IsNull(session.userPassword.user);
            Assert.IsNull(session.userPassword.password);
        }
コード例 #7
0
        public void Clientup1()
        {
            transport.is_server = false;
            PwAuth pwAuth = newPwAuth("tcp://*****:*****@host:9999");

            pwAuth.SetSession(session);
            pwAuth.SessionNotify(SessionConsts.UP);
            Assert.IsTrue(session.up);
            Assert.AreEqual(What.TRANSPORT_MESSAGE, transport.what);
            Message msg1 = transport.msg;

            Assert.AreEqual("_Etch_PwAuthReq", msg1.GetXType.Name);
            Assert.AreEqual("fred", msg1.Get(new Field("user")));
            Assert.AreEqual("1234", msg1.Get(new Field("password")));
        }