public Task <string> PrepareTestAsync(CachingTestContext context, ICachingCommand command) { // The package is available on the source. context.IsPackageBAvailable = true; var args = command.PrepareArguments(context, context.PackageIdentityB); return(Task.FromResult(args)); }
public async Task <string> PrepareTestAsync(CachingTestContext context, ICachingCommand command) { // The package is available in the global packages folder. await context.AddToGlobalPackagesFolderAsync(context.PackageIdentityB, context.PackageBPath); // The package is not available on the source. context.IsPackageBAvailable = false; return(command.PrepareArguments(context, context.PackageIdentityB)); }
public async Task <string> PrepareTestAsync(CachingTestContext context, ICachingCommand command) { // Add the first version of the package to the global packages folder. await context.AddToGlobalPackagesFolderAsync(context.PackageIdentityA, context.PackageAVersionAPath); // A different version of the same package is available on the source. context.CurrentPackageAPath = context.PackageAVersionBPath; context.IsPackageAAvailable = true; return(command.PrepareArguments(context, context.PackageIdentityA)); }
public Task <string> PrepareTestAsync(CachingTestContext context, ICachingCommand command) { // Populate the output packages path with a leftover .directdownload file. Directory.CreateDirectory(context.OutputPackagesPath); var path = Path.Combine(context.OutputPackagesPath, $"leftover.nugetdirectdownload"); File.WriteAllText(path, string.Empty); var args = command.PrepareArguments(context, context.PackageIdentityA); return(Task.FromResult(args)); }
public Task <string> PrepareTestAsync(CachingTestContext context, ICachingCommand command) { // The second version of the package is available on the source. context.IsPackageAAvailable = true; context.CurrentPackageAPath = context.PackageAVersionBPath; // Add the first version of the package to the HTTP. context.AddPackageToHttpCache(context.PackageIdentityA, context.PackageAVersionAPath); var args = command.PrepareArguments(context, context.PackageIdentityA); return(Task.FromResult(args)); }