-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathSdkFeatureBandTests.cs
43 lines (38 loc) · 1.63 KB
/
SdkFeatureBandTests.cs
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
35
36
37
38
39
40
41
42
43
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.NET.Sdk.WorkloadManifestReader;
namespace ManifestReaderTests
{
public class SdkFeatureBandTests : SdkTest
{
public SdkFeatureBandTests(ITestOutputHelper logger) : base(logger)
{
}
[Theory]
[InlineData("6.0.100", "6.0.100")]
[InlineData("10.0.512", "10.0.500")]
[InlineData("7.0.100-preview.1.12345", "7.0.100-preview.1")]
[InlineData("7.0.100-dev", "7.0.100")]
[InlineData("7.0.100-ci", "7.0.100")]
[InlineData("6.0.100-rc.2.21505.57", "6.0.100-rc.2")]
[InlineData("7.0.100-alpha.1.21558.2", "7.0.100-alpha.1")]
public void ItParsesVersionsCorrectly(string version, string expectedParsedVersion)
{
var parsedVersion = new SdkFeatureBand(version).ToString();
parsedVersion.Should().Be(expectedParsedVersion);
}
[Theory]
[InlineData("6.0.100", "6.0.100")]
[InlineData("10.0.512", "10.0.500")]
[InlineData("7.0.105-preview.1.12345", "7.0.100")]
[InlineData("7.0.100-dev", "7.0.100")]
[InlineData("7.0.100-ci", "7.0.100")]
[InlineData("6.0.100-rc.2.21505.57", "6.0.100")]
[InlineData("7.0.400-alpha.1.21558.2", "7.0.400")]
public void ItDiscardsPreleaseLabelsCorrectly(string version, string expectedParsedVersion)
{
var parsedVersion = new SdkFeatureBand(version).ToStringWithoutPrerelease();
parsedVersion.Should().Be(expectedParsedVersion);
}
}
}