@org.junit.Test public void testExecuteWithTestFailuresAndIgnoreFailures() { configureTask(); test.setIgnoreFailures(true); expectTestsFail(); test.executeTests(); }
@org.junit.Test public void testExecute() { configureTask(); expectTestsExecuted(); test.executeTests(); }
@org.junit.Test public void testExecuteWithTestFailuresAndStopAtFailures() { configureTask(); expectTestsFail(); try { test.executeTests(); fail(); } catch (GradleException e) { assertThat(e.getMessage(), startsWith("There were failing tests. See the report at")); } }