From 9351b8453d5563e5823d1e83f2828ad507cc3738 Mon Sep 17 00:00:00 2001 From: jzitnik-dev Date: Sat, 20 Sep 2025 21:44:54 +0200 Subject: [PATCH] test: Remove auto transient test --- .../AutoTransientSupportTest.java | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/test/java/cz/jzitnik/game/core/autotransient/AutoTransientSupportTest.java diff --git a/src/test/java/cz/jzitnik/game/core/autotransient/AutoTransientSupportTest.java b/src/test/java/cz/jzitnik/game/core/autotransient/AutoTransientSupportTest.java deleted file mode 100644 index 9898202..0000000 --- a/src/test/java/cz/jzitnik/game/core/autotransient/AutoTransientSupportTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package cz.jzitnik.game.core.autotransient; - -import cz.jzitnik.game.annotations.AutoTransient; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import org.reflections.Reflections; -import org.reflections.scanners.Scanners; -import org.reflections.util.ConfigurationBuilder; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.*; - -class AutoTransientSupportTest { - @Test - @DisplayName("All fields annotated with @AutoTransient must be transient.") - void checkAutoTransientAnnotation() { - Reflections reflections = new Reflections( - new ConfigurationBuilder() - .forPackages("cz.jzitnik.game") - .addScanners(Scanners.FieldsAnnotated) - ); - Set fields = reflections.getFieldsAnnotatedWith(AutoTransient.class); - - for (Field field : fields) { - if (!Modifier.isTransient(field.getModifiers())) { - fail("Field '" + field.getName() + "' in class " + field.getClass().getName() + - " is annotated with @AutoTransient but is not transient."); - } - } - } -} \ No newline at end of file