use of org.gradle.testkit.runner.BuildResult in project lightning by automatictester.
the class ReportTaskTest method runReportWithMissingInput.
@Test
public void runReportWithMissingInput() {
BuildResult result = GradleRunner.create().withProjectDir(new File("src/integrationTest/resources/build/no/csv")).withArguments(":report").withPluginClasspath().buildAndFail();
assertThat(taskOutputContainsText("Not all mandatory input specified for this task or specified files not readable", result), is(true));
}
use of org.gradle.testkit.runner.BuildResult in project lightning by automatictester.
the class VerifyTaskTest method runVerifyWithServerSideTests.
@Test
public void runVerifyWithServerSideTests() {
BuildResult result = GradleRunner.create().withProjectDir(new File("src/integrationTest/resources/build/perfmon")).withArguments(":verify").withPluginClasspath().build();
assertThat(result.task(":verify").getOutcome(), is(SUCCESS));
assertThat(taskOutputContainsFileContent("/results/expected/1_client_2_server.txt", result), is(true));
}
use of org.gradle.testkit.runner.BuildResult in project wildfly-gradle-tools by wildfly.
the class BuildFunctionalTest method testProvisioningTask.
@Test
public void testProvisioningTask() {
BuildResult result = testProject.runTask("provision");
assertEquals(result.task(":provision").getOutcome(), TaskOutcome.SUCCESS);
// now check some key file from WildFly was really materialized in the right place:
final Path provisionedWildFlyPath = testProject.getWorkDirectory().resolve("build").resolve(ProvisionTask.DEFAULT_OUTPUT_DIR);
System.out.println("Server expected in: " + provisionedWildFlyPath);
assertTrue(provisionedWildFlyPath.resolve("jboss-modules.jar").toFile().isFile());
}
use of org.gradle.testkit.runner.BuildResult in project spring-security by spring-projects.
the class IntegrationTestPluginITest method checkWithGroovy.
@Test
public void checkWithGroovy() throws Exception {
BuildResult result = this.testKit.withProjectResource("samples/integrationtest/withgroovy/").withArguments("check").build();
assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
assertThat(new File(testKit.getRootDir(), "build/test-results/integrationTest/")).exists();
assertThat(new File(testKit.getRootDir(), "build/reports/tests/integrationTest/")).exists();
}
use of org.gradle.testkit.runner.BuildResult in project spring-security by spring-projects.
the class IntegrationTestPluginITest method checkWithJavaPlugin.
@Test
public void checkWithJavaPlugin() throws Exception {
BuildResult result = this.testKit.withProjectResource("samples/integrationtest/withjava/").withArguments("check").build();
assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
assertThat(new File(testKit.getRootDir(), "build/test-results/integrationTest/")).exists();
assertThat(new File(testKit.getRootDir(), "build/reports/tests/integrationTest/")).exists();
}
Aggregations