From 33a5e66b053e098dbc04da9bde42173ba5c9649a Mon Sep 17 00:00:00 2001 From: lavenderses Date: Mon, 6 May 2024 11:39:28 +0900 Subject: [PATCH] Move parser class to parser package --- .../AwsAppConfigClientService.java | 4 ++-- .../app_config_model/AppConfigBooleanValue.java | 2 +- .../app_config_model/AppConfigObjectValue.java | 2 +- .../AppConfigValueParseException.java | 2 +- .../{app_config_model => parser}/AwsAppConfigParser.java | 6 +++++- .../AwsAppConfigClientServiceTest.kt | 4 ++-- .../{app_config_model => parser}/AwsAppConfigParserTest.kt | 4 +++- 7 files changed, 15 insertions(+), 9 deletions(-) rename src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/{app_config_model => parser}/AppConfigValueParseException.java (99%) rename src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/{app_config_model => parser}/AwsAppConfigParser.java (96%) rename src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/{app_config_model => parser}/AwsAppConfigParserTest.kt (98%) diff --git a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientService.java b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientService.java index 8be65d2..e66a8b2 100644 --- a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientService.java +++ b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientService.java @@ -7,8 +7,8 @@ import dev.openfeature.sdk.Reason; import dev.openfeature.sdk.Value; import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigValue; -import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigValueParseException; -import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AwsAppConfigParser; +import io.github.lavenderses.aws_app_config_openfeature_provider.parser.AppConfigValueParseException; +import io.github.lavenderses.aws_app_config_openfeature_provider.parser.AwsAppConfigParser; import io.github.lavenderses.aws_app_config_openfeature_provider.converter.AppConfigValueConverter; import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.ErrorEvaluationValue; import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.EvaluationValue; diff --git a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigBooleanValue.java b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigBooleanValue.java index e30d248..42a34ab 100644 --- a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigBooleanValue.java +++ b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigBooleanValue.java @@ -18,7 +18,7 @@ @EqualsAndHashCode(callSuper = true) public final class AppConfigBooleanValue extends AppConfigValue { - AppConfigBooleanValue( + public AppConfigBooleanValue( @NotNull Boolean enabled, @NotNull Boolean value, @Language("json") @NotNull String jsonFormat diff --git a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigObjectValue.java b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigObjectValue.java index f91ba17..990ecb6 100644 --- a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigObjectValue.java +++ b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigObjectValue.java @@ -18,7 +18,7 @@ @EqualsAndHashCode(callSuper = true) public final class AppConfigObjectValue extends AppConfigValue { - AppConfigObjectValue( + public AppConfigObjectValue( @NotNull Boolean enabled, @NotNull Value value, @Language("json") @NotNull String jsonFormat diff --git a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigValueParseException.java b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AppConfigValueParseException.java similarity index 99% rename from src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigValueParseException.java rename to src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AppConfigValueParseException.java index c1575d1..b383f2c 100644 --- a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AppConfigValueParseException.java +++ b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AppConfigValueParseException.java @@ -1,4 +1,4 @@ -package io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model; +package io.github.lavenderses.aws_app_config_openfeature_provider.parser; import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.ErrorEvaluationValue; import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.EvaluationResult; diff --git a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AwsAppConfigParser.java b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AwsAppConfigParser.java similarity index 96% rename from src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AwsAppConfigParser.java rename to src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AwsAppConfigParser.java index b856fee..f357ae6 100644 --- a/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AwsAppConfigParser.java +++ b/src/main/java/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AwsAppConfigParser.java @@ -1,4 +1,4 @@ -package io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model; +package io.github.lavenderses.aws_app_config_openfeature_provider.parser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; @@ -7,6 +7,10 @@ import dev.openfeature.sdk.ImmutableStructure; import dev.openfeature.sdk.Structure; import dev.openfeature.sdk.Value; +import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigBooleanValue; +import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigObjectValue; +import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigValue; +import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigValueKey; import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.EvaluationResult; import io.github.lavenderses.aws_app_config_openfeature_provider.utils.ObjectMapperBuilder; import org.intellij.lang.annotations.Language; diff --git a/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientServiceTest.kt b/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientServiceTest.kt index a2b035a..6803bbf 100644 --- a/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientServiceTest.kt +++ b/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/AwsAppConfigClientServiceTest.kt @@ -8,14 +8,14 @@ import dev.openfeature.sdk.Reason import dev.openfeature.sdk.Value import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigBooleanValue import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigObjectValue -import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigValueParseException -import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AwsAppConfigParser import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.fixture import io.github.lavenderses.aws_app_config_openfeature_provider.converter.AppConfigValueConverter import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.ErrorEvaluationValue import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.EvaluationResult import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.ObjectEvaluationValue import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.PrimitiveEvaluationValue +import io.github.lavenderses.aws_app_config_openfeature_provider.parser.AppConfigValueParseException +import io.github.lavenderses.aws_app_config_openfeature_provider.parser.AwsAppConfigParser import org.junit.jupiter.api.Nested import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AwsAppConfigParserTest.kt b/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AwsAppConfigParserTest.kt similarity index 98% rename from src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AwsAppConfigParserTest.kt rename to src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AwsAppConfigParserTest.kt index 4f06c24..63e2c42 100644 --- a/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/app_config_model/AwsAppConfigParserTest.kt +++ b/src/test/kotlin/io/github/lavenderses/aws_app_config_openfeature_provider/parser/AwsAppConfigParserTest.kt @@ -1,4 +1,4 @@ -package io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model +package io.github.lavenderses.aws_app_config_openfeature_provider.parser import assertk.assertThat import assertk.assertions.isEqualTo @@ -7,6 +7,8 @@ import com.fasterxml.jackson.databind.node.IntNode import com.fasterxml.jackson.databind.node.TextNode import dev.openfeature.sdk.ImmutableStructure import dev.openfeature.sdk.Value +import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigBooleanValue +import io.github.lavenderses.aws_app_config_openfeature_provider.app_config_model.AppConfigObjectValue import io.github.lavenderses.aws_app_config_openfeature_provider.evaluation_value.EvaluationResult import io.github.lavenderses.aws_app_config_openfeature_provider.helper.Time import io.github.lavenderses.aws_app_config_openfeature_provider.utils.ObjectMapperBuilder