Skip to content

Commit

Permalink
Update tck mapping test
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Jul 4, 2022
1 parent 523f112 commit 5ac22e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -102,7 +102,7 @@ public void shouldConvertColumnEntityToSocialMedia(){
entity.add("name", "Social Media");
entity.add("nickname", "otaviojava");
entity.add("createdOn",date);
entity.add("type", SocialMediaNotification.class.getSimpleName());
entity.add("dtype", SocialMediaNotification.class.getSimpleName());
SocialMediaNotification notification = this.converter.toEntity(entity);
assertEquals(100L, notification.getId());
assertEquals("Social Media", notification.getName());
Expand All @@ -118,7 +118,7 @@ public void shouldConvertColumnEntityToSms(){
entity.add("name", "SMS Notification");
entity.add("phone", "+351987654123");
entity.add("createdOn", date);
entity.add("type", "SMS");
entity.add("dtype", "SMS");
SmsNotification notification = this.converter.toEntity(entity);
Assertions.assertEquals(100L, notification.getId());
Assertions.assertEquals("SMS Notification", notification.getName());
Expand All @@ -134,7 +134,7 @@ public void shouldConvertColumnEntityToEmail(){
entity.add("name", "Email Notification");
entity.add("email", "otavio@otavio.test");
entity.add("createdOn", date);
entity.add("type", "Email");
entity.add("dtype", "Email");
EmailNotification notification = this.converter.toEntity(entity);
Assertions.assertEquals(100L, notification.getId());
Assertions.assertEquals("Email Notification", notification.getName());
Expand Down Expand Up @@ -209,7 +209,7 @@ public void shouldReturnErrorWhenMismatchField() {
entity.add("name", "Email Notification");
entity.add("email", "otavio@otavio.test");
entity.add("createdOn", date);
entity.add("type", "Wrong");
entity.add("dtype", "Wrong");
Assertions.assertThrows(MappingException.class, ()-> this.converter.toEntity(entity));
}
}
Expand Up @@ -101,7 +101,7 @@ public void shouldConvertDocumentEntityToSocialMedia(){
entity.add("name", "Social Media");
entity.add("nickname", "otaviojava");
entity.add("createdOn",date);
entity.add("type", SocialMediaNotification.class.getSimpleName());
entity.add("dtype", SocialMediaNotification.class.getSimpleName());
SocialMediaNotification notification = this.converter.toEntity(entity);
assertEquals(100L, notification.getId());
assertEquals("Social Media", notification.getName());
Expand All @@ -117,7 +117,7 @@ public void shouldConvertDocumentEntityToSms(){
entity.add("name", "SMS Notification");
entity.add("phone", "+351987654123");
entity.add("createdOn", date);
entity.add("type", "SMS");
entity.add("dtype", "SMS");
SmsNotification notification = this.converter.toEntity(entity);
Assertions.assertEquals(100L, notification.getId());
Assertions.assertEquals("SMS Notification", notification.getName());
Expand All @@ -133,7 +133,7 @@ public void shouldConvertDocumentEntityToEmail(){
entity.add("name", "Email Notification");
entity.add("email", "otavio@otavio.test");
entity.add("createdOn", date);
entity.add("type", "Email");
entity.add("dtype", "Email");
EmailNotification notification = this.converter.toEntity(entity);
Assertions.assertEquals(100L, notification.getId());
Assertions.assertEquals("Email Notification", notification.getName());
Expand Down Expand Up @@ -208,7 +208,7 @@ public void shouldReturnErrorWhenMismatchField() {
entity.add("name", "Email Notification");
entity.add("email", "otavio@otavio.test");
entity.add("createdOn", date);
entity.add("type", "Wrong");
entity.add("dtype", "Wrong");
Assertions.assertThrows(MappingException.class, ()-> this.converter.toEntity(entity));
}
}

0 comments on commit 5ac22e1

Please sign in to comment.