Skip to content

Commit 1242f2d

Browse files
committed
fix compile
1 parent 8e1ea37 commit 1242f2d

File tree

38 files changed

+53
-56
lines changed

38 files changed

+53
-56
lines changed

test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/V3DetailControlModelTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public static IEnumerable<object[]> FloatingVersions_TestCases()
625625
[InlineData("3.0.0", "3.0.0", true, false)]
626626
[InlineData("3", "3.0.0", true, false)]
627627
[InlineData("3.0.1-beta", "3.0.1-beta", true, true)]
628-
public async void WhenPackageStyleIsPackageReference_And_CustomVersion_InstalledTab_IsSelectedVersionCorrect(string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
628+
public async Task WhenPackageStyleIsPackageReference_And_CustomVersion_InstalledTab_IsSelectedVersionCorrect(string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
629629
{
630630
// Arange project
631631
Mock<IServiceBroker> mockServiceBroker = new Mock<IServiceBroker>();
@@ -730,7 +730,7 @@ await model.SetCurrentPackageAsync(
730730
[Theory]
731731
[MemberData(nameof(FloatingVersions_TestCases))]
732732

733-
public async void WhenPackageStyleIsPackageReference_And_CustomVersion_UpdatesTab_IsSelectedVersionCorrect(string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
733+
public async Task WhenPackageStyleIsPackageReference_And_CustomVersion_UpdatesTab_IsSelectedVersionCorrect(string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
734734
{
735735
// Assert
736736
// Updates Tab wont show package if it is latest
@@ -855,7 +855,7 @@ await model.SetCurrentPackageAsync(
855855
[InlineData("3.0.0", "3.0.0", true, false)]
856856
[InlineData("3", "3.0.0", true, false)]
857857
[InlineData("3.0.1-beta", "3.0.1-beta", true, true)]
858-
public async void WhenPackageStyleIsPackageReference_And_CustomVersion_BrowseTab_IsSelectedVersionCorrect(string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
858+
public async Task WhenPackageStyleIsPackageReference_And_CustomVersion_BrowseTab_IsSelectedVersionCorrect(string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
859859
{
860860
// Arange project
861861
Mock<IServiceBroker> mockServiceBroker = new Mock<IServiceBroker>();
@@ -1065,7 +1065,7 @@ public static IEnumerable<object[]> FloatingVersions_TestCases_NonPackageReferen
10651065
[InlineData(NuGetProjectKind.ProjectK, ProjectModel.ProjectStyle.ProjectJson, "[3,)", "3", true, false)]
10661066
[InlineData(NuGetProjectKind.ProjectK, ProjectModel.ProjectStyle.ProjectJson, "[3.0,)", "3.0", true, false)]
10671067
[InlineData(NuGetProjectKind.ProjectK, ProjectModel.ProjectStyle.ProjectJson, "[3.0.0,)", "3.0.0", true, false)]
1068-
public async void WhenPackageStyleIsNotPackageReference_And_CustomVersion_InstalledTab_IsSelectedVersionCorrect(NuGetProjectKind projectKind, ProjectModel.ProjectStyle projectStyle, string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
1068+
public async Task WhenPackageStyleIsNotPackageReference_And_CustomVersion_InstalledTab_IsSelectedVersionCorrect(NuGetProjectKind projectKind, ProjectModel.ProjectStyle projectStyle, string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
10691069
{
10701070
// Arange project
10711071
Mock<IServiceBroker> mockServiceBroker = new Mock<IServiceBroker>();
@@ -1168,7 +1168,7 @@ await model.SetCurrentPackageAsync(
11681168
[InlineData(NuGetProjectKind.ProjectK, ProjectModel.ProjectStyle.ProjectJson, "[3,)", "3", true, false)]
11691169
[InlineData(NuGetProjectKind.ProjectK, ProjectModel.ProjectStyle.ProjectJson, "[3.0,)", "3.0", true, false)]
11701170
[InlineData(NuGetProjectKind.ProjectK, ProjectModel.ProjectStyle.ProjectJson, "[3.0.0,)", "3.0.0", true, false)]
1171-
public async void WhenPackageStyleIsNotPackageReference_And_CustomVersion_BrowseTab_IsSelectedVersionCorrect(NuGetProjectKind projectKind, ProjectModel.ProjectStyle projectStyle, string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
1171+
public async Task WhenPackageStyleIsNotPackageReference_And_CustomVersion_BrowseTab_IsSelectedVersionCorrect(NuGetProjectKind projectKind, ProjectModel.ProjectStyle projectStyle, string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
11721172
{
11731173
// Arange project
11741174
Mock<IServiceBroker> mockServiceBroker = new Mock<IServiceBroker>();
@@ -1271,7 +1271,7 @@ await model.SetCurrentPackageAsync(
12711271

12721272
[Theory]
12731273
[MemberData(nameof(FloatingVersions_TestCases_NonPackageReferenceProject))]
1274-
public async void WhenPackageStyleIsNotPackageReference_And_CustomVersion_UpdatesTab_IsSelectedVersionCorrect(NuGetProjectKind projectKind, ProjectModel.ProjectStyle projectStyle, string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
1274+
public async Task WhenPackageStyleIsNotPackageReference_And_CustomVersion_UpdatesTab_IsSelectedVersionCorrect(NuGetProjectKind projectKind, ProjectModel.ProjectStyle projectStyle, string allowedVersions, string installedVersion, bool isLatest, bool includePrerelease)
12751275
{
12761276
// Arrange project
12771277
Mock<IServiceBroker> mockServiceBroker = new Mock<IServiceBroker>();

test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/PackageLicenseUtilitiesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void PackageLicenseUtility_GeneratesLinkWithHigherVersion()
8383
var links = PackageLicenseUtilities.GenerateLicenseLinks(licenseData, licenseFileHeader: null, packagePath: null, packageIdentity: null);
8484

8585
Assert.True(links[0] is WarningText);
86-
Assert.Empty(links.Where(e => e is LicenseText));
86+
Assert.DoesNotContain(links, e => e is LicenseText);
8787
}
8888

8989
[Fact]

test/NuGet.Clients.Tests/NuGet.Tools.Test/NuGetBrokeredServiceFactoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ public async Task ProfferServicesAsync_WithAuthorizingBrokeredServiceFactoryServ
148148
}
149149
}
150150

151-
public static TheoryData ServicesAndFactories => new TheoryData<ServiceRpcDescriptor, Type>
151+
public static TheoryData<ServiceRpcDescriptor, Type> ServicesAndFactories => new()
152152
{
153153
{ ContractsNuGetServices.NuGetProjectServiceV1, typeof(NuGetProjectService) }
154154
};
155155

156-
public static TheoryData ServicesAndAuthorizingFactories => new TheoryData<ServiceRpcDescriptor, Type>
156+
public static TheoryData<ServiceRpcDescriptor, Type> ServicesAndAuthorizingFactories => new()
157157
{
158158
{ NuGetServices.ProjectManagerService, typeof(NuGetProjectManagerService) },
159159
{ NuGetServices.ProjectUpgraderService, typeof(NuGetProjectUpgraderService) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Common.Test/NuGetFeedbackDiagnosticFileProviderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public NuGetFeedbackDiagnosticFileProviderTests()
5555
}
5656

5757
[Fact]
58-
public async void GetFiles_NoSolutionMock_ReturnsZip()
58+
public async Task GetFiles_NoSolutionMock_ReturnsZip()
5959
{
6060
// Arrange - also see constructor
6161
List<Task> backgroundTasks = new();

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/ContextInfos/PackageDeprecationMetadataContextInfoTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageDeprec
2828
Assert.Equal(expectedResult.Reasons, actualResult.Reasons);
2929
}
3030

31-
public static TheoryData TestData => new TheoryData<PackageDeprecationMetadataContextInfo>
31+
public static TheoryData<PackageDeprecationMetadataContextInfo> TestData => new()
3232
{
3333
{
3434
new PackageDeprecationMetadataContextInfo(

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/AlternatePackageMetadataContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(AlternatePack
1919
Assert.Equal(expectedResult.VersionRange, actualResult.VersionRange);
2020
}
2121

22-
public static TheoryData TestData => new TheoryData<AlternatePackageMetadataContextInfo>
22+
public static TheoryData<AlternatePackageMetadataContextInfo> TestData => new()
2323
{
2424
{ new AlternatePackageMetadataContextInfo(packageId: "packageid", new VersionRange(new NuGetVersion("1.0"))) }
2525
};

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/FloatRangeFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(FloatRange ex
2222
Assert.Equal(expectedResult.OriginalReleasePrefix, actualResult!.OriginalReleasePrefix);
2323
}
2424

25-
public static TheoryData FloatRanges => new TheoryData<FloatRange>
25+
public static TheoryData<FloatRange> FloatRanges => new()
2626
{
2727
{ new FloatRange(NuGetVersionFloatBehavior.AbsoluteLatest, NuGetVersion.Parse("0.0.0"), "*") },
2828
{ new FloatRange(NuGetVersionFloatBehavior.PrereleaseMajor, MinVersion, "*") },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/IInstalledAndTransitivePackagesFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(InstalledAndT
5555
}
5656
}
5757

58-
public static TheoryData IInstalledAndTransitivePackages => new TheoryData<IInstalledAndTransitivePackages>
58+
public static TheoryData<InstalledAndTransitivePackages> IInstalledAndTransitivePackages => new()
5959
{
6060
{ new InstalledAndTransitivePackages(DirectPackages, TransitivePackages) },
6161
{ new InstalledAndTransitivePackages(DirectPackages, Array.Empty<ITransitivePackageReferenceContextInfo>()) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/ILogMessageFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(ILogMessage e
2222
TestUtility.AssertEqual(expectedResult, actualResult!);
2323
}
2424

25-
public static TheoryData ILogMessages => new TheoryData<ILogMessage>
25+
public static TheoryData<ILogMessage> ILogMessages => new()
2626
{
2727
{ new LogMessage(LogLevel.Error, Message, NuGetLogCode.NU3000) },
2828
{

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/IPackageReferenceContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(IPackageRefer
3030
Assert.Equal(expectedResult.IsDevelopmentDependency, actualResult.IsDevelopmentDependency);
3131
}
3232

33-
public static TheoryData IPackageReferenceContextInfos => new TheoryData<IPackageReferenceContextInfo>
33+
public static TheoryData<IPackageReferenceContextInfo> IPackageReferenceContextInfos => new()
3434
{
3535
{ PackageReferenceContextInfo.Create(PackageIdentity, Framework) },
3636
{ PackageReferenceContextInfo.Create(PackageIdentity, framework: null) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/IProjectContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(IProjectConte
2121
Assert.Equal(expectedResult.ProjectKind, actualResult.ProjectKind);
2222
}
2323

24-
public static TheoryData IProjectContextInfos => new TheoryData<IProjectContextInfo>
24+
public static TheoryData<IProjectContextInfo> IProjectContextInfos => new()
2525
{
2626
{ new ProjectContextInfo(ProjectId, ProjectModel.ProjectStyle.PackageReference, NuGetProjectKind.PackageReference) }
2727
};

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/IProjectMetadataContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(IProjectMetad
2424
Assert.Equal(expectedResult.UniqueName, actualResult.UniqueName);
2525
}
2626

27-
public static TheoryData IProjectMetadataContextInfos => new TheoryData<IProjectMetadataContextInfo>
27+
public static TheoryData<IProjectMetadataContextInfo> IProjectMetadataContextInfos => new()
2828
{
2929
{
3030
new ProjectMetadataContextInfo(

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/ImplicitProjectActionFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(ImplicitProje
2323
Assert.Equal(expectedResult, actualResult);
2424
}
2525

26-
public static TheoryData ImplicitProjectActions => new TheoryData<ImplicitProjectAction>
26+
public static TheoryData<ImplicitProjectAction> ImplicitProjectActions => new()
2727
{
2828
{ new ImplicitProjectAction(Id, PackageIdentity, NuGetProjectActionType.Install) }
2929
};

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/LicenseMetadataFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(LicenseMetada
3939
Assert.Equal(expectedResult.WarningsAndErrors, actualResult.WarningsAndErrors);
4040
}
4141

42-
public static TheoryData TestData => new TheoryData<LicenseMetadata>
42+
public static TheoryData<LicenseMetadata> TestData => new()
4343
{
4444
new LicenseMetadata(LicenseType.Expression,
4545
"MIT",

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/NuGetFrameworkFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(NuGetFramewor
1919
Assert.Equal(expectedResult, actualResult);
2020
}
2121

22-
public static TheoryData NuGetFrameworks => new TheoryData<NuGetFramework>
22+
public static TheoryData<NuGetFramework> NuGetFrameworks => new()
2323
{
2424
{ new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Net, new Version(4, 5), "Profile344") },
2525
{ new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.Net, new Version(4, 8)) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/NuGetVersionFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(NuGetVersion
2525
Assert.Equal(expectedResult.ToString(), actualResult.ToString());
2626
}
2727

28-
public static TheoryData Versions => new TheoryData<NuGetVersion>
28+
public static TheoryData<NuGetVersion> Versions => new()
2929
{
3030
{ PackageVersion },
3131
{ PackageVersionWithPrerelease },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageDependencyFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageDepend
2525
Assert.Equal(expectedResult, actualResult);
2626
}
2727

28-
public static TheoryData PackageDependencies => new TheoryData<PackageDependency>
28+
public static TheoryData<PackageDependency> PackageDependencies => new()
2929
{
3030
{ new PackageDependency(PackageId) },
3131
{ new PackageDependency(PackageId, VersionRange) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageDependencyInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageDepend
2424
Assert.Equal(expectedResult, actualResult);
2525
}
2626

27-
public static TheoryData PackageDependencyInfos => new TheoryData<PackageDependencyInfo>
27+
public static TheoryData<PackageDependencyInfo> PackageDependencyInfos => new()
2828
{
2929
{ new PackageDependencyInfo(PackageIdentity.Id, PackageIdentity.Version) },
3030
{ new PackageDependencyInfo(PackageIdentity, Enumerable.Empty<PackageDependency>()) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageDeprecationMetadataContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageDeprec
3838
}
3939
}
4040

41-
public static TheoryData TestData => new TheoryData<PackageDeprecationMetadataContextInfo>
41+
public static TheoryData<PackageDeprecationMetadataContextInfo> TestData => new()
4242
{
4343
{ new PackageDeprecationMetadataContextInfo("message", new List<string>{"string1" }, new AlternatePackageMetadataContextInfo("packageId", new VersionRange(new NuGetVersion("0.1")))) },
4444
{ new PackageDeprecationMetadataContextInfo(null, new List<string>{"string1" }, new AlternatePackageMetadataContextInfo("packageId", new VersionRange(new NuGetVersion("0.1")))) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageIdentityFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageIdenti
2222
Assert.Equal(expectedResult, actualResult);
2323
}
2424

25-
public static TheoryData PackageIdentities => new TheoryData<PackageIdentity>
25+
public static TheoryData<PackageIdentity> PackageIdentities => new()
2626
{
2727
{ new PackageIdentity(PackageId, version: null) },
2828
{ new PackageIdentity(PackageId, PackageVersion) }

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageReferenceFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageRefere
3131
Assert.Equal(expectedResult.TargetFramework, actualResult.TargetFramework);
3232
}
3333

34-
public static TheoryData PackageReferences => new TheoryData<PackageReference>
34+
public static TheoryData<PackageReference> PackageReferences => new()
3535
{
3636
{ new PackageReference(PackageIdentity, Framework) },
3737
{ new PackageReference(PackageIdentity, Framework, userInstalled: true) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageSearchMetadataContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageSearch
6060
Assert.Equal(expectedResult.Vulnerabilities, actualResult.Vulnerabilities);
6161
}
6262

63-
public static TheoryData TestData => new TheoryData<PackageSearchMetadataContextInfo>
63+
public static TheoryData<PackageSearchMetadataContextInfo> TestData => new()
6464
{
6565
{ PackageSearchMetadataContextInfo.Create(new PackageSearchMetadataBuilder.ClonedPackageSearchMetadata()
6666
{

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageSourceContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageSource
1717
Assert.Equal(expectedResult.GetHashCode(), actualResult.GetHashCode());
1818
}
1919

20-
public static TheoryData TestData => new TheoryData<PackageSourceContextInfo>
20+
public static TheoryData<PackageSourceContextInfo> TestData => new()
2121
{
2222
{ new PackageSourceContextInfo("source", "name", isEnabled: true, protocolVersion: 3, allowInsecureConnections: true, disableTLSCertificateValidation: true) },
2323
{ new PackageSourceContextInfo("source", "name", isEnabled: true, protocolVersion: 3, allowInsecureConnections: true) },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageSourceFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageSource
2424
Assert.Equal(expectedResult.IsMachineWide, actualResult.IsMachineWide);
2525
}
2626

27-
public static TheoryData PackageSources => new TheoryData<PackageSource>
27+
public static TheoryData<PackageSource> PackageSources => new()
2828
{
2929
{ new PackageSource(Name, Source, isEnabled: true) },
3030
{ new PackageSource(Name, Source, isEnabled: true) { IsMachineWide = true } },

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/PackageVulnerabilityMetadataContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(PackageVulner
1818
Assert.Equal(expectedResult, actualResult);
1919
}
2020

21-
public static TheoryData TestData => new TheoryData<PackageVulnerabilityMetadataContextInfo>
21+
public static TheoryData<PackageVulnerabilityMetadataContextInfo> TestData => new()
2222
{
2323
{ new PackageVulnerabilityMetadataContextInfo(new Uri("htpp://www.nuget.org"), 2) }
2424
};

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/ProjectActionFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(ProjectAction
2929
Assert.Equal(expectedResult, actualResult);
3030
}
3131

32-
public static TheoryData ProjectActions => new TheoryData<ProjectAction>
32+
public static TheoryData<ProjectAction> ProjectActions => new()
3333
{
3434
{ new ProjectAction(Id, ProjectId, PackageIdentityWithoutVersion, NuGetProjectActionType.Uninstall, implicitActions: null) },
3535
{ new ProjectAction(Id, ProjectId, PackageIdentity, NuGetProjectActionType.Install, ImplicitProjectActions) }

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/RemoteErrorFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(RemoteError e
2727
Assert.Equal(expectedResult.TypeName, actualResult.TypeName);
2828
}
2929

30-
public static TheoryData RemoteErrors => new TheoryData<RemoteError>
30+
public static TheoryData<RemoteError> RemoteErrors => new()
3131
{
3232
{
3333
new RemoteError(

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/SearchFilterFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(SearchFilter
2424
Assert.Equal(expectedResult.SupportedFrameworks, actualResult.SupportedFrameworks);
2525
}
2626

27-
public static TheoryData TestData => new TheoryData<SearchFilter>
27+
public static TheoryData<SearchFilter> TestData => new()
2828
{
2929
{
3030
new SearchFilter(includePrerelease: true, SearchFilterType.IsAbsoluteLatestVersion)

test/NuGet.Clients.Tests/NuGet.VisualStudio.Internal.Contracts.Test/Formatters/SearchResultContextInfoFormatterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void SerializeThenDeserialize_WithValidArguments_RoundTrips(SearchResultC
5151
};
5252

5353

54-
public static TheoryData TestData => new TheoryData<SearchResultContextInfo>
54+
public static TheoryData<SearchResultContextInfo> TestData => new()
5555
{
5656
{ new SearchResultContextInfo() },
5757
{ new SearchResultContextInfo(Guid.NewGuid()) },

0 commit comments

Comments
 (0)