Example #1
0
        public void SearchForRequestAcceptCertificateNoPermanentOption()
        {
            // Prepare
            const string stdError = "(R)eject or accept (t)emporarily?";

            using (MemoryStream strReader = new MemoryStream(Encoding.ASCII.GetBytes(stdError)))
            {
                using (StreamReader reader = new StreamReader(strReader))
                {
                    // Act
                    OutputMessageType type = CommandRunner.ReadAndDisplayInteractiveCommandProcessOutput(
                        reader
                        );

                    // Assert
                    Assert.Equal(OutputMessageType.RequestAcceptCertificateNoPermanentOption, type);
                }
            }
        }
Example #2
0
        public void SearchForPassword()
        {
            // Prepare
            const string stdError = "Password for ";

            using (MemoryStream strReader = new MemoryStream(Encoding.ASCII.GetBytes(stdError)))
            {
                using (StreamReader reader = new StreamReader(strReader))
                {
                    // Act
                    OutputMessageType type = CommandRunner.ReadAndDisplayInteractiveCommandProcessOutput(
                        reader
                        );

                    // Assert
                    Assert.Equal(OutputMessageType.RequestInputPassword, type);
                }
            }
        }