Skip to content

Commit 5d9f62f

Browse files
authored
Merge pull request #77 from microsoft/alzollin/updatedDeps
Updated dependencies.
2 parents cf22d3d + 04c9ee4 commit 5d9f62f

9 files changed

Lines changed: 47 additions & 125 deletions

MSStore.API/MSStore.API.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Microsoft.Identity.Client" Version="4.69.1" />
25-
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.69.1" />
26-
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.3" />
24+
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.1" />
25+
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.1" />
26+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
2727
</ItemGroup>
2828

2929
</Project>

MSStore.CLI.UnitTests/CredentialManagerUnixTests.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System.Runtime.InteropServices;
54
using MSStore.CLI.Services.CredentialManager.Unix;
65

76
namespace MSStore.CLI.UnitTests
@@ -25,26 +24,18 @@ public void Cleanup()
2524
}
2625

2726
[TestMethod]
27+
[OSCondition(ConditionMode.Exclude, OperatingSystems.Windows)]
2828
public void CredentialManagerUnix_ReadCredential_ShouldReturnEmpty()
2929
{
30-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
31-
{
32-
Assert.Inconclusive("This test is only valid on non-Windows platforms");
33-
}
34-
3530
var secret = _credentialManagerUnix.ReadCredential("testUserName");
3631

3732
secret.Should().BeEmpty();
3833
}
3934

4035
[TestMethod]
36+
[OSCondition(ConditionMode.Exclude, OperatingSystems.Windows)]
4137
public void CredentialManagerUnix_WriteCredential_ShouldPersist()
4238
{
43-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
44-
{
45-
Assert.Inconclusive("This test is only valid on non-Windows platforms");
46-
}
47-
4839
_credentialManagerUnix.WriteCredential("testUserName", "testSecret");
4940

5041
var secret = _credentialManagerUnix.ReadCredential("testUserName");

MSStore.CLI.UnitTests/MSStore.CLI.UnitTests.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
<Project Sdk="MSTest.Sdk/3.8.3">
1+
<Project Sdk="MSTest.Sdk/3.9.2">
22

33
<PropertyGroup>
44
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net9.0;net9.0-windows10.0.17763.0</TargetFrameworks>
55
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('windows'))">net9.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<MSTestAnalysisMode>Recommended</MSTestAnalysisMode>
89

910
<NoWarn>$(NoWarn);CA1001;CA1812;CS1591</NoWarn>
1011
</PropertyGroup>
@@ -35,30 +36,30 @@
3536
</ItemGroup>
3637

3738
<ItemGroup>
38-
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.13.0" />
39+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.14.1" />
3940
</ItemGroup>
4041

4142
<ItemGroup>
4243
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="17.14.2" />
4344
</ItemGroup>
4445

4546
<ItemGroup>
46-
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.6.3" />
47+
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.7.2" />
4748
</ItemGroup>
4849

4950
<ItemGroup>
50-
<PackageReference Update="MSTest.Analyzers" Version="3.8.3">
51+
<PackageReference Update="MSTest.Analyzers" Version="3.9.2">
5152
<PrivateAssets>all</PrivateAssets>
5253
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5354
</PackageReference>
5455
</ItemGroup>
5556

5657
<ItemGroup>
57-
<PackageReference Update="MSTest.TestAdapter" Version="3.8.3" />
58+
<PackageReference Update="MSTest.TestAdapter" Version="3.9.2" />
5859
</ItemGroup>
5960

6061
<ItemGroup>
61-
<PackageReference Update="MSTest.TestFramework" Version="3.8.3" />
62+
<PackageReference Update="MSTest.TestFramework" Version="3.9.2" />
6263
</ItemGroup>
6364

6465
</Project>

MSStore.CLI.UnitTests/PackageCommandUnitTests.cs

Lines changed: 12 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System.Runtime.InteropServices;
5-
64
namespace MSStore.CLI.UnitTests
75
{
86
[TestClass]
@@ -27,13 +25,9 @@ public async Task PackageCommandShouldUseDefaultDirectoryIfNoArgument()
2725
}
2826

2927
[TestMethod]
28+
[OSCondition(OperatingSystems.Windows)]
3029
public async Task PackageCommandForUWPAppsShouldCallMSBuildIfWindows()
3130
{
32-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
33-
{
34-
Assert.Inconclusive("This test is only valid on Windows platforms");
35-
}
36-
3731
var path = CopyFilesRecursively("UWPProject");
3832

3933
var dirInfo = new DirectoryInfo(path);
@@ -67,13 +61,9 @@ public async Task PackageCommandForUWPAppsShouldCallMSBuildIfWindows()
6761
}
6862

6963
[TestMethod]
64+
[OSCondition(OperatingSystems.Windows)]
7065
public async Task PackageCommandForUWPAppsShouldCallMSBuildWithOutputParameterIfWindows()
7166
{
72-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
73-
{
74-
Assert.Inconclusive("This test is only valid on Windows platforms");
75-
}
76-
7767
var path = CopyFilesRecursively("UWPProject");
7868

7969
var dirInfo = new DirectoryInfo(path);
@@ -115,13 +105,9 @@ public async Task PackageCommandForUWPAppsShouldCallMSBuildWithOutputParameterIf
115105
}
116106

117107
[TestMethod]
108+
[OSCondition(OperatingSystems.Windows)]
118109
public async Task PackageCommandForWinUIAppsShouldCallMSBuildIfWindows()
119110
{
120-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
121-
{
122-
Assert.Inconclusive("This test is only valid on Windows platforms");
123-
}
124-
125111
var path = CopyFilesRecursively("WinUIProject");
126112

127113
var dirInfo = new DirectoryInfo(path);
@@ -172,13 +158,9 @@ public async Task PackageCommandForWinUIAppsShouldCallMSBuildIfWindows()
172158
}
173159

174160
[TestMethod]
161+
[OSCondition(OperatingSystems.Windows)]
175162
public async Task PackageCommandForWinUIAppsShouldCallMSBuildWithOutputParameterIfWindows()
176163
{
177-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
178-
{
179-
Assert.Inconclusive("This test is only valid on Windows platforms");
180-
}
181-
182164
var path = CopyFilesRecursively("WinUIProject");
183165

184166
var dirInfo = new DirectoryInfo(path);
@@ -240,13 +222,9 @@ public async Task PackageCommandForWinUIAppsShouldCallMSBuildWithOutputParameter
240222
}
241223

242224
[TestMethod]
225+
[OSCondition(OperatingSystems.Windows)]
243226
public async Task PackageCommandForMauiAppsShouldCallMSBuildIfWindows()
244227
{
245-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
246-
{
247-
Assert.Inconclusive("This test is only valid on Windows platforms");
248-
}
249-
250228
var path = CopyFilesRecursively("MauiProject");
251229

252230
var dirInfo = new DirectoryInfo(path);
@@ -279,13 +257,9 @@ public async Task PackageCommandForMauiAppsShouldCallMSBuildIfWindows()
279257
}
280258

281259
[TestMethod]
260+
[OSCondition(OperatingSystems.Windows)]
282261
public async Task PackageCommandForMauiAppsShouldCallMSBuildWithOutputParameterIfWindows()
283262
{
284-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
285-
{
286-
Assert.Inconclusive("This test is only valid on Windows platforms");
287-
}
288-
289263
var path = CopyFilesRecursively("MauiProject");
290264

291265
var dirInfo = new DirectoryInfo(path);
@@ -335,13 +309,9 @@ public async Task PackageCommandForMauiAppsShouldCallMSBuildWithOutputParameterI
335309
[DataRow(-6, new[] { "ElectronProject", "Yarn" })]
336310
[DataRow(-6, new[] { "ReactNativeProject", "Npm" })]
337311
[DataRow(-6, new[] { "ReactNativeProject", "Yarn" })]
312+
[OSCondition(ConditionMode.Exclude, OperatingSystems.Windows)]
338313
public async Task PackageCommandShouldNotWorkIfNotWindowsOnSpecificPlatforms(int expectedResult, string[] testDataProjectSubPath)
339314
{
340-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
341-
{
342-
Assert.Inconclusive("This test is only valid on non-Windows platforms");
343-
}
344-
345315
var path = CopyFilesRecursively(Path.Combine(testDataProjectSubPath));
346316

347317
var dirInfo = new DirectoryInfo(path);
@@ -362,13 +332,9 @@ public async Task PackageCommandShouldNotWorkIfNotWindowsOnSpecificPlatforms(int
362332
}
363333

364334
[TestMethod]
335+
[OSCondition(OperatingSystems.Windows)]
365336
public async Task PackageCommandForFlutterAppsShouldCallFlutter()
366337
{
367-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
368-
{
369-
Assert.Inconclusive("This test is only valid on Windows platforms");
370-
}
371-
372338
var path = CopyFilesRecursively("FlutterProject");
373339

374340
var dirInfo = new DirectoryInfo(path);
@@ -413,13 +379,9 @@ public async Task PackageCommandForFlutterAppsShouldCallFlutter()
413379
}
414380

415381
[TestMethod]
382+
[OSCondition(OperatingSystems.Windows)]
416383
public async Task PackageCommandForFlutterAppsShouldCallFlutterWithOutputParameter()
417384
{
418-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
419-
{
420-
Assert.Inconclusive("This test is only valid on Windows platforms");
421-
}
422-
423385
var path = CopyFilesRecursively("FlutterProject");
424386

425387
var dirInfo = new DirectoryInfo(path);
@@ -484,13 +446,9 @@ private void SetupPubGet(DirectoryInfo dirInfo)
484446
}
485447

486448
[TestMethod]
449+
[OSCondition(OperatingSystems.Windows)]
487450
public async Task PackageCommandForElectronNpmAppsShouldCallElectronNpm()
488451
{
489-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
490-
{
491-
Assert.Inconclusive("This test is only valid on Windows platforms");
492-
}
493-
494452
var path = CopyFilesRecursively(Path.Combine("ElectronProject", "Npm"));
495453

496454
var dirInfo = new DirectoryInfo(path);
@@ -524,13 +482,9 @@ public async Task PackageCommandForElectronNpmAppsShouldCallElectronNpm()
524482
}
525483

526484
[TestMethod]
485+
[OSCondition(OperatingSystems.Windows)]
527486
public async Task PackageCommandForElectronYarnAppsShouldCallElectronYarn()
528487
{
529-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
530-
{
531-
Assert.Inconclusive("This test is only valid on Windows platforms");
532-
}
533-
534488
var path = CopyFilesRecursively(Path.Combine("ElectronProject", "Yarn"));
535489

536490
var dirInfo = new DirectoryInfo(path);
@@ -566,13 +520,9 @@ public async Task PackageCommandForElectronYarnAppsShouldCallElectronYarn()
566520
[TestMethod]
567521
[DataRow("Npm")]
568522
[DataRow("Yarn")]
523+
[OSCondition(OperatingSystems.Windows)]
569524
public async Task PackageCommandForReactNativeNpmAppsShouldCallMSBuild(string manifestType)
570525
{
571-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
572-
{
573-
Assert.Inconclusive("This test is only valid on Windows platforms");
574-
}
575-
576526
var path = CopyFilesRecursively(Path.Combine("ReactNativeProject", manifestType));
577527

578528
var dirInfo = new DirectoryInfo(path);

MSStore.CLI.UnitTests/ProductTypeHelperTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void Test_ProductTypeHelper_Solve_Unpackaged()
1313
{
1414
var productId = "12345678-1234-1234-1234-123456789012";
1515
var productType = ProductTypeHelper.Solve(productId);
16-
Assert.AreEqual(productType, ProductType.Unpackaged);
16+
Assert.AreEqual(ProductType.Unpackaged, productType);
1717
}
1818

1919
[TestMethod]
@@ -23,7 +23,7 @@ public void Test_ProductTypeHelper_Solve_Unpackaged()
2323
public void Test_ProductTypeHelper_Solve_Packaged(string productId)
2424
{
2525
var productType = ProductTypeHelper.Solve(productId);
26-
Assert.AreEqual(productType, ProductType.Packaged);
26+
Assert.AreEqual(ProductType.Packaged, productType);
2727
}
2828
}
2929
}

MSStore.CLI.UnitTests/ProjectConfiguratorTests.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System.Runtime.InteropServices;
54
using MSStore.CLI.Services.PWABuilder;
65

76
namespace MSStore.CLI.UnitTests
@@ -466,13 +465,9 @@ private async Task ValidateReactNativeAppxManifestWasUpdatedAsync(string path)
466465
}
467466

468467
[TestMethod]
468+
[OSCondition(OperatingSystems.Windows)]
469469
public async Task ProjectConfiguratorParsesUWPProject()
470470
{
471-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
472-
{
473-
Assert.Inconclusive("This test is only valid on Windows platforms");
474-
}
475-
476471
var path = CopyFilesRecursively("UWPProject");
477472

478473
DefaultMSBuildExecution(new DirectoryInfo(path));
@@ -494,13 +489,9 @@ public async Task ProjectConfiguratorParsesUWPProject()
494489
}
495490

496491
[TestMethod]
492+
[OSCondition(OperatingSystems.Windows)]
497493
public async Task ProjectConfiguratorParsesWinUIProject()
498494
{
499-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
500-
{
501-
Assert.Inconclusive("This test is only valid on Windows platforms");
502-
}
503-
504495
var path = CopyFilesRecursively("WinUIProject");
505496

506497
var dirInfo = new DirectoryInfo(path);

MSStore.CLI.UnitTests/PublishCommandUnitTests.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System.Runtime.InteropServices;
54
using MSStore.CLI.ProjectConfigurators;
65

76
namespace MSStore.CLI.UnitTests
@@ -29,13 +28,9 @@ public async Task PublishCommandShouldUseDefaultDirectoryIfNoArgument()
2928
}
3029

3130
[TestMethod]
31+
[OSCondition(OperatingSystems.Windows)]
3232
public async Task PublishCommandForUWPAppsShouldCallMSBuildIfWindows()
3333
{
34-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
35-
{
36-
Assert.Inconclusive("This test is only valid on Windows platforms");
37-
}
38-
3934
var path = CopyFilesRecursively("UWPProject");
4035

4136
DefaultMSBuildExecution(new DirectoryInfo(path));
@@ -58,13 +53,9 @@ public async Task PublishCommandForUWPAppsShouldCallMSBuildIfWindows()
5853
}
5954

6055
[TestMethod]
56+
[OSCondition(OperatingSystems.Windows)]
6157
public async Task PublishCommandForWinUIAppsShouldCallMSBuildIfWindows()
6258
{
63-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
64-
{
65-
Assert.Inconclusive("This test is only valid on Windows platforms");
66-
}
67-
6859
var path = CopyFilesRecursively("WinUIProject");
6960

7061
var dirInfo = new DirectoryInfo(path);
@@ -93,13 +84,9 @@ public async Task PublishCommandForWinUIAppsShouldCallMSBuildIfWindows()
9384
}
9485

9586
[TestMethod]
87+
[OSCondition(OperatingSystems.Windows)]
9688
public async Task PublishCommandForMauiAppsShouldCallMSBuildIfWindows()
9789
{
98-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
99-
{
100-
Assert.Inconclusive("This test is only valid on Windows platforms");
101-
}
102-
10390
var path = CopyFilesRecursively("MauiProject");
10491

10592
var dirInfo = new DirectoryInfo(path);

0 commit comments

Comments
 (0)