From 73336ae3b97fd23533a2c91d8f61b5ebf5df84bb Mon Sep 17 00:00:00 2001 From: Lars Johansson <lars.johansson@ess.eu> Date: Tue, 26 Sep 2023 10:08:52 +0200 Subject: [PATCH] Refactor integration test class names and update javadoc --- src/test/java/org/openepics/names/docker/HealthcheckIT.java | 2 +- src/test/java/org/openepics/names/docker/NamesIT.java | 2 +- src/test/java/org/openepics/names/docker/ReportIT.java | 2 +- .../org/openepics/names/docker/StructuresDeviceGroupIT.java | 2 +- .../org/openepics/names/docker/StructuresDeviceTypeIT.java | 2 +- .../org/openepics/names/docker/StructuresDisciplineIT.java | 2 +- .../org/openepics/names/docker/StructuresSubsystemIT.java | 2 +- .../org/openepics/names/docker/StructuresSystemGroupIT.java | 2 +- .../java/org/openepics/names/docker/StructuresSystemIT.java | 2 +- .../names/docker/complex/NamesInstanceIndexIT.java | 2 +- .../{StructuresCUDNamesLegacyIT.java => NamesLegacyIT.java} | 4 ++-- ...sCUDDeleteIT.java => NamesLegacyStructuresDeleteIT.java} | 4 ++-- ...sCUDUpdateIT.java => NamesLegacyStructuresUpdateIT.java} | 4 ++-- .../org/openepics/names/docker/complex/NamesMultipleIT.java | 2 +- .../openepics/names/docker/complex/StructuresLevel3IT.java | 4 ++-- .../names/docker/complex/StructuresMultipleIT.java | 2 +- src/test/resources/INTEGRATIONTEST_DOCKER_RUN.md | 6 +++--- 17 files changed, 23 insertions(+), 23 deletions(-) rename src/test/java/org/openepics/names/docker/complex/{StructuresCUDNamesLegacyIT.java => NamesLegacyIT.java} (99%) rename src/test/java/org/openepics/names/docker/complex/{StructuresCUDDeleteIT.java => NamesLegacyStructuresDeleteIT.java} (99%) rename src/test/java/org/openepics/names/docker/complex/{StructuresCUDUpdateIT.java => NamesLegacyStructuresUpdateIT.java} (99%) diff --git a/src/test/java/org/openepics/names/docker/HealthcheckIT.java b/src/test/java/org/openepics/names/docker/HealthcheckIT.java index aa1e0554..09ca51b8 100644 --- a/src/test/java/org/openepics/names/docker/HealthcheckIT.java +++ b/src/test/java/org/openepics/names/docker/HealthcheckIT.java @@ -36,7 +36,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is healthcheck endpoint. + * Purpose of this class is to test healthcheck endpoint. * In practice, it means means to have Naming and PostgreSQL up and running. * </p> * diff --git a/src/test/java/org/openepics/names/docker/NamesIT.java b/src/test/java/org/openepics/names/docker/NamesIT.java index 925958f3..509dabd2 100644 --- a/src/test/java/org/openepics/names/docker/NamesIT.java +++ b/src/test/java/org/openepics/names/docker/NamesIT.java @@ -53,7 +53,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is names endpoint. + * Purpose of this class is to test names endpoints. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/ReportIT.java b/src/test/java/org/openepics/names/docker/ReportIT.java index cfe35909..53e0b27c 100644 --- a/src/test/java/org/openepics/names/docker/ReportIT.java +++ b/src/test/java/org/openepics/names/docker/ReportIT.java @@ -36,7 +36,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is report endpoint. + * Purpose of this class is to test report endpoints. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java index adc7e173..86fbba77 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java @@ -47,7 +47,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and device group. + * Purpose of this class is to test structures endpoints and device group. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java index 0a19f4d4..7fab4faa 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java @@ -47,7 +47,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and device type. + * Purpose of this class is to test structures endpoints and device type. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java index 2d8c4ffd..15d0bbf7 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java @@ -46,7 +46,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and discipline. + * Purpose of this class is to test structures endpoints and discipline. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java index 72f8816d..ff4d4cd5 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java @@ -47,7 +47,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and subsystem. + * Purpose of this class is to test structures endpoints and subsystem. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java index fb630b58..8c0f4836 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java @@ -47,7 +47,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and system group. + * Purpose of this class is to test structures endpoints and system group. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java index 1c193aff..0a8134c3 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java @@ -47,7 +47,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and system. + * Purpose of this class is to test structures endpoints and system. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java b/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java index 0d7d2444..f59ccf32 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java @@ -44,7 +44,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is names endpoint and rules for disciplines P&ID and Scientific in particular. + * Purpose of this class is to test names endpoints and rules for disciplines P&ID and Scientific in particular. * In practice, this class contains tests for instance index, en masse. * </p> * diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresCUDNamesLegacyIT.java b/src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java similarity index 99% rename from src/test/java/org/openepics/names/docker/complex/StructuresCUDNamesLegacyIT.java rename to src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java index 58f28a9f..037e4243 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresCUDNamesLegacyIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesLegacyIT.java @@ -45,14 +45,14 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is names endpoint and rules for legacy name. + * Purpose of this class is to test rules for legacy name. * In practice, this class contains tests for structures and names, before and after delete of structures. * </p> * * @author Lars Johansson */ @Testcontainers -class StructuresCUDNamesLegacyIT { +class NamesLegacyIT { // test // name is legacy in various ways diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresCUDDeleteIT.java b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java similarity index 99% rename from src/test/java/org/openepics/names/docker/complex/StructuresCUDDeleteIT.java rename to src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java index 808212f5..950ae7c5 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresCUDDeleteIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresDeleteIT.java @@ -43,14 +43,14 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is names endpoint and rules for legacy name. + * Purpose of this class is to test rules for legacy name. * In practice, this class contains tests for structures and names, before and after delete of structures. * </p> * * @author Lars Johansson */ @Testcontainers -class StructuresCUDDeleteIT { +class NamesLegacyStructuresDeleteIT { // test // create update delete structures and ensure name is as expected diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresCUDUpdateIT.java b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java similarity index 99% rename from src/test/java/org/openepics/names/docker/complex/StructuresCUDUpdateIT.java rename to src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java index 0b1f655d..7a58a243 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresCUDUpdateIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesLegacyStructuresUpdateIT.java @@ -43,14 +43,14 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is names endpoint and rules for legacy name. + * Purpose of this class is to test rules for legacy name. * In practice, this class contains tests for structures and names, before and after update of structures. * </p> * * @author Lars Johansson */ @Testcontainers -class StructuresCUDUpdateIT { +class NamesLegacyStructuresUpdateIT { // test // create update delete structures and ensure name is as expected diff --git a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java index 72f6813e..9036727c 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java @@ -50,7 +50,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is names endpoint. + * Purpose of this class is to test names endpoints. * In particular, purpose is to test arrays of names. * </p> * diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java b/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java index 49fc48d2..d395e95b 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java +++ b/src/test/java/org/openepics/names/docker/complex/StructuresLevel3IT.java @@ -42,8 +42,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoints. In particular create level 3 entries - * and create all entries before approve all entries. + * Purpose of this class is to test structures endpoints. + * In particular create level 3 entries and create all entries before approve all entries. * </p> * * @author Lars Johansson diff --git a/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java index 15689f5c..7576f787 100644 --- a/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/StructuresMultipleIT.java @@ -47,7 +47,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; * with docker-compose.yml / Dockerfile. * * <p> - * Focus of this class is structures endpoint and system. + * Purpose of this class is to test structures endpoints. * In particular, purpose is to test arrays of structures. * </p> * diff --git a/src/test/resources/INTEGRATIONTEST_DOCKER_RUN.md b/src/test/resources/INTEGRATIONTEST_DOCKER_RUN.md index eb89c486..c19b8045 100644 --- a/src/test/resources/INTEGRATIONTEST_DOCKER_RUN.md +++ b/src/test/resources/INTEGRATIONTEST_DOCKER_RUN.md @@ -39,10 +39,10 @@ mvn test -Dtest=org.openepics.names.docker.SubsystemIT mvn test -Dtest=org.openepics.names.docker.SystemGroupIT mvn test -Dtest=org.openepics.names.docker.SystemIT mvn test -Dtest=org.openepics.names.docker.complex.NamesInstanceIndexIT +mvn test -Dtest=org.openepics.names.docker.complex.NamesLegacyIT +mvn test -Dtest=org.openepics.names.docker.complex.NamesLegacyStructuresDeleteIT +mvn test -Dtest=org.openepics.names.docker.complex.NamesLegacyStructuresUpdateIT mvn test -Dtest=org.openepics.names.docker.complex.NamesMultipleIT -mvn test -Dtest=org.openepics.names.docker.complex.StructuresCUDDeleteIT -mvn test -Dtest=org.openepics.names.docker.complex.StructuresCUDNamesLegacyIT -mvn test -Dtest=org.openepics.names.docker.complex.StructuresCUDUpdateIT mvn test -Dtest=org.openepics.names.docker.complex.StructuresLevel3IT mvn test -Dtest=org.openepics.names.docker.complex.StructuresMultipleIT ``` -- GitLab