Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Align unit test package dependencies (#523)
Browse files Browse the repository at this point in the history
* Consolidate Moq to latest stable version v4.10.1

* Consolidate xunit dependency to latest stable v2.4.1

* Consolidate xunit.runner.visualstudio to latest stable v2.4.1.
Install xunit.runner.visualstudio in all test projects per xunit recommendation.

* Turn xunit.core into a transitive dependency to avoid unintended package downgrades

* Fix xunit compilation errors
  • Loading branch information
xavierdecoster authored May 17, 2019
1 parent 62358c0 commit e3a1a96
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 21 deletions.
8 changes: 5 additions & 3 deletions tests/CatalogMetadataTests/CatalogMetadataTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,18 @@
<Version>1.1.2</Version>
</PackageReference>
<PackageReference Include="Moq">
<Version>4.5.23</Version>
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Common">
<Version>5.0.0-preview1.5665</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.1.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.1.0</Version>
<Version>2.4.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
10 changes: 6 additions & 4 deletions tests/CatalogTests/CatalogTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
<Version>3.1.0</Version>
</PackageReference>
<PackageReference Include="Moq">
<Version>4.7.25</Version>
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Packaging">
<Version>5.0.0-preview1.5665</Version>
Expand All @@ -276,10 +276,12 @@
<Version>8.2.1</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.1.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.core">
<Version>2.1.0</Version>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.4.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion tests/CatalogTests/Helpers/FeedPackageIdentityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static IEnumerable<object[]> Equals_Data

[Theory]
[MemberData(nameof(Equals_Data))]
public void Equals(string idA, string versionA, string idB, string versionB, bool success)
public void FeedPackageIdentityEquals(string idA, string versionA, string idB, string versionB, bool success)
{
var packageA = new FeedPackageIdentity(idA, versionA);
var packageB = new FeedPackageIdentity(idB, versionB);
Expand Down
9 changes: 3 additions & 6 deletions tests/NgTests/NgTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
<Version>2.2.0</Version>
</PackageReference>
<PackageReference Include="Moq">
<Version>4.7.25</Version>
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Protocol">
<Version>5.0.0-preview1.5665</Version>
Expand All @@ -209,13 +209,10 @@
<Version>8.2.1</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="xunit.core">
<Version>2.1.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.2.0</Version>
<Version>2.4.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions tests/NuGet.IndexingTests/Extraction/DocumentCreatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void HasExpectedFieldNamesAndValues()
}
}

public static IEnumerable<string[]> VerifiesRequiredPropertiesAreProvidedData
public static IEnumerable<object[]> VerifiesRequiredPropertiesAreProvidedData
{
get
{
Expand All @@ -226,7 +226,7 @@ public static IEnumerable<string[]> VerifiesRequiredPropertiesAreProvidedData
}
}

public static IEnumerable<string[]> ValidatesPropertiesThatAreNotStringsData
public static IEnumerable<object[]> ValidatesPropertiesThatAreNotStringsData
{
get
{
Expand Down
4 changes: 2 additions & 2 deletions tests/NuGet.IndexingTests/NuGet.IndexingTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<Version>1.1.2</Version>
</PackageReference>
<PackageReference Include="Moq">
<Version>4.5.21</Version>
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Configuration">
<Version>2.28.0</Version>
Expand All @@ -104,7 +104,7 @@
<Version>5.0.0-preview1.5665</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.1.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.4.1</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq">
<Version>4.7.25</Version>
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.4.1</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<Version>2.28.0</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.1.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.4.1</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq">
<Version>4.7.25</Version>
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.4.1</Version>
Expand Down

0 comments on commit e3a1a96

Please sign in to comment.