RestInterface_1_5.cpp (24648B)
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_5/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_5; 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": "install", 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 } 229 ] 230 } 231 ] 232 }, 233 "ContinuationToken": "abcd" 234 })delimiter"); 235 } 236 237 void VerifyLocalizations_AllFields(const Manifest& manifest) 238 { 239 REQUIRE(manifest.DefaultLocalization.Locale == "en-US"); 240 REQUIRE(manifest.DefaultLocalization.Get<Localization::Publisher>() == "Foo"); 241 REQUIRE(manifest.DefaultLocalization.Get<Localization::PublisherUrl>() == "http://publisher.net"); 242 REQUIRE(manifest.DefaultLocalization.Get<Localization::PublisherSupportUrl>() == "http://publisherSupport.net"); 243 REQUIRE(manifest.DefaultLocalization.Get<Localization::PrivacyUrl>() == "http://packagePrivacyUrl.net"); 244 REQUIRE(manifest.DefaultLocalization.Get<Localization::Author>() == "FooBar"); 245 REQUIRE(manifest.DefaultLocalization.Get<Localization::PackageName>() == "Bar"); 246 REQUIRE(manifest.DefaultLocalization.Get<Localization::PackageUrl>() == "http://packageUrl.net"); 247 REQUIRE(manifest.DefaultLocalization.Get<Localization::License>() == "Foo Bar License"); 248 REQUIRE(manifest.DefaultLocalization.Get<Localization::LicenseUrl>() == "http://licenseUrl.net"); 249 REQUIRE(manifest.DefaultLocalization.Get<Localization::Copyright>() == "Foo Bar Copyright"); 250 REQUIRE(manifest.DefaultLocalization.Get<Localization::CopyrightUrl>() == "http://copyrightUrl.net"); 251 REQUIRE(manifest.DefaultLocalization.Get<Localization::ShortDescription>() == "Foo bar is a foo bar."); 252 REQUIRE(manifest.DefaultLocalization.Get<Localization::Description>() == "Foo bar is a placeholder."); 253 REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().size() == 3); 254 REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().at(0) == "FooBar"); 255 REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().at(1) == "Foo"); 256 REQUIRE(manifest.DefaultLocalization.Get<Localization::Tags>().at(2) == "Bar"); 257 REQUIRE(manifest.DefaultLocalization.Get<Localization::ReleaseNotes>() == "Default release notes"); 258 REQUIRE(manifest.DefaultLocalization.Get<Localization::ReleaseNotesUrl>() == "https://DefaultReleaseNotes.net"); 259 REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().size() == 1); 260 REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().at(0).Label == "DefaultLabel"); 261 REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().at(0).AgreementText == "DefaultText"); 262 REQUIRE(manifest.DefaultLocalization.Get<Localization::Agreements>().at(0).AgreementUrl == "https://DefaultAgreementUrl.net"); 263 REQUIRE(manifest.DefaultLocalization.Get<Localization::PurchaseUrl>() == "http://DefaultPurchaseUrl.net"); 264 REQUIRE(manifest.DefaultLocalization.Get<Localization::InstallationNotes>() == "Default Installation Notes"); 265 REQUIRE(manifest.DefaultLocalization.Get<Localization::Documentations>().size() == 1); 266 REQUIRE(manifest.DefaultLocalization.Get<Localization::Documentations>().at(0).DocumentLabel == "Default Document Label"); 267 REQUIRE(manifest.DefaultLocalization.Get<Localization::Documentations>().at(0).DocumentUrl == "http://DefaultDocumentUrl.net"); 268 REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().size() == 1); 269 REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Url == "https://DefaultTestIcon"); 270 REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).FileType == IconFileTypeEnum::Ico); 271 REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Resolution == IconResolutionEnum::Custom); 272 REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Theme == IconThemeEnum::Default); 273 REQUIRE(manifest.DefaultLocalization.Get<Localization::Icons>().at(0).Sha256 == AppInstaller::Utility::SHA256::ConvertToBytes("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8123")); 274 275 REQUIRE(manifest.Localizations.size() == 1); 276 ManifestLocalization frenchLocalization = manifest.Localizations.at(0); 277 REQUIRE(frenchLocalization.Locale == "fr-Fr"); 278 REQUIRE(frenchLocalization.Get<Localization::Publisher>() == "Foo French"); 279 REQUIRE(frenchLocalization.Get<Localization::PublisherUrl>() == "http://publisher-fr.net"); 280 REQUIRE(frenchLocalization.Get<Localization::PublisherSupportUrl>() == "http://publisherSupport-fr.net"); 281 REQUIRE(frenchLocalization.Get<Localization::PrivacyUrl>() == "http://packagePrivacyUrl-fr.net"); 282 REQUIRE(frenchLocalization.Get<Localization::Author>() == "FooBar French"); 283 REQUIRE(frenchLocalization.Get<Localization::PackageName>() == "Bar"); 284 REQUIRE(frenchLocalization.Get<Localization::PackageUrl>() == "http://packageUrl-fr.net"); 285 REQUIRE(frenchLocalization.Get<Localization::License>() == "Foo Bar License"); 286 REQUIRE(frenchLocalization.Get<Localization::LicenseUrl>() == "http://licenseUrl-fr.net"); 287 REQUIRE(frenchLocalization.Get<Localization::Copyright>() == "Foo Bar Copyright"); 288 REQUIRE(frenchLocalization.Get<Localization::CopyrightUrl>() == "http://copyrightUrl-fr.net"); 289 REQUIRE(frenchLocalization.Get<Localization::ShortDescription>() == "Foo bar is a foo bar French."); 290 REQUIRE(frenchLocalization.Get<Localization::Description>() == "Foo bar is a placeholder French."); 291 REQUIRE(frenchLocalization.Get<Localization::Tags>().size() == 3); 292 REQUIRE(frenchLocalization.Get<Localization::Tags>().at(0) == "FooBarFr"); 293 REQUIRE(frenchLocalization.Get<Localization::Tags>().at(1) == "FooFr"); 294 REQUIRE(frenchLocalization.Get<Localization::Tags>().at(2) == "BarFr"); 295 REQUIRE(frenchLocalization.Get<Localization::ReleaseNotes>() == "Release notes"); 296 REQUIRE(frenchLocalization.Get<Localization::ReleaseNotesUrl>() == "https://ReleaseNotes.net"); 297 REQUIRE(frenchLocalization.Get<Localization::Agreements>().size() == 1); 298 REQUIRE(frenchLocalization.Get<Localization::Agreements>().at(0).Label == "Label"); 299 REQUIRE(frenchLocalization.Get<Localization::Agreements>().at(0).AgreementText == "Text"); 300 REQUIRE(frenchLocalization.Get<Localization::Agreements>().at(0).AgreementUrl == "https://AgreementUrl.net"); 301 REQUIRE(frenchLocalization.Get<Localization::PurchaseUrl>() == "http://purchaseUrl.net"); 302 REQUIRE(frenchLocalization.Get<Localization::InstallationNotes>() == "Installation Notes"); 303 REQUIRE(frenchLocalization.Get<Localization::Documentations>().size() == 1); 304 REQUIRE(frenchLocalization.Get<Localization::Documentations>().at(0).DocumentLabel == "Document Label"); 305 REQUIRE(frenchLocalization.Get<Localization::Documentations>().at(0).DocumentUrl == "http://documentUrl.net"); 306 REQUIRE(frenchLocalization.Get<Localization::Icons>().size() == 1); 307 REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Url == "https://testIcon"); 308 REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).FileType == IconFileTypeEnum::Png); 309 REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Resolution == IconResolutionEnum::Square32); 310 REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Theme == IconThemeEnum::Light); 311 REQUIRE(frenchLocalization.Get<Localization::Icons>().at(0).Sha256 == AppInstaller::Utility::SHA256::ConvertToBytes("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321")); 312 } 313 314 void VerifyInstallers_AllFields(const Manifest& manifest) 315 { 316 REQUIRE(manifest.Installers.size() == 1); 317 318 ManifestInstaller actualInstaller = manifest.Installers.at(0); 319 REQUIRE(actualInstaller.Sha256 == AppInstaller::Utility::SHA256::ConvertToBytes("011048877dfaef109801b3f3ab2b60afc74f3fc4f7b3430e0c897f5da1df84b6")); 320 REQUIRE(actualInstaller.Url == "http://foobar.zip"); 321 REQUIRE(actualInstaller.Arch == Architecture::X86); 322 REQUIRE(actualInstaller.Locale == "en-US"); 323 REQUIRE(actualInstaller.Platform.size() == 1); 324 REQUIRE(actualInstaller.Platform[0] == PlatformEnum::Desktop); 325 REQUIRE(actualInstaller.MinOSVersion == "1078"); 326 REQUIRE(actualInstaller.BaseInstallerType == InstallerTypeEnum::Zip); 327 REQUIRE(actualInstaller.Scope == ScopeEnum::User); 328 REQUIRE(actualInstaller.InstallModes.size() == 1); 329 REQUIRE(actualInstaller.InstallModes.at(0) == InstallModeEnum::Interactive); 330 REQUIRE(actualInstaller.Switches.size() == 7); 331 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Silent) == "/s"); 332 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::SilentWithProgress) == "/s"); 333 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Interactive) == "/i"); 334 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::InstallLocation) == "C:\\Users\\User1"); 335 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Log) == "/l"); 336 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Update) == "/u"); 337 REQUIRE(actualInstaller.Switches.at(InstallerSwitchType::Custom) == "/custom"); 338 REQUIRE(actualInstaller.InstallerSuccessCodes.size() == 1); 339 REQUIRE(actualInstaller.InstallerSuccessCodes.at(0) == 0); 340 REQUIRE(actualInstaller.UpdateBehavior == UpdateBehaviorEnum::Install); 341 REQUIRE(actualInstaller.Commands.at(0) == "command1"); 342 REQUIRE(actualInstaller.Protocols.at(0) == "protocol1"); 343 REQUIRE(actualInstaller.FileExtensions.at(0) == ".file-extension"); 344 REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::WindowsFeature, "feature1")); 345 REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::WindowsLibrary, "library1")); 346 REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::Package, "Foo.Baz", "2.0.0")); 347 REQUIRE(actualInstaller.Dependencies.HasExactDependency(DependencyType::External, "FooBarBaz")); 348 REQUIRE(actualInstaller.PackageFamilyName == ""); 349 REQUIRE(actualInstaller.ProductCode == "5b6e0f8a-3bbf-4a17-aefd-024c2b3e075d"); 350 REQUIRE(actualInstaller.ReleaseDate == "2021-01-01"); 351 REQUIRE(actualInstaller.InstallerAbortsTerminal); 352 REQUIRE(actualInstaller.InstallLocationRequired); 353 REQUIRE(actualInstaller.RequireExplicitUpgrade); 354 REQUIRE(actualInstaller.ElevationRequirement == ElevationRequirementEnum::ElevatesSelf); 355 REQUIRE(actualInstaller.UnsupportedOSArchitectures.size() == 1); 356 REQUIRE(actualInstaller.UnsupportedOSArchitectures.at(0) == Architecture::Arm); 357 REQUIRE(actualInstaller.AppsAndFeaturesEntries.size() == 1); 358 REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).DisplayName == "DisplayName"); 359 REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).DisplayVersion == "DisplayVersion"); 360 REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).Publisher == "Publisher"); 361 REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).ProductCode == "ProductCode"); 362 REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).UpgradeCode == "UpgradeCode"); 363 REQUIRE(actualInstaller.AppsAndFeaturesEntries.at(0).InstallerType == InstallerTypeEnum::Exe); 364 REQUIRE(actualInstaller.Markets.AllowedMarkets.size() == 1); 365 REQUIRE(actualInstaller.Markets.AllowedMarkets.at(0) == "US"); 366 REQUIRE(actualInstaller.ExpectedReturnCodes.at(3).ReturnResponseEnum == ExpectedReturnCodeEnum::Custom); 367 REQUIRE(actualInstaller.ExpectedReturnCodes.at(3).ReturnResponseUrl == "http://returnResponseUrl.net"); 368 REQUIRE(actualInstaller.NestedInstallerType == InstallerTypeEnum::Portable); 369 REQUIRE(actualInstaller.DisplayInstallWarnings); 370 REQUIRE(actualInstaller.UnsupportedArguments.size() == 1); 371 REQUIRE(actualInstaller.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Log); 372 REQUIRE(actualInstaller.NestedInstallerFiles.size() == 1); 373 REQUIRE(actualInstaller.NestedInstallerFiles.at(0).RelativeFilePath == "test\\app.exe"); 374 REQUIRE(actualInstaller.NestedInstallerFiles.at(0).PortableCommandAlias == "test.exe"); 375 REQUIRE(actualInstaller.InstallationMetadata.DefaultInstallLocation == "%TEMP%\\DefaultInstallLocation"); 376 REQUIRE(actualInstaller.InstallationMetadata.Files.size() == 1); 377 REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).RelativeFilePath == "test\\app.exe"); 378 REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).FileType == InstalledFileTypeEnum::Launch); 379 REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).FileSha256 == AppInstaller::Utility::SHA256::ConvertToBytes("011048877dfaef109801b3f3ab2b60afc74f3fc4f7b3430e0c897f5da1df84b6")); 380 REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).InvocationParameter == "/parameter"); 381 REQUIRE(actualInstaller.InstallationMetadata.Files.at(0).DisplayName == "test"); 382 } 383 }; 384 } 385 386 TEST_CASE("GetManifests_GoodResponse_V1_5", "[RestSource][Interface_1_5]") 387 { 388 GoodManifest_AllFields sampleManifest; 389 utility::string_t sample = sampleManifest.GetSampleManifest_AllFields(); 390 HttpClientHelper helper{ GetTestRestRequestHandler(web::http::status_codes::OK, std::move(sample)) }; 391 Interface v1_5{ TestRestUriString, std::move(helper), {} }; 392 std::vector<Manifest> manifests = v1_5.GetManifests("Foo.Bar"); 393 REQUIRE(manifests.size() == 1); 394 395 // Verify manifest is populated 396 Manifest& manifest = manifests[0]; 397 REQUIRE(manifest.Id == "Foo.Bar"); 398 REQUIRE(manifest.Version == "3.0.0abc"); 399 REQUIRE(manifest.Moniker == "FooBarMoniker"); 400 REQUIRE(manifest.Channel == ""); 401 REQUIRE(manifest.ManifestVersion == AppInstaller::Manifest::ManifestVer{ "1.5.0" }); 402 sampleManifest.VerifyLocalizations_AllFields(manifest); 403 sampleManifest.VerifyInstallers_AllFields(manifest); 404 }