Esempio n. 1
0
        /// <summary>
        /// Track specified intput/output.
        /// </summary>
        /// <param name="io">The specified intput/output.</param>
        /// <param name="options">The option with <see cref="AbstractTester"/>.</param>
        /// <returns>Tracked intput/output.</returns>
        public IOConsole Track(IOConsole io, params Mixture[] options)
        {
            var input = new InputArgs();

            if (options.TryGet("interactive", out Mixture exists))
            {
                input.SetInteractive(exists);
            }

            if (inputs != null && inputs.Length > 0)
            {
                input.SetInputStream(CreateStream(inputs));
            }

            Initialize(options);
            io.SetInput(input);
            io.SetOutput(Output);

            return(io);
        }