Esempio n. 1
0
        public async Task Usage_ShouldListHelpDocument()
        {
            var httpsResult = await Https.ExecuteAsync("--help");

            using var reader = new StreamReader(httpsResult.StdOut);

            var expected = reader.ReadToEnd().TrimEnd();
            var actual   = _readmeFixture.Readme.UsageDocumentation.TrimEnd();

            Assert.Equal(expected, actual);
        }
Esempio n. 2
0
        public async Task VersionFlag_ShouldReportVersion()
        {
            var args = new[]
            {
                "--version"
            };

            var versionPrefix = _httpsCsprojFixture.VersionPrefix.Value;

            var expected = $"dotnet-https {versionPrefix}.0" + Environment.NewLine;
            var result   = await Https.ExecuteAsync(args);

            var actual = new StreamReader(result.StdOut).ReadToEnd();

            Assert.Equal(expected, actual);
        }