Skip to content

Commit

Permalink
Update package name of test classes and annotations (#233)
Browse files Browse the repository at this point in the history
Updated the package names of test classes and annotations, from `com.chrimle.*` to `io.github.chrimle.*`. The package name of test classes were overlooked when the project `groupId` was updated. This change brings consistency, and removes all references to `com.chrimle.*`. This **only** affects unit-tests within the project.
  • Loading branch information
Chrimle authored Nov 30, 2024
1 parent 4b85492 commit 054a889
Show file tree
Hide file tree
Showing 22 changed files with 63 additions and 66 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@
<generatorName>${generatorName.default}</generatorName>
<configOptions>
<additionalModelTypeAnnotations>
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
</additionalModelTypeAnnotations>
<sourceFolder>${sourceFolder.default}</sourceFolder>
<useEnumCaseInsensitive>${useEnumCaseInsensitive.default}</useEnumCaseInsensitive>
Expand Down Expand Up @@ -268,7 +268,7 @@
<templateDirectory>${templateDirectory.default}</templateDirectory>
<generatorName>${generatorName.default}</generatorName>
<configOptions>
<additionalEnumTypeAnnotations>@com.chrimle.example.annotations.TestAnnotationOne;@com.chrimle.example.annotations.TestAnnotationTwo;@com.chrimle.example.annotations.TestAnnotationThree;</additionalEnumTypeAnnotations>
<additionalEnumTypeAnnotations>@io.github.chrimle.example.annotations.TestAnnotationOne;@io.github.chrimle.example.annotations.TestAnnotationTwo;@io.github.chrimle.example.annotations.TestAnnotationThree;</additionalEnumTypeAnnotations>
<sourceFolder>${sourceFolder.default}</sourceFolder>
<useEnumCaseInsensitive>${useEnumCaseInsensitive.default}</useEnumCaseInsensitive>
<serializableModel>${serializableModel.default}</serializableModel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/
package com.chrimle.example.annotations;
package io.github.chrimle.example.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/
package com.chrimle.example.annotations;
package io.github.chrimle.example.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/
package com.chrimle.example.annotations;
package io.github.chrimle.example.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/
package com.chrimle.example;
package io.github.chrimle.example;

/**
* Enum class listing all expected classes ({@code record}s and {@code enum}s) to be generated from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/
package com.chrimle.example;
package io.github.chrimle.example;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
limitations under the License.
*/
package com.chrimle.example;
package io.github.chrimle.example;

import com.chrimle.example.utils.AssertionUtils;
import io.github.chrimle.example.utils.AssertionUtils;
import java.util.Arrays;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/
package com.chrimle.example;
package io.github.chrimle.example;

/**
* Represents each {@code <pluginExecution>} present in the Maven {@code <build>} step. This is used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
limitations under the License.
*/
package com.chrimle.example;
package io.github.chrimle.example;

import com.chrimle.example.utils.AssertionUtils;
import com.chrimle.example.utils.GeneratedEnumTestUtils;
import com.chrimle.example.utils.GeneratedRecordTestUtils;
import io.github.chrimle.example.utils.AssertionUtils;
import io.github.chrimle.example.utils.GeneratedEnumTestUtils;
import io.github.chrimle.example.utils.GeneratedRecordTestUtils;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
limitations under the License.
*/
package com.chrimle.example.utils;
package io.github.chrimle.example.utils;

import com.chrimle.example.GeneratedField;
import com.chrimle.example.GeneratedSource;
import io.github.chrimle.example.GeneratedField;
import io.github.chrimle.example.GeneratedSource;
import io.github.chrimle.example.annotations.TestAnnotationOne;
import io.github.chrimle.example.annotations.TestAnnotationThree;
import io.github.chrimle.example.annotations.TestAnnotationTwo;
import jakarta.validation.Valid;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
Expand Down Expand Up @@ -49,17 +52,11 @@ public static void assertIsEnum(final Class<?> clazz) {
public static void assertClassIsAnnotatedWithAdditionalTypeAnnotations(
final Class<?> classUnderTest, final boolean hasAdditionalTypeAnnotations) {
assertClassIsAnnotatedWith(
classUnderTest,
com.chrimle.example.annotations.TestAnnotationOne.class,
hasAdditionalTypeAnnotations);
classUnderTest, TestAnnotationOne.class, hasAdditionalTypeAnnotations);
assertClassIsAnnotatedWith(
classUnderTest,
com.chrimle.example.annotations.TestAnnotationTwo.class,
hasAdditionalTypeAnnotations);
classUnderTest, TestAnnotationTwo.class, hasAdditionalTypeAnnotations);
assertClassIsAnnotatedWith(
classUnderTest,
com.chrimle.example.annotations.TestAnnotationThree.class,
hasAdditionalTypeAnnotations);
classUnderTest, TestAnnotationThree.class, hasAdditionalTypeAnnotations);
}

public static void assertClassIsAnnotatedAsDeprecated(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
limitations under the License.
*/
package com.chrimle.example.utils;
package io.github.chrimle.example.utils;

import com.chrimle.example.GeneratedSource;
import io.github.chrimle.example.GeneratedSource;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
limitations under the License.
*/
package com.chrimle.example.utils;
package io.github.chrimle.example.utils;

import com.chrimle.example.GeneratedField;
import com.chrimle.example.GeneratedSource;
import io.github.chrimle.example.GeneratedField;
import io.github.chrimle.example.GeneratedSource;
import java.lang.reflect.Constructor;
import java.math.BigDecimal;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
* @deprecated
*/
@Deprecated
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public enum DeprecatedExampleEnum {
ENUM1("ENUM1"),
ENUM2("ENUM2"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
/**
* Example of an Enum
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public enum ExampleEnum {
/**
* Some description of ENUM1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public RecordWithInnerEnums(
/**
* Example of an inner enum class
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public enum ExampleInnerEnum {
/**
* Some description of ENUM1
Expand Down Expand Up @@ -100,9 +100,9 @@ public static ExampleInnerEnum fromValue(final String value) {
/**
* Example of another inner enum class
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public enum ExampleInnerTwoEnum {
ENUM1("ENUM1"),
ENUM2("ENUM2"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
* @param field1 a boolean field
*/
@Deprecated
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record DeprecatedExampleRecord(
@javax.annotation.Nonnull Boolean field1) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
*
* @param field1 a boolean field
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record ExampleRecord(
@javax.annotation.Nonnull Boolean field1) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
*
* @param field1 a String field with a default value
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record ExampleRecordWithDefaultFields(
@javax.annotation.Nonnull String field1) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
* @param field5 an Array of Boolean field
* @param field6 a Set field
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record ExampleRecordWithNullableFieldsOfEachType(
@javax.annotation.Nullable Boolean field1,
@javax.annotation.Nullable String field2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
* @param field7 ExampleRecord
* @param field8 ExampleEnum
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record ExampleRecordWithRequiredFieldsOfEachType(
@javax.annotation.Nonnull Boolean field1,
@javax.annotation.Nonnull String field2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
* @param bigDecimalMaximum BigDecimal
* @param bigDecimalMinimumAndMaximum BigDecimal
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record RecordWithAllConstraints(
@javax.annotation.Nonnull String stringStandard,
@javax.annotation.Nonnull String stringDefault,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
* @param exampleInner Example of an inner enum class
* @param exampleInnerTwo Example of another inner enum class
*/
@com.chrimle.example.annotations.TestAnnotationOne
@com.chrimle.example.annotations.TestAnnotationTwo
@com.chrimle.example.annotations.TestAnnotationThree
@io.github.chrimle.example.annotations.TestAnnotationOne
@io.github.chrimle.example.annotations.TestAnnotationTwo
@io.github.chrimle.example.annotations.TestAnnotationThree
public record RecordWithInnerEnums(
@javax.annotation.Nonnull ExampleInnerEnum exampleInner,
@javax.annotation.Nonnull ExampleInnerTwoEnum exampleInnerTwo) {
Expand Down

0 comments on commit 054a889

Please sign in to comment.