本文整理汇总了C#中Context.SubstituteWildCards方法的典型用法代码示例。如果您正苦于以下问题:C# Context.SubstituteWildCards方法的具体用法?C# Context.SubstituteWildCards怎么用?C# Context.SubstituteWildCards使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Context
的用法示例。
在下文中一共展示了Context.SubstituteWildCards方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Validate
public override void Validate(Context context)
{
if (string.IsNullOrEmpty(_destinationPath))
{
throw new ArgumentNullException("DestinationPath is either null or of zero length");
}
_destinationPath = context.SubstituteWildCards(_destinationPath);
if (string.IsNullOrEmpty(_sourcePath))
{
throw new ArgumentNullException("SourcePath is either null or of zero length");
}
_sourcePath = context.SubstituteWildCards(_sourcePath);
}
示例2: Validate
///<summary>
/// Validates the SqlQuery
///</summary>
/// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
///<exception cref="ArgumentNullException"></exception>
public void Validate(Context context)
{
string sqlQuery = GetFormattedSqlQuery(context);
if (string.IsNullOrEmpty(sqlQuery))
{
throw new ArgumentNullException("The Sql Query cannot be formmatted correctly");
}
for (int c = 0; c < QueryParameters.Count; c++)
{
if (QueryParameters[c] is string)
{
QueryParameters[c] = context.SubstituteWildCards((string)QueryParameters[c]);
}
}
RawSqlQuery = context.SubstituteWildCards(RawSqlQuery);
}
示例3: Validate
public override void Validate(Context context)
{
if (string.IsNullOrEmpty(CreationPath))
{
throw new ArgumentNullException("CreationPath is either null or of zero length");
}
CreationPath = context.SubstituteWildCards(CreationPath);
DataSource.Validate(context);
}
示例4: Validate
public void Validate(Context context)
{
// xPathValidations - optional
if (string.IsNullOrEmpty(_xmlSchemaPath))
{
throw new ArgumentNullException("XmlSchemaPath is either null or of zero length");
}
_xmlSchemaPath = context.SubstituteWildCards(_xmlSchemaPath);
if (string.IsNullOrEmpty(_xmlSchemaNameSpace))
{
throw new ArgumentNullException("XmlSchemaNameSpace is either null or of zero length");
}
_xmlSchemaNameSpace = context.SubstituteWildCards(_xmlSchemaNameSpace);
}
示例5: Validate
/// <summary>
/// ITestStep.Validate() implementation
/// </summary>
public void Validate(Context context)
{
if (string.IsNullOrEmpty(_processName))
{
throw new ArgumentNullException("ProcessName is either null or of zero length");
}
_processName = context.SubstituteWildCards(_processName);
if (string.IsNullOrEmpty(_processParams))
{
throw new ArgumentNullException("ProcessParams is either null or of zero length");
}
_processParams = context.SubstituteWildCards(_processParams);
if (string.IsNullOrEmpty(_workingDirectory))
{
throw new ArgumentNullException("WorkingDirectory is either null or of zero length");
}
_workingDirectory = context.SubstituteWildCards(_workingDirectory);
}
示例6: Validate
public void Validate(Context context)
{
// delayBeforeCheck - optional
if (string.IsNullOrEmpty(_connectionString))
{
throw new ArgumentNullException("ConnectionString is either null or of zero length");
}
_connectionString = context.SubstituteWildCards(_connectionString);
if (null == _sqlQuery)
{
throw new ArgumentNullException("ConnectionString is either null or of zero length");
}
_sqlQuery.Validate(context);
}
示例7: Validate
///<summary>
/// TestStepBase.Validate() implementation
///</summary>
/// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
///<exception cref="ArgumentNullException"></exception>
public override void Validate(Context context)
{
if (null == _filesToDelete || 0 == _filesToDelete.Count)
{
throw new ArgumentNullException("FilePathsToDelete is either null or of zero length");
}
for (int c = 0; c < _filesToDelete.Count; c++)
{
_filesToDelete[c] = context.SubstituteWildCards(_filesToDelete[c]);
}
}
示例8: Validate
public void Validate(Context context)
{
// compareAsUTF8 - optional
if (string.IsNullOrEmpty(_comparisonDataPath))
{
throw new ArgumentNullException("ComparisonDataPath is either null or of zero length");
}
_comparisonDataPath = context.SubstituteWildCards(_comparisonDataPath);
}
示例9: Validate
/// <summary>
/// TestStepBase.Validate() implementation
/// </summary>
/// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
public override void Validate(Context context)
{
ArgumentValidation.CheckForEmptyString(_pipelineTypeName, "pipelineTypeName");
// pipelineAssemblyPath - optional
_source = context.SubstituteWildCards(_source);
if (!new FileInfo(_source).Exists)
{
throw new ArgumentException("Source file does not exist.", _source);
}
// destinationDir - optional
if (!string.IsNullOrEmpty(_destinationDir))
{
_destinationDir = context.SubstituteWildCards(_destinationDir);
}
}
示例10: Validate
/// <summary>
/// ITestStepOM.Validate() implementation
/// </summary>
/// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
public void Validate(Context context)
{
if (0 > _timeout)
{
throw new ArgumentNullException("Timeout must be greater than zero");
}
if (string.IsNullOrEmpty(_directory))
{
throw new ArgumentNullException("Directory is either null or of zero length");
}
_directory = context.SubstituteWildCards(_directory);
if (string.IsNullOrEmpty(_searchPattern))
{
throw new ArgumentNullException("SearchPattern is either null or of zero length");
}
_searchPattern = context.SubstituteWildCards(_searchPattern);
if(null != _validationStep)
{
_validationStep.Validate(context);
}
if(null != _contextLoaderStep)
{
_contextLoaderStep.Validate(context);
}
}
示例11: Validate
public void Validate(Context context)
{
// delayBeforeExecution - optional
if(string.IsNullOrEmpty(_connectionString))
{
throw new ArgumentNullException("ConnectionString is either null or of zero length");
}
_connectionString = context.SubstituteWildCards(_connectionString);
// numberOfRowsAffected - no validation
if(null == _sqlQuery)
{
throw new ArgumentNullException("ConnectionString is either null or of zero length");
}
else
{
_sqlQuery.Validate(context);
}
}
示例12: Validate
/// <summary>
/// TestStepBase.Validate() implementation
/// </summary>
/// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
public override void Validate(Context context)
{
ArgumentValidation.CheckForEmptyString(_pipelineTypeName, "pipelineTypeName");
// pipelineAssemblyPath - optional
_destination = context.SubstituteWildCards(_destination);
}
示例13: Validate
public void Validate(Context context)
{
if (String.IsNullOrEmpty(_directory))
{
throw new ArgumentNullException("CreationPath is either null or of zero length");
}
_directory = context.SubstituteWildCards(_directory);
if (String.IsNullOrEmpty(_searchPattern))
{
throw new ArgumentNullException("SourcePath is either null or of zero length");
}
_searchPattern = context.SubstituteWildCards(_searchPattern);
}