Skip to content

[integration test] supports application arguments #1701

@jknack

Description

@jknack

We are going to add a factory method attribute for integration tests, so:

public class App extends Jooby {
  public App(String argument) {
    get("/", ctx -> "Easy testing!");
  }
}

Can be tested like:

public class TestApp {
  
  @JoobyTest(value = App.class, factoryMethod = "createApp")
  public void test() {
    ... test code goes here
  }

  public App createApp() {
    return new App("Argument");
  }
}

cc @rrva

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions