From 8f19dede82c72ea5662bf920f8a533c79333dc30 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Thu, 12 Dec 2024 15:23:18 +0200 Subject: [PATCH] some javadoc Signed-off-by: Atanas Atanasov --- ...rverMappedConfigSourceInitializerTest.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java b/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java index 7738568f..26d29e41 100644 --- a/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java +++ b/server/src/test/java/com/hedera/block/server/config/ServerMappedConfigSourceInitializerTest.java @@ -40,6 +40,9 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +/** + * Tests for {@link ServerMappedConfigSourceInitializer}. + */ class ServerMappedConfigSourceInitializerTest { private static final ConfigMapping[] SUPPORTED_MAPPINGS = { new ConfigMapping("consumer.timeoutThresholdMillis", "CONSUMER_TIMEOUT_THRESHOLD_MILLIS"), @@ -53,6 +56,21 @@ class ServerMappedConfigSourceInitializerTest { new ConfigMapping("server.port", "SERVER_PORT"), }; + /** + * This test aims to verify the state of all config extensions we have + * added. These configs are the ones that are returned from + * {@link BlockNodeConfigExtension#getConfigDataTypes()}. This test will + * verify: + *
+     *     - all added config classes are annotated with the {@link ConfigData}
+     *       annotation.
+     *     - all fields in all config classes are annotated with the
+     *       {@link ConfigProperty} annotation.
+     *     - a mapping for all fields in all config classes is present in the
+     *       {@link ServerMappedConfigSourceInitializer#MAPPINGS()}.
+     * 
+ * @param config parameterized, config class to test + */ @Disabled("This test is disabled because it will start passing only after #285 gets implemented") @ParameterizedTest @MethodSource("allConfigDataTypes") @@ -97,7 +115,7 @@ void testVerifyAllFieldsInRecordsAreMapped(final Class config) * ServerMappedConfigSourceInitializer#MAPPINGS} to make this pass. */ @Test - void test_VerifyAllSupportedMappingsAreAddedToInstance() throws ReflectiveOperationException { + void testVerifyAllSupportedMappingsAreAddedToInstance() throws ReflectiveOperationException { final Queue actual = extractConfigMappings(); assertEquals(SUPPORTED_MAPPINGS.length, actual.size());