Skip to content

Commit 612dbbc

Browse files
committed
Remove Xunit warning
1 parent 47d8969 commit 612dbbc

File tree

7 files changed

+46
-37
lines changed

7 files changed

+46
-37
lines changed

Directory.Build.props

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
<Project>
2-
<PropertyGroup>
3-
<NoWarn>CS1591;CS0219;8002;NU5125</NoWarn>
4-
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
5-
</PropertyGroup>
6-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
7-
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
8-
</PropertyGroup>
9-
<!-- Enable building .NET Framework projects on any machine with at least MSBuild or the .NET Core SDK installed.-->
10-
<ItemGroup>
11-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
12-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
13-
<PrivateAssets>all</PrivateAssets>
14-
</PackageReference>
15-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
16-
</ItemGroup>
17-
<ItemGroup>
18-
<!-- Compiler to support nullable in VS2017 -->
19-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.4.0" PrivateAssets="All" />
20-
</ItemGroup>
2+
<PropertyGroup>
3+
<NoWarn>CS1591;CS0219;8002;NU5125</NoWarn>
4+
<SolutionDirectory Condition="'$(SolutionDirectory)'==''">$(MSBuildThisFileDirectory)</SolutionDirectory>
5+
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
6+
</PropertyGroup>
7+
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
8+
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
9+
</PropertyGroup>
10+
<!-- Enable building .NET Framework projects on any machine with at least MSBuild or the .NET Core SDK installed.-->
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
14+
<PrivateAssets>all</PrivateAssets>
15+
</PackageReference>
16+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
17+
</ItemGroup>
2118
</Project>

appveyor.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#version should be only changed with RELEASE eminent, see RELEASE.md
2-
version: 2.7.0-alpha-{build}
2+
version: 2.7.0-{build}
33

4-
image: Visual Studio 2017
4+
image: Visual Studio 2019
55

66
clone_depth: 1
77
pull_requests:

src/CommandLine/CommandLine.csproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<LangVersion>8.0</LangVersion>
2828
<IncludeSymbols>true</IncludeSymbols>
2929
<DebugType>portable</DebugType>
30-
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
3130
</PropertyGroup>
3231

3332
<ItemGroup Condition="'$(BuildTarget)' != 'fsharp'">
@@ -48,7 +47,7 @@
4847
<PackageReference Include="FSharp.Core" Version="4.0.0.1" Condition="'$(BuildTarget)' == 'fsharp'" />
4948
</ItemGroup>
5049
<ItemGroup>
51-
<None Include="..\..\LICENSE.md" Pack="true" PackagePath=""/>
52-
<None Include="..\..\art\CommandLine20.png" Pack="true" PackagePath=""/>
50+
<None Include="$(SolutionDirectory)LICENSE.md" Pack="true" PackagePath=""/>
51+
<None Include="$(SolutionDirectory)art\CommandLine20.png" Pack="true" PackagePath=""/>
5352
</ItemGroup>
5453
</Project>

tests/CommandLine.Tests/Fakes/Immutable_Simple_Options.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public class Immutable_Simple_Options_Invalid_Ctor_Args
4141

4242
public Immutable_Simple_Options_Invalid_Ctor_Args(string stringValue1, IEnumerable<int> intSequence2, bool boolValue, long longValue)
4343
{
44-
this.stringValue = stringValue;
45-
this.intSequence = intSequence;
44+
this.stringValue = stringValue1;
45+
this.intSequence = intSequence2;
4646
this.boolValue = boolValue;
4747
this.longValue = longValue;
4848
}

tests/CommandLine.Tests/Unit/Core/InstanceBuilderTests.cs

+15-2
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,9 @@ public void Parse_to_immutable_instance(string[] arguments, Immutable_Simple_Opt
902902
}
903903

904904
[Theory]
905-
[MemberData(nameof(ImmutableInstanceData))]
906-
public void Parse_to_immutable_instance_with_Invalid_Ctor_Args(string[] arguments, Immutable_Simple_Options _)
905+
[MemberData(nameof(ImmutableInstanceDataArgs))]
906+
[Trait("Category", "Immutable")]
907+
public void Parse_to_immutable_instance_with_Invalid_Ctor_Args(string[] arguments)
907908
{
908909
// Fixture setup in attributes
909910

@@ -1209,6 +1210,18 @@ public static IEnumerable<object[]> ImmutableInstanceData
12091210
yield return new object[] { new[] { "--stringvalue=strval0", "-i", "9", "7", "8", "-x", "9876543210" }, new Immutable_Simple_Options("strval0", new[] { 9, 7, 8 }, true, 9876543210L) };
12101211
}
12111212
}
1213+
public static IEnumerable<object[]> ImmutableInstanceDataArgs
1214+
{
1215+
get
1216+
{
1217+
yield return new object[] { new string[] { } } ;
1218+
yield return new object[] {new [] {"--stringvalue=strval0"}};
1219+
yield return new object[] { new[] { "-i", "9", "7", "8" } };
1220+
yield return new object[] { new[] { "-x" }};
1221+
yield return new object[] { new[] { "9876543210" }};
1222+
yield return new object[] { new[] { "--stringvalue=strval0", "-i", "9", "7", "8", "-x", "9876543210" }};
1223+
}
1224+
}
12121225

12131226
public static IEnumerable<object[]> GuidData
12141227
{

tests/CommandLine.Tests/Unit/ParserTests.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -682,15 +682,16 @@ public void Properly_formatted_help_screen_excludes_help_as_unknown_option()
682682
// Teardown
683683
}
684684

685-
//[Fact]
686-
public static void Breaking_mutually_exclusive_set_constraint_with_set_name_with_partial_string_right_side_equality_gererates_MissingValueOptionError()
685+
[Fact]
686+
public static void Breaking_mutually_exclusive_set_constraint_with_both_set_name_with_gererates_Error()
687687
{
688688
// Fixture setup
689689
var expectedResult = new[]
690-
{
691-
new MutuallyExclusiveSetError(new NameInfo("", "weburl"), string.Empty),
692-
new MutuallyExclusiveSetError(new NameInfo("", "somethingelese"), string.Empty)
693-
};
690+
{
691+
new MutuallyExclusiveSetError(new NameInfo("", "weburl"), "theweb"),
692+
new MutuallyExclusiveSetError(new NameInfo("", "somethingelse"), "theweb"),
693+
694+
};
694695
var sut = new Parser();
695696

696697
// Exercize system
@@ -699,8 +700,7 @@ public static void Breaking_mutually_exclusive_set_constraint_with_set_name_with
699700

700701
// Verify outcome
701702
((NotParsed<Options_With_SetName_That_Ends_With_Previous_SetName>)result).Errors.Should().BeEquivalentTo(expectedResult);
702-
703-
// Teardown
703+
704704
}
705705

706706
[Fact]

tests/CommandLine.Tests/Unit/Text/HelpTextTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ public void Options_should_be_separated_by_spaces()
845845
// Verify outcome
846846
var text = helpText.ToString();
847847
var lines = text.ToLines().TrimStringArray();
848-
Console.WriteLine(text);
848+
849849
lines[3].Should().Be("-z, --strseq (Default: a b c)");
850850
lines[5].Should().Be("-y, --intseq (Default: 1 2 3)");
851851
lines[7].Should().Be("-q, --dblseq (Default: 1.1 2.2 3.3)");

0 commit comments

Comments
 (0)