tests for cache taking multiple input files

This commit is contained in:
Rama Krishnan Raghupathy 2017-03-06 22:57:40 -08:00
parent ed1ca04f51
commit e40435920d
7 changed files with 119 additions and 18 deletions

View file

@ -3,12 +3,13 @@
using Microsoft.DotNet.Cli.Utils;
using NuGet.Frameworks;
using System.Collections.Generic;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public sealed class CacheCommand : TestCommand
{
private string _profileProject;
private List<string> _profileProject = new List<string>();
private string _framework;
private string _output;
private string _runtime;
@ -22,7 +23,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public CacheCommand WithEntries(string profileProject)
{
_profileProject = profileProject;
_profileProject.Add($"--entries {profileProject}");
return this;
}
public CacheCommand WithFramework(string framework)
@ -83,7 +85,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
FrameworkVersionOption);
}
private string ProfileProjectOption => string.IsNullOrEmpty(_profileProject) ? "" : $"--entries {_profileProject}";
private string ProfileProjectOption => string.Join(" ", _profileProject) ;
private string FrameworkOption => string.IsNullOrEmpty(_framework) ? "" : $"-f {_framework}";

View file

@ -3,6 +3,7 @@
using Microsoft.DotNet.Cli.Utils;
using NuGet.Frameworks;
using System.Collections.Generic;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
@ -11,7 +12,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private string _framework;
private string _output;
private string _runtime;
private string _profileproj;
private List<string> _profileFilterProject = new List<string>();
public PublishCommand()
: base("dotnet")
@ -43,7 +44,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public PublishCommand WithProFileProject(string profileproj)
{
_profileproj = profileproj;
_profileFilterProject.Add( $" --filter {profileproj}");
return this;
}
@ -74,6 +75,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private string RuntimeOption => string.IsNullOrEmpty(_runtime) ? "" : $"-r {_runtime}";
private string ProfileProjOption => string.IsNullOrEmpty(_profileproj) ? "" : $"--filter {_profileproj}";
private string ProfileProjOption => string.Join(" ", _profileFilterProject);
}
}