-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVersionTests.cs
More file actions
34 lines (29 loc) · 913 Bytes
/
VersionTests.cs
File metadata and controls
34 lines (29 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.IO;
using System.Threading.Tasks;
using System.Xml.Linq;
using Xunit;
namespace Https.Tests
{
public class VersionTests : IClassFixture<HttpsCsprojFixture>
{
readonly HttpsCsprojFixture _httpsCsprojFixture;
public VersionTests(HttpsCsprojFixture httpsCsprojFixture)
{
_httpsCsprojFixture = httpsCsprojFixture;
}
[Fact]
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);
}
}
}