This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: decouple the internal model names from the generated JSON (#14)
- Loading branch information
Showing
9 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/com/hlag/tools/commvis/analyzer/model/HttpConsumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/java/com/hlag/tools/commvis/analyzer/model/CommunicationModelTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.hlag.tools.commvis.analyzer.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class CommunicationModelTest { | ||
@Test | ||
void shouldHaveSerializedNameAnnotationOnFiled_toDecoupleTheFieldNameFromJson() { | ||
Field[] declaredFields = CommunicationModel.class.getDeclaredFields(); | ||
|
||
for (Field f : declaredFields) { | ||
SerializedName actualAnnotation = f.getAnnotation(SerializedName.class); | ||
|
||
assertThat(actualAnnotation).isNotNull(); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/com/hlag/tools/commvis/analyzer/model/HttpConsumerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.hlag.tools.commvis.analyzer.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class HttpConsumerTest { | ||
@Test | ||
void shouldHaveSerializedNameAnnotationOnFiled_toDecoupleTheFieldNameFromJson() { | ||
Field[] declaredFields = CommunicationModel.class.getDeclaredFields(); | ||
|
||
for (Field f : declaredFields) { | ||
SerializedName actualAnnotation = f.getAnnotation(SerializedName.class); | ||
|
||
assertThat(actualAnnotation).isNotNull(); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/com/hlag/tools/commvis/analyzer/model/HttpProducerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.hlag.tools.commvis.analyzer.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class HttpProducerTest { | ||
@Test | ||
void shouldHaveSerializedNameAnnotationOnFiled_toDecoupleTheFieldNameFromJson() { | ||
Field[] declaredFields = CommunicationModel.class.getDeclaredFields(); | ||
|
||
for (Field f : declaredFields) { | ||
SerializedName actualAnnotation = f.getAnnotation(SerializedName.class); | ||
|
||
assertThat(actualAnnotation).isNotNull(); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/com/hlag/tools/commvis/analyzer/model/JmsReceiverTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.hlag.tools.commvis.analyzer.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class JmsReceiverTest { | ||
@Test | ||
void shouldHaveSerializedNameAnnotationOnFiled_toDecoupleTheFieldNameFromJson() { | ||
Field[] declaredFields = CommunicationModel.class.getDeclaredFields(); | ||
|
||
for (Field f : declaredFields) { | ||
SerializedName actualAnnotation = f.getAnnotation(SerializedName.class); | ||
|
||
assertThat(actualAnnotation).isNotNull(); | ||
} | ||
} | ||
} |