2016-07-15 15:31:50 +00:00
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
2016-07-13 00:10:48 +00:00
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Build
|
|
|
|
{
|
|
|
|
public class DotNetTest : DotNetTool
|
|
|
|
{
|
|
|
|
protected override string Command
|
|
|
|
{
|
|
|
|
get { return "test"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override string Args
|
|
|
|
{
|
2016-07-15 07:20:23 +00:00
|
|
|
get { return $"{GetConfiguration()} {GetNoBuild()} {GetXml()} {GetNoTrait()}"; }
|
2016-07-13 00:10:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public string Configuration { get; set; }
|
|
|
|
|
|
|
|
public string Xml { get; set; }
|
|
|
|
|
|
|
|
public string NoTrait { get; set; }
|
|
|
|
|
2016-07-15 07:20:23 +00:00
|
|
|
public bool NoBuild { get; set; }
|
|
|
|
|
2016-07-13 00:10:48 +00:00
|
|
|
private string GetConfiguration()
|
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(Configuration))
|
|
|
|
{
|
|
|
|
return $"--configuration {Configuration}";
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
private string GetNoTrait()
|
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(Configuration))
|
|
|
|
{
|
|
|
|
return $"-notrait {NoTrait}";
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
private string GetXml()
|
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(Xml))
|
|
|
|
{
|
|
|
|
return $"-xml {Xml}";
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
2016-07-15 07:20:23 +00:00
|
|
|
|
|
|
|
private string GetNoBuild()
|
|
|
|
{
|
|
|
|
if (NoBuild)
|
|
|
|
{
|
|
|
|
return "--no-build";
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
2016-07-13 00:10:48 +00:00
|
|
|
}
|
|
|
|
}
|