IntegrationTest.java 644 B

12345678910111213141516171819202122232425
  1. import org.junit.*;
  2. import play.mvc.*;
  3. import play.test.*;
  4. import static play.test.Helpers.*;
  5. import static org.junit.Assert.*;
  6. import static org.fluentlenium.core.filter.FilterConstructor.*;
  7. public class IntegrationTest {
  8. /**
  9. * add your integration test here
  10. * in this example we just check if the welcome page is being shown
  11. */
  12. @Test
  13. public void test() {
  14. running(testServer(3333, fakeApplication(inMemoryDatabase())), HTMLUNIT, browser -> {
  15. browser.goTo("http://localhost:3333");
  16. assertTrue(browser.pageSource().contains("Your new application is ready."));
  17. });
  18. }
  19. }