Package org.springframework.boot.cli.infrastructure.CommandLineInvoker

Examples of org.springframework.boot.cli.infrastructure.CommandLineInvoker.Invocation.await()


  @Test
  public void jarCreation() throws Exception {
    File jar = new File("target/test-app.jar");
    Invocation invocation = this.cli.invoke("jar", jar.getAbsolutePath(),
        "jar.groovy");
    invocation.await();
    assertEquals(invocation.getErrorOutput(), 0, invocation.getErrorOutput().length());
    assertTrue(jar.exists());

    Process process = new JavaExecutable().processBuilder("-jar",
        jar.getAbsolutePath()).start();
View Full Code Here


    assertTrue(jar.exists());

    Process process = new JavaExecutable().processBuilder("-jar",
        jar.getAbsolutePath()).start();
    invocation = new Invocation(process);
    invocation.await();

    assertThat(invocation.getErrorOutput(), equalTo(""));
    assertThat(invocation.getStandardOutput(), containsString("Hello World!"));
    assertThat(invocation.getStandardOutput(), containsString("/public/public.txt"));
    assertThat(invocation.getStandardOutput(),
View Full Code Here

  @Test
  public void jarCreationWithIncludes() throws Exception {
    File jar = new File("target/test-app.jar");
    Invocation invocation = this.cli.invoke("jar", jar.getAbsolutePath(),
        "--include", "-public/**,-resources/**", "jar.groovy");
    invocation.await();
    assertEquals(invocation.getErrorOutput(), 0, invocation.getErrorOutput().length());
    assertTrue(jar.exists());

    Process process = new JavaExecutable().processBuilder("-jar",
        jar.getAbsolutePath()).start();
View Full Code Here

    assertTrue(jar.exists());

    Process process = new JavaExecutable().processBuilder("-jar",
        jar.getAbsolutePath()).start();
    invocation = new Invocation(process);
    invocation.await();

    assertThat(invocation.getErrorOutput(), equalTo(""));
    assertThat(invocation.getStandardOutput(), containsString("Hello World!"));
    assertThat(invocation.getStandardOutput(),
        not(containsString("/public/public.txt")));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.