mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Packaged apps test (#4921)
* Added wrapper for PackageManager and Package class * Added tests for package in development and framework mode * Renamed UWP test file * Improved readability of UWP tests
This commit is contained in:
committed by
GitHub
parent
ec803d63c8
commit
653ae777d5
@@ -0,0 +1,41 @@
|
||||
using Package = Windows.ApplicationModel.Package;
|
||||
|
||||
namespace Microsoft.Plugin.Program.Programs
|
||||
{
|
||||
public class PackageWrapper : IPackage
|
||||
{
|
||||
public string Name { get; }
|
||||
|
||||
public string FullName { get; }
|
||||
|
||||
public string FamilyName { get; }
|
||||
|
||||
public bool IsFramework { get; }
|
||||
|
||||
public bool IsDevelopmentMode { get; }
|
||||
|
||||
public string InstalledLocation { get; }
|
||||
|
||||
public PackageWrapper(string Name, string FullName, string FamilyName, bool IsFramework, bool IsDevelopmentMode, string InstalledLocation)
|
||||
{
|
||||
this.Name = Name;
|
||||
this.FullName = FullName;
|
||||
this.FamilyName = FamilyName;
|
||||
this.IsFramework = IsFramework;
|
||||
this.IsDevelopmentMode = IsDevelopmentMode;
|
||||
this.InstalledLocation = InstalledLocation;
|
||||
}
|
||||
|
||||
public static PackageWrapper GetWrapperFromPackage(Package package)
|
||||
{
|
||||
return new PackageWrapper(
|
||||
package.Id.Name,
|
||||
package.Id.FullName,
|
||||
package.Id.FamilyName,
|
||||
package.IsFramework,
|
||||
package.IsDevelopmentMode,
|
||||
package.InstalledLocation.Path
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user