Skip to content

Commit

Permalink
Add all properties to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Akinwale Alagbe committed Oct 18, 2023
1 parent 5879735 commit 4937959
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,25 @@ private void ValidateManifestFields(Manifest manifest, TestManifestVersion manif

Assert.Single(manifest.UnsupportedOSArchitectures);
Assert.Equal("arm", manifest.UnsupportedOSArchitectures[0]);

Assert.Single(installer1.InstallationMetadata.Files);
ManifestInstallerFile installerFile2 = installer1.InstallationMetadata.Files[0];
Assert.Equal("main2.exe", installerFile2.RelativeFilePath);
Assert.Equal("DisplayName2", installerFile2.DisplayName);
Assert.Equal("/arg2", installerFile2.InvocationParameter);
Assert.Equal("79D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", installerFile2.FileSha256);

Assert.Equal("msi", installer1.NestedInstallerType);

InstallerNestedInstallerFile installerNestedInstallerFile2 = installer1.NestedInstallerFiles[0];
Assert.Equal("RelativeFilePath2", installerNestedInstallerFile2.RelativeFilePath);
Assert.Equal("PortableCommandAlias2", installerNestedInstallerFile2.PortableCommandAlias);

Assert.Single(installer1.UnsupportedArguments);
Assert.Equal("location", installer1.UnsupportedArguments[0]);

Assert.True(installer1.DisplayInstallWarnings);
Assert.True(installer1.DownloadCommandProhibited);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,13 @@ Installers:
ReleaseDate: 2021-02-02
InstallerAbortsTerminal: false
InstallLocationRequired: false
NestedInstallerFiles:
- RelativeFilePath: RelativeFilePath2
PortableCommandAlias: PortableCommandAlias2
RequireExplicitUpgrade: false
DisplayInstallWarnings: false
DisplayInstallWarnings: true
ElevationRequirement: elevationRequired
NestedInstallerType: msi
UnsupportedArguments:
- location
UnsupportedOSArchitectures:
Expand All @@ -212,7 +216,15 @@ Installers:
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
DownloadCommandProhibited: false
DownloadCommandProhibited: true
InstallationMetadata:
DefaultInstallLocation: "%ProgramFiles%\\TestApp"
Files:
- RelativeFilePath: "main2.exe"
FileSha256: 79D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82
FileType: launch2
InvocationParameter: "/arg2"
DisplayName: "DisplayName2"
- Architecture: x64
InstallerSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82
InstallerUrl: https://www.microsoft.com/msixsdk/msixsdkx64.exe
Expand Down
6 changes: 0 additions & 6 deletions src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ public class ManifestInstaller
/// </summary>
public List<InstallerNestedInstallerFile> NestedInstallerFiles { get; set; }

/// <summary>
/// Gets or sets the excluded markets.
/// </summary>
public string ExcludedMarkets { get; set; }

/// <summary>
/// Gets or sets the unsupported arguments.
/// </summary>
Expand Down Expand Up @@ -265,7 +260,6 @@ public bool Equals(ManifestInstaller other)
(this.InstallationMetadata == other.InstallationMetadata) &&
(this.NestedInstallerType == other.NestedInstallerType) &&
(this.NestedInstallerFiles == other.NestedInstallerFiles) &&
(this.ExcludedMarkets == other.ExcludedMarkets) &&
(this.DisplayInstallWarnings == other.DisplayInstallWarnings);
}

Expand Down

0 comments on commit 4937959

Please sign in to comment.