本文整理汇总了Java中org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation类的典型用法代码示例。如果您正苦于以下问题:Java Invocation类的具体用法?Java Invocation怎么用?Java Invocation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Invocation类属于org.springframework.boot.cli.infrastructure.CommandLineInvoker包,在下文中一共展示了Invocation类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: noArguments
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void noArguments() throws Exception {
Invocation invocation = this.cli.invoke("jar");
invocation.await();
assertThat(invocation.getStandardOutput(), equalTo(""));
assertThat(invocation.getErrorOutput(), containsString("The name of the "
+ "resulting jar and at least one source file must be specified"));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:JarCommandIT.java
示例2: noSources
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void noSources() throws Exception {
Invocation invocation = this.cli.invoke("jar", "test-app.jar");
invocation.await();
assertThat(invocation.getStandardOutput(), equalTo(""));
assertThat(invocation.getErrorOutput(), containsString("The name of the "
+ "resulting jar and at least one source file must be specified"));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:JarCommandIT.java
示例3: hintProducesListOfValidCommands
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void hintProducesListOfValidCommands()
throws IOException, InterruptedException {
Invocation cli = this.cli.invoke("hint");
assertThat(cli.await(), equalTo(0));
assertThat("Unexpected error: \n" + cli.getErrorOutput(),
cli.getErrorOutput().length(), equalTo(0));
assertThat(cli.getStandardOutputLines().size(), equalTo(11));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:CommandLineIT.java
示例4: invokingWithNoArgumentsDisplaysHelp
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void invokingWithNoArgumentsDisplaysHelp()
throws IOException, InterruptedException {
Invocation cli = this.cli.invoke();
assertThat(cli.await(), equalTo(1));
assertThat(cli.getErrorOutput().length(), equalTo(0));
assertThat(cli.getStandardOutput(), startsWith("usage:"));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:CommandLineIT.java
示例5: unrecognizedCommandsAreHandledGracefully
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void unrecognizedCommandsAreHandledGracefully()
throws IOException, InterruptedException {
Invocation cli = this.cli.invoke("not-a-real-command");
assertThat(cli.await(), equalTo(1));
assertThat(cli.getErrorOutput(),
containsString("'not-a-real-command' is not a valid command"));
assertThat(cli.getStandardOutput().length(), equalTo(0));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:CommandLineIT.java
示例6: version
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void version() throws IOException, InterruptedException {
Invocation cli = this.cli.invoke("version");
assertThat(cli.await(), equalTo(0));
assertThat(cli.getErrorOutput().length(), equalTo(0));
assertThat(cli.getStandardOutput(), startsWith("Spring CLI v"));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:CommandLineIT.java
示例7: help
import org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation; //导入依赖的package包/类
@Test
public void help() throws IOException, InterruptedException {
Invocation cli = this.cli.invoke("help");
assertThat(cli.await(), equalTo(1));
assertThat(cli.getErrorOutput().length(), equalTo(0));
assertThat(cli.getStandardOutput(), startsWith("usage:"));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:CommandLineIT.java