winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

RestInterface_1_9.cpp (24803B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #include "pch.h"
      4 #include "TestCommon.h"
      5 #include "TestRestRequestHandler.h"
      6 #include <Rest/Schema/1_9/Interface.h>
      7 #include <Rest/Schema/IRestClient.h>
      8 #include <AppInstallerVersions.h>
      9 #include <AppInstallerErrors.h>
     10 
     11 using namespace TestCommon;
     12 using namespace AppInstaller::Http;
     13 using namespace AppInstaller::Utility;
     14 using namespace AppInstaller::Manifest;
     15 using namespace AppInstaller::Repository;
     16 using namespace AppInstaller::Repository::Rest;
     17 using namespace AppInstaller::Repository::Rest::Schema;
     18 using namespace AppInstaller::Repository::Rest::Schema::V1_9;
     19 
     20 namespace
     21 {
     22     const std::string TestRestUriString = "http://restsource.com/api";
     23 
     24     struct GoodManifest_AllFields
     25     {
     26         utility::string_t GetSampleManifest_AllFields()
     27         {
     28             return _XPLATSTR(
     29                 R"delimiter(
     30         {
     31           "Data": {
     32             "PackageIdentifier": "Foo.Bar",
     33             "Versions": [
     34               {
     35                 "PackageVersion": "3.0.0abc",
     36                 "DefaultLocale": {
     37                   "PackageLocale": "en-US",
     38                   "Publisher": "Foo",
     39                   "PublisherUrl": "http://publisher.net",
     40                   "PublisherSupportUrl": "http://publisherSupport.net",
     41                   "PrivacyUrl": "http://packagePrivacyUrl.net",
     42                   "Author": "FooBar",
     43                   "PackageName": "Bar",
     44                   "PackageUrl": "http://packageUrl.net",
     45                   "License": "Foo Bar License",
     46                   "LicenseUrl": "http://licenseUrl.net",
     47                   "Copyright": "Foo Bar Copyright",
     48                   "CopyrightUrl": "http://copyrightUrl.net",
     49                   "ShortDescription": "Foo bar is a foo bar.",
     50                   "Description": "Foo bar is a placeholder.",
     51                   "Tags": [
     52                     "FooBar",
     53                     "Foo",
     54                     "Bar"
     55                   ],
     56                   "Moniker": "FooBarMoniker",
     57                   "ReleaseNotes": "Default release notes",
     58                   "ReleaseNotesUrl": "https://DefaultReleaseNotes.net",
     59                   "Agreements": [{
     60                     "AgreementLabel": "DefaultLabel",
     61                     "Agreement": "DefaultText",
     62                     "AgreementUrl": "https://DefaultAgreementUrl.net"
     63                   }],
     64                   "PurchaseUrl": "http://DefaultPurchaseUrl.net",
     65                   "InstallationNotes": "Default Installation Notes",
     66                   "Documentations": [{
     67                     "DocumentLabel": "Default Document Label",
     68                     "DocumentUrl": "http://DefaultDocumentUrl.net"
     69                   }],
     70                   "Icons": [{
     71                     "IconUrl": "https://DefaultTestIcon",
     72                     "IconFileType": "ico",
     73                     "IconResolution": "custom",
     74                     "IconTheme": "default",
     75                     "IconSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8123"
     76                   }]
     77                 },
     78                 "Channel": "",
     79                 "Locales": [
     80                   {
     81                     "PackageLocale": "fr-Fr",
     82                     "Publisher": "Foo French",
     83                     "PublisherUrl": "http://publisher-fr.net",
     84                     "PublisherSupportUrl": "http://publisherSupport-fr.net",
     85                     "PrivacyUrl": "http://packagePrivacyUrl-fr.net",
     86                     "Author": "FooBar French",
     87                     "PackageName": "Bar",
     88                     "PackageUrl": "http://packageUrl-fr.net",
     89                     "License": "Foo Bar License",
     90                     "LicenseUrl": "http://licenseUrl-fr.net",
     91                     "Copyright": "Foo Bar Copyright",
     92                     "CopyrightUrl": "http://copyrightUrl-fr.net",
     93                     "ShortDescription": "Foo bar is a foo bar French.",
     94                     "Description": "Foo bar is a placeholder French.",
     95                     "Tags": [
     96                       "FooBarFr",
     97                       "FooFr",
     98                       "BarFr"
     99                     ],
    100                     "ReleaseNotes": "Release notes",
    101                     "ReleaseNotesUrl": "https://ReleaseNotes.net",
    102                     "Agreements": [{
    103                       "AgreementLabel": "Label",
    104                       "Agreement": "Text",
    105                       "AgreementUrl": "https://AgreementUrl.net"
    106                     }],
    107                     "PurchaseUrl": "http://purchaseUrl.net",
    108                     "InstallationNotes": "Installation Notes",
    109                     "Documentations": [{
    110                       "DocumentLabel": "Document Label",
    111                       "DocumentUrl": "http://documentUrl.net"
    112                     }],
    113                     "Icons": [{
    114                       "IconUrl": "https://testIcon",
    115                       "IconFileType": "png",
    116                       "IconResolution": "32x32",
    117                       "IconTheme": "light",
    118                       "IconSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321"
    119                     }]
    120                   }
    121                 ],)delimiter") _XPLATSTR(R"delimiter(
    122                 "Installers": [
    123                   {
    124                     "InstallerSha256": "011048877dfaef109801b3f3ab2b60afc74f3fc4f7b3430e0c897f5da1df84b6",
    125                     "InstallerUrl": "http://foobar.zip",
    126                     "Architecture": "x86",
    127                     "InstallerLocale": "en-US",
    128                     "Platform": [
    129                       "Windows.Desktop"
    130                     ],
    131                     "MinimumOSVersion": "1078",
    132                     "InstallerType": "zip",
    133                     "Scope": "user",
    134                     "InstallModes": [
    135                       "interactive"
    136                     ],
    137                     "InstallerSwitches": {
    138                       "Silent": "/s",
    139                       "SilentWithProgress": "/s",
    140                       "Interactive": "/i",
    141                       "InstallLocation": "C:\\Users\\User1",
    142                       "Log": "/l",
    143                       "Upgrade": "/u",
    144                       "Custom": "/custom",
    145                       "Repair": "/repair"
    146                     },
    147                     "InstallerSuccessCodes": [
    148                       0
    149                     ],
    150                     "UpgradeBehavior": "deny",
    151                     "Commands": [
    152                       "command1"
    153                     ],
    154                     "Protocols": [
    155                        "protocol1"
    156                     ],
    157                     "FileExtensions": [
    158                       ".file-extension"
    159                     ],
    160                     "Dependencies": {
    161                       "WindowsFeatures": [
    162                         "feature1"
    163                       ],
    164                       "WindowsLibraries": [
    165                         "library1"
    166                       ],
    167                       "PackageDependencies": [
    168                         {
    169                           "PackageIdentifier": "Foo.Baz",
    170                           "MinimumVersion": "2.0.0"
    171                         }
    172                       ],
    173                       "ExternalDependencies": [
    174                         "FooBarBaz"
    175                       ]
    176                     },
    177                     "ProductCode": "5b6e0f8a-3bbf-4a17-aefd-024c2b3e075d",
    178                     "ReleaseDate": "2021-01-01",
    179                     "InstallerAbortsTerminal": true,
    180                     "InstallLocationRequired": true,
    181                     "RequireExplicitUpgrade": true,
    182                     "UnsupportedOSArchitectures": [ "arm" ],
    183                     "ElevationRequirement": "elevatesSelf",
    184                     "AppsAndFeaturesEntries": [{
    185                       "DisplayName": "DisplayName",
    186                       "DisplayVersion": "DisplayVersion",
    187                       "Publisher": "Publisher",
    188                       "ProductCode": "ProductCode",
    189                       "UpgradeCode": "UpgradeCode",
    190                       "InstallerType": "exe"
    191                     }],
    192                     "Markets" : {
    193                       "AllowedMarkets": [ "US" ]
    194                     },
    195                     "ExpectedReturnCodes": [{
    196                       "InstallerReturnCode": 3,
    197                       "ReturnResponse": "custom",
    198                       "ReturnResponseUrl": "http://returnResponseUrl.net"
    199                     }],
    200                     "NestedInstallerType": "portable",
    201                     "DisplayInstallWarnings": true,
    202                     "UnsupportedArguments": [ "log" ],
    203                     "NestedInstallerFiles": [{
    204                       "RelativeFilePath": "test\\app.exe",
    205                       "PortableCommandAlias": "test.exe"
    206                     }],
    207                     "InstallationMetadata": {
    208                       "DefaultInstallLocation": "%TEMP%\\DefaultInstallLocation",
    209                       "Files": [{
    210                         "RelativeFilePath": "test\\app.exe",
    211                         "FileSha256": "011048877dfaef109801b3f3ab2b60afc74f3fc4f7b3430e0c897f5da1df84b6",
    212                         "FileType": "launch",
    213                         "InvocationParameter": "/parameter",
    214                         "DisplayName": "test"
    215                       }]
    216                     },
    217                     "DownloadCommandProhibited": true,
    218                     "RepairBehavior": "uninstaller",
    219                     "ArchiveBinariesDependOnPath": true
    220                   }
    221                 ]
    222               }
    223             ]
    224           },
    225           "ContinuationToken": "abcd"
    226         })delimiter");
    227         }
    228 
    229         void VerifyLocalizations_AllFields(const AppInstaller::Manifest::Manifest& manifest)
    230         {
    231             REQUIRE(manifest.DefaultLocalization.Locale == "en-US");
    232             REQUIRE(manifest.DefaultLocalization.Get<Localization::Publisher>() == "Foo");
    233             REQUIRE(manifest.DefaultLocalization.Get<Localization::PublisherUrl>() == "http://publisher.net");
    234             REQUIRE(manifest.DefaultLocalization.Get<Localization::PublisherSupportUrl>() == "http://publisherSupport.net");
    235             REQUIRE(manifest.DefaultLocalization.Get<Localization::PrivacyUrl>() == "http://packagePrivacyUrl.net");
    236             REQUIRE(manifest.DefaultLocalization.Get<Localization::Author>() == "FooBar");
    237             REQUIRE(manifest.DefaultLocalization.Get<Localization::PackageName>() == "Bar");
    238             REQUIRE(manifest.DefaultLocalization.Get<Localization::PackageUrl>() == "http://packageUrl.net");
    239             REQUIRE(manifest.DefaultLocalization.Get<Localization::License>() == "Foo Bar License");
    240             REQUIRE(manifest.DefaultLocalization.Get<Localization::LicenseUrl>() == "http://licenseUrl.net");
    241             REQUIRE(manifest.DefaultLocalization.Get<Localization::Copyright>() == "Foo Bar Copyright");
    242             REQUIRE(manifest.DefaultLocalization.Get<Localization::CopyrightUrl>() == "http://copyrightUrl.net");
    243             REQUIRE(manifest.DefaultLocalization.Get<Localization::ShortDescription>() == "Foo bar is a foo bar.");
    244             REQUIRE(manifest.DefaultLocalization.Get<Localization::Description>() == "Foo bar is a placeholder.");
    245             REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().size() == 3);
    246             REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().at(0) == "FooBar");
    247             REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().at(1) == "Foo");
    248             REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().at(2) == "Bar");
    249             REQUIRE(manifest.DefaultLocalization.Get<Localization::ReleaseNotes>() == "Default release notes");
    250             REQUIRE(manifest.DefaultLocalization.Get<Localization::ReleaseNotesUrl>() == "https://DefaultReleaseNotes.net");
    251             REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().size() == 1);
    252             REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().at(0).Label == "DefaultLabel");
    253             REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().at(0).AgreementText == "DefaultText");
    254             REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().at(0).AgreementUrl == "https://DefaultAgreementUrl.net");
    255             REQUIRE(manifest.DefaultLocalization.Get<Localization::PurchaseUrl>() == "http://DefaultPurchaseUrl.net");
    256             REQUIRE(manifest.DefaultLocalization.Get<Localization::InstallationNotes>() == "Default Installation Notes");
    257             REQUIRE(manifest.DefaultLocalization.Get<Localization::Documentations>().size() == 1);
    258             REQUIRE(manifest.DefaultLocalization.Get<Localization::Documentations>().at(0).DocumentLabel == "Default Document Label");
    259             REQUIRE(manifest.DefaultLocalization.Get<Localization::Documentations>().at(0).DocumentUrl == "http://DefaultDocumentUrl.net");
    260             REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().size() == 1);
    261             REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Url == "https://DefaultTestIcon");
    262             REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).FileType == IconFileTypeEnum::Ico);
    263             REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Resolution == IconResolutionEnum::Custom);
    264             REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Theme == IconThemeEnum::Default);
    265             REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Sha256 == AppInstaller::Utility::SHA256::ConvertToBytes("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8123"));
    266 
    267             REQUIRE(manifest.Localizations.size() == 1);
    268             ManifestLocalization frenchLocalization = manifest.Localizations.at(0);
    269             REQUIRE(frenchLocalization.Locale == "fr-Fr");
    270             REQUIRE(frenchLocalization.Get<Localization::Publisher>() == "Foo French");
    271             REQUIRE(frenchLocalization.Get<Localization::PublisherUrl>() == "http://publisher-fr.net");
    272             REQUIRE(frenchLocalization.Get<Localization::PublisherSupportUrl>() == "http://publisherSupport-fr.net");
    273             REQUIRE(frenchLocalization.Get<Localization::PrivacyUrl>() == "http://packagePrivacyUrl-fr.net");
    274             REQUIRE(frenchLocalization.Get<Localization::Author>() == "FooBar French");
    275             REQUIRE(frenchLocalization.Get<Localization::PackageName>() == "Bar");
    276             REQUIRE(frenchLocalization.Get<Localization::PackageUrl>() == "http://packageUrl-fr.net");
    277             REQUIRE(frenchLocalization.Get<Localization::License>() == "Foo Bar License");
    278             REQUIRE(frenchLocalization.Get<Localization::LicenseUrl>() == "http://licenseUrl-fr.net");
    279             REQUIRE(frenchLocalization.Get<Localization::Copyright>() == "Foo Bar Copyright");
    280             REQUIRE(frenchLocalization.Get<Localization::CopyrightUrl>() == "http://copyrightUrl-fr.net");
    281             REQUIRE(frenchLocalization.Get<Localization::ShortDescription>() == "Foo bar is a foo bar French.");
    282             REQUIRE(frenchLocalization.Get<Localization::Description>() == "Foo bar is a placeholder French.");
    283             REQUIRE(frenchLocalization.Get<Localization::Tags>().size() == 3);
    284             REQUIRE(frenchLocalization.Get<Localization::Tags>().at(0) == "FooBarFr");
    285             REQUIRE(frenchLocalization.Get<Localization::Tags>().at(1) == "FooFr");
    286             REQUIRE(frenchLocalization.Get<Localization::Tags>().at(2) == "BarFr");
    287             REQUIRE(frenchLocalization.Get<Localization::ReleaseNotes>() == "Release notes");
    288             REQUIRE(frenchLocalization.Get<Localization::ReleaseNotesUrl>() == "https://ReleaseNotes.net");
    289             REQUIRE(frenchLocalization.Get<Localization::Agreements>().size() == 1);
    290             REQUIRE(frenchLocalization.Get<Localization::Agreements>().at(0).Label == "Label");
    291             REQUIRE(frenchLocalization.Get<Localization::Agreements>().at(0).AgreementText == "Text");
    292             REQUIRE(frenchLocalization.Get<Localization::Agreements>().at(0).AgreementUrl == "https://AgreementUrl.net");
    293             REQUIRE(frenchLocalization.Get<Localization::PurchaseUrl>() == "http://purchaseUrl.net");
    294             REQUIRE(frenchLocalization.Get<Localization::InstallationNotes>() == "Installation Notes");
    295             REQUIRE(frenchLocalization.Get<Localization::Documentations>().size() == 1);
    296             REQUIRE(frenchLocalization.Get<Localization::Documentations>().at(0).DocumentLabel == "Document Label");
    297             REQUIRE(frenchLocalization.Get<Localization::Documentations>().at(0).DocumentUrl == "http://documentUrl.net");
    298             REQUIRE(frenchLocalization.Get<Localization::Icons>().size() == 1);
    299             REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Url == "https://testIcon");
    300             REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).FileType == IconFileTypeEnum::Png);
    301             REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Resolution == IconResolutionEnum::Square32);
    302             REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Theme == IconThemeEnum::Light);
    303             REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Sha256 == AppInstaller::Utility::SHA256::ConvertToBytes("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321"));
    304         }
    305 
    306         void VerifyInstallers_AllFields(const AppInstaller::Manifest::Manifest& manifest)
    307         {
    308             REQUIRE(manifest.Installers.size() == 1);
    309 
    310             ManifestInstaller actualInstaller = manifest.Installers.at(0);
    311             REQUIRE(actualInstaller.Sha256 == AppInstaller::Utility::SHA256::ConvertToBytes("011048877dfaef109801b3f3ab2b60afc74f3fc4f7b3430e0c897f5da1df84b6"));
    312             REQUIRE(actualInstaller.Url == "http://foobar.zip");
    313             REQUIRE(actualInstaller.Arch == Architecture::X86);
    314             REQUIRE(actualInstaller.Locale == "en-US");
    315             REQUIRE(actualInstaller.Platform.size() == 1);
    316             REQUIRE(actualInstaller.Platform[0] == PlatformEnum::Desktop);
    317             REQUIRE(actualInstaller.MinOSVersion == "1078");
    318             REQUIRE(actualInstaller.BaseInstallerType == InstallerTypeEnum::Zip);
    319             REQUIRE(actualInstaller.Scope == ScopeEnum::User);
    320             REQUIRE(actualInstaller.InstallModes.size() == 1);
    321             REQUIRE(actualInstaller.InstallModes.at(0) == InstallModeEnum::Interactive);
    322             REQUIRE(actualInstaller.Switches.size() == 8);
    323             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Silent) == "/s");
    324             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::SilentWithProgress) == "/s");
    325             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Interactive) == "/i");
    326             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::InstallLocation) == "C:\\Users\\User1");
    327             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Log) == "/l");
    328             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Update) == "/u");
    329             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Custom) == "/custom");
    330             REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Repair) == "/repair");
    331             REQUIRE(actualInstaller.InstallerSuccessCodes.size() == 1);
    332             REQUIRE(actualInstaller.InstallerSuccessCodes.at(0) == 0);
    333             REQUIRE(actualInstaller.UpdateBehavior == UpdateBehaviorEnum::Deny);
    334             REQUIRE(actualInstaller.Commands.at(0) == "command1");
    335             REQUIRE(actualInstaller.Protocols.at(0) == "protocol1");
    336             REQUIRE(actualInstaller.FileExtensions.at(0) == ".file-extension");
    337             REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::WindowsFeature, "feature1"));
    338             REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::WindowsLibrary, "library1"));
    339             REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::Package, "Foo.Baz", "2.0.0"));
    340             REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::External, "FooBarBaz"));
    341             REQUIRE(actualInstaller.PackageFamilyName == "");
    342             REQUIRE(actualInstaller.ProductCode == "5b6e0f8a-3bbf-4a17-aefd-024c2b3e075d");
    343             REQUIRE(actualInstaller.ReleaseDate == "2021-01-01");
    344             REQUIRE(actualInstaller.InstallerAbortsTerminal);
    345             REQUIRE(actualInstaller.InstallLocationRequired);
    346             REQUIRE(actualInstaller.RequireExplicitUpgrade);
    347             REQUIRE(actualInstaller.ElevationRequirement == ElevationRequirementEnum::ElevatesSelf);
    348             REQUIRE(actualInstaller.UnsupportedOSArchitectures.size() == 1);
    349             REQUIRE(actualInstaller.UnsupportedOSArchitectures.at(0) == Architecture::Arm);
    350             REQUIRE(actualInstaller.AppsAndFeaturesEntries.size() == 1);
    351             REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).DisplayName == "DisplayName");
    352             REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).DisplayVersion == "DisplayVersion");
    353             REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).Publisher == "Publisher");
    354             REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).ProductCode == "ProductCode");
    355             REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).UpgradeCode == "UpgradeCode");
    356             REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).InstallerType == InstallerTypeEnum::Exe);
    357             REQUIRE(actualInstaller.Markets.AllowedMarkets.size() == 1);
    358             REQUIRE(actualInstaller.Markets.AllowedMarkets.at(0) == "US");
    359             REQUIRE(actualInstaller.ExpectedReturnCodes.at(3).ReturnResponseEnum == ExpectedReturnCodeEnum::Custom);
    360             REQUIRE(actualInstaller.ExpectedReturnCodes.at(3).ReturnResponseUrl == "http://returnResponseUrl.net");
    361             REQUIRE(actualInstaller.NestedInstallerType == InstallerTypeEnum::Portable);
    362             REQUIRE(actualInstaller.DisplayInstallWarnings);
    363             REQUIRE(actualInstaller.UnsupportedArguments.size() == 1);
    364             REQUIRE(actualInstaller.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Log);
    365             REQUIRE(actualInstaller.NestedInstallerFiles.size() == 1);
    366             REQUIRE(actualInstaller.NestedInstallerFiles.at(0).RelativeFilePath == "test\\app.exe");
    367             REQUIRE(actualInstaller.NestedInstallerFiles.at(0).PortableCommandAlias == "test.exe");
    368             REQUIRE(actualInstaller.InstallationMetadata.DefaultInstallLocation == "%TEMP%\\DefaultInstallLocation");
    369             REQUIRE(actualInstaller.InstallationMetadata.Files.size() == 1);
    370             REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).RelativeFilePath == "test\\app.exe");
    371             REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).FileType == InstalledFileTypeEnum::Launch);
    372             REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).FileSha256 == AppInstaller::Utility::SHA256::ConvertToBytes("011048877dfaef109801b3f3ab2b60afc74f3fc4f7b3430e0c897f5da1df84b6"));
    373             REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).InvocationParameter == "/parameter");
    374             REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).DisplayName == "test");
    375             REQUIRE(actualInstaller.DownloadCommandProhibited);
    376             REQUIRE(actualInstaller.RepairBehavior == RepairBehaviorEnum::Uninstaller);
    377             REQUIRE(actualInstaller.ArchiveBinariesDependOnPath);
    378         }
    379     };
    380 }
    381 
    382 TEST_CASE("GetManifests_GoodResponse_V1_9", "[RestSource][Interface_1_9]")
    383 {
    384     GoodManifest_AllFields sampleManifest;
    385     utility::string_t sample = sampleManifest.GetSampleManifest_AllFields();
    386     HttpClientHelper helper{ GetTestRestRequestHandler(web::http::status_codes::OK, std::move(sample)) };
    387     Interface v1_9{ TestRestUriString, std::move(helper), {} };
    388     std::vector<Manifest> manifests = v1_9.GetManifests("Foo.Bar");
    389     REQUIRE(manifests.size() == 1);
    390 
    391     // Verify manifest is populated
    392     Manifest& manifest = manifests[0];
    393     REQUIRE(manifest.Id == "Foo.Bar");
    394     REQUIRE(manifest.Version == "3.0.0abc");
    395     REQUIRE(manifest.Moniker == "FooBarMoniker");
    396     REQUIRE(manifest.Channel == "");
    397     REQUIRE(manifest.ManifestVersion == AppInstaller::Manifest::ManifestVer{ "1.9.0" });
    398     sampleManifest.VerifyLocalizations_AllFields(manifest);
    399     sampleManifest.VerifyInstallers_AllFields(manifest);
    400 }