Search in sources :

Example 1 with TaskOutcome

use of org.gradle.testkit.runner.TaskOutcome in project core-java by SpineEventEngine.

the class ModelVerifierPluginShould method halt_build_on_malformed_command_handling_methods.

// TODO:2017-08-25:dmytro.dashenkov: Re-enable when Model is capable of
@Ignore
// https://github.com/SpineEventEngine/base/issues/49
@Test
public void halt_build_on_malformed_command_handling_methods() {
    final BuildResult result = newProjectWithJava("io/spine/model/verify/MalformedAggregate.java").executeAndFail(VERIFY_MODEL);
    final BuildTask task = result.task(toPath(VERIFY_MODEL));
    assertNotNull(task);
    final TaskOutcome generationResult = task.getOutcome();
    assertEquals(FAILED, generationResult);
}
Also used : BuildResult(org.gradle.testkit.runner.BuildResult) BuildTask(org.gradle.testkit.runner.BuildTask) TaskOutcome(org.gradle.testkit.runner.TaskOutcome) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 2 with TaskOutcome

use of org.gradle.testkit.runner.TaskOutcome in project core-java by SpineEventEngine.

the class ModelVerifierPluginShould method halt_build_on_duplicate_command_handling_methods.

@Test
public void halt_build_on_duplicate_command_handling_methods() {
    final BuildResult result = newProjectWithJava("io/spine/model/verify/DuplicateAggregate.java", "io/spine/model/verify/DuplicateCommandHandler.java").executeAndFail(VERIFY_MODEL);
    final BuildTask task = result.task(toPath(VERIFY_MODEL));
    assertNotNull(task);
    final TaskOutcome generationResult = task.getOutcome();
    assertEquals(FAILED, generationResult);
}
Also used : BuildResult(org.gradle.testkit.runner.BuildResult) BuildTask(org.gradle.testkit.runner.BuildTask) TaskOutcome(org.gradle.testkit.runner.TaskOutcome) Test(org.junit.Test)

Aggregations

BuildResult (org.gradle.testkit.runner.BuildResult)2 BuildTask (org.gradle.testkit.runner.BuildTask)2 TaskOutcome (org.gradle.testkit.runner.TaskOutcome)2 Test (org.junit.Test)2 Ignore (org.junit.Ignore)1