本文整理匯總了C#中Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.GetCommandBuilder方法的典型用法代碼示例。如果您正苦於以下問題:C# TestContext.GetCommandBuilder方法的具體用法?C# TestContext.GetCommandBuilder怎麽用?C# TestContext.GetCommandBuilder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
的用法示例。
在下文中一共展示了TestContext.GetCommandBuilder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetJobSubmissionCommandGeneratesCorrectCommand
public void GetJobSubmissionCommandGeneratesCorrectCommand()
{
var testContext = new TestContext();
const string expectedCommand = @"reef\Org.Apache.REEF.Bridge.exe" +
" %JAVA_HOME%/bin/java -XX:PermSize=128m -XX:MaxPermSize=128m -Xmx512m " +
"-classpath %HADOOP_CONF_DIR%;%HADOOP_HOME%/*;%HADOOP_HOME%/lib/*;%HADO" +
"OP_COMMON_HOME%/*;%HADOOP_COMMON_HOME%/lib/*;%HADOOP_YARN_HOME%/*;%HAD" +
"OOP_YARN_HOME%/lib/*;%HADOOP_HDFS_HOME%/*;%HADOOP_HDFS_HOME%/lib/*;%HA" +
"DOOP_MAPRED_HOME%/*;%HADOOP_MAPRED_HOME%/lib/*;%HADOOP_HOME%/etc/hadoo" +
"p;%HADOOP_HOME%/share/hadoop/common/*;%HADOOP_HOME%/share/hadoop/commo" +
"n/lib/*;%HADOOP_HOME%/share/hadoop/yarn/*;%HADOOP_HOME%/share/hadoop/y" +
"arn/lib/*;%HADOOP_HOME%/share/hadoop/hdfs/*;%HADOOP_HOME%/share/hadoop" +
"/hdfs/lib/*;%HADOOP_HOME%/share/hadoop/mapreduce/*;%HADOOP_HOME%/share" +
"/hadoop/mapreduce/lib/*;reef/local/*;reef/global/* -Dproc_reef org.apa" +
"che.reef.bridge.client.YarnBootstrapREEFLauncher reef/local/job-submis" +
"sion-params.json 1> <LOG_DIR>/driver.stdout 2> <LOG_DIR>/driver.stderr";
var commandBuilder = testContext.GetCommandBuilder();
var jobSubmissionCommand = commandBuilder.GetJobSubmissionCommand();
Assert.AreEqual(expectedCommand, jobSubmissionCommand);
}