Skip to content

Commit

Permalink
some javadoc
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Atanasov <[email protected]>
  • Loading branch information
ata-nas committed Dec 12, 2024
1 parent 9934af4 commit 8f19ded
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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:
* <pre>
* - 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()}.
* </pre>
* @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")
Expand Down Expand Up @@ -97,7 +115,7 @@ void testVerifyAllFieldsInRecordsAreMapped(final Class<? extends Record> config)
* ServerMappedConfigSourceInitializer#MAPPINGS} to make this pass.
*/
@Test
void test_VerifyAllSupportedMappingsAreAddedToInstance() throws ReflectiveOperationException {
void testVerifyAllSupportedMappingsAreAddedToInstance() throws ReflectiveOperationException {
final Queue<ConfigMapping> actual = extractConfigMappings();

assertEquals(SUPPORTED_MAPPINGS.length, actual.size());
Expand Down

0 comments on commit 8f19ded

Please sign in to comment.