-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for language formal and informal
- Loading branch information
Showing
15 changed files
with
106 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,8 @@ components: | |
example: "[email protected]" | ||
language: | ||
$ref: '#/components/schemas/LanguageCode' | ||
dialect: | ||
$ref: '#/components/schemas/Dialect' | ||
templateData: | ||
type: array | ||
items: | ||
|
@@ -116,3 +118,10 @@ components: | |
so, sq, sr, ss, st, su, sv, sw, ta, te, tg, th, ti, tk, tl, tn, to, tr, ts, tt, tw, | ||
ty, ug, uk, ur, uz, ve, vi, vo, wa, wo, xh, yi, yo, za, zh, zu | ||
] | ||
|
||
Dialect: | ||
type: string | ||
default: formal | ||
enum: [ | ||
formal, informal | ||
] |
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
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
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
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
import de.caritas.cob.userservice.api.port.out.ConsultantAgencyRepository; | ||
import de.caritas.cob.userservice.api.service.consultingtype.ReleaseToggle; | ||
import de.caritas.cob.userservice.api.service.consultingtype.ReleaseToggleService; | ||
import de.caritas.cob.userservice.mailservice.generated.web.model.Dialect; | ||
import de.caritas.cob.userservice.mailservice.generated.web.model.LanguageCode; | ||
import de.caritas.cob.userservice.mailservice.generated.web.model.MailDTO; | ||
import java.util.List; | ||
|
@@ -91,6 +92,7 @@ public void generateEmails_Should_ReturnExpectedMailDTO_When_PresentConsultantHa | |
assertThat(generatedMail.getTemplate(), is(TEMPLATE_NEW_DIRECT_ENQUIRY_NOTIFICATION)); | ||
assertThat(generatedMail.getEmail(), is("[email protected]")); | ||
assertThat(generatedMail.getLanguage(), is(LanguageCode.DE)); | ||
assertThat(generatedMail.getDialect(), is(MAIN_CONSULTANT.getDialect())); | ||
|
||
var templateData = generatedMail.getTemplateData(); | ||
assertThat(templateData, hasSize(3)); | ||
|
@@ -143,11 +145,12 @@ public void generateEmails_Should_ReturnExpectedMailDTO_When_PresentConsultantHa | |
assertThat(generatedMail.getTemplate(), is(TEMPLATE_NEW_DIRECT_ENQUIRY_NOTIFICATION)); | ||
assertThat(generatedMail.getEmail(), is("[email protected]")); | ||
assertThat(generatedMail.getLanguage(), is(LanguageCode.DE)); | ||
|
||
assertThat(generatedMail.getDialect(), is(MAIN_CONSULTANT.getDialect())); | ||
var templateData = generatedMail.getTemplateData(); | ||
assertThat(templateData, hasSize(3)); | ||
assertThat(templateData.get(0).getKey(), is("name")); | ||
assertThat(templateData.get(0).getValue(), is("first name last name")); | ||
|
||
assertThat(templateData.get(1).getKey(), is("plz")); | ||
assertThat(templateData.get(1).getValue(), is(POSTCODE)); | ||
assertThat(templateData.get(2).getKey(), is("url")); | ||
|
Oops, something went wrong.