public void Clientup5() { transport.is_server = false; session.password = "******"; PwAuth pwAuth = newPwAuth("tcp://host:9999"); pwAuth.SetSession(session); pwAuth.SessionNotify(SessionConsts.UP); }
public void Clientup4() { transport.is_server = false; session.user = "******"; PwAuth pwAuth = newPwAuth("tcp://host:9999"); pwAuth.SetSession(session); pwAuth.SessionNotify(SessionConsts.UP); }
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); }
public void Serverup1() { transport.is_server = true; PwAuth pwAuth = newPwAuth("tcp://host:9999"); pwAuth.SetSession(session); pwAuth.SessionNotify(SessionConsts.UP); Assert.IsTrue(session.up); }
public void Clientdown1() { transport.is_server = false; PwAuth pwAuth = newPwAuth("tcp://host:9999"); pwAuth.SetSession(session); pwAuth.SessionNotify(SessionConsts.DOWN); Assert.IsFalse(session.up); }
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); }
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"))); }