From 5b9c7754b46ea87d4c2b5c9655f0d7739de50be2 Mon Sep 17 00:00:00 2001 From: Exlll Date: Sat, 16 Jul 2022 17:23:59 +0200 Subject: [PATCH] Move to new project structure --- README.md | 118 ++-- .../src/main/kotlin/core-config.gradle.kts | 72 +++ .../src/main/kotlin/java-config.gradle.kts | 91 --- .../src/main/kotlin/libs-config.gradle.kts | 12 + .../src/main/kotlin/plugins-config.gradle.kts | 28 + configlib-core/build.gradle.kts | 3 +- .../configlib/ExampleConfigurationTests.java | 539 +----------------- .../java/de/exlll/configlib/TestUtils.java | 7 +- .../ExampleConfigurationA1.java | 0 .../ExampleConfigurationA2.java | 0 .../ExampleConfigurationB1.java | 0 .../ExampleConfigurationB2.java | 0 .../ExampleConfigurationNulls.java | 0 .../ExampleConfigurationsSerialized.java | 0 .../configlib/configurations/ExampleEnum.java | 0 .../ExampleEqualityAsserter.java | 503 ++++++++++++++++ .../configurations/ExampleInitializer.java | 0 .../configurations/ExampleRecord1.java | 0 .../configurations/ExampleRecord2.java | 0 configlib-paper/build.gradle.kts | 10 +- configlib-velocity/build.gradle.kts | 10 +- configlib-waterfall/build.gradle.kts | 10 +- configlib-yaml/build.gradle.kts | 8 + .../YamlConfigurationProperties.java | 0 .../configlib/YamlConfigurationStore.java | 0 .../exlll/configlib/YamlConfigurations.java | 42 +- .../ExampleConfigurationYamlTests.java | 84 +++ .../YamlConfigurationPropertiesTest.java | 0 .../configlib/YamlConfigurationStoreTest.java | 0 .../configlib/YamlConfigurationsTest.java | 26 +- .../exlll/configlib/YamlFileWriterTest.java | 0 gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 60756 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 263 +++++---- gradlew.bat | 14 +- settings.gradle.kts | 1 + 36 files changed, 1013 insertions(+), 830 deletions(-) create mode 100644 buildSrc/src/main/kotlin/core-config.gradle.kts delete mode 100644 buildSrc/src/main/kotlin/java-config.gradle.kts create mode 100644 buildSrc/src/main/kotlin/libs-config.gradle.kts create mode 100644 buildSrc/src/main/kotlin/plugins-config.gradle.kts rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/TestUtils.java (96%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleConfigurationA1.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleConfigurationA2.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleConfigurationB1.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleConfigurationB2.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleConfigurationNulls.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleConfigurationsSerialized.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleEnum.java (100%) create mode 100644 configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleEqualityAsserter.java rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleInitializer.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleRecord1.java (100%) rename configlib-core/src/{test => testFixtures}/java/de/exlll/configlib/configurations/ExampleRecord2.java (100%) create mode 100644 configlib-yaml/build.gradle.kts rename {configlib-core => configlib-yaml}/src/main/java/de/exlll/configlib/YamlConfigurationProperties.java (100%) rename {configlib-core => configlib-yaml}/src/main/java/de/exlll/configlib/YamlConfigurationStore.java (100%) rename configlib-core/src/main/java/de/exlll/configlib/Configurations.java => configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurations.java (87%) create mode 100644 configlib-yaml/src/test/java/de/exlll/configlib/ExampleConfigurationYamlTests.java rename {configlib-core => configlib-yaml}/src/test/java/de/exlll/configlib/YamlConfigurationPropertiesTest.java (100%) rename {configlib-core => configlib-yaml}/src/test/java/de/exlll/configlib/YamlConfigurationStoreTest.java (100%) rename configlib-core/src/test/java/de/exlll/configlib/ConfigurationsTest.java => configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationsTest.java (83%) rename {configlib-core => configlib-yaml}/src/test/java/de/exlll/configlib/YamlFileWriterTest.java (100%) diff --git a/README.md b/README.md index 2cd356a..19f1aa6 100644 --- a/README.md +++ b/README.md @@ -81,16 +81,16 @@ public final class Example { var config = new UserConfiguration(); // Save a new instance to the configuration file - Configurations.saveYamlConfiguration(configFile, UserConfiguration.class, config); + YamlConfigurations.saveConfiguration(configFile, UserConfiguration.class, config); // Load a new instance from the configuration file - config = Configurations.loadYamlConfiguration(configFile, UserConfiguration.class); + config = YamlConfigurations.loadConfiguration(configFile, UserConfiguration.class); System.out.println(config.admin.username); System.out.println(config.blockedUsers); // Modify and save the configuration file config.blockedUsers.add(new User("user3", "pass3")); - Configurations.saveYamlConfiguration(configFile, UserConfiguration.class, config); + YamlConfigurations.saveConfiguration(configFile, UserConfiguration.class, config); } } ``` @@ -225,11 +225,14 @@ public final class UnsupportedTypes { There are two ways to load and save configurations. Which way you choose depends on your liking. Both ways have three methods in common: -* `save` saves a configuration to a file -* `load` creates a new configuration instance and populates it with values taken from a file -* `update` is a combination of `load` and `save` and the method you'd usually want to use: it takes - care of creating the configuration file if it does not exist and otherwise updates it to reflect - changes to (the fields or components of) the configuration type. +* The `save` method saves a configuration to a file. The file is created if it does not exist and + is overwritten otherwise. +* The `load` method creates a new configuration instance and populates it with values taken from a + file. For classes, the no-args constructor is used to create a new instance. For records, the + canonical constructor is called. +* The `update` method is a combination of `load` and `save` and the method you'd usually want to + use: it takes care of creating the configuration file if it does not exist and otherwise updates + it to reflect changes to (the fields or components of) the configuration type.
Example of update behavior when configuration file exists @@ -288,14 +291,16 @@ Config config2 = store.update(configurationFile); #### Way 2 -The second way is to use the static methods from the `Configurations` class. +The second way is to use the static methods from the `YamlConfigurations` class. ```java -Config config1 = Configurations.loadYamlConfiguration(configurationFile, Config.class); -Configurations.saveYamlConfiguration(configurationFile, Config.class, config1); -Config config2 = Configurations.updateYamlConfiguration(configurationFile, Config.class); +Config config1 = YamlConfigurations.loadConfiguration(configurationFile, Config.class); +YamlConfigurations.saveConfiguration(configurationFile, Config.class, config1); +Config config2 = YamlConfigurations.updateConfiguration(configurationFile, Config.class); ``` +
+ Each of these methods has two additional overloads: One that takes a properties object and another that lets you configure a properties object builder. For example, the overloads for the `loadYamlConfiguration` method are: @@ -306,16 +311,26 @@ YamlConfigurationProperties properties = YamlConfigurationProperties.newBuilder( .inputNulls(true) .outputNulls(false) .build(); -Config c1 = Configurations.loadYamlConfiguration(configurationFile, Config.class, properties); +Config c1 = YamlConfigurations.loadConfiguration(configurationFile, Config.class, properties); // overload 2 -Config c2 = Configurations.loadYamlConfiguration( +Config c2 = YamlConfigurations.loadConfiguration( configurationFile, Config.class, builder -> builder.inputNulls(true).outputNulls(false) ); ``` +All three methods can also be passed a Java record instead of a class. Because you cannot provide +default values for records, the `update` method also has an additional variant which takes a default +configuration: + +```java +record User(String name, String email) {} +YamlConfigurationStore store = new YamlConfigurationStore<>(User.class, properties); +User user = store.update(configurationFile, new User("John Doe", "john@doe.com")); +``` + ### Configuration properties Instances of the `ConfigurationProperties` class allow customization of how configurations are @@ -339,7 +354,7 @@ YamlConfigurationProperties properties = ConfigLib.BUKKIT_DEFAULT_PROPERTIES.toB .build(); ``` -To get access to this object, you have to import `configlib-paper` instead of `configlib-core` as +To get access to this object, you have to import `configlib-paper` instead of `configlib-yaml` as described in the [Import](#import) section. ### Comments @@ -348,6 +363,11 @@ The fields or components of a configuration can be annotated with the `@Comment` annotation takes an array of strings. Each of these strings is written onto a new line as a comment. Empty strings are written as newlines. +If a configuration type _C_ that defines comments is used (as a field or component) within another +configuration type, the comments of _C_ are written with the proper indentation. However, if +instances of _C_ are stored inside a collection, their comments are not printed when the collection +is written. + Serializing the following configuration as YAML ... ```java @@ -368,10 +388,25 @@ public final class ExampleConfiguration { commentedField: commented field ``` -If a configuration type _C_ that defines comments is used (as a field or component) within another -configuration type, the comments of _C_ are written with the proper indentation. However, if -instances of _C_ are stored inside a collection, their comments are not printed when the collection -is written. +Similarly, if you define the following record configuration and save it ... + +```java +record User(@Comment("The name") String name, @Comment("The address") Address address) {} +record Address(@Comment("The street") String street) {} + +User user = new User("John Doe", new Address("10 Downing St")); +``` + +... you get: + +```yaml +# The name +name: John Doe +# The address +address: + # The street + street: 10 Downing St +``` ### Subclassing @@ -498,13 +533,13 @@ instances of `B` (or some other subclass of `A`) in it. #### Custom serializers -If you want to add support for a type is not a record or whose class is not annotated +If you want to add support for a type that is not a record or whose class is not annotated with `@Configuration`, you can register a custom serializer. Serializers are instances of the `de.exlll.configlib.Serializer` interface. When implementing that interface you have to make sure that you convert your source type into one of the valid target types listed in the table above. The serializer then has to be registered through a `ConfigurationProperties` object. -The following `Serializer` serializes instances of `java.awt.Point` into strings. +The following `Serializer` serializes instances of `java.awt.Point` into strings and vice versa. ```java public final class PointSerializer implements Serializer { @@ -565,6 +600,25 @@ public final class RecursiveTypDefinitions {
+## Project structure + +This project contains three classes of modules: + +* The `configlib-core` module contains most of the logic of this library. In it, you can find (among + other things), the object mapper that converts configuration instances to maps (and vice versa), + most serializers, and the classes responsible for the extraction of comments. It does not + contain anything Minecraft related. +* The `configlib-yaml` module contains the classes that can save configuration instances as YAML + files and instantiate new instances from such files. This module does not contain anything + Minecraft related, either. +* The `configlib-paper`, `configlib-velocity`, and `configlib-waterfall` modules contain basic + plugins that are used to conveniently load this library. These three modules shade the `-core` + module, the `-yaml` module, and the YAML parser when the `shadowJar` task is executed. The shaded + jar files are released on the [releases page](https://github.com/Exlll/ConfigLib/releases). + * The `configlib-paper` module additionally contains the `ConfigLib.BUKKIT_DEFAULT_PROPERTIES` + object which adds support for the serialization of Bukkit classes like `ItemStack` as + described [here](#support-for-bukkit-classes-like-itemstack). + ## Import **INFO:** I'm currently looking for an easier way for you to import this library that does not @@ -572,8 +626,8 @@ require authentication with GitHub. Please check this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have authentication problems. To use this library, import it into your project with either Maven or Gradle as shown in the two -sections below. This library has additional dependencies (namely, a YAML parser) which are not -included in the artifact you import. +examples below. This library has additional dependencies (namely, a YAML parser) which are not +exposed by the artifact you import. This repository provides plugin versions of this library which bundle all its dependencies, so you don't have to worry about them. Also, these versions make it easier for you to update this library @@ -581,16 +635,16 @@ if you have written multiple plugins that use it. The plugin versions can be downloaded from the [releases page](https://github.com/Exlll/ConfigLib/releases) where you can identify them by -their `-paper-`, `-waterfall-`, and `-velocity-` infix and `-all` suffix. Other than that, the -plugin versions currently don't add any additional functionality. If you use these versions, don't -forget to add them as a dependency in the `plugin.yml` (for Paper and Waterfall) or to the -dependencies array (for Velocity) of your own plugin. +their `-paper-`, `-waterfall-`, and `-velocity-` infix and `-all` suffix. Except for the `-paper-` +version, the other two plugin versions currently don't add any additional functionality. If you use +these versions, don't forget to add them as a dependency in the `plugin.yml` (for Paper and +Waterfall) or to the dependencies array (for Velocity) of your own plugin. -Alternatively, if you don't want to use an extra plugin, you can shade the `-core` version and the +Alternatively, if you don't want to use an extra plugin, you can shade the `-yaml` version with its YAML parser yourself. **NOTE:** If you want serialization support for Bukkit classes like `ItemStack`, -replace `configlib-core` with `configlib-paper` +replace `configlib-yaml` with `configlib-paper` (see [here](#support-for-bukkit-classes-like-itemstack)). #### Maven @@ -603,7 +657,7 @@ replace `configlib-core` with `configlib-paper` de.exlll - configlib-core + configlib-yaml 3.1.0 ``` @@ -613,13 +667,13 @@ replace `configlib-core` with `configlib-paper` ```groovy repositories { maven { url 'https://maven.pkg.github.com/Exlll/ConfigLib' } } -dependencies { implementation 'de.exlll:configlib-core:3.1.0' } +dependencies { implementation 'de.exlll:configlib-yaml:3.1.0' } ``` ```kotlin repositories { maven { url = uri("https://maven.pkg.github.com/Exlll/ConfigLib") } } -dependencies { implementation("de.exlll:configlib-core:3.1.0") } +dependencies { implementation("de.exlll:configlib-yaml:3.1.0") } ``` ## Future work diff --git a/buildSrc/src/main/kotlin/core-config.gradle.kts b/buildSrc/src/main/kotlin/core-config.gradle.kts new file mode 100644 index 0000000..eb05b34 --- /dev/null +++ b/buildSrc/src/main/kotlin/core-config.gradle.kts @@ -0,0 +1,72 @@ +plugins { + `java-library` + `java-test-fixtures` + `maven-publish` + idea +} + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + + withJavadocJar() + withSourcesJar() +} + +tasks.getByName("test") { + useJUnitPlatform() +} + +repositories { + mavenCentral() + maven(url = "https://papermc.io/repo/repository/maven-public/") +} + +dependencies { + testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.8.2") + testFixturesApi("org.junit.jupiter:junit-jupiter-params:5.8.2") + testFixturesApi("org.junit.jupiter:junit-jupiter-engine:5.8.2") + testFixturesApi("org.junit.platform:junit-platform-runner:1.8.2") + testFixturesApi("org.junit.platform:junit-platform-suite-api:1.8.2") + testFixturesApi("org.mockito:mockito-inline:4.2.0") + testFixturesApi("org.mockito:mockito-junit-jupiter:4.2.0") + testFixturesApi("org.hamcrest:hamcrest-all:1.3") + testFixturesApi("com.google.jimfs:jimfs:1.2") +} + +publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/Exlll/ConfigLib") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } + + val moduleId = project.name.split("-")[1].toLowerCase() + val publicationName = moduleId.capitalize() + + publications { + register(publicationName) { + from(components["java"]) + } + } +} + +idea { + module { + isDownloadJavadoc = true + isDownloadSources = true + } +} + +val javaComponent = components["java"] as AdhocComponentWithVariants +javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { + skip() +} +javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { + skip() +} diff --git a/buildSrc/src/main/kotlin/java-config.gradle.kts b/buildSrc/src/main/kotlin/java-config.gradle.kts deleted file mode 100644 index c27fee3..0000000 --- a/buildSrc/src/main/kotlin/java-config.gradle.kts +++ /dev/null @@ -1,91 +0,0 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - -plugins { - java - idea - `maven-publish` - id("com.github.johnrengelman.shadow") -} - -val shade = configurations.create("shade") - -configurations { - compileClasspath.get().extendsFrom(shade) -} - -val shadowJarTask = tasks.getByName("shadowJar") { - configurations = listOf(shade) - relocate("org.snakeyaml.engine", "de.exlll.configlib.org.snakeyaml.engine") -} - -val coreProjectCheckTask = project(":configlib-core").tasks.getByName("check"); - -shadowJarTask.dependsOn( - tasks.named("check"), - coreProjectCheckTask -) - -tasks.getByName("build").dependsOn(coreProjectCheckTask) - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - - withJavadocJar() - withSourcesJar() -} - -tasks.getByName("test") { - useJUnitPlatform() -} - -repositories { - mavenCentral() - maven(url = "https://papermc.io/repo/repository/maven-public/") -} - -dependencies { - testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2") - testImplementation("org.junit.jupiter:junit-jupiter-params:5.8.2") - testImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.2") - testImplementation("org.junit.platform:junit-platform-runner:1.8.2") - testImplementation("org.junit.platform:junit-platform-suite-api:1.8.2") - testImplementation("org.mockito:mockito-inline:4.2.0") - testImplementation("org.mockito:mockito-junit-jupiter:4.2.0") - testImplementation("org.hamcrest:hamcrest-all:1.3") - testImplementation("com.google.jimfs:jimfs:1.2") -} - -val javaComponent = components["java"] as AdhocComponentWithVariants -javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { - skip() -} - -publishing { - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/Exlll/ConfigLib") - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - - val moduleId = project.name.split("-")[1].toLowerCase() - val publicationName = moduleId.capitalize() - - publications { - register(publicationName) { - from(components["java"]) - } - } -} - -idea { - module { - isDownloadJavadoc = true - isDownloadSources = true - } -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/libs-config.gradle.kts b/buildSrc/src/main/kotlin/libs-config.gradle.kts new file mode 100644 index 0000000..b77efb5 --- /dev/null +++ b/buildSrc/src/main/kotlin/libs-config.gradle.kts @@ -0,0 +1,12 @@ +plugins { + `java-library` +} + +dependencies { + api(project(":configlib-core")) + testImplementation(testFixtures(project(":configlib-core"))) +} + +tasks.compileJava { + dependsOn(project(":configlib-core").tasks.check) +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/plugins-config.gradle.kts b/buildSrc/src/main/kotlin/plugins-config.gradle.kts new file mode 100644 index 0000000..0016df1 --- /dev/null +++ b/buildSrc/src/main/kotlin/plugins-config.gradle.kts @@ -0,0 +1,28 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + +plugins { + `java-library` + id("com.github.johnrengelman.shadow") +} + +dependencies { + api(project(":configlib-yaml")) +} + +tasks.shadowJar { + relocate("org.snakeyaml.engine", "de.exlll.configlib.org.snakeyaml.engine") +} + +tasks.compileJava { + dependsOn( + project(":configlib-core").tasks.check, + project(":configlib-yaml").tasks.check + ) +} + +val javaComponent = components["java"] as AdhocComponentWithVariants +val shadowRuntimeElementsConfiguration = configurations["shadowRuntimeElements"] + +javaComponent.withVariantsFromConfiguration(shadowRuntimeElementsConfiguration) { + skip() +} \ No newline at end of file diff --git a/configlib-core/build.gradle.kts b/configlib-core/build.gradle.kts index 9e59321..71ff8c2 100644 --- a/configlib-core/build.gradle.kts +++ b/configlib-core/build.gradle.kts @@ -1,8 +1,7 @@ plugins { - `java-config` + `core-config` } dependencies { - shade("org.snakeyaml:snakeyaml-engine:2.3") implementation("org.snakeyaml:snakeyaml-engine:2.3") } \ No newline at end of file diff --git a/configlib-core/src/test/java/de/exlll/configlib/ExampleConfigurationTests.java b/configlib-core/src/test/java/de/exlll/configlib/ExampleConfigurationTests.java index 932dbe3..bdc2813 100644 --- a/configlib-core/src/test/java/de/exlll/configlib/ExampleConfigurationTests.java +++ b/configlib-core/src/test/java/de/exlll/configlib/ExampleConfigurationTests.java @@ -11,14 +11,10 @@ import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.Files; import java.nio.file.Path; -import java.util.*; -import java.util.function.Supplier; -import java.util.stream.Collectors; +import java.util.Map; import static de.exlll.configlib.configurations.ExampleConfigurationsSerialized.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static de.exlll.configlib.configurations.ExampleEqualityAsserter.*; import static org.junit.jupiter.api.Assertions.assertEquals; class ExampleConfigurationTests { @@ -258,535 +254,4 @@ class ExampleConfigurationTests { ExampleRecord2 deserialize2 = serializer.deserialize(EXAMPLE_RECORD2_2); assertExampleRecord2Equal(ExampleInitializer.EXAMPLE_RECORD2_2, deserialize2); } - - private static void assertExampleRecord1Equal( - ExampleRecord1 expected, - ExampleRecord1 actual - ) { - assertThat(actual.i(), is(expected.i())); - assertThat(actual.d(), is(expected.d())); - assertThat(actual.enm(), is(expected.enm())); - assertThat(actual.listUuid(), is(expected.listUuid())); - assertThat(actual.arrayArrayFloat(), is(expected.arrayArrayFloat())); - assertExampleConfigurationsB1Equal(expected.b1(), actual.b1()); - } - - private static void assertExampleRecord2Equal( - ExampleRecord2 expected, - ExampleRecord2 actual - ) { - assertEquals(expected.b(), actual.b()); - assertExampleRecord1Equal(expected.r1(), actual.r1()); - } - - private static void assertExampleConfigurationsNullsEqual( - ExampleConfigurationNulls expected, - ExampleConfigurationNulls actual - ) { - assertEquals(expected.getNullInteger(), actual.getNullInteger()); - assertEquals(expected.getNullString(), actual.getNullString()); - assertEquals(expected.getNullEnm(), actual.getNullEnm()); - assertEquals(expected.getNullB1(), actual.getNullB1()); - assertEquals(expected.getNullList(), actual.getNullList()); - assertEquals(expected.getNullArray(), actual.getNullArray()); - assertEquals(expected.getNullSet(), actual.getNullSet()); - assertEquals(expected.getNullMap(), actual.getNullMap()); - assertEquals(expected.getNullPoint(), actual.getNullPoint()); - assertEquals(expected.getListNullString(), actual.getListNullString()); - assertArrayEquals(expected.getArrayNullDouble(), actual.getArrayNullDouble()); - assertEquals(expected.getSetNullInteger(), actual.getSetNullInteger()); - assertEquals(expected.getMapNullEnmKey(), actual.getMapNullEnmKey()); - assertEquals(expected.getMapNullBigIntegerValue(), actual.getMapNullBigIntegerValue()); - assertEquals(expected, actual); - } - - private static void assertExampleConfigurationsA1Equal( - ExampleConfigurationA1 a1_1, - ExampleConfigurationA1 a1_2 - ) { - assertThat(ExampleConfigurationA1.getA1_staticFinalInt(), is(1)); - assertThat(ExampleConfigurationA1.getA1_staticInt(), is(2)); - - assertThat(a1_1.getA1_finalInt(), is(a1_2.getA1_finalInt())); - assertThat(a1_1.getA1_transientInt(), is(a1_2.getA1_transientInt())); - assertThat(a1_1.getA1_ignoredInt(), is(a1_2.getA1_ignoredInt())); - assertThat(a1_1.getA1_ignoredString(), is(a1_2.getA1_ignoredString())); - assertThat(a1_1.getA1_ignoredListString(), is(a1_2.getA1_ignoredListString())); - assertThat(a1_1.isA1_primBool(), is(a1_2.isA1_primBool())); - assertThat(a1_1.getA1_primChar(), is(a1_2.getA1_primChar())); - assertThat(a1_1.getA1_primByte(), is(a1_2.getA1_primByte())); - assertThat(a1_1.getA1_primShort(), is(a1_2.getA1_primShort())); - assertThat(a1_1.getA1_primInt(), is(a1_2.getA1_primInt())); - assertThat(a1_1.getA1_primLong(), is(a1_2.getA1_primLong())); - assertThat(a1_1.getA1_primFloat(), is(a1_2.getA1_primFloat())); - assertThat(a1_1.getA1_primDouble(), is(a1_2.getA1_primDouble())); - assertThat(a1_1.getA1_refBool(), is(a1_2.getA1_refBool())); - assertThat(a1_1.getA1_refChar(), is(a1_2.getA1_refChar())); - assertThat(a1_1.getA1_refByte(), is(a1_2.getA1_refByte())); - assertThat(a1_1.getA1_refShort(), is(a1_2.getA1_refShort())); - assertThat(a1_1.getA1_refInt(), is(a1_2.getA1_refInt())); - assertThat(a1_1.getA1_refLong(), is(a1_2.getA1_refLong())); - assertThat(a1_1.getA1_refFloat(), is(a1_2.getA1_refFloat())); - assertThat(a1_1.getA1_refDouble(), is(a1_2.getA1_refDouble())); - assertThat(a1_1.getA1_string(), is(a1_2.getA1_string())); - assertThat(a1_1.getA1_bigInteger(), is(a1_2.getA1_bigInteger())); - assertThat(a1_1.getA1_bigDecimal(), is(a1_2.getA1_bigDecimal())); - assertThat(a1_1.getA1_localDate(), is(a1_2.getA1_localDate())); - assertThat(a1_1.getA1_localTime(), is(a1_2.getA1_localTime())); - assertThat(a1_1.getA1_localDateTime(), is(a1_2.getA1_localDateTime())); - assertThat(a1_1.getA1_instant(), is(a1_2.getA1_instant())); - assertThat(a1_1.getA1_uuid(), is(a1_2.getA1_uuid())); - assertThat(a1_1.getA1_file(), is(a1_2.getA1_file())); - assertThat(a1_1.getA1_path(), is(a1_2.getA1_path())); - assertThat(a1_1.getA1_url(), is(a1_2.getA1_url())); - assertThat(a1_1.getA1_uri(), is(a1_2.getA1_uri())); - assertThat(a1_1.getA1_uuid(), is(a1_2.getA1_uuid())); - assertThat(a1_1.getA1_Enm(), is(a1_2.getA1_Enm())); - assertThat(a1_1.getA1_b1(), is(a1_2.getA1_b1())); - assertThat(a1_1.getA1_b2(), is(a1_2.getA1_b2())); - assertThat(a1_1.getA1_r1(), is(a1_2.getA1_r1())); - assertThat(a1_1.getA1_r2(), is(a1_2.getA1_r2())); - assertThat(a1_1.getA1_listBoolean(), is(a1_2.getA1_listBoolean())); - assertThat(a1_1.getA1_listChar(), is(a1_2.getA1_listChar())); - assertThat(a1_1.getA1_listByte(), is(a1_2.getA1_listByte())); - assertThat(a1_1.getA1_listShort(), is(a1_2.getA1_listShort())); - assertThat(a1_1.getA1_listInteger(), is(a1_2.getA1_listInteger())); - assertThat(a1_1.getA1_listLong(), is(a1_2.getA1_listLong())); - assertThat(a1_1.getA1_listFloat(), is(a1_2.getA1_listFloat())); - assertThat(a1_1.getA1_listDouble(), is(a1_2.getA1_listDouble())); - assertThat(a1_1.getA1_listString(), is(a1_2.getA1_listString())); - assertThat(a1_1.getA1_listBigInteger(), is(a1_2.getA1_listBigInteger())); - assertThat(a1_1.getA1_listBigDecimal(), is(a1_2.getA1_listBigDecimal())); - assertThat(a1_1.getA1_listLocalDate(), is(a1_2.getA1_listLocalDate())); - assertThat(a1_1.getA1_listLocalTime(), is(a1_2.getA1_listLocalTime())); - assertThat(a1_1.getA1_listLocalDateTime(), is(a1_2.getA1_listLocalDateTime())); - assertThat(a1_1.getA1_listInstant(), is(a1_2.getA1_listInstant())); - assertThat(a1_1.getA1_listUuid(), is(a1_2.getA1_listUuid())); - assertThat(a1_1.getA1_listFile(), is(a1_2.getA1_listFile())); - assertThat(a1_1.getA1_listPath(), is(a1_2.getA1_listPath())); - assertThat(a1_1.getA1_listUrl(), is(a1_2.getA1_listUrl())); - assertThat(a1_1.getA1_listUri(), is(a1_2.getA1_listUri())); - assertThat(a1_1.getA1_listEnm(), is(a1_2.getA1_listEnm())); - assertThat(a1_1.getA1_listB1(), is(a1_2.getA1_listB1())); - assertThat(a1_1.getA1_listB2(), is(a1_2.getA1_listB2())); - assertThat(a1_1.getA1_listR1(), is(a1_2.getA1_listR1())); - assertThat(a1_1.getA1_listR2(), is(a1_2.getA1_listR2())); - assertThat(a1_1.getA1_arrayPrimBoolean(), is(a1_2.getA1_arrayPrimBoolean())); - assertThat(a1_1.getA1_arrayPrimChar(), is(a1_2.getA1_arrayPrimChar())); - assertThat(a1_1.getA1_arrayPrimByte(), is(a1_2.getA1_arrayPrimByte())); - assertThat(a1_1.getA1_arrayPrimShort(), is(a1_2.getA1_arrayPrimShort())); - assertThat(a1_1.getA1_arrayPrimInteger(), is(a1_2.getA1_arrayPrimInteger())); - assertThat(a1_1.getA1_arrayPrimLong(), is(a1_2.getA1_arrayPrimLong())); - assertThat(a1_1.getA1_arrayPrimFloat(), is(a1_2.getA1_arrayPrimFloat())); - assertThat(a1_1.getA1_arrayPrimDouble(), is(a1_2.getA1_arrayPrimDouble())); - assertThat(a1_1.getA1_arrayBoolean(), is(a1_2.getA1_arrayBoolean())); - assertThat(a1_1.getA1_arrayChar(), is(a1_2.getA1_arrayChar())); - assertThat(a1_1.getA1_arrayByte(), is(a1_2.getA1_arrayByte())); - assertThat(a1_1.getA1_arrayShort(), is(a1_2.getA1_arrayShort())); - assertThat(a1_1.getA1_arrayInteger(), is(a1_2.getA1_arrayInteger())); - assertThat(a1_1.getA1_arrayLong(), is(a1_2.getA1_arrayLong())); - assertThat(a1_1.getA1_arrayFloat(), is(a1_2.getA1_arrayFloat())); - assertThat(a1_1.getA1_arrayDouble(), is(a1_2.getA1_arrayDouble())); - assertThat(a1_1.getA1_arrayString(), is(a1_2.getA1_arrayString())); - assertThat(a1_1.getA1_arrayBigInteger(), is(a1_2.getA1_arrayBigInteger())); - assertThat(a1_1.getA1_arrayBigDecimal(), is(a1_2.getA1_arrayBigDecimal())); - assertThat(a1_1.getA1_arrayLocalDate(), is(a1_2.getA1_arrayLocalDate())); - assertThat(a1_1.getA1_arrayLocalTime(), is(a1_2.getA1_arrayLocalTime())); - assertThat(a1_1.getA1_arrayLocalDateTime(), is(a1_2.getA1_arrayLocalDateTime())); - assertThat(a1_1.getA1_arrayUuid(), is(a1_2.getA1_arrayUuid())); - assertThat(a1_1.getA1_arrayEnm(), is(a1_2.getA1_arrayEnm())); - assertThat(a1_1.getA1_arrayB1(), is(a1_2.getA1_arrayB1())); - assertThat(a1_1.getA1_arrayB2(), is(a1_2.getA1_arrayB2())); - assertThat(a1_1.getA1_arrayR1(), is(a1_2.getA1_arrayR1())); - assertThat(a1_1.getA1_arrayR2(), is(a1_2.getA1_arrayR2())); - assertThat(a1_1.getA1_setBoolean(), is(a1_2.getA1_setBoolean())); - assertThat(a1_1.getA1_setChar(), is(a1_2.getA1_setChar())); - assertThat(a1_1.getA1_setByte(), is(a1_2.getA1_setByte())); - assertThat(a1_1.getA1_setShort(), is(a1_2.getA1_setShort())); - assertThat(a1_1.getA1_setInteger(), is(a1_2.getA1_setInteger())); - assertThat(a1_1.getA1_setLong(), is(a1_2.getA1_setLong())); - assertThat(a1_1.getA1_setFloat(), is(a1_2.getA1_setFloat())); - assertThat(a1_1.getA1_setDouble(), is(a1_2.getA1_setDouble())); - assertThat(a1_1.getA1_setString(), is(a1_2.getA1_setString())); - assertThat(a1_1.getA1_setBigInteger(), is(a1_2.getA1_setBigInteger())); - assertThat(a1_1.getA1_setBigDecimal(), is(a1_2.getA1_setBigDecimal())); - assertThat(a1_1.getA1_setLocalDate(), is(a1_2.getA1_setLocalDate())); - assertThat(a1_1.getA1_setLocalTime(), is(a1_2.getA1_setLocalTime())); - assertThat(a1_1.getA1_setLocalDateTime(), is(a1_2.getA1_setLocalDateTime())); - assertThat(a1_1.getA1_setUuid(), is(a1_2.getA1_setUuid())); - assertThat(a1_1.getA1_setEnm(), is(a1_2.getA1_setEnm())); - assertThat(a1_1.getA1_setB1(), is(a1_2.getA1_setB1())); - assertThat(a1_1.getA1_setB2(), is(a1_2.getA1_setB2())); - assertThat(a1_1.getA1_setR1(), is(a1_2.getA1_setR1())); - assertThat(a1_1.getA1_setR2(), is(a1_2.getA1_setR2())); - assertThat(a1_1.getA1_mapBooleanBoolean(), is(a1_2.getA1_mapBooleanBoolean())); - assertThat(a1_1.getA1_mapCharChar(), is(a1_2.getA1_mapCharChar())); - assertThat(a1_1.getA1_mapByteByte(), is(a1_2.getA1_mapByteByte())); - assertThat(a1_1.getA1_mapShortShort(), is(a1_2.getA1_mapShortShort())); - assertThat(a1_1.getA1_mapIntegerInteger(), is(a1_2.getA1_mapIntegerInteger())); - assertThat(a1_1.getA1_mapLongLong(), is(a1_2.getA1_mapLongLong())); - assertThat(a1_1.getA1_mapFloatFloat(), is(a1_2.getA1_mapFloatFloat())); - assertThat(a1_1.getA1_mapDoubleDouble(), is(a1_2.getA1_mapDoubleDouble())); - assertThat(a1_1.getA1_mapStringString(), is(a1_2.getA1_mapStringString())); - assertThat(a1_1.getA1_mapBigIntegerBigInteger(), is(a1_2.getA1_mapBigIntegerBigInteger())); - assertThat(a1_1.getA1_mapBigDecimalBigDecimal(), is(a1_2.getA1_mapBigDecimalBigDecimal())); - assertThat(a1_1.getA1_mapLocalDateLocalDate(), is(a1_2.getA1_mapLocalDateLocalDate())); - assertThat(a1_1.getA1_mapLocalTimeLocalTime(), is(a1_2.getA1_mapLocalTimeLocalTime())); - assertThat(a1_1.getA1_mapLocalDateTimeLocalDateTime(), is(a1_2.getA1_mapLocalDateTimeLocalDateTime())); - assertThat(a1_1.getA1_mapUuidUuid(), is(a1_2.getA1_mapUuidUuid())); - assertThat(a1_1.getA1_mapEnmEnm(), is(a1_2.getA1_mapEnmEnm())); - assertThat(a1_1.getA1_mapIntegerB1(), is(a1_2.getA1_mapIntegerB1())); - assertThat(a1_1.getA1_mapEnmB2(), is(a1_2.getA1_mapEnmB2())); - assertThat(a1_1.getA1_mapStringR1(), is(a1_2.getA1_mapStringR1())); - assertThat(a1_1.getA1_mapStringR2(), is(a1_2.getA1_mapStringR2())); - assertThat(a1_1.getA1_listEmpty(), is(a1_2.getA1_listEmpty())); - assertThat(a1_1.getA1_arrayEmpty(), is(a1_2.getA1_arrayEmpty())); - assertThat(a1_1.getA1_setEmpty(), is(a1_2.getA1_setEmpty())); - assertThat(a1_1.getA1_mapEmpty(), is(a1_2.getA1_mapEmpty())); - assertThat(a1_1.getA1_listListByte(), is(a1_2.getA1_listListByte())); - assertDeepEquals(a1_1.getA1_listArrayFloat(), a1_2.getA1_listArrayFloat(), ArrayList::new); - assertThat(a1_1.getA1_listSetString(), is(a1_2.getA1_listSetString())); - assertThat(a1_1.getA1_listMapEnmLocalDate(), is(a1_2.getA1_listMapEnmLocalDate())); - assertThat(a1_1.getA1_setSetShort(), is(a1_2.getA1_setSetShort())); - assertDeepEquals(a1_1.getA1_setArrayDouble(), a1_2.getA1_setArrayDouble(), HashSet::new); - assertThat(a1_1.getA1_setListString(), is(a1_2.getA1_setListString())); - assertThat(a1_1.getA1_setMapEnmLocalTime(), is(a1_2.getA1_setMapEnmLocalTime())); - assertThat(a1_1.getA1_mapIntegerMapLongBoolean(), is(a1_2.getA1_mapIntegerMapLongBoolean())); - assertThat(a1_1.getA1_mapStringListB1(), is(a1_2.getA1_mapStringListB1())); - assertEquals(a1_2.getA1_mapBigIntegerArrayBigDecimal().keySet(), a1_1.getA1_mapBigIntegerArrayBigDecimal().keySet()); - assertDeepEquals(a1_2.getA1_mapBigIntegerArrayBigDecimal().values(), a1_2.getA1_mapBigIntegerArrayBigDecimal().values(), HashSet::new); - assertThat(a1_1.getA1_mapEnmSetB2(), is(a1_2.getA1_mapEnmSetB2())); - assertThat(a1_1.getA1_mapIntegerListMapShortSetB2(), is(a1_2.getA1_mapIntegerListMapShortSetB2())); - assertThat(a1_1.getA1_arrayArrayPrimBoolean(), is(a1_2.getA1_arrayArrayPrimBoolean())); - assertThat(a1_1.getA1_arrayArrayPrimChar(), is(a1_2.getA1_arrayArrayPrimChar())); - assertThat(a1_1.getA1_arrayArrayPrimByte(), is(a1_2.getA1_arrayArrayPrimByte())); - assertThat(a1_1.getA1_arrayArrayPrimShort(), is(a1_2.getA1_arrayArrayPrimShort())); - assertThat(a1_1.getA1_arrayArrayPrimInteger(), is(a1_2.getA1_arrayArrayPrimInteger())); - assertThat(a1_1.getA1_arrayArrayPrimLong(), is(a1_2.getA1_arrayArrayPrimLong())); - assertThat(a1_1.getA1_arrayArrayPrimFloat(), is(a1_2.getA1_arrayArrayPrimFloat())); - assertThat(a1_1.getA1_arrayArrayPrimDouble(), is(a1_2.getA1_arrayArrayPrimDouble())); - assertThat(a1_1.getA1_arrayArrayBoolean(), is(a1_2.getA1_arrayArrayBoolean())); - assertThat(a1_1.getA1_arrayArrayChar(), is(a1_2.getA1_arrayArrayChar())); - assertThat(a1_1.getA1_arrayArrayByte(), is(a1_2.getA1_arrayArrayByte())); - assertThat(a1_1.getA1_arrayArrayShort(), is(a1_2.getA1_arrayArrayShort())); - assertThat(a1_1.getA1_arrayArrayInteger(), is(a1_2.getA1_arrayArrayInteger())); - assertThat(a1_1.getA1_arrayArrayLong(), is(a1_2.getA1_arrayArrayLong())); - assertThat(a1_1.getA1_arrayArrayFloat(), is(a1_2.getA1_arrayArrayFloat())); - assertThat(a1_1.getA1_arrayArrayDouble(), is(a1_2.getA1_arrayArrayDouble())); - assertThat(a1_1.getA1_arrayArrayString(), is(a1_2.getA1_arrayArrayString())); - assertThat(a1_1.getA1_arrayArrayBigInteger(), is(a1_2.getA1_arrayArrayBigInteger())); - assertThat(a1_1.getA1_arrayArrayBigDecimal(), is(a1_2.getA1_arrayArrayBigDecimal())); - assertThat(a1_1.getA1_arrayArrayLocalDate(), is(a1_2.getA1_arrayArrayLocalDate())); - assertThat(a1_1.getA1_arrayArrayLocalTime(), is(a1_2.getA1_arrayArrayLocalTime())); - assertThat(a1_1.getA1_arrayArrayLocalDateTime(), is(a1_2.getA1_arrayArrayLocalDateTime())); - assertThat(a1_1.getA1_arrayArrayUuid(), is(a1_2.getA1_arrayArrayUuid())); - assertThat(a1_1.getA1_arrayArrayEnm(), is(a1_2.getA1_arrayArrayEnm())); - assertThat(a1_1.getA1_arrayArrayB1(), is(a1_2.getA1_arrayArrayB1())); - assertThat(a1_1.getA1_arrayArrayB2(), is(a1_2.getA1_arrayArrayB2())); - assertThat(a1_1.getA1_arrayArrayR1(), is(a1_2.getA1_arrayArrayR1())); - assertThat(a1_1.getA1_arrayArrayR2(), is(a1_2.getA1_arrayArrayR2())); - assertThat(a1_1.getA1_point(), is(a1_2.getA1_point())); - assertThat(a1_1.getA1_listPoint(), is(a1_2.getA1_listPoint())); - assertThat(a1_1.getA1_arrayPoint(), is(a1_2.getA1_arrayPoint())); - assertThat(a1_1.getA1_setPoint(), is(a1_2.getA1_setPoint())); - assertThat(a1_1.getA1_mapEnmListPoint(), is(a1_2.getA1_mapEnmListPoint())); - } - - static void assertExampleConfigurationsA2Equal( - ExampleConfigurationA2 a2_1, - ExampleConfigurationA2 a2_2 - ) { - assertThat(ExampleConfigurationA2.getA1_staticFinalInt(), is(1)); - assertThat(ExampleConfigurationA2.getA1_staticInt(), is(2)); - - assertExampleConfigurationsA1Equal(a2_1, a2_2); - - assertThat(a2_1.getA2_finalInt(), is(a2_2.getA2_finalInt())); - assertThat(a2_1.getA2_transientInt(), is(a2_2.getA2_transientInt())); - assertThat(a2_1.getA2_ignoredInt(), is(a2_2.getA2_ignoredInt())); - assertThat(a2_1.getA2_ignoredString(), is(a2_2.getA2_ignoredString())); - assertThat(a2_1.getA2_ignoredListString(), is(a2_2.getA2_ignoredListString())); - assertThat(a2_1.isA2_primBool(), is(a2_2.isA2_primBool())); - assertThat(a2_1.getA2_primChar(), is(a2_2.getA2_primChar())); - assertThat(a2_1.getA2_primByte(), is(a2_2.getA2_primByte())); - assertThat(a2_1.getA2_primShort(), is(a2_2.getA2_primShort())); - assertThat(a2_1.getA2_primInt(), is(a2_2.getA2_primInt())); - assertThat(a2_1.getA2_primLong(), is(a2_2.getA2_primLong())); - assertThat(a2_1.getA2_primFloat(), is(a2_2.getA2_primFloat())); - assertThat(a2_1.getA2_primDouble(), is(a2_2.getA2_primDouble())); - assertThat(a2_1.getA2_refBool(), is(a2_2.getA2_refBool())); - assertThat(a2_1.getA2_refChar(), is(a2_2.getA2_refChar())); - assertThat(a2_1.getA2_refByte(), is(a2_2.getA2_refByte())); - assertThat(a2_1.getA2_refShort(), is(a2_2.getA2_refShort())); - assertThat(a2_1.getA2_refInt(), is(a2_2.getA2_refInt())); - assertThat(a2_1.getA2_refLong(), is(a2_2.getA2_refLong())); - assertThat(a2_1.getA2_refFloat(), is(a2_2.getA2_refFloat())); - assertThat(a2_1.getA2_refDouble(), is(a2_2.getA2_refDouble())); - assertThat(a2_1.getA2_string(), is(a2_2.getA2_string())); - assertThat(a2_1.getA2_bigInteger(), is(a2_2.getA2_bigInteger())); - assertThat(a2_1.getA2_bigDecimal(), is(a2_2.getA2_bigDecimal())); - assertThat(a2_1.getA2_localDate(), is(a2_2.getA2_localDate())); - assertThat(a2_1.getA2_localTime(), is(a2_2.getA2_localTime())); - assertThat(a2_1.getA2_localDateTime(), is(a2_2.getA2_localDateTime())); - assertThat(a2_1.getA2_instant(), is(a2_2.getA2_instant())); - assertThat(a2_1.getA2_uuid(), is(a2_2.getA2_uuid())); - assertThat(a2_1.getA2_file(), is(a2_2.getA2_file())); - assertThat(a2_1.getA2_path(), is(a2_2.getA2_path())); - assertThat(a2_1.getA2_url(), is(a2_2.getA2_url())); - assertThat(a2_1.getA2_uri(), is(a2_2.getA2_uri())); - assertThat(a2_1.getA2_Enm(), is(a2_2.getA2_Enm())); - assertThat(a2_1.getA2_b1(), is(a2_2.getA2_b1())); - assertThat(a2_1.getA2_b2(), is(a2_2.getA2_b2())); - assertThat(a2_1.getA2_r1(), is(a2_2.getA2_r1())); - assertThat(a2_1.getA2_r2(), is(a2_2.getA2_r2())); - assertThat(a2_1.getA2_listBoolean(), is(a2_2.getA2_listBoolean())); - assertThat(a2_1.getA2_listChar(), is(a2_2.getA2_listChar())); - assertThat(a2_1.getA2_listByte(), is(a2_2.getA2_listByte())); - assertThat(a2_1.getA2_listShort(), is(a2_2.getA2_listShort())); - assertThat(a2_1.getA2_listInteger(), is(a2_2.getA2_listInteger())); - assertThat(a2_1.getA2_listLong(), is(a2_2.getA2_listLong())); - assertThat(a2_1.getA2_listFloat(), is(a2_2.getA2_listFloat())); - assertThat(a2_1.getA2_listDouble(), is(a2_2.getA2_listDouble())); - assertThat(a2_1.getA2_listString(), is(a2_2.getA2_listString())); - assertThat(a2_1.getA2_listBigInteger(), is(a2_2.getA2_listBigInteger())); - assertThat(a2_1.getA2_listBigDecimal(), is(a2_2.getA2_listBigDecimal())); - assertThat(a2_1.getA2_listLocalDate(), is(a2_2.getA2_listLocalDate())); - assertThat(a2_1.getA2_listLocalTime(), is(a2_2.getA2_listLocalTime())); - assertThat(a2_1.getA2_listLocalDateTime(), is(a2_2.getA2_listLocalDateTime())); - assertThat(a2_1.getA2_listInstant(), is(a2_2.getA2_listInstant())); - assertThat(a2_1.getA2_listUuid(), is(a2_2.getA2_listUuid())); - assertThat(a2_1.getA2_listFile(), is(a2_2.getA2_listFile())); - assertThat(a2_1.getA2_listPath(), is(a2_2.getA2_listPath())); - assertThat(a2_1.getA2_listUrl(), is(a2_2.getA2_listUrl())); - assertThat(a2_1.getA2_listUri(), is(a2_2.getA2_listUri())); - assertThat(a2_1.getA2_listEnm(), is(a2_2.getA2_listEnm())); - assertThat(a2_1.getA2_listB1(), is(a2_2.getA2_listB1())); - assertThat(a2_1.getA2_listB2(), is(a2_2.getA2_listB2())); - assertThat(a2_1.getA2_listR1(), is(a2_2.getA2_listR1())); - assertThat(a2_1.getA2_listR2(), is(a2_2.getA2_listR2())); - assertThat(a2_1.getA2_arrayPrimBoolean(), is(a2_2.getA2_arrayPrimBoolean())); - assertThat(a2_1.getA2_arrayPrimChar(), is(a2_2.getA2_arrayPrimChar())); - assertThat(a2_1.getA2_arrayPrimByte(), is(a2_2.getA2_arrayPrimByte())); - assertThat(a2_1.getA2_arrayPrimShort(), is(a2_2.getA2_arrayPrimShort())); - assertThat(a2_1.getA2_arrayPrimInteger(), is(a2_2.getA2_arrayPrimInteger())); - assertThat(a2_1.getA2_arrayPrimLong(), is(a2_2.getA2_arrayPrimLong())); - assertThat(a2_1.getA2_arrayPrimFloat(), is(a2_2.getA2_arrayPrimFloat())); - assertThat(a2_1.getA2_arrayPrimDouble(), is(a2_2.getA2_arrayPrimDouble())); - assertThat(a2_1.getA2_arrayBoolean(), is(a2_2.getA2_arrayBoolean())); - assertThat(a2_1.getA2_arrayChar(), is(a2_2.getA2_arrayChar())); - assertThat(a2_1.getA2_arrayByte(), is(a2_2.getA2_arrayByte())); - assertThat(a2_1.getA2_arrayShort(), is(a2_2.getA2_arrayShort())); - assertThat(a2_1.getA2_arrayInteger(), is(a2_2.getA2_arrayInteger())); - assertThat(a2_1.getA2_arrayLong(), is(a2_2.getA2_arrayLong())); - assertThat(a2_1.getA2_arrayFloat(), is(a2_2.getA2_arrayFloat())); - assertThat(a2_1.getA2_arrayDouble(), is(a2_2.getA2_arrayDouble())); - assertThat(a2_1.getA2_arrayString(), is(a2_2.getA2_arrayString())); - assertThat(a2_1.getA2_arrayBigInteger(), is(a2_2.getA2_arrayBigInteger())); - assertThat(a2_1.getA2_arrayBigDecimal(), is(a2_2.getA2_arrayBigDecimal())); - assertThat(a2_1.getA2_arrayLocalDate(), is(a2_2.getA2_arrayLocalDate())); - assertThat(a2_1.getA2_arrayLocalTime(), is(a2_2.getA2_arrayLocalTime())); - assertThat(a2_1.getA2_arrayLocalDateTime(), is(a2_2.getA2_arrayLocalDateTime())); - assertThat(a2_1.getA2_arrayUuid(), is(a2_2.getA2_arrayUuid())); - assertThat(a2_1.getA2_arrayEnm(), is(a2_2.getA2_arrayEnm())); - assertThat(a2_1.getA2_arrayB1(), is(a2_2.getA2_arrayB1())); - assertThat(a2_1.getA2_arrayB2(), is(a2_2.getA2_arrayB2())); - assertThat(a2_1.getA2_arrayR1(), is(a2_2.getA2_arrayR1())); - assertThat(a2_1.getA2_arrayR2(), is(a2_2.getA2_arrayR2())); - assertThat(a2_1.getA2_setBoolean(), is(a2_2.getA2_setBoolean())); - assertThat(a2_1.getA2_setChar(), is(a2_2.getA2_setChar())); - assertThat(a2_1.getA2_setByte(), is(a2_2.getA2_setByte())); - assertThat(a2_1.getA2_setShort(), is(a2_2.getA2_setShort())); - assertThat(a2_1.getA2_setInteger(), is(a2_2.getA2_setInteger())); - assertThat(a2_1.getA2_setLong(), is(a2_2.getA2_setLong())); - assertThat(a2_1.getA2_setFloat(), is(a2_2.getA2_setFloat())); - assertThat(a2_1.getA2_setDouble(), is(a2_2.getA2_setDouble())); - assertThat(a2_1.getA2_setString(), is(a2_2.getA2_setString())); - assertThat(a2_1.getA2_setBigInteger(), is(a2_2.getA2_setBigInteger())); - assertThat(a2_1.getA2_setBigDecimal(), is(a2_2.getA2_setBigDecimal())); - assertThat(a2_1.getA2_setLocalDate(), is(a2_2.getA2_setLocalDate())); - assertThat(a2_1.getA2_setLocalTime(), is(a2_2.getA2_setLocalTime())); - assertThat(a2_1.getA2_setLocalDateTime(), is(a2_2.getA2_setLocalDateTime())); - assertThat(a2_1.getA2_setUuid(), is(a2_2.getA2_setUuid())); - assertThat(a2_1.getA2_setEnm(), is(a2_2.getA2_setEnm())); - assertThat(a2_1.getA2_setB1(), is(a2_2.getA2_setB1())); - assertThat(a2_1.getA2_setB2(), is(a2_2.getA2_setB2())); - assertThat(a2_1.getA2_setR1(), is(a2_2.getA2_setR1())); - assertThat(a2_1.getA2_setR2(), is(a2_2.getA2_setR2())); - assertThat(a2_1.getA2_mapBooleanBoolean(), is(a2_2.getA2_mapBooleanBoolean())); - assertThat(a2_1.getA2_mapCharChar(), is(a2_2.getA2_mapCharChar())); - assertThat(a2_1.getA2_mapByteByte(), is(a2_2.getA2_mapByteByte())); - assertThat(a2_1.getA2_mapShortShort(), is(a2_2.getA2_mapShortShort())); - assertThat(a2_1.getA2_mapIntegerInteger(), is(a2_2.getA2_mapIntegerInteger())); - assertThat(a2_1.getA2_mapLongLong(), is(a2_2.getA2_mapLongLong())); - assertThat(a2_1.getA2_mapFloatFloat(), is(a2_2.getA2_mapFloatFloat())); - assertThat(a2_1.getA2_mapDoubleDouble(), is(a2_2.getA2_mapDoubleDouble())); - assertThat(a2_1.getA2_mapStringString(), is(a2_2.getA2_mapStringString())); - assertThat(a2_1.getA2_mapBigIntegerBigInteger(), is(a2_2.getA2_mapBigIntegerBigInteger())); - assertThat(a2_1.getA2_mapBigDecimalBigDecimal(), is(a2_2.getA2_mapBigDecimalBigDecimal())); - assertThat(a2_1.getA2_mapLocalDateLocalDate(), is(a2_2.getA2_mapLocalDateLocalDate())); - assertThat(a2_1.getA2_mapLocalTimeLocalTime(), is(a2_2.getA2_mapLocalTimeLocalTime())); - assertThat(a2_1.getA2_mapLocalDateTimeLocalDateTime(), is(a2_2.getA2_mapLocalDateTimeLocalDateTime())); - assertThat(a2_1.getA2_mapUuidUuid(), is(a2_2.getA2_mapUuidUuid())); - assertThat(a2_1.getA2_mapEnmEnm(), is(a2_2.getA2_mapEnmEnm())); - assertThat(a2_1.getA2_mapIntegerB1(), is(a2_2.getA2_mapIntegerB1())); - assertThat(a2_1.getA2_mapEnmB2(), is(a2_2.getA2_mapEnmB2())); - assertThat(a2_1.getA2_mapStringR1(), is(a2_2.getA2_mapStringR1())); - assertThat(a2_1.getA2_mapStringR2(), is(a2_2.getA2_mapStringR2())); - assertThat(a2_1.getA2_listEmpty(), is(a2_2.getA2_listEmpty())); - assertThat(a2_1.getA2_arrayEmpty(), is(a2_2.getA2_arrayEmpty())); - assertThat(a2_1.getA2_setEmpty(), is(a2_2.getA2_setEmpty())); - assertThat(a2_1.getA2_mapEmpty(), is(a2_2.getA2_mapEmpty())); - assertThat(a2_1.getA2_listListByte(), is(a2_2.getA2_listListByte())); - assertDeepEquals(a2_1.getA2_listArrayFloat(), a2_2.getA2_listArrayFloat(), ArrayList::new); - assertThat(a2_1.getA2_listSetString(), is(a2_2.getA2_listSetString())); - assertThat(a2_1.getA2_listMapEnmLocalDate(), is(a2_2.getA2_listMapEnmLocalDate())); - assertThat(a2_1.getA2_setSetShort(), is(a2_2.getA2_setSetShort())); - assertDeepEquals(a2_1.getA2_setArrayDouble(), a2_2.getA2_setArrayDouble(), HashSet::new); - assertThat(a2_1.getA2_setListString(), is(a2_2.getA2_setListString())); - assertThat(a2_1.getA2_setMapEnmLocalTime(), is(a2_2.getA2_setMapEnmLocalTime())); - assertThat(a2_1.getA2_mapIntegerMapLongBoolean(), is(a2_2.getA2_mapIntegerMapLongBoolean())); - assertThat(a2_1.getA2_mapStringListB1(), is(a2_2.getA2_mapStringListB1())); - assertEquals(a2_2.getA2_mapBigIntegerArrayBigDecimal().keySet(), a2_1.getA2_mapBigIntegerArrayBigDecimal().keySet()); - assertDeepEquals(a2_2.getA2_mapBigIntegerArrayBigDecimal().values(), a2_2.getA2_mapBigIntegerArrayBigDecimal().values(), HashSet::new); - assertThat(a2_1.getA2_mapEnmSetB2(), is(a2_2.getA2_mapEnmSetB2())); - assertThat(a2_1.getA2_mapIntegerListMapShortSetB2(), is(a2_2.getA2_mapIntegerListMapShortSetB2())); - assertThat(a2_1.getA2_arrayArrayPrimBoolean(), is(a2_2.getA2_arrayArrayPrimBoolean())); - assertThat(a2_1.getA2_arrayArrayPrimChar(), is(a2_2.getA2_arrayArrayPrimChar())); - assertThat(a2_1.getA2_arrayArrayPrimByte(), is(a2_2.getA2_arrayArrayPrimByte())); - assertThat(a2_1.getA2_arrayArrayPrimShort(), is(a2_2.getA2_arrayArrayPrimShort())); - assertThat(a2_1.getA2_arrayArrayPrimInteger(), is(a2_2.getA2_arrayArrayPrimInteger())); - assertThat(a2_1.getA2_arrayArrayPrimLong(), is(a2_2.getA2_arrayArrayPrimLong())); - assertThat(a2_1.getA2_arrayArrayPrimFloat(), is(a2_2.getA2_arrayArrayPrimFloat())); - assertThat(a2_1.getA2_arrayArrayPrimDouble(), is(a2_2.getA2_arrayArrayPrimDouble())); - assertThat(a2_1.getA2_arrayArrayBoolean(), is(a2_2.getA2_arrayArrayBoolean())); - assertThat(a2_1.getA2_arrayArrayChar(), is(a2_2.getA2_arrayArrayChar())); - assertThat(a2_1.getA2_arrayArrayByte(), is(a2_2.getA2_arrayArrayByte())); - assertThat(a2_1.getA2_arrayArrayShort(), is(a2_2.getA2_arrayArrayShort())); - assertThat(a2_1.getA2_arrayArrayInteger(), is(a2_2.getA2_arrayArrayInteger())); - assertThat(a2_1.getA2_arrayArrayLong(), is(a2_2.getA2_arrayArrayLong())); - assertThat(a2_1.getA2_arrayArrayFloat(), is(a2_2.getA2_arrayArrayFloat())); - assertThat(a2_1.getA2_arrayArrayDouble(), is(a2_2.getA2_arrayArrayDouble())); - assertThat(a2_1.getA2_arrayArrayString(), is(a2_2.getA2_arrayArrayString())); - assertThat(a2_1.getA2_arrayArrayBigInteger(), is(a2_2.getA2_arrayArrayBigInteger())); - assertThat(a2_1.getA2_arrayArrayBigDecimal(), is(a2_2.getA2_arrayArrayBigDecimal())); - assertThat(a2_1.getA2_arrayArrayLocalDate(), is(a2_2.getA2_arrayArrayLocalDate())); - assertThat(a2_1.getA2_arrayArrayLocalTime(), is(a2_2.getA2_arrayArrayLocalTime())); - assertThat(a2_1.getA2_arrayArrayLocalDateTime(), is(a2_2.getA2_arrayArrayLocalDateTime())); - assertThat(a2_1.getA2_arrayArrayUuid(), is(a2_2.getA2_arrayArrayUuid())); - assertThat(a2_1.getA2_arrayArrayEnm(), is(a2_2.getA2_arrayArrayEnm())); - assertThat(a2_1.getA2_arrayArrayB1(), is(a2_2.getA2_arrayArrayB1())); - assertThat(a2_1.getA2_arrayArrayB2(), is(a2_2.getA2_arrayArrayB2())); - assertThat(a2_1.getA2_arrayArrayR1(), is(a2_2.getA2_arrayArrayR1())); - assertThat(a2_1.getA2_arrayArrayR2(), is(a2_2.getA2_arrayArrayR2())); - assertThat(a2_1.getA2_point(), is(a2_2.getA2_point())); - assertThat(a2_1.getA2_listPoint(), is(a2_2.getA2_listPoint())); - assertThat(a2_1.getA2_arrayPoint(), is(a2_2.getA2_arrayPoint())); - assertThat(a2_1.getA2_setPoint(), is(a2_2.getA2_setPoint())); - assertThat(a2_1.getA2_mapEnmListPoint(), is(a2_2.getA2_mapEnmListPoint())); - } - - - private static void assertExampleConfigurationsB1Equal( - ExampleConfigurationB1 b1_1, - ExampleConfigurationB1 b1_2 - ) { - assertThat(ExampleConfigurationB1.getB1_staticFinalInt(), is(1)); - assertThat(ExampleConfigurationB1.getB1_staticInt(), is(2)); - - assertThat(b1_1.getB1_finalInt(), is(b1_2.getB1_finalInt())); - assertThat(b1_1.getB1_transientInt(), is(b1_2.getB1_transientInt())); - assertThat(b1_1.getB1_ignoredInt(), is(b1_2.getB1_ignoredInt())); - assertThat(b1_1.getB1_ignoredString(), is(b1_2.getB1_ignoredString())); - assertThat(b1_1.getB1_ignoredListString(), is(b1_2.getB1_ignoredListString())); - assertThat(b1_1.isB1_primBool(), is(b1_2.isB1_primBool())); - assertThat(b1_1.getB1_refChar(), is(b1_2.getB1_refChar())); - assertThat(b1_1.getB1_string(), is(b1_2.getB1_string())); - assertThat(b1_1.getB1_listByte(), is(b1_2.getB1_listByte())); - assertThat(b1_1.getB1_arrayShort(), is(b1_2.getB1_arrayShort())); - assertThat(b1_1.getB1_setInteger(), is(b1_2.getB1_setInteger())); - assertThat(b1_1.getB1_listEmpty(), is(b1_2.getB1_listEmpty())); - assertThat(b1_1.getB1_mapLongLong(), is(b1_2.getB1_mapLongLong())); - assertThat(b1_1.getB1_listListByte(), is(b1_2.getB1_listListByte())); - assertThat(b1_1.getB1_point(), is(b1_2.getB1_point())); - assertEquals(b1_2, b1_1); - } - - private static void assertExampleConfigurationsB2Equal( - ExampleConfigurationB2 b2_1, - ExampleConfigurationB2 b2_2 - ) { - assertExampleConfigurationsB1Equal(b2_1, b2_2); - - assertThat(ExampleConfigurationB2.getB1_staticFinalInt(), is(1)); - assertThat(ExampleConfigurationB2.getB1_staticInt(), is(2)); - - assertThat(b2_1.getB2_finalInt(), is(b2_2.getB2_finalInt())); - assertThat(b2_1.getB2_transientInt(), is(b2_2.getB2_transientInt())); - assertThat(b2_1.getB2_ignoredInt(), is(b2_2.getB2_ignoredInt())); - assertThat(b2_1.getB2_ignoredString(), is(b2_2.getB2_ignoredString())); - assertThat(b2_1.getB2_ignoredListString(), is(b2_2.getB2_ignoredListString())); - assertThat(b2_1.getB2_primChar(), is(b2_2.getB2_primChar())); - assertThat(b2_1.getB2_refBool(), is(b2_2.getB2_refBool())); - assertThat(b2_1.getB2_bigInteger(), is(b2_2.getB2_bigInteger())); - assertThat(b2_1.getB2_listShort(), is(b2_2.getB2_listShort())); - assertThat(b2_1.getB2_arrayInteger(), is(b2_2.getB2_arrayInteger())); - assertThat(b2_1.getB2_setLong(), is(b2_2.getB2_setLong())); - assertThat(b2_1.getB2_arrayEmpty(), is(b2_2.getB2_arrayEmpty())); - assertThat(b2_1.getB2_mapFloatFloat(), is(b2_2.getB2_mapFloatFloat())); - assertDeepEquals(b2_1.getB2_setArrayDouble(), b2_2.getB2_setArrayDouble(), LinkedHashSet::new); - assertThat(b2_1.getB2_listPoint(), is(b2_2.getB2_listPoint())); - assertEquals(b2_2, b2_1); - } - - private static > void assertDeepEquals( - C collection1, - C collection2, - Supplier>> collectionFactory - ) { - Collection> c1 = collection1.stream().map(Arrays::asList) - .collect(Collectors.toCollection(collectionFactory)); - Collection> c2 = collection2.stream().map(Arrays::asList) - .collect(Collectors.toCollection(collectionFactory)); - assertEquals(c2, c1); - } - - @Test - void yamlStoreSavesAndLoadsExampleConfigurationA2() { - var properties = YamlConfigurationProperties.newBuilder() - .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) - .build(); - var store = new YamlConfigurationStore<>(ExampleConfigurationA2.class, properties); - ExampleConfigurationA2 cfg1 = ExampleInitializer.newExampleConfigurationA2(); - store.save(cfg1, yamlFile); - ExampleConfigurationA2 cfg2 = store.load(yamlFile); - assertExampleConfigurationsA2Equal(cfg1, cfg2); - } - - @Test - void yamlStoreSavesAndLoadsExampleConfigurationNullsWithNullCollectionElements1() { - var properties = YamlConfigurationProperties.newBuilder() - .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) - .outputNulls(true) - .inputNulls(true) - .build(); - var store = new YamlConfigurationStore<>(ExampleConfigurationNulls.class, properties); - ExampleConfigurationNulls cfg1 = ExampleInitializer - .newExampleConfigurationNullsWithNullCollectionElements1(); - store.save(cfg1, yamlFile); - ExampleConfigurationNulls cfg2 = store.load(yamlFile); - assertExampleConfigurationsNullsEqual(cfg1, cfg2); - } - - @Test - void yamlStoreSavesAndLoadsExampleConfigurationNullsWithoutNullCollectionElements1() { - var properties = YamlConfigurationProperties.newBuilder() - .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) - .build(); - var store = new YamlConfigurationStore<>(ExampleConfigurationNulls.class, properties); - ExampleConfigurationNulls cfg1 = ExampleInitializer - .newExampleConfigurationNullsWithoutNullCollectionElements1(); - store.save(cfg1, yamlFile); - ExampleConfigurationNulls cfg2 = store.load(yamlFile); - assertExampleConfigurationsNullsEqual(cfg1, cfg2); - } } diff --git a/configlib-core/src/test/java/de/exlll/configlib/TestUtils.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/TestUtils.java similarity index 96% rename from configlib-core/src/test/java/de/exlll/configlib/TestUtils.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/TestUtils.java index d180978..abad0c2 100644 --- a/configlib-core/src/test/java/de/exlll/configlib/TestUtils.java +++ b/configlib-core/src/testFixtures/java/de/exlll/configlib/TestUtils.java @@ -1,5 +1,6 @@ package de.exlll.configlib; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.function.Executable; import java.awt.Point; @@ -14,8 +15,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import static java.util.stream.Collectors.joining; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; public final class TestUtils { public static final PointSerializer POINT_SERIALIZER = new PointSerializer(); @@ -62,8 +61,8 @@ public final class TestUtils { Executable executable, String expectedExceptionMessage ) { - T exception = assertThrows(exceptionType, executable); - assertEquals(expectedExceptionMessage, exception.getMessage()); + T exception = Assertions.assertThrows(exceptionType, executable); + Assertions.assertEquals(expectedExceptionMessage, exception.getMessage()); } public static final class CustomBigIntegerSerializer implements Serializer { diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationA1.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationA1.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationA1.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationA1.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationA2.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationA2.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationA2.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationA2.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationB1.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationB1.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationB1.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationB1.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationB2.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationB2.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationB2.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationB2.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationNulls.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationNulls.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationNulls.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationNulls.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationsSerialized.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationsSerialized.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleConfigurationsSerialized.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleConfigurationsSerialized.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleEnum.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleEnum.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleEnum.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleEnum.java diff --git a/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleEqualityAsserter.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleEqualityAsserter.java new file mode 100644 index 0000000..470cf8e --- /dev/null +++ b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleEqualityAsserter.java @@ -0,0 +1,503 @@ +package de.exlll.configlib.configurations; + +import java.util.*; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public final class ExampleEqualityAsserter { + public static void assertExampleRecord1Equal( + ExampleRecord1 expected, + ExampleRecord1 actual + ) { + assertThat(actual.i(), is(expected.i())); + assertThat(actual.d(), is(expected.d())); + assertThat(actual.enm(), is(expected.enm())); + assertThat(actual.listUuid(), is(expected.listUuid())); + assertThat(actual.arrayArrayFloat(), is(expected.arrayArrayFloat())); + assertExampleConfigurationsB1Equal(expected.b1(), actual.b1()); + } + + public static void assertExampleRecord2Equal( + ExampleRecord2 expected, + ExampleRecord2 actual + ) { + assertEquals(expected.b(), actual.b()); + assertExampleRecord1Equal(expected.r1(), actual.r1()); + } + + public static void assertExampleConfigurationsNullsEqual( + ExampleConfigurationNulls expected, + ExampleConfigurationNulls actual + ) { + assertEquals(expected.getNullInteger(), actual.getNullInteger()); + assertEquals(expected.getNullString(), actual.getNullString()); + assertEquals(expected.getNullEnm(), actual.getNullEnm()); + assertEquals(expected.getNullB1(), actual.getNullB1()); + assertEquals(expected.getNullList(), actual.getNullList()); + assertEquals(expected.getNullArray(), actual.getNullArray()); + assertEquals(expected.getNullSet(), actual.getNullSet()); + assertEquals(expected.getNullMap(), actual.getNullMap()); + assertEquals(expected.getNullPoint(), actual.getNullPoint()); + assertEquals(expected.getListNullString(), actual.getListNullString()); + assertArrayEquals(expected.getArrayNullDouble(), actual.getArrayNullDouble()); + assertEquals(expected.getSetNullInteger(), actual.getSetNullInteger()); + assertEquals(expected.getMapNullEnmKey(), actual.getMapNullEnmKey()); + assertEquals(expected.getMapNullBigIntegerValue(), actual.getMapNullBigIntegerValue()); + assertEquals(expected, actual); + } + + public static void assertExampleConfigurationsA1Equal( + ExampleConfigurationA1 a1_1, + ExampleConfigurationA1 a1_2 + ) { + assertThat(ExampleConfigurationA1.getA1_staticFinalInt(), is(1)); + assertThat(ExampleConfigurationA1.getA1_staticInt(), is(2)); + + assertThat(a1_1.getA1_finalInt(), is(a1_2.getA1_finalInt())); + assertThat(a1_1.getA1_transientInt(), is(a1_2.getA1_transientInt())); + assertThat(a1_1.getA1_ignoredInt(), is(a1_2.getA1_ignoredInt())); + assertThat(a1_1.getA1_ignoredString(), is(a1_2.getA1_ignoredString())); + assertThat(a1_1.getA1_ignoredListString(), is(a1_2.getA1_ignoredListString())); + assertThat(a1_1.isA1_primBool(), is(a1_2.isA1_primBool())); + assertThat(a1_1.getA1_primChar(), is(a1_2.getA1_primChar())); + assertThat(a1_1.getA1_primByte(), is(a1_2.getA1_primByte())); + assertThat(a1_1.getA1_primShort(), is(a1_2.getA1_primShort())); + assertThat(a1_1.getA1_primInt(), is(a1_2.getA1_primInt())); + assertThat(a1_1.getA1_primLong(), is(a1_2.getA1_primLong())); + assertThat(a1_1.getA1_primFloat(), is(a1_2.getA1_primFloat())); + assertThat(a1_1.getA1_primDouble(), is(a1_2.getA1_primDouble())); + assertThat(a1_1.getA1_refBool(), is(a1_2.getA1_refBool())); + assertThat(a1_1.getA1_refChar(), is(a1_2.getA1_refChar())); + assertThat(a1_1.getA1_refByte(), is(a1_2.getA1_refByte())); + assertThat(a1_1.getA1_refShort(), is(a1_2.getA1_refShort())); + assertThat(a1_1.getA1_refInt(), is(a1_2.getA1_refInt())); + assertThat(a1_1.getA1_refLong(), is(a1_2.getA1_refLong())); + assertThat(a1_1.getA1_refFloat(), is(a1_2.getA1_refFloat())); + assertThat(a1_1.getA1_refDouble(), is(a1_2.getA1_refDouble())); + assertThat(a1_1.getA1_string(), is(a1_2.getA1_string())); + assertThat(a1_1.getA1_bigInteger(), is(a1_2.getA1_bigInteger())); + assertThat(a1_1.getA1_bigDecimal(), is(a1_2.getA1_bigDecimal())); + assertThat(a1_1.getA1_localDate(), is(a1_2.getA1_localDate())); + assertThat(a1_1.getA1_localTime(), is(a1_2.getA1_localTime())); + assertThat(a1_1.getA1_localDateTime(), is(a1_2.getA1_localDateTime())); + assertThat(a1_1.getA1_instant(), is(a1_2.getA1_instant())); + assertThat(a1_1.getA1_uuid(), is(a1_2.getA1_uuid())); + assertThat(a1_1.getA1_file(), is(a1_2.getA1_file())); + assertThat(a1_1.getA1_path(), is(a1_2.getA1_path())); + assertThat(a1_1.getA1_url(), is(a1_2.getA1_url())); + assertThat(a1_1.getA1_uri(), is(a1_2.getA1_uri())); + assertThat(a1_1.getA1_uuid(), is(a1_2.getA1_uuid())); + assertThat(a1_1.getA1_Enm(), is(a1_2.getA1_Enm())); + assertThat(a1_1.getA1_b1(), is(a1_2.getA1_b1())); + assertThat(a1_1.getA1_b2(), is(a1_2.getA1_b2())); + assertThat(a1_1.getA1_r1(), is(a1_2.getA1_r1())); + assertThat(a1_1.getA1_r2(), is(a1_2.getA1_r2())); + assertThat(a1_1.getA1_listBoolean(), is(a1_2.getA1_listBoolean())); + assertThat(a1_1.getA1_listChar(), is(a1_2.getA1_listChar())); + assertThat(a1_1.getA1_listByte(), is(a1_2.getA1_listByte())); + assertThat(a1_1.getA1_listShort(), is(a1_2.getA1_listShort())); + assertThat(a1_1.getA1_listInteger(), is(a1_2.getA1_listInteger())); + assertThat(a1_1.getA1_listLong(), is(a1_2.getA1_listLong())); + assertThat(a1_1.getA1_listFloat(), is(a1_2.getA1_listFloat())); + assertThat(a1_1.getA1_listDouble(), is(a1_2.getA1_listDouble())); + assertThat(a1_1.getA1_listString(), is(a1_2.getA1_listString())); + assertThat(a1_1.getA1_listBigInteger(), is(a1_2.getA1_listBigInteger())); + assertThat(a1_1.getA1_listBigDecimal(), is(a1_2.getA1_listBigDecimal())); + assertThat(a1_1.getA1_listLocalDate(), is(a1_2.getA1_listLocalDate())); + assertThat(a1_1.getA1_listLocalTime(), is(a1_2.getA1_listLocalTime())); + assertThat(a1_1.getA1_listLocalDateTime(), is(a1_2.getA1_listLocalDateTime())); + assertThat(a1_1.getA1_listInstant(), is(a1_2.getA1_listInstant())); + assertThat(a1_1.getA1_listUuid(), is(a1_2.getA1_listUuid())); + assertThat(a1_1.getA1_listFile(), is(a1_2.getA1_listFile())); + assertThat(a1_1.getA1_listPath(), is(a1_2.getA1_listPath())); + assertThat(a1_1.getA1_listUrl(), is(a1_2.getA1_listUrl())); + assertThat(a1_1.getA1_listUri(), is(a1_2.getA1_listUri())); + assertThat(a1_1.getA1_listEnm(), is(a1_2.getA1_listEnm())); + assertThat(a1_1.getA1_listB1(), is(a1_2.getA1_listB1())); + assertThat(a1_1.getA1_listB2(), is(a1_2.getA1_listB2())); + assertThat(a1_1.getA1_listR1(), is(a1_2.getA1_listR1())); + assertThat(a1_1.getA1_listR2(), is(a1_2.getA1_listR2())); + assertThat(a1_1.getA1_arrayPrimBoolean(), is(a1_2.getA1_arrayPrimBoolean())); + assertThat(a1_1.getA1_arrayPrimChar(), is(a1_2.getA1_arrayPrimChar())); + assertThat(a1_1.getA1_arrayPrimByte(), is(a1_2.getA1_arrayPrimByte())); + assertThat(a1_1.getA1_arrayPrimShort(), is(a1_2.getA1_arrayPrimShort())); + assertThat(a1_1.getA1_arrayPrimInteger(), is(a1_2.getA1_arrayPrimInteger())); + assertThat(a1_1.getA1_arrayPrimLong(), is(a1_2.getA1_arrayPrimLong())); + assertThat(a1_1.getA1_arrayPrimFloat(), is(a1_2.getA1_arrayPrimFloat())); + assertThat(a1_1.getA1_arrayPrimDouble(), is(a1_2.getA1_arrayPrimDouble())); + assertThat(a1_1.getA1_arrayBoolean(), is(a1_2.getA1_arrayBoolean())); + assertThat(a1_1.getA1_arrayChar(), is(a1_2.getA1_arrayChar())); + assertThat(a1_1.getA1_arrayByte(), is(a1_2.getA1_arrayByte())); + assertThat(a1_1.getA1_arrayShort(), is(a1_2.getA1_arrayShort())); + assertThat(a1_1.getA1_arrayInteger(), is(a1_2.getA1_arrayInteger())); + assertThat(a1_1.getA1_arrayLong(), is(a1_2.getA1_arrayLong())); + assertThat(a1_1.getA1_arrayFloat(), is(a1_2.getA1_arrayFloat())); + assertThat(a1_1.getA1_arrayDouble(), is(a1_2.getA1_arrayDouble())); + assertThat(a1_1.getA1_arrayString(), is(a1_2.getA1_arrayString())); + assertThat(a1_1.getA1_arrayBigInteger(), is(a1_2.getA1_arrayBigInteger())); + assertThat(a1_1.getA1_arrayBigDecimal(), is(a1_2.getA1_arrayBigDecimal())); + assertThat(a1_1.getA1_arrayLocalDate(), is(a1_2.getA1_arrayLocalDate())); + assertThat(a1_1.getA1_arrayLocalTime(), is(a1_2.getA1_arrayLocalTime())); + assertThat(a1_1.getA1_arrayLocalDateTime(), is(a1_2.getA1_arrayLocalDateTime())); + assertThat(a1_1.getA1_arrayUuid(), is(a1_2.getA1_arrayUuid())); + assertThat(a1_1.getA1_arrayEnm(), is(a1_2.getA1_arrayEnm())); + assertThat(a1_1.getA1_arrayB1(), is(a1_2.getA1_arrayB1())); + assertThat(a1_1.getA1_arrayB2(), is(a1_2.getA1_arrayB2())); + assertThat(a1_1.getA1_arrayR1(), is(a1_2.getA1_arrayR1())); + assertThat(a1_1.getA1_arrayR2(), is(a1_2.getA1_arrayR2())); + assertThat(a1_1.getA1_setBoolean(), is(a1_2.getA1_setBoolean())); + assertThat(a1_1.getA1_setChar(), is(a1_2.getA1_setChar())); + assertThat(a1_1.getA1_setByte(), is(a1_2.getA1_setByte())); + assertThat(a1_1.getA1_setShort(), is(a1_2.getA1_setShort())); + assertThat(a1_1.getA1_setInteger(), is(a1_2.getA1_setInteger())); + assertThat(a1_1.getA1_setLong(), is(a1_2.getA1_setLong())); + assertThat(a1_1.getA1_setFloat(), is(a1_2.getA1_setFloat())); + assertThat(a1_1.getA1_setDouble(), is(a1_2.getA1_setDouble())); + assertThat(a1_1.getA1_setString(), is(a1_2.getA1_setString())); + assertThat(a1_1.getA1_setBigInteger(), is(a1_2.getA1_setBigInteger())); + assertThat(a1_1.getA1_setBigDecimal(), is(a1_2.getA1_setBigDecimal())); + assertThat(a1_1.getA1_setLocalDate(), is(a1_2.getA1_setLocalDate())); + assertThat(a1_1.getA1_setLocalTime(), is(a1_2.getA1_setLocalTime())); + assertThat(a1_1.getA1_setLocalDateTime(), is(a1_2.getA1_setLocalDateTime())); + assertThat(a1_1.getA1_setUuid(), is(a1_2.getA1_setUuid())); + assertThat(a1_1.getA1_setEnm(), is(a1_2.getA1_setEnm())); + assertThat(a1_1.getA1_setB1(), is(a1_2.getA1_setB1())); + assertThat(a1_1.getA1_setB2(), is(a1_2.getA1_setB2())); + assertThat(a1_1.getA1_setR1(), is(a1_2.getA1_setR1())); + assertThat(a1_1.getA1_setR2(), is(a1_2.getA1_setR2())); + assertThat(a1_1.getA1_mapBooleanBoolean(), is(a1_2.getA1_mapBooleanBoolean())); + assertThat(a1_1.getA1_mapCharChar(), is(a1_2.getA1_mapCharChar())); + assertThat(a1_1.getA1_mapByteByte(), is(a1_2.getA1_mapByteByte())); + assertThat(a1_1.getA1_mapShortShort(), is(a1_2.getA1_mapShortShort())); + assertThat(a1_1.getA1_mapIntegerInteger(), is(a1_2.getA1_mapIntegerInteger())); + assertThat(a1_1.getA1_mapLongLong(), is(a1_2.getA1_mapLongLong())); + assertThat(a1_1.getA1_mapFloatFloat(), is(a1_2.getA1_mapFloatFloat())); + assertThat(a1_1.getA1_mapDoubleDouble(), is(a1_2.getA1_mapDoubleDouble())); + assertThat(a1_1.getA1_mapStringString(), is(a1_2.getA1_mapStringString())); + assertThat(a1_1.getA1_mapBigIntegerBigInteger(), is(a1_2.getA1_mapBigIntegerBigInteger())); + assertThat(a1_1.getA1_mapBigDecimalBigDecimal(), is(a1_2.getA1_mapBigDecimalBigDecimal())); + assertThat(a1_1.getA1_mapLocalDateLocalDate(), is(a1_2.getA1_mapLocalDateLocalDate())); + assertThat(a1_1.getA1_mapLocalTimeLocalTime(), is(a1_2.getA1_mapLocalTimeLocalTime())); + assertThat(a1_1.getA1_mapLocalDateTimeLocalDateTime(), is(a1_2.getA1_mapLocalDateTimeLocalDateTime())); + assertThat(a1_1.getA1_mapUuidUuid(), is(a1_2.getA1_mapUuidUuid())); + assertThat(a1_1.getA1_mapEnmEnm(), is(a1_2.getA1_mapEnmEnm())); + assertThat(a1_1.getA1_mapIntegerB1(), is(a1_2.getA1_mapIntegerB1())); + assertThat(a1_1.getA1_mapEnmB2(), is(a1_2.getA1_mapEnmB2())); + assertThat(a1_1.getA1_mapStringR1(), is(a1_2.getA1_mapStringR1())); + assertThat(a1_1.getA1_mapStringR2(), is(a1_2.getA1_mapStringR2())); + assertThat(a1_1.getA1_listEmpty(), is(a1_2.getA1_listEmpty())); + assertThat(a1_1.getA1_arrayEmpty(), is(a1_2.getA1_arrayEmpty())); + assertThat(a1_1.getA1_setEmpty(), is(a1_2.getA1_setEmpty())); + assertThat(a1_1.getA1_mapEmpty(), is(a1_2.getA1_mapEmpty())); + assertThat(a1_1.getA1_listListByte(), is(a1_2.getA1_listListByte())); + assertDeepEquals(a1_1.getA1_listArrayFloat(), a1_2.getA1_listArrayFloat(), ArrayList::new); + assertThat(a1_1.getA1_listSetString(), is(a1_2.getA1_listSetString())); + assertThat(a1_1.getA1_listMapEnmLocalDate(), is(a1_2.getA1_listMapEnmLocalDate())); + assertThat(a1_1.getA1_setSetShort(), is(a1_2.getA1_setSetShort())); + assertDeepEquals(a1_1.getA1_setArrayDouble(), a1_2.getA1_setArrayDouble(), HashSet::new); + assertThat(a1_1.getA1_setListString(), is(a1_2.getA1_setListString())); + assertThat(a1_1.getA1_setMapEnmLocalTime(), is(a1_2.getA1_setMapEnmLocalTime())); + assertThat(a1_1.getA1_mapIntegerMapLongBoolean(), is(a1_2.getA1_mapIntegerMapLongBoolean())); + assertThat(a1_1.getA1_mapStringListB1(), is(a1_2.getA1_mapStringListB1())); + assertEquals(a1_2.getA1_mapBigIntegerArrayBigDecimal().keySet(), a1_1.getA1_mapBigIntegerArrayBigDecimal().keySet()); + assertDeepEquals(a1_2.getA1_mapBigIntegerArrayBigDecimal().values(), a1_2.getA1_mapBigIntegerArrayBigDecimal().values(), HashSet::new); + assertThat(a1_1.getA1_mapEnmSetB2(), is(a1_2.getA1_mapEnmSetB2())); + assertThat(a1_1.getA1_mapIntegerListMapShortSetB2(), is(a1_2.getA1_mapIntegerListMapShortSetB2())); + assertThat(a1_1.getA1_arrayArrayPrimBoolean(), is(a1_2.getA1_arrayArrayPrimBoolean())); + assertThat(a1_1.getA1_arrayArrayPrimChar(), is(a1_2.getA1_arrayArrayPrimChar())); + assertThat(a1_1.getA1_arrayArrayPrimByte(), is(a1_2.getA1_arrayArrayPrimByte())); + assertThat(a1_1.getA1_arrayArrayPrimShort(), is(a1_2.getA1_arrayArrayPrimShort())); + assertThat(a1_1.getA1_arrayArrayPrimInteger(), is(a1_2.getA1_arrayArrayPrimInteger())); + assertThat(a1_1.getA1_arrayArrayPrimLong(), is(a1_2.getA1_arrayArrayPrimLong())); + assertThat(a1_1.getA1_arrayArrayPrimFloat(), is(a1_2.getA1_arrayArrayPrimFloat())); + assertThat(a1_1.getA1_arrayArrayPrimDouble(), is(a1_2.getA1_arrayArrayPrimDouble())); + assertThat(a1_1.getA1_arrayArrayBoolean(), is(a1_2.getA1_arrayArrayBoolean())); + assertThat(a1_1.getA1_arrayArrayChar(), is(a1_2.getA1_arrayArrayChar())); + assertThat(a1_1.getA1_arrayArrayByte(), is(a1_2.getA1_arrayArrayByte())); + assertThat(a1_1.getA1_arrayArrayShort(), is(a1_2.getA1_arrayArrayShort())); + assertThat(a1_1.getA1_arrayArrayInteger(), is(a1_2.getA1_arrayArrayInteger())); + assertThat(a1_1.getA1_arrayArrayLong(), is(a1_2.getA1_arrayArrayLong())); + assertThat(a1_1.getA1_arrayArrayFloat(), is(a1_2.getA1_arrayArrayFloat())); + assertThat(a1_1.getA1_arrayArrayDouble(), is(a1_2.getA1_arrayArrayDouble())); + assertThat(a1_1.getA1_arrayArrayString(), is(a1_2.getA1_arrayArrayString())); + assertThat(a1_1.getA1_arrayArrayBigInteger(), is(a1_2.getA1_arrayArrayBigInteger())); + assertThat(a1_1.getA1_arrayArrayBigDecimal(), is(a1_2.getA1_arrayArrayBigDecimal())); + assertThat(a1_1.getA1_arrayArrayLocalDate(), is(a1_2.getA1_arrayArrayLocalDate())); + assertThat(a1_1.getA1_arrayArrayLocalTime(), is(a1_2.getA1_arrayArrayLocalTime())); + assertThat(a1_1.getA1_arrayArrayLocalDateTime(), is(a1_2.getA1_arrayArrayLocalDateTime())); + assertThat(a1_1.getA1_arrayArrayUuid(), is(a1_2.getA1_arrayArrayUuid())); + assertThat(a1_1.getA1_arrayArrayEnm(), is(a1_2.getA1_arrayArrayEnm())); + assertThat(a1_1.getA1_arrayArrayB1(), is(a1_2.getA1_arrayArrayB1())); + assertThat(a1_1.getA1_arrayArrayB2(), is(a1_2.getA1_arrayArrayB2())); + assertThat(a1_1.getA1_arrayArrayR1(), is(a1_2.getA1_arrayArrayR1())); + assertThat(a1_1.getA1_arrayArrayR2(), is(a1_2.getA1_arrayArrayR2())); + assertThat(a1_1.getA1_point(), is(a1_2.getA1_point())); + assertThat(a1_1.getA1_listPoint(), is(a1_2.getA1_listPoint())); + assertThat(a1_1.getA1_arrayPoint(), is(a1_2.getA1_arrayPoint())); + assertThat(a1_1.getA1_setPoint(), is(a1_2.getA1_setPoint())); + assertThat(a1_1.getA1_mapEnmListPoint(), is(a1_2.getA1_mapEnmListPoint())); + } + + public static void assertExampleConfigurationsA2Equal( + ExampleConfigurationA2 a2_1, + ExampleConfigurationA2 a2_2 + ) { + assertThat(ExampleConfigurationA2.getA1_staticFinalInt(), is(1)); + assertThat(ExampleConfigurationA2.getA1_staticInt(), is(2)); + + assertExampleConfigurationsA1Equal(a2_1, a2_2); + + assertThat(a2_1.getA2_finalInt(), is(a2_2.getA2_finalInt())); + assertThat(a2_1.getA2_transientInt(), is(a2_2.getA2_transientInt())); + assertThat(a2_1.getA2_ignoredInt(), is(a2_2.getA2_ignoredInt())); + assertThat(a2_1.getA2_ignoredString(), is(a2_2.getA2_ignoredString())); + assertThat(a2_1.getA2_ignoredListString(), is(a2_2.getA2_ignoredListString())); + assertThat(a2_1.isA2_primBool(), is(a2_2.isA2_primBool())); + assertThat(a2_1.getA2_primChar(), is(a2_2.getA2_primChar())); + assertThat(a2_1.getA2_primByte(), is(a2_2.getA2_primByte())); + assertThat(a2_1.getA2_primShort(), is(a2_2.getA2_primShort())); + assertThat(a2_1.getA2_primInt(), is(a2_2.getA2_primInt())); + assertThat(a2_1.getA2_primLong(), is(a2_2.getA2_primLong())); + assertThat(a2_1.getA2_primFloat(), is(a2_2.getA2_primFloat())); + assertThat(a2_1.getA2_primDouble(), is(a2_2.getA2_primDouble())); + assertThat(a2_1.getA2_refBool(), is(a2_2.getA2_refBool())); + assertThat(a2_1.getA2_refChar(), is(a2_2.getA2_refChar())); + assertThat(a2_1.getA2_refByte(), is(a2_2.getA2_refByte())); + assertThat(a2_1.getA2_refShort(), is(a2_2.getA2_refShort())); + assertThat(a2_1.getA2_refInt(), is(a2_2.getA2_refInt())); + assertThat(a2_1.getA2_refLong(), is(a2_2.getA2_refLong())); + assertThat(a2_1.getA2_refFloat(), is(a2_2.getA2_refFloat())); + assertThat(a2_1.getA2_refDouble(), is(a2_2.getA2_refDouble())); + assertThat(a2_1.getA2_string(), is(a2_2.getA2_string())); + assertThat(a2_1.getA2_bigInteger(), is(a2_2.getA2_bigInteger())); + assertThat(a2_1.getA2_bigDecimal(), is(a2_2.getA2_bigDecimal())); + assertThat(a2_1.getA2_localDate(), is(a2_2.getA2_localDate())); + assertThat(a2_1.getA2_localTime(), is(a2_2.getA2_localTime())); + assertThat(a2_1.getA2_localDateTime(), is(a2_2.getA2_localDateTime())); + assertThat(a2_1.getA2_instant(), is(a2_2.getA2_instant())); + assertThat(a2_1.getA2_uuid(), is(a2_2.getA2_uuid())); + assertThat(a2_1.getA2_file(), is(a2_2.getA2_file())); + assertThat(a2_1.getA2_path(), is(a2_2.getA2_path())); + assertThat(a2_1.getA2_url(), is(a2_2.getA2_url())); + assertThat(a2_1.getA2_uri(), is(a2_2.getA2_uri())); + assertThat(a2_1.getA2_Enm(), is(a2_2.getA2_Enm())); + assertThat(a2_1.getA2_b1(), is(a2_2.getA2_b1())); + assertThat(a2_1.getA2_b2(), is(a2_2.getA2_b2())); + assertThat(a2_1.getA2_r1(), is(a2_2.getA2_r1())); + assertThat(a2_1.getA2_r2(), is(a2_2.getA2_r2())); + assertThat(a2_1.getA2_listBoolean(), is(a2_2.getA2_listBoolean())); + assertThat(a2_1.getA2_listChar(), is(a2_2.getA2_listChar())); + assertThat(a2_1.getA2_listByte(), is(a2_2.getA2_listByte())); + assertThat(a2_1.getA2_listShort(), is(a2_2.getA2_listShort())); + assertThat(a2_1.getA2_listInteger(), is(a2_2.getA2_listInteger())); + assertThat(a2_1.getA2_listLong(), is(a2_2.getA2_listLong())); + assertThat(a2_1.getA2_listFloat(), is(a2_2.getA2_listFloat())); + assertThat(a2_1.getA2_listDouble(), is(a2_2.getA2_listDouble())); + assertThat(a2_1.getA2_listString(), is(a2_2.getA2_listString())); + assertThat(a2_1.getA2_listBigInteger(), is(a2_2.getA2_listBigInteger())); + assertThat(a2_1.getA2_listBigDecimal(), is(a2_2.getA2_listBigDecimal())); + assertThat(a2_1.getA2_listLocalDate(), is(a2_2.getA2_listLocalDate())); + assertThat(a2_1.getA2_listLocalTime(), is(a2_2.getA2_listLocalTime())); + assertThat(a2_1.getA2_listLocalDateTime(), is(a2_2.getA2_listLocalDateTime())); + assertThat(a2_1.getA2_listInstant(), is(a2_2.getA2_listInstant())); + assertThat(a2_1.getA2_listUuid(), is(a2_2.getA2_listUuid())); + assertThat(a2_1.getA2_listFile(), is(a2_2.getA2_listFile())); + assertThat(a2_1.getA2_listPath(), is(a2_2.getA2_listPath())); + assertThat(a2_1.getA2_listUrl(), is(a2_2.getA2_listUrl())); + assertThat(a2_1.getA2_listUri(), is(a2_2.getA2_listUri())); + assertThat(a2_1.getA2_listEnm(), is(a2_2.getA2_listEnm())); + assertThat(a2_1.getA2_listB1(), is(a2_2.getA2_listB1())); + assertThat(a2_1.getA2_listB2(), is(a2_2.getA2_listB2())); + assertThat(a2_1.getA2_listR1(), is(a2_2.getA2_listR1())); + assertThat(a2_1.getA2_listR2(), is(a2_2.getA2_listR2())); + assertThat(a2_1.getA2_arrayPrimBoolean(), is(a2_2.getA2_arrayPrimBoolean())); + assertThat(a2_1.getA2_arrayPrimChar(), is(a2_2.getA2_arrayPrimChar())); + assertThat(a2_1.getA2_arrayPrimByte(), is(a2_2.getA2_arrayPrimByte())); + assertThat(a2_1.getA2_arrayPrimShort(), is(a2_2.getA2_arrayPrimShort())); + assertThat(a2_1.getA2_arrayPrimInteger(), is(a2_2.getA2_arrayPrimInteger())); + assertThat(a2_1.getA2_arrayPrimLong(), is(a2_2.getA2_arrayPrimLong())); + assertThat(a2_1.getA2_arrayPrimFloat(), is(a2_2.getA2_arrayPrimFloat())); + assertThat(a2_1.getA2_arrayPrimDouble(), is(a2_2.getA2_arrayPrimDouble())); + assertThat(a2_1.getA2_arrayBoolean(), is(a2_2.getA2_arrayBoolean())); + assertThat(a2_1.getA2_arrayChar(), is(a2_2.getA2_arrayChar())); + assertThat(a2_1.getA2_arrayByte(), is(a2_2.getA2_arrayByte())); + assertThat(a2_1.getA2_arrayShort(), is(a2_2.getA2_arrayShort())); + assertThat(a2_1.getA2_arrayInteger(), is(a2_2.getA2_arrayInteger())); + assertThat(a2_1.getA2_arrayLong(), is(a2_2.getA2_arrayLong())); + assertThat(a2_1.getA2_arrayFloat(), is(a2_2.getA2_arrayFloat())); + assertThat(a2_1.getA2_arrayDouble(), is(a2_2.getA2_arrayDouble())); + assertThat(a2_1.getA2_arrayString(), is(a2_2.getA2_arrayString())); + assertThat(a2_1.getA2_arrayBigInteger(), is(a2_2.getA2_arrayBigInteger())); + assertThat(a2_1.getA2_arrayBigDecimal(), is(a2_2.getA2_arrayBigDecimal())); + assertThat(a2_1.getA2_arrayLocalDate(), is(a2_2.getA2_arrayLocalDate())); + assertThat(a2_1.getA2_arrayLocalTime(), is(a2_2.getA2_arrayLocalTime())); + assertThat(a2_1.getA2_arrayLocalDateTime(), is(a2_2.getA2_arrayLocalDateTime())); + assertThat(a2_1.getA2_arrayUuid(), is(a2_2.getA2_arrayUuid())); + assertThat(a2_1.getA2_arrayEnm(), is(a2_2.getA2_arrayEnm())); + assertThat(a2_1.getA2_arrayB1(), is(a2_2.getA2_arrayB1())); + assertThat(a2_1.getA2_arrayB2(), is(a2_2.getA2_arrayB2())); + assertThat(a2_1.getA2_arrayR1(), is(a2_2.getA2_arrayR1())); + assertThat(a2_1.getA2_arrayR2(), is(a2_2.getA2_arrayR2())); + assertThat(a2_1.getA2_setBoolean(), is(a2_2.getA2_setBoolean())); + assertThat(a2_1.getA2_setChar(), is(a2_2.getA2_setChar())); + assertThat(a2_1.getA2_setByte(), is(a2_2.getA2_setByte())); + assertThat(a2_1.getA2_setShort(), is(a2_2.getA2_setShort())); + assertThat(a2_1.getA2_setInteger(), is(a2_2.getA2_setInteger())); + assertThat(a2_1.getA2_setLong(), is(a2_2.getA2_setLong())); + assertThat(a2_1.getA2_setFloat(), is(a2_2.getA2_setFloat())); + assertThat(a2_1.getA2_setDouble(), is(a2_2.getA2_setDouble())); + assertThat(a2_1.getA2_setString(), is(a2_2.getA2_setString())); + assertThat(a2_1.getA2_setBigInteger(), is(a2_2.getA2_setBigInteger())); + assertThat(a2_1.getA2_setBigDecimal(), is(a2_2.getA2_setBigDecimal())); + assertThat(a2_1.getA2_setLocalDate(), is(a2_2.getA2_setLocalDate())); + assertThat(a2_1.getA2_setLocalTime(), is(a2_2.getA2_setLocalTime())); + assertThat(a2_1.getA2_setLocalDateTime(), is(a2_2.getA2_setLocalDateTime())); + assertThat(a2_1.getA2_setUuid(), is(a2_2.getA2_setUuid())); + assertThat(a2_1.getA2_setEnm(), is(a2_2.getA2_setEnm())); + assertThat(a2_1.getA2_setB1(), is(a2_2.getA2_setB1())); + assertThat(a2_1.getA2_setB2(), is(a2_2.getA2_setB2())); + assertThat(a2_1.getA2_setR1(), is(a2_2.getA2_setR1())); + assertThat(a2_1.getA2_setR2(), is(a2_2.getA2_setR2())); + assertThat(a2_1.getA2_mapBooleanBoolean(), is(a2_2.getA2_mapBooleanBoolean())); + assertThat(a2_1.getA2_mapCharChar(), is(a2_2.getA2_mapCharChar())); + assertThat(a2_1.getA2_mapByteByte(), is(a2_2.getA2_mapByteByte())); + assertThat(a2_1.getA2_mapShortShort(), is(a2_2.getA2_mapShortShort())); + assertThat(a2_1.getA2_mapIntegerInteger(), is(a2_2.getA2_mapIntegerInteger())); + assertThat(a2_1.getA2_mapLongLong(), is(a2_2.getA2_mapLongLong())); + assertThat(a2_1.getA2_mapFloatFloat(), is(a2_2.getA2_mapFloatFloat())); + assertThat(a2_1.getA2_mapDoubleDouble(), is(a2_2.getA2_mapDoubleDouble())); + assertThat(a2_1.getA2_mapStringString(), is(a2_2.getA2_mapStringString())); + assertThat(a2_1.getA2_mapBigIntegerBigInteger(), is(a2_2.getA2_mapBigIntegerBigInteger())); + assertThat(a2_1.getA2_mapBigDecimalBigDecimal(), is(a2_2.getA2_mapBigDecimalBigDecimal())); + assertThat(a2_1.getA2_mapLocalDateLocalDate(), is(a2_2.getA2_mapLocalDateLocalDate())); + assertThat(a2_1.getA2_mapLocalTimeLocalTime(), is(a2_2.getA2_mapLocalTimeLocalTime())); + assertThat(a2_1.getA2_mapLocalDateTimeLocalDateTime(), is(a2_2.getA2_mapLocalDateTimeLocalDateTime())); + assertThat(a2_1.getA2_mapUuidUuid(), is(a2_2.getA2_mapUuidUuid())); + assertThat(a2_1.getA2_mapEnmEnm(), is(a2_2.getA2_mapEnmEnm())); + assertThat(a2_1.getA2_mapIntegerB1(), is(a2_2.getA2_mapIntegerB1())); + assertThat(a2_1.getA2_mapEnmB2(), is(a2_2.getA2_mapEnmB2())); + assertThat(a2_1.getA2_mapStringR1(), is(a2_2.getA2_mapStringR1())); + assertThat(a2_1.getA2_mapStringR2(), is(a2_2.getA2_mapStringR2())); + assertThat(a2_1.getA2_listEmpty(), is(a2_2.getA2_listEmpty())); + assertThat(a2_1.getA2_arrayEmpty(), is(a2_2.getA2_arrayEmpty())); + assertThat(a2_1.getA2_setEmpty(), is(a2_2.getA2_setEmpty())); + assertThat(a2_1.getA2_mapEmpty(), is(a2_2.getA2_mapEmpty())); + assertThat(a2_1.getA2_listListByte(), is(a2_2.getA2_listListByte())); + assertDeepEquals(a2_1.getA2_listArrayFloat(), a2_2.getA2_listArrayFloat(), ArrayList::new); + assertThat(a2_1.getA2_listSetString(), is(a2_2.getA2_listSetString())); + assertThat(a2_1.getA2_listMapEnmLocalDate(), is(a2_2.getA2_listMapEnmLocalDate())); + assertThat(a2_1.getA2_setSetShort(), is(a2_2.getA2_setSetShort())); + assertDeepEquals(a2_1.getA2_setArrayDouble(), a2_2.getA2_setArrayDouble(), HashSet::new); + assertThat(a2_1.getA2_setListString(), is(a2_2.getA2_setListString())); + assertThat(a2_1.getA2_setMapEnmLocalTime(), is(a2_2.getA2_setMapEnmLocalTime())); + assertThat(a2_1.getA2_mapIntegerMapLongBoolean(), is(a2_2.getA2_mapIntegerMapLongBoolean())); + assertThat(a2_1.getA2_mapStringListB1(), is(a2_2.getA2_mapStringListB1())); + assertEquals(a2_2.getA2_mapBigIntegerArrayBigDecimal().keySet(), a2_1.getA2_mapBigIntegerArrayBigDecimal().keySet()); + assertDeepEquals(a2_2.getA2_mapBigIntegerArrayBigDecimal().values(), a2_2.getA2_mapBigIntegerArrayBigDecimal().values(), HashSet::new); + assertThat(a2_1.getA2_mapEnmSetB2(), is(a2_2.getA2_mapEnmSetB2())); + assertThat(a2_1.getA2_mapIntegerListMapShortSetB2(), is(a2_2.getA2_mapIntegerListMapShortSetB2())); + assertThat(a2_1.getA2_arrayArrayPrimBoolean(), is(a2_2.getA2_arrayArrayPrimBoolean())); + assertThat(a2_1.getA2_arrayArrayPrimChar(), is(a2_2.getA2_arrayArrayPrimChar())); + assertThat(a2_1.getA2_arrayArrayPrimByte(), is(a2_2.getA2_arrayArrayPrimByte())); + assertThat(a2_1.getA2_arrayArrayPrimShort(), is(a2_2.getA2_arrayArrayPrimShort())); + assertThat(a2_1.getA2_arrayArrayPrimInteger(), is(a2_2.getA2_arrayArrayPrimInteger())); + assertThat(a2_1.getA2_arrayArrayPrimLong(), is(a2_2.getA2_arrayArrayPrimLong())); + assertThat(a2_1.getA2_arrayArrayPrimFloat(), is(a2_2.getA2_arrayArrayPrimFloat())); + assertThat(a2_1.getA2_arrayArrayPrimDouble(), is(a2_2.getA2_arrayArrayPrimDouble())); + assertThat(a2_1.getA2_arrayArrayBoolean(), is(a2_2.getA2_arrayArrayBoolean())); + assertThat(a2_1.getA2_arrayArrayChar(), is(a2_2.getA2_arrayArrayChar())); + assertThat(a2_1.getA2_arrayArrayByte(), is(a2_2.getA2_arrayArrayByte())); + assertThat(a2_1.getA2_arrayArrayShort(), is(a2_2.getA2_arrayArrayShort())); + assertThat(a2_1.getA2_arrayArrayInteger(), is(a2_2.getA2_arrayArrayInteger())); + assertThat(a2_1.getA2_arrayArrayLong(), is(a2_2.getA2_arrayArrayLong())); + assertThat(a2_1.getA2_arrayArrayFloat(), is(a2_2.getA2_arrayArrayFloat())); + assertThat(a2_1.getA2_arrayArrayDouble(), is(a2_2.getA2_arrayArrayDouble())); + assertThat(a2_1.getA2_arrayArrayString(), is(a2_2.getA2_arrayArrayString())); + assertThat(a2_1.getA2_arrayArrayBigInteger(), is(a2_2.getA2_arrayArrayBigInteger())); + assertThat(a2_1.getA2_arrayArrayBigDecimal(), is(a2_2.getA2_arrayArrayBigDecimal())); + assertThat(a2_1.getA2_arrayArrayLocalDate(), is(a2_2.getA2_arrayArrayLocalDate())); + assertThat(a2_1.getA2_arrayArrayLocalTime(), is(a2_2.getA2_arrayArrayLocalTime())); + assertThat(a2_1.getA2_arrayArrayLocalDateTime(), is(a2_2.getA2_arrayArrayLocalDateTime())); + assertThat(a2_1.getA2_arrayArrayUuid(), is(a2_2.getA2_arrayArrayUuid())); + assertThat(a2_1.getA2_arrayArrayEnm(), is(a2_2.getA2_arrayArrayEnm())); + assertThat(a2_1.getA2_arrayArrayB1(), is(a2_2.getA2_arrayArrayB1())); + assertThat(a2_1.getA2_arrayArrayB2(), is(a2_2.getA2_arrayArrayB2())); + assertThat(a2_1.getA2_arrayArrayR1(), is(a2_2.getA2_arrayArrayR1())); + assertThat(a2_1.getA2_arrayArrayR2(), is(a2_2.getA2_arrayArrayR2())); + assertThat(a2_1.getA2_point(), is(a2_2.getA2_point())); + assertThat(a2_1.getA2_listPoint(), is(a2_2.getA2_listPoint())); + assertThat(a2_1.getA2_arrayPoint(), is(a2_2.getA2_arrayPoint())); + assertThat(a2_1.getA2_setPoint(), is(a2_2.getA2_setPoint())); + assertThat(a2_1.getA2_mapEnmListPoint(), is(a2_2.getA2_mapEnmListPoint())); + } + + + public static void assertExampleConfigurationsB1Equal( + ExampleConfigurationB1 b1_1, + ExampleConfigurationB1 b1_2 + ) { + assertThat(ExampleConfigurationB1.getB1_staticFinalInt(), is(1)); + assertThat(ExampleConfigurationB1.getB1_staticInt(), is(2)); + + assertThat(b1_1.getB1_finalInt(), is(b1_2.getB1_finalInt())); + assertThat(b1_1.getB1_transientInt(), is(b1_2.getB1_transientInt())); + assertThat(b1_1.getB1_ignoredInt(), is(b1_2.getB1_ignoredInt())); + assertThat(b1_1.getB1_ignoredString(), is(b1_2.getB1_ignoredString())); + assertThat(b1_1.getB1_ignoredListString(), is(b1_2.getB1_ignoredListString())); + assertThat(b1_1.isB1_primBool(), is(b1_2.isB1_primBool())); + assertThat(b1_1.getB1_refChar(), is(b1_2.getB1_refChar())); + assertThat(b1_1.getB1_string(), is(b1_2.getB1_string())); + assertThat(b1_1.getB1_listByte(), is(b1_2.getB1_listByte())); + assertThat(b1_1.getB1_arrayShort(), is(b1_2.getB1_arrayShort())); + assertThat(b1_1.getB1_setInteger(), is(b1_2.getB1_setInteger())); + assertThat(b1_1.getB1_listEmpty(), is(b1_2.getB1_listEmpty())); + assertThat(b1_1.getB1_mapLongLong(), is(b1_2.getB1_mapLongLong())); + assertThat(b1_1.getB1_listListByte(), is(b1_2.getB1_listListByte())); + assertThat(b1_1.getB1_point(), is(b1_2.getB1_point())); + assertEquals(b1_2, b1_1); + } + + public static void assertExampleConfigurationsB2Equal( + ExampleConfigurationB2 b2_1, + ExampleConfigurationB2 b2_2 + ) { + assertExampleConfigurationsB1Equal(b2_1, b2_2); + + assertThat(ExampleConfigurationB2.getB1_staticFinalInt(), is(1)); + assertThat(ExampleConfigurationB2.getB1_staticInt(), is(2)); + + assertThat(b2_1.getB2_finalInt(), is(b2_2.getB2_finalInt())); + assertThat(b2_1.getB2_transientInt(), is(b2_2.getB2_transientInt())); + assertThat(b2_1.getB2_ignoredInt(), is(b2_2.getB2_ignoredInt())); + assertThat(b2_1.getB2_ignoredString(), is(b2_2.getB2_ignoredString())); + assertThat(b2_1.getB2_ignoredListString(), is(b2_2.getB2_ignoredListString())); + assertThat(b2_1.getB2_primChar(), is(b2_2.getB2_primChar())); + assertThat(b2_1.getB2_refBool(), is(b2_2.getB2_refBool())); + assertThat(b2_1.getB2_bigInteger(), is(b2_2.getB2_bigInteger())); + assertThat(b2_1.getB2_listShort(), is(b2_2.getB2_listShort())); + assertThat(b2_1.getB2_arrayInteger(), is(b2_2.getB2_arrayInteger())); + assertThat(b2_1.getB2_setLong(), is(b2_2.getB2_setLong())); + assertThat(b2_1.getB2_arrayEmpty(), is(b2_2.getB2_arrayEmpty())); + assertThat(b2_1.getB2_mapFloatFloat(), is(b2_2.getB2_mapFloatFloat())); + assertDeepEquals(b2_1.getB2_setArrayDouble(), b2_2.getB2_setArrayDouble(), LinkedHashSet::new); + assertThat(b2_1.getB2_listPoint(), is(b2_2.getB2_listPoint())); + assertEquals(b2_2, b2_1); + } + + public static > void assertDeepEquals( + C collection1, + C collection2, + Supplier>> collectionFactory + ) { + Collection> c1 = collection1.stream().map(Arrays::asList) + .collect(Collectors.toCollection(collectionFactory)); + Collection> c2 = collection2.stream().map(Arrays::asList) + .collect(Collectors.toCollection(collectionFactory)); + assertEquals(c2, c1); + } +} diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleInitializer.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleInitializer.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleInitializer.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleInitializer.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleRecord1.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleRecord1.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleRecord1.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleRecord1.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleRecord2.java b/configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleRecord2.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/configurations/ExampleRecord2.java rename to configlib-core/src/testFixtures/java/de/exlll/configlib/configurations/ExampleRecord2.java diff --git a/configlib-paper/build.gradle.kts b/configlib-paper/build.gradle.kts index bdb7400..5605818 100644 --- a/configlib-paper/build.gradle.kts +++ b/configlib-paper/build.gradle.kts @@ -1,10 +1,8 @@ plugins { - `java-config` + `core-config` + `plugins-config` } dependencies { - shade(project(":configlib-core")) - implementation("io.papermc.paper:paper-api:1.19-R0.1-SNAPSHOT") -} - -tasks.jar { from(project(":configlib-core").sourceSets["main"].output) } \ No newline at end of file + compileOnly("io.papermc.paper:paper-api:1.19-R0.1-SNAPSHOT") +} \ No newline at end of file diff --git a/configlib-velocity/build.gradle.kts b/configlib-velocity/build.gradle.kts index 9a6c87e..18ae525 100644 --- a/configlib-velocity/build.gradle.kts +++ b/configlib-velocity/build.gradle.kts @@ -1,11 +1,9 @@ plugins { - `java-config` + `core-config` + `plugins-config` } dependencies { - shade(project(":configlib-core")) - implementation("com.velocitypowered:velocity-api:3.0.1") + compileOnly("com.velocitypowered:velocity-api:3.0.1") annotationProcessor("com.velocitypowered:velocity-api:3.0.1") -} - -tasks.jar { from(project(":configlib-core").sourceSets["main"].output) } \ No newline at end of file +} \ No newline at end of file diff --git a/configlib-waterfall/build.gradle.kts b/configlib-waterfall/build.gradle.kts index 4338ac7..55698a6 100644 --- a/configlib-waterfall/build.gradle.kts +++ b/configlib-waterfall/build.gradle.kts @@ -1,10 +1,8 @@ plugins { - `java-config` + `core-config` + `plugins-config` } dependencies { - shade(project(":configlib-core")) - implementation("io.github.waterfallmc:waterfall-api:1.19-R0.1-SNAPSHOT") -} - -tasks.jar { from(project(":configlib-core").sourceSets["main"].output) } \ No newline at end of file + compileOnly("io.github.waterfallmc:waterfall-api:1.19-R0.1-SNAPSHOT") +} \ No newline at end of file diff --git a/configlib-yaml/build.gradle.kts b/configlib-yaml/build.gradle.kts new file mode 100644 index 0000000..c70690f --- /dev/null +++ b/configlib-yaml/build.gradle.kts @@ -0,0 +1,8 @@ +plugins { + `core-config` + `libs-config` +} + +dependencies { + implementation("org.snakeyaml:snakeyaml-engine:2.3") +} \ No newline at end of file diff --git a/configlib-core/src/main/java/de/exlll/configlib/YamlConfigurationProperties.java b/configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurationProperties.java similarity index 100% rename from configlib-core/src/main/java/de/exlll/configlib/YamlConfigurationProperties.java rename to configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurationProperties.java diff --git a/configlib-core/src/main/java/de/exlll/configlib/YamlConfigurationStore.java b/configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurationStore.java similarity index 100% rename from configlib-core/src/main/java/de/exlll/configlib/YamlConfigurationStore.java rename to configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurationStore.java diff --git a/configlib-core/src/main/java/de/exlll/configlib/Configurations.java b/configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurations.java similarity index 87% rename from configlib-core/src/main/java/de/exlll/configlib/Configurations.java rename to configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurations.java index 3407fc4..a5ab1de 100644 --- a/configlib-core/src/main/java/de/exlll/configlib/Configurations.java +++ b/configlib-yaml/src/main/java/de/exlll/configlib/YamlConfigurations.java @@ -6,8 +6,8 @@ import java.util.function.Consumer; /** * This class contains convenience methods for loading, saving, and updating configurations. */ -public final class Configurations { - private Configurations() {} +public final class YamlConfigurations { + private YamlConfigurations() {} /** * Loads a configuration of the given type from the specified YAML file using a @@ -23,12 +23,12 @@ public final class Configurations { * @throws RuntimeException if reading the configuration throws an exception * @see YamlConfigurationStore#load(Path) */ - public static T loadYamlConfiguration( + public static T loadConfiguration( Path configurationFile, Class configurationType ) { final var properties = YamlConfigurationProperties.newBuilder().build(); - return loadYamlConfiguration(configurationFile, configurationType, properties); + return loadConfiguration(configurationFile, configurationType, properties); } /** @@ -47,14 +47,14 @@ public final class Configurations { * @throws RuntimeException if reading the configuration throws an exception * @see YamlConfigurationStore#load(Path) */ - public static T loadYamlConfiguration( + public static T loadConfiguration( Path configurationFile, Class configurationType, Consumer> propertiesConfigurer ) { final var builder = YamlConfigurationProperties.newBuilder(); propertiesConfigurer.accept(builder); - return loadYamlConfiguration(configurationFile, configurationType, builder.build()); + return loadConfiguration(configurationFile, configurationType, builder.build()); } /** @@ -72,7 +72,7 @@ public final class Configurations { * @throws RuntimeException if reading the configuration throws an exception * @see YamlConfigurationStore#load(Path) */ - public static T loadYamlConfiguration( + public static T loadConfiguration( Path configurationFile, Class configurationType, YamlConfigurationProperties properties @@ -85,7 +85,7 @@ public final class Configurations { * Updates a YAML configuration file with a configuration of the given type using a * {@code YamlConfigurationProperties} object with default values. *

- * See {@link YamlConfigurationStore#save(Object, Path)} for an explanation of how the update is // TODO: change #save to #update + * See {@link YamlConfigurationStore#update(Path)} for an explanation of how the update is done. * done. * * @param configurationFile the configuration file that is updated @@ -97,12 +97,12 @@ public final class Configurations { * @throws RuntimeException if loading or saving the configuration throws an exception * @see YamlConfigurationStore#update(Path) */ - public static T updateYamlConfiguration( + public static T updateConfiguration( Path configurationFile, Class configurationType ) { final var properties = YamlConfigurationProperties.newBuilder().build(); - return updateYamlConfiguration(configurationFile, configurationType, properties); + return updateConfiguration(configurationFile, configurationType, properties); } /** @@ -110,8 +110,7 @@ public final class Configurations { * {@code YamlConfigurationProperties} object that is built by a builder. The builder is * initialized with default values and can be configured by the {@code propertiesConfigurer}. *

- * See {@link YamlConfigurationStore#save(Object, Path)} for an explanation of how the update is - * done. + * See {@link YamlConfigurationStore#update(Path)} for an explanation of how the update is done. * * @param configurationFile the configuration file that is updated * @param configurationType the type of configuration @@ -123,22 +122,21 @@ public final class Configurations { * @throws RuntimeException if loading or saving the configuration throws an exception * @see YamlConfigurationStore#update(Path) */ - public static T updateYamlConfiguration( + public static T updateConfiguration( Path configurationFile, Class configurationType, Consumer> propertiesConfigurer ) { final var builder = YamlConfigurationProperties.newBuilder(); propertiesConfigurer.accept(builder); - return updateYamlConfiguration(configurationFile, configurationType, builder.build()); + return updateConfiguration(configurationFile, configurationType, builder.build()); } /** * Updates a YAML configuration file with a configuration of the given type using the given * {@code YamlConfigurationProperties} object. *

- * See {@link YamlConfigurationStore#save(Object, Path)} for an explanation of how the update is - * done. + * See {@link YamlConfigurationStore#update(Path)} for an explanation of how the update is done. * * @param configurationFile the configuration file that is updated * @param configurationType the type of configuration @@ -150,7 +148,7 @@ public final class Configurations { * @throws RuntimeException if loading or saving the configuration throws an exception * @see YamlConfigurationStore#update(Path) */ - public static T updateYamlConfiguration( + public static T updateConfiguration( Path configurationFile, Class configurationType, YamlConfigurationProperties properties @@ -173,13 +171,13 @@ public final class Configurations { * @throws RuntimeException if writing the configuration throws an exception * @see YamlConfigurationStore#save(Object, Path) */ - public static void saveYamlConfiguration( + public static void saveConfiguration( Path configurationFile, Class configurationType, T configuration ) { final var properties = YamlConfigurationProperties.newBuilder().build(); - saveYamlConfiguration(configurationFile, configurationType, configuration, properties); + saveConfiguration(configurationFile, configurationType, configuration, properties); } /** @@ -198,7 +196,7 @@ public final class Configurations { * @throws RuntimeException if writing the configuration throws an exception * @see YamlConfigurationStore#save(Object, Path) */ - public static void saveYamlConfiguration( + public static void saveConfiguration( Path configurationFile, Class configurationType, T configuration, @@ -206,7 +204,7 @@ public final class Configurations { ) { final var builder = YamlConfigurationProperties.newBuilder(); propertiesConfigurer.accept(builder); - saveYamlConfiguration(configurationFile, configurationType, configuration, builder.build()); + saveConfiguration(configurationFile, configurationType, configuration, builder.build()); } /** @@ -224,7 +222,7 @@ public final class Configurations { * @throws RuntimeException if writing the configuration throws an exception * @see YamlConfigurationStore#save(Object, Path) */ - public static void saveYamlConfiguration( + public static void saveConfiguration( Path configurationFile, Class configurationType, T configuration, diff --git a/configlib-yaml/src/test/java/de/exlll/configlib/ExampleConfigurationYamlTests.java b/configlib-yaml/src/test/java/de/exlll/configlib/ExampleConfigurationYamlTests.java new file mode 100644 index 0000000..acca592 --- /dev/null +++ b/configlib-yaml/src/test/java/de/exlll/configlib/ExampleConfigurationYamlTests.java @@ -0,0 +1,84 @@ +package de.exlll.configlib; + +import com.google.common.jimfs.Jimfs; +import de.exlll.configlib.configurations.ExampleConfigurationA2; +import de.exlll.configlib.configurations.ExampleConfigurationNulls; +import de.exlll.configlib.configurations.ExampleInitializer; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.awt.Point; +import java.io.IOException; +import java.nio.file.FileSystem; +import java.nio.file.Files; +import java.nio.file.Path; + +import static de.exlll.configlib.configurations.ExampleEqualityAsserter.assertExampleConfigurationsA2Equal; +import static de.exlll.configlib.configurations.ExampleEqualityAsserter.assertExampleConfigurationsNullsEqual; + +final class ExampleConfigurationYamlTests { + private static final ConfigurationProperties PROPERTIES_ALLOW_NULL = ConfigurationProperties.newBuilder() + .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) + .outputNulls(true) + .inputNulls(true) + .build(); + private static final ConfigurationProperties PROPERTIES_DENY_NULL = ConfigurationProperties.newBuilder() + .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) + .outputNulls(false) + .inputNulls(false) + .build(); + + private final FileSystem fs = Jimfs.newFileSystem(); + private final Path yamlFile = fs.getPath("/tmp/config.yml"); + + @BeforeEach + void setUp() throws IOException { + Files.createDirectories(yamlFile.getParent()); + } + + @AfterEach + void tearDown() throws IOException { + fs.close(); + } + + @Test + void yamlStoreSavesAndLoadsExampleConfigurationA2() { + var properties = YamlConfigurationProperties.newBuilder() + .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) + .build(); + var store = new YamlConfigurationStore<>(ExampleConfigurationA2.class, properties); + ExampleConfigurationA2 cfg1 = ExampleInitializer.newExampleConfigurationA2(); + store.save(cfg1, yamlFile); + ExampleConfigurationA2 cfg2 = store.load(yamlFile); + assertExampleConfigurationsA2Equal(cfg1, cfg2); + } + + @Test + void yamlStoreSavesAndLoadsExampleConfigurationNullsWithNullCollectionElements1() { + var properties = YamlConfigurationProperties.newBuilder() + .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) + .outputNulls(true) + .inputNulls(true) + .build(); + var store = new YamlConfigurationStore<>(ExampleConfigurationNulls.class, properties); + ExampleConfigurationNulls cfg1 = ExampleInitializer + .newExampleConfigurationNullsWithNullCollectionElements1(); + store.save(cfg1, yamlFile); + ExampleConfigurationNulls cfg2 = store.load(yamlFile); + assertExampleConfigurationsNullsEqual(cfg1, cfg2); + } + + @Test + void yamlStoreSavesAndLoadsExampleConfigurationNullsWithoutNullCollectionElements1() { + var properties = YamlConfigurationProperties.newBuilder() + .addSerializer(Point.class, TestUtils.POINT_SERIALIZER) + .build(); + var store = new YamlConfigurationStore<>(ExampleConfigurationNulls.class, properties); + ExampleConfigurationNulls cfg1 = ExampleInitializer + .newExampleConfigurationNullsWithoutNullCollectionElements1(); + store.save(cfg1, yamlFile); + ExampleConfigurationNulls cfg2 = store.load(yamlFile); + assertExampleConfigurationsNullsEqual(cfg1, cfg2); + } +} diff --git a/configlib-core/src/test/java/de/exlll/configlib/YamlConfigurationPropertiesTest.java b/configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationPropertiesTest.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/YamlConfigurationPropertiesTest.java rename to configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationPropertiesTest.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/YamlConfigurationStoreTest.java b/configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationStoreTest.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/YamlConfigurationStoreTest.java rename to configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationStoreTest.java diff --git a/configlib-core/src/test/java/de/exlll/configlib/ConfigurationsTest.java b/configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationsTest.java similarity index 83% rename from configlib-core/src/test/java/de/exlll/configlib/ConfigurationsTest.java rename to configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationsTest.java index 709c71d..23e42ab 100644 --- a/configlib-core/src/test/java/de/exlll/configlib/ConfigurationsTest.java +++ b/configlib-yaml/src/test/java/de/exlll/configlib/YamlConfigurationsTest.java @@ -12,7 +12,7 @@ import java.nio.file.Path; import static org.junit.jupiter.api.Assertions.assertEquals; -class ConfigurationsTest { +class YamlConfigurationsTest { private static final FieldFilter includeI = field -> field.getName().equals("i"); private final FileSystem fs = Jimfs.newFileSystem(); private final Path yamlFile = fs.getPath("/tmp/config.yml"); @@ -37,11 +37,11 @@ class ConfigurationsTest { void saveYamlConfiguration1() { Config configuration = new Config(); - Configurations.saveYamlConfiguration(yamlFile, Config.class, configuration); + YamlConfigurations.saveConfiguration(yamlFile, Config.class, configuration); assertEquals("i: 10\nj: 11", TestUtils.readFile(yamlFile)); configuration.i = 20; - Configurations.saveYamlConfiguration(yamlFile, Config.class, configuration); + YamlConfigurations.saveConfiguration(yamlFile, Config.class, configuration); assertEquals("i: 20\nj: 11", TestUtils.readFile(yamlFile)); } @@ -49,7 +49,7 @@ class ConfigurationsTest { void saveYamlConfiguration2() { Config configuration = new Config(); - Configurations.saveYamlConfiguration( + YamlConfigurations.saveConfiguration( yamlFile, Config.class, configuration, builder -> builder.setFieldFilter(includeI) ); @@ -60,7 +60,7 @@ class ConfigurationsTest { void saveYamlConfiguration3() { Config configuration = new Config(); - Configurations.saveYamlConfiguration( + YamlConfigurations.saveConfiguration( yamlFile, Config.class, configuration, YamlConfigurationProperties.newBuilder().setFieldFilter(includeI).build() ); @@ -70,18 +70,18 @@ class ConfigurationsTest { @Test void loadYamlConfiguration1() { writeString("i: 20\nk: 30"); - Config config = Configurations.loadYamlConfiguration(yamlFile, Config.class); + Config config = YamlConfigurations.loadConfiguration(yamlFile, Config.class); assertConfigEquals(config, 20, 11); writeString("i: 20\nj: 30"); - config = Configurations.loadYamlConfiguration(yamlFile, Config.class); + config = YamlConfigurations.loadConfiguration(yamlFile, Config.class); assertConfigEquals(config, 20, 30); } @Test void loadYamlConfiguration2() { writeString("i: 20\nj: 30"); - Config config = Configurations.loadYamlConfiguration( + Config config = YamlConfigurations.loadConfiguration( yamlFile, Config.class, builder -> builder.setFieldFilter(includeI) ); @@ -92,7 +92,7 @@ class ConfigurationsTest { void loadYamlConfiguration3() { writeString("i: 20\nj: 30"); - Config config = Configurations.loadYamlConfiguration( + Config config = YamlConfigurations.loadConfiguration( yamlFile, Config.class, YamlConfigurationProperties.newBuilder().setFieldFilter(includeI).build() ); @@ -102,19 +102,19 @@ class ConfigurationsTest { @Test void updateYamlConfiguration1() { - Config config = Configurations.updateYamlConfiguration(yamlFile, Config.class); + Config config = YamlConfigurations.updateConfiguration(yamlFile, Config.class); assertConfigEquals(config, 10, 11); assertEquals("i: 10\nj: 11", TestUtils.readFile(yamlFile)); writeString("i: 20\nk: 30"); - config = Configurations.updateYamlConfiguration(yamlFile, Config.class); + config = YamlConfigurations.updateConfiguration(yamlFile, Config.class); assertConfigEquals(config, 20, 11); assertEquals("i: 20\nj: 11", TestUtils.readFile(yamlFile)); } @Test void updateYamlConfiguration2() { - Config config = Configurations.updateYamlConfiguration( + Config config = YamlConfigurations.updateConfiguration( yamlFile, Config.class, builder -> builder.setFieldFilter(includeI) ); @@ -124,7 +124,7 @@ class ConfigurationsTest { @Test void updateYamlConfiguration3() { - Config config = Configurations.updateYamlConfiguration( + Config config = YamlConfigurations.updateConfiguration( yamlFile, Config.class, YamlConfigurationProperties.newBuilder().setFieldFilter(includeI).build() ); diff --git a/configlib-core/src/test/java/de/exlll/configlib/YamlFileWriterTest.java b/configlib-yaml/src/test/java/de/exlll/configlib/YamlFileWriterTest.java similarity index 100% rename from configlib-core/src/test/java/de/exlll/configlib/YamlFileWriterTest.java rename to configlib-yaml/src/test/java/de/exlll/configlib/YamlFileWriterTest.java diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c023ec8b20f512888fe07c5bd3ff77bb8f..249e5832f090a2944b7473328c07c9755baa3196 100644 GIT binary patch delta 21931 zcmaI6V~n8R6E)b==Cp0wc2C>3ZQD=Vwry+L)3)8ywrx-EZ{KV-`6rwGaFa@IRdPR6 z)u~hG4$gort%Eht{y(MI%kt z0Y0nYm>z`rdM7Lh=##-Ps^6h>FU7m~cgyxqs;Nqi&~ytk^e7KkJL>mWt4%qL*DKv= zcgsip(fRo@w)aGHJ&cRiJs;2cc4v+b>Y#M1j_&4}9i`o^*Uzg;mkN44%!|HxGTNmY za%+!%)BkmU@yFRSA8-3+6za3Rpa>0d>aP z|6x$gEo6tjC%O4IHwK@zhTuzcDM38z%iFcrUhI%h?s07}F{H1l!3u%>r`EgBk|m$r z87XPla{FK=fulv&qhy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~oHlJ62(mQOTXXxYnw<1(JvtqbPI7fs_ z<|nSUxS?(IS?CMOk%P~%ap=Plyu#}4V3b*($QC4I7ZY+g#=3>%CKQJizarNe+>m8h z*Huj0jALg{bye9M-dL*Fkww%5BRMLNfw1XqvS*nvQa@~kIGYPdWuH! zKL`r)AjOw|3fyoioKcN#aqr`OUSJxQ*u1=~fH^o3FdHtFIS;hMi!V`^7_2;4C5siKj4rKx+(MrSy?^zaADG@E+v>8vVHd z%Dg;Oh!!AraDyrw_%Y4~(1oxuf!@>uADzTNEoUPe!T@Z~vmvM@v<^Wa!(cR^`7Z^Y z@zDW{RB&}c5pl2_&MyideT3zo;y4nBgT+05hvL{l$QW8GNM)IqG@v<1Y7duE1pr;J zhv`djXrTnvM9G2!lS^!f1KWXqH3s&}UFsije|L}|unzi~D^g7Y%lwG_Y*S0Hh)*mB z1cE%^cUFlC1%S}+X(7@Fpni2K^kx}_`0w>RNC+H&a<%?xi5@_bWuZ}4RF$QHY5&I{ zsBte11hNk1ohTph6SoB;Ed#{C;OiHGkA~S(LotaJS!k>)*r+^^w1R?WdIHn$Wq?sK z8?e0sho<^~DguyQWdqKQvmpMPWne=>zZwGvY9$zuf{6f2qbR6R2#^Pp1T@A_(2Nkk zcT5%98UoyB;RU3b;J_GYH3q6HHKv4qlR5%JGO{1Wjg;do~nGG}N0Q_?v&=Dda;i \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,101 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index ac1b06f..53a6b23 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle.kts b/settings.gradle.kts index a5f4bf0..bfb48b0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,6 @@ rootProject.name = "configlib" include("configlib-core") +include("configlib-yaml") include("configlib-paper") include("configlib-waterfall") include("configlib-velocity")