From b49f34e34f59ea8fd81cac567690e46d0322f379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Fuch=C3=9F?= Date: Fri, 4 Oct 2024 11:07:48 +0200 Subject: [PATCH] Add RAW Model File Type --- .../ardoco/tlr/models/agents/ArchitectureConfiguration.java | 1 + tests/integration-tests/tests-base/pom.xml | 2 +- .../kit/kastel/mcse/ardoco/core/tests/eval/HistoricProject.java | 2 ++ .../edu/kit/kastel/mcse/ardoco/core/tests/eval/Project.java | 2 ++ tests/integration-tests/tests-tlr/.gitignore | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/integration-tests/tests-tlr/.gitignore diff --git a/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/agents/ArchitectureConfiguration.java b/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/agents/ArchitectureConfiguration.java index da4e599..9cca6d8 100644 --- a/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/agents/ArchitectureConfiguration.java +++ b/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/agents/ArchitectureConfiguration.java @@ -22,6 +22,7 @@ public Extractor extractor() { return switch (type) { case PCM -> new PcmExtractor(architectureFile.getAbsolutePath()); case UML -> new UmlExtractor(architectureFile.getAbsolutePath()); + case RAW -> throw new IllegalArgumentException("Raw model is not supported for this project."); }; } } diff --git a/tests/integration-tests/tests-base/pom.xml b/tests/integration-tests/tests-base/pom.xml index 279977a..0bfe176 100644 --- a/tests/integration-tests/tests-base/pom.xml +++ b/tests/integration-tests/tests-base/pom.xml @@ -20,7 +20,7 @@ io.github.ardoco metrics - 0.1.1-SNAPSHOT + 0.1.1 compile diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/HistoricProject.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/HistoricProject.java index b28cc51..2a6882f 100644 --- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/HistoricProject.java +++ b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/HistoricProject.java @@ -111,6 +111,7 @@ public File getModelFile(ArchitectureModelType modelType) { return switch (modelType) { case PCM -> getModelFile(); case UML -> ProjectHelper.loadFileFromResources(model.replace("/pcm/", "/uml/").replace(".repository", ".uml")); + case RAW -> throw new IllegalArgumentException("Raw model is not supported for this project."); }; } @@ -119,6 +120,7 @@ public String getModelResourceName(ArchitectureModelType modelType) { return switch (modelType) { case PCM -> model; case UML -> model.replace("/pcm/", "/uml/").replace(".repository", ".uml"); + case RAW -> throw new IllegalArgumentException("Raw model is not supported for this project."); }; } diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/Project.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/Project.java index d6d6b27..fc9a8e8 100644 --- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/Project.java +++ b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/Project.java @@ -120,6 +120,7 @@ public File getModelFile(ArchitectureModelType modelType) { return switch (modelType) { case PCM -> getModelFile(); case UML -> ProjectHelper.loadFileFromResources(model.replace("/pcm/", "/uml/").replace(".repository", ".uml")); + case RAW -> throw new IllegalArgumentException("Raw model is not supported for this project."); }; } @@ -128,6 +129,7 @@ public String getModelResourceName(ArchitectureModelType modelType) { return switch (modelType) { case PCM -> model; case UML -> model.replace("/pcm/", "/uml/").replace(".repository", ".uml"); + case RAW -> throw new IllegalArgumentException("Raw model is not supported for this project."); }; } diff --git a/tests/integration-tests/tests-tlr/.gitignore b/tests/integration-tests/tests-tlr/.gitignore new file mode 100644 index 0000000..4bb5138 --- /dev/null +++ b/tests/integration-tests/tests-tlr/.gitignore @@ -0,0 +1 @@ +cache-llm