当前位置: 首页>>代码示例>>C#>>正文


C# TestContext.GetCommandBuilder方法代码示例

本文整理汇总了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);
        }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:21,代码来源:WindowsYarnJobCommandProviderTests.cs


注:本文中的Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.GetCommandBuilder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。