예제 #1
0
        public PanelPutty(PuttySession session)
        {
            InitializeComponent();

            AutoSize = true;
            Text     = session.SessionName;
            Resize  += new System.EventHandler(TermPanel_Resize);
        }
        public void Empty_putty_session_matches()
        {
            // Arrange
            var puttySession = new PuttySession();
            var expectedResult = "://";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_with_identifier_and_protocol_and_username_and_hostname_matches()
        {
            // Arrange
            var puttySession = new PuttySession { Identifier = "poop", Protocol = "asdf", Username = "******", Hostname = "bar.com" };
            var expectedResult = "asdf://[email protected]";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_with_only_identifier_and_protocol_and_username_matches()
        {
            // Arrange
            var puttySession = new PuttySession { Identifier = "poop", Protocol = "asdf", Username = "******" };
            var expectedResult = "asdf://hello@";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_with_only_identifier_matches()
        {
            // Arrange
            var puttySession = new PuttySession { Identifier = "asdf" };
            var expectedResult = "://";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Empty_putty_session_matches()
        {
            // Arrange
            var puttySession   = new PuttySession();
            var expectedResult = "://";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_with_identifier_and_protocol_and_username_and_hostname_matches()
        {
            // Arrange
            var puttySession = new PuttySession {
                Identifier = "poop", Protocol = "asdf", Username = "******", Hostname = "bar.com"
            };
            var expectedResult = "asdf://[email protected]";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_with_only_identifier_and_protocol_and_username_matches()
        {
            // Arrange
            var puttySession = new PuttySession {
                Identifier = "poop", Protocol = "asdf", Username = "******"
            };
            var expectedResult = "asdf://hello@";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_with_only_identifier_matches()
        {
            // Arrange
            var puttySession = new PuttySession {
                Identifier = "asdf"
            };
            var expectedResult = "://";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_without_identifier_matches()
        {
            // Arrange
            var puttySession = new PuttySession {
                Protocol = "asdf", Username = "******", Hostname = "bar.com"
            };
            var expectedResult = "asdf://[email protected]";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }
        public void Putty_session_without_identifier_matches()
        {
            // Arrange
            var puttySession = new PuttySession { Protocol = "asdf", Username = "******", Hostname = "bar.com" };
            var expectedResult = "asdf://[email protected]";

            // Act
            var result = puttySession.ToString();

            // Assert
            Assert.AreEqual(result, expectedResult);
        }