本文整理匯總了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