Beispiel #1
0
        public void T00_TelnetSuccess()
        {
            ProtocolServiceTestPlugin.Instance.Reset();

            ITCPParameter tcp = _protocolService.CreateDefaultTelnetParameter();
            tcp.Destination = GetTelnetConnectableHost();
            Assert.AreEqual(23, tcp.Port);

            ResultCallback client = new ResultCallback();
            IInterruptable t = _protocolService.AsyncTelnetConnect(client, tcp);
            client.AssertSuccess();

            ProtocolServiceTestPlugin.Instance.AssertSuccess();
        }
        public void T00_TelnetSuccess()
        {
            ProtocolServiceTestPlugin.Instance.Reset();

            ITCPParameter tcp = _protocolService.CreateDefaultTelnetParameter();

            tcp.Destination = GetTelnetConnectableHost();
            Assert.AreEqual(23, tcp.Port);

            ResultCallback client = new ResultCallback();
            IInterruptable t      = _protocolService.AsyncTelnetConnect(client, tcp);

            client.AssertSuccess();

            ProtocolServiceTestPlugin.Instance.AssertSuccess();
        }
        private void SSHSuccess(SSHProtocol sshprotocol)
        {
            ProtocolServiceTestPlugin.Instance.Reset();

            ISSHLoginParameter ssh = _protocolService.CreateDefaultSSHParameter();

            ssh.Method  = sshprotocol;
            ssh.Account = UnitTestUtil.GetUnitTestConfig("protocols.ssh_account");
            ssh.PasswordOrPassphrase = UnitTestUtil.GetUnitTestConfig("protocols.ssh_password");
            ITCPParameter tcp = (ITCPParameter)ssh.GetAdapter(typeof(ITCPParameter));

            tcp.Destination = GetSSHConnectableHost();
            Assert.AreEqual(22, tcp.Port);

            ResultCallback client = new ResultCallback();
            IInterruptable t      = _protocolService.AsyncSSHConnect(client, ssh);

            client.AssertSuccess();

            ProtocolServiceTestPlugin.Instance.AssertSuccess();
        }
        private void SSHSuccess(SSHProtocol sshprotocol) {
            ProtocolServiceTestPlugin.Instance.Reset();

            ISSHLoginParameter ssh = _protocolService.CreateDefaultSSHParameter();
            ssh.Method = sshprotocol;
            ssh.Account = UnitTestUtil.GetUnitTestConfig("protocols.ssh_account");
            ssh.PasswordOrPassphrase = UnitTestUtil.GetUnitTestConfig("protocols.ssh_password");
            ITCPParameter tcp = (ITCPParameter)ssh.GetAdapter(typeof(ITCPParameter));
            tcp.Destination = GetSSHConnectableHost();
            Assert.AreEqual(22, tcp.Port);

            ResultCallback client = new ResultCallback();
            IInterruptable t = _protocolService.AsyncSSHConnect(client, ssh);
            client.AssertSuccess();

            ProtocolServiceTestPlugin.Instance.AssertSuccess();
        }