failure.assertHasDescription("broken closure");
}
@Test
public void reportsTaskActionExecutionFailsFromJavaWithRuntimeException() {
File buildFile = getTestBuildFile("task-action-execution-failure.gradle");
<BUG>GradleExecutionFailure failure = usingBuildFile(buildFile).runTasksAndExpectFailure("brokenJavaTask");
</BUG>
failure.assertHasFileName(String.format("Build file '%s'", buildFile));
failure.assertHasContext("Execution failed for task ':brokenJavaTask'");
failure.assertHasDescription("broken action");

failure.assertHasDescription("broken closure");
}
@Test
public void reportsTaskActionExecutionFailsFromJavaWithRuntimeException() {
File buildFile = getTestBuildFile("task-action-execution-failure.gradle");
ExecutionFailure failure = usingBuildFile(buildFile).withTasks("brokenJavaTask").runWithFailure();
failure.assertHasFileName(String.format("Build file '%s'", buildFile));
failure.assertHasContext("Execution failed for task ':brokenJavaTask'");
failure.assertHasDescription("broken action");
