From fd45f7f9e3b3d7a312af9112cae79a0c40172316 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 13 Jan 2023 21:29:29 +0100 Subject: [PATCH] refactor: Tried to simplify & clearify the naming of the integration-tests --- ...esStorageIT.java => InMemoryWithFilesConfigurationIT.java} | 2 +- ...StorageIT.java => InMemoryWithMongoDbConfigurationIT.java} | 2 +- ...StorageStrategyIT.java => InMemoryWithFilesStorageIT.java} | 4 ++-- ...orageStrategyIT.java => InMemoryWithMongoDbStorageIT.java} | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename src/test/java/de/juplo/kafka/chat/backend/{InMemoryWithFilesStorageIT.java => InMemoryWithFilesConfigurationIT.java} (97%) rename src/test/java/de/juplo/kafka/chat/backend/{InMemoryWithMongoDbStorageIT.java => InMemoryWithMongoDbConfigurationIT.java} (98%) rename src/test/java/de/juplo/kafka/chat/backend/persistence/{InMemoryWithFilesStorageStrategyIT.java => InMemoryWithFilesStorageIT.java} (95%) rename src/test/java/de/juplo/kafka/chat/backend/persistence/{InMemoryWithMongoDbStorageStrategyIT.java => InMemoryWithMongoDbStorageIT.java} (96%) diff --git a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesStorageIT.java b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesConfigurationIT.java similarity index 97% rename from src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesStorageIT.java rename to src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesConfigurationIT.java index 12abf7aa..8aa0815e 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesStorageIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithFilesConfigurationIT.java @@ -14,7 +14,7 @@ import java.time.Duration; @SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = "chat.backend.storage-directory=target/test-classes/data/files") -class InMemoryWithFilesStorageIT +class InMemoryWithFilesConfigurationIT { @LocalServerPort private int port; diff --git a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithMongoDbStorageIT.java b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithMongoDbConfigurationIT.java similarity index 98% rename from src/test/java/de/juplo/kafka/chat/backend/InMemoryWithMongoDbStorageIT.java rename to src/test/java/de/juplo/kafka/chat/backend/InMemoryWithMongoDbConfigurationIT.java index 1a93841c..4612aa8b 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithMongoDbStorageIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/InMemoryWithMongoDbConfigurationIT.java @@ -29,7 +29,7 @@ import java.time.Duration; "spring.data.mongodb.database=test" }) @Testcontainers @Slf4j -class InMemoryWithMongoDbStorageIT +class InMemoryWithMongoDbConfigurationIT { @LocalServerPort private int port; diff --git a/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithFilesStorageStrategyIT.java b/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithFilesStorageIT.java similarity index 95% rename from src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithFilesStorageStrategyIT.java rename to src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithFilesStorageIT.java index 6fc9aac2..bd1a5c6a 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithFilesStorageStrategyIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithFilesStorageIT.java @@ -22,7 +22,7 @@ import java.util.function.Supplier; @Slf4j -public class InMemoryWithFilesStorageStrategyIT extends AbstractStorageStrategyIT +public class InMemoryWithFilesStorageIT extends AbstractStorageStrategyIT { final static Path path = Paths.get("target","local-json-files"); @@ -31,7 +31,7 @@ public class InMemoryWithFilesStorageStrategyIT extends AbstractStorageStrategyI final FilesStorageStrategy storageStrategy; - public InMemoryWithFilesStorageStrategyIT() + public InMemoryWithFilesStorageIT() { clock = Clock.systemDefaultZone(); mapper = new ObjectMapper(); diff --git a/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithMongoDbStorageStrategyIT.java b/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithMongoDbStorageIT.java similarity index 96% rename from src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithMongoDbStorageStrategyIT.java rename to src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithMongoDbStorageIT.java index ef30d947..80067117 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithMongoDbStorageStrategyIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/persistence/InMemoryWithMongoDbStorageIT.java @@ -4,7 +4,7 @@ import de.juplo.kafka.chat.backend.api.ShardingStrategy; import de.juplo.kafka.chat.backend.domain.ChatHomeService; import de.juplo.kafka.chat.backend.domain.ChatRoomFactory; import de.juplo.kafka.chat.backend.persistence.inmemory.InMemoryChatHomeService; -import de.juplo.kafka.chat.backend.persistence.InMemoryWithMongoDbStorageStrategyIT.DataSourceInitializer; +import de.juplo.kafka.chat.backend.persistence.InMemoryWithMongoDbStorageIT.DataSourceInitializer; import de.juplo.kafka.chat.backend.persistence.inmemory.InMemoryChatRoomFactory; import de.juplo.kafka.chat.backend.persistence.inmemory.InMemoryChatRoomService; import de.juplo.kafka.chat.backend.persistence.storage.mongodb.ChatRoomRepository; @@ -37,7 +37,7 @@ import java.util.function.Supplier; @AutoConfigureDataMongo @ContextConfiguration(initializers = DataSourceInitializer.class) @Slf4j -public class InMemoryWithMongoDbStorageStrategyIT extends AbstractStorageStrategyIT +public class InMemoryWithMongoDbStorageIT extends AbstractStorageStrategyIT { @Autowired MongoDbStorageStrategy storageStrategy; -- 2.20.1