diff --git a/examples/plantuml/.gitignore b/examples/plantuml/.gitignore new file mode 100644 index 00000000..930e968d --- /dev/null +++ b/examples/plantuml/.gitignore @@ -0,0 +1,2 @@ +dist +dist2 \ No newline at end of file diff --git a/plantuml-plugin/src/test/java/io/freefair/gradle/plugins/plantuml/PlantumlPluginTest.java b/plantuml-plugin/src/test/java/io/freefair/gradle/plugins/plantuml/PlantumlPluginTest.java index 3d2e2a1b..e98caba9 100644 --- a/plantuml-plugin/src/test/java/io/freefair/gradle/plugins/plantuml/PlantumlPluginTest.java +++ b/plantuml-plugin/src/test/java/io/freefair/gradle/plugins/plantuml/PlantumlPluginTest.java @@ -39,6 +39,21 @@ void execute() { task.source(getClass().getClassLoader().getResource("puml-files").getPath()); + task.getDeleteOutputBeforeBuild().set(true); + + assertThrows(UnsupportedOperationException.class, task::execute); + } + + @Test + void executeWithoutDelete() { + project.getPlugins().apply(PlantumlPlugin.class); + + PlantumlTask task = project.getTasks().withType(PlantumlTask.class).getByName("plantUml"); + + task.source(getClass().getClassLoader().getResource("puml-files").getPath()); + + task.getDeleteOutputBeforeBuild().set(false); + assertThrows(UnsupportedOperationException.class, task::execute); }