-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32920 Fix ObjectExportNotification to string and constructor (#434)
Fixed Lombok annotaiton + added tests
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
...messaging/src/test/java/ca/gc/aafc/dina/messaging/message/ObjectExportNotificationIT.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,28 @@ | ||
package ca.gc.aafc.dina.messaging.message; | ||
|
||
import java.util.UUID; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
|
||
import ca.gc.aafc.dina.testsupport.TestResourceHelper; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class ObjectExportNotificationIT { | ||
|
||
@Test | ||
public void testSerDe() throws JsonProcessingException { | ||
|
||
ObjectExportNotification oen = ObjectExportNotification.builder() | ||
.uuid(UUID.randomUUID()) | ||
.username("user") | ||
.toa("toa").build(); | ||
|
||
String asJson = TestResourceHelper.OBJECT_MAPPER.writeValueAsString(oen); | ||
|
||
ObjectExportNotification oen2 = TestResourceHelper.OBJECT_MAPPER.readValue(asJson, ObjectExportNotification.class); | ||
assertEquals(oen, oen2); | ||
} | ||
} |