Example #1
0
        public async Task TestPingLocalHost1()
        {
            #region arrange
            var args = "";
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                args = "127.0.0.1 -n 1";
            }
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            {
                args = "127.0.0.1 -c 1";
            }
            var r = new ReceiverProcess("ping", args);
            #endregion
            #region act
            var dt = await r.TransformData(null);

            #endregion
            #region assert
            dt.Should().NotBeNull();
            dt.DataToBeSentFurther.Should().NotBeNull();
            dt.DataToBeSentFurther.Count.Should().Be(2);//output and error
            dt.DataToBeSentFurther.First().Value.Should().NotBeNull();
            dt.DataToBeSentFurther.First().Value.Rows.Count.Should().BeGreaterOrEqualTo(1);
            var row = dt.DataToBeSentFurther.First().Value.Rows[0];
            #endregion
        }
Example #2
0
        static async Task ResultsDir()
        {
            var v = new Verifier();

            var r    = new ReceiverProcess("print.exe", null);
            var data = await r.TransformData(null);

            await v.TransformData(data);

            return;
        }