mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[Tests]Fix Unit Test to compile under .NET 5 and up (#21229)
.NET Framework has the previous function, but .NET Core does not support it. This is so we can keep compiling this code under new frameworks.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Castle.Core.Internal;
|
||||
using Microsoft.Plugin.Program.Programs;
|
||||
@@ -52,8 +53,8 @@ namespace Microsoft.Plugin.Program.UnitTests.Programs
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(2, applications.Length);
|
||||
Assert.IsTrue(applications.FindAll(x => x.Name == "DevelopmentApp").Length > 0);
|
||||
Assert.IsTrue(applications.FindAll(x => x.Name == "PackagedApp").Length > 0);
|
||||
Assert.IsTrue(Array.FindAll(applications, x => x.Name == "DevelopmentApp").Length > 0);
|
||||
Assert.IsTrue(Array.FindAll(applications, x => x.Name == "PackagedApp").Length > 0);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -71,7 +72,7 @@ namespace Microsoft.Plugin.Program.UnitTests.Programs
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(1, applications.Length);
|
||||
Assert.IsTrue(applications.FindAll(x => x.Name == "PackagedApp").Length > 0);
|
||||
Assert.IsTrue(Array.FindAll(applications, x => x.Name == "PackagedApp").Length > 0);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
Reference in New Issue
Block a user