// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gauntlet
{
public class GauntletParamDescription
{
///
/// The param name that is passed in on the commandline
/// In -PARAMNAME or -PARAMNAME=val format
///
public string ParamName;
///
/// Is this required for the test to run?
///
public bool Required;
///
/// Very brief desc of what to pass in -
/// Will show up in -param= format.
/// Ex - a value of "Map To Use" would show up as -param=
public string InputFormat;
///
/// Helpful description for what this Parameter or flag represents and what can be passed in.
///
public string ParamDesc;
///
/// If you would like to provide a sample input for this field, do so here. Will show up as (ex: SampleInput) at the end of the param description
///
public string SampleInput;
///
/// If this param has a default value, put it here. Will show ups as (default: DefaultValue)
///
public string DefaultValue;
///
/// Whether this is a Test-specific param or a generic gauntlet param.
///
public bool TestSpecificParam;
public GauntletParamDescription()
{
TestSpecificParam = true;
}
public override string ToString()
{
string ParamFormat = ParamName;
if (!string.IsNullOrEmpty(InputFormat))
{
ParamFormat += "=" + InputFormat;
}
string DefaultFormat = "";
if (!string.IsNullOrEmpty(DefaultValue))
{
DefaultFormat = string.Format("(default: {0}) ", DefaultValue);
}
string SampleFormat = "";
if (!string.IsNullOrEmpty(SampleInput))
{
SampleFormat = string.Format(" (ex: {0})", SampleInput);
}
ParamFormat = string.Format("{0}:\t\t{1}{2}{3}{4}", ParamFormat, Required ? "*Required* " : "", DefaultFormat, ParamDesc, SampleInput);
return ParamFormat;
}
}
}