winget-cli

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

RestInterface_1_6.cpp (24763B)


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