/// <summary> /// Sends an <see cref="InstallRequestMessage"/> to create or delete a workload installation record. /// </summary> /// <param name="requestType">The action to perform on the workload record.</param> /// <param name="workloadId">The workload identifier.</param> /// <param name="sdkFeatureBand">The SDK feature band associated with the record.</param> /// <returns></returns> public InstallResponseMessage SendWorkloadRecordRequest(InstallRequestType requestType, WorkloadId workloadId, SdkFeatureBand sdkFeatureBand) { return(Send(new InstallRequestMessage { RequestType = requestType, WorkloadId = workloadId.ToString(), SdkFeatureBand = sdkFeatureBand.ToString(), })); }
public void GivenManagedInstallItCanInstallManifestVersion() { var(_, installer, nugetDownloader) = GetTestInstaller(manifestDownload: true); var featureBand = new SdkFeatureBand("6.0.100"); var manifestId = new ManifestId("test-manifest-1"); var manifestVersion = new ManifestVersion("5.0.0"); var manifestUpdate = new ManifestVersionUpdate(manifestId, null, null, manifestVersion, featureBand.ToString()); CliTransaction.RunNew(context => installer.InstallWorkloadManifest(manifestUpdate, context)); var mockNugetInstaller = nugetDownloader as MockNuGetPackageDownloader; mockNugetInstaller.DownloadCallParams.Count.Should().Be(1); mockNugetInstaller.DownloadCallParams[0].ShouldBeEquivalentTo((new PackageId($"{manifestId}.manifest-{featureBand}"), new NuGetVersion(manifestVersion.ToString()), null as DirectoryPath?, null as PackageSourceLocation)); }