Skip to content

Commit

Permalink
Merge pull request #29 from CaritasDeutschland/feature-long-titles
Browse files Browse the repository at this point in the history
feat: add long titles
  • Loading branch information
mebo4b authored Dec 15, 2021
2 parents 3cf4bab + fa7bb35 commit 23891c4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions api/consultingtypeservice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -478,3 +478,6 @@ components:
default:
type: string
example: "Lorem ipsum"
long:
type: string
example: "Lorem ipsum"
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public static ConsultingTypeCoreDTO mapConsultingType(ConsultingType consultingT

private static ConsultingTypeCoreDTOTitles mapConsultingTypeCoreDtoTitles(Titles titles) {
return new ConsultingTypeCoreDTOTitles()
._default(titles.getDefault());
._default(titles.getDefault())
._long(titles.getLong());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ public void fetchConsultingTypeGroupList_Should_ReturnListOfConsultingTypeGroupR
assertThat(result.get(0).getTitle(), is(GROUP_1));
assertThat(result.get(0).getConsultingTypes(), hasSize(2));
assertThat(result.get(0).getConsultingTypes().get(0).getTitles().getDefault(), is(consultingType1.getTitles().getDefault()));
assertThat(result.get(0).getConsultingTypes().get(0).getTitles().getLong(), is(consultingType1.getTitles().getLong()));
assertThat(result.get(0).getConsultingTypes().get(0).getId(), is(consultingType1.getId()));
assertThat(result.get(0).getConsultingTypes().get(1).getTitles().getDefault(), is(consultingType2.getTitles().getDefault()));
assertThat(result.get(0).getConsultingTypes().get(1).getTitles().getLong(), is(consultingType2.getTitles().getLong()));
assertThat(result.get(0).getConsultingTypes().get(1).getId(), is(consultingType2.getId()));
assertThat(result.get(1).getTitle(), is(GROUP_2));
assertThat(result.get(1).getConsultingTypes(), hasSize(2));
assertThat(result.get(1).getConsultingTypes().get(0).getTitles().getDefault(), is(consultingType1.getTitles().getDefault()));
assertThat(result.get(1).getConsultingTypes().get(0).getTitles().getLong(), is(consultingType1.getTitles().getLong()));
assertThat(result.get(1).getConsultingTypes().get(0).getId(), is(consultingType1.getId()));
assertThat(result.get(1).getConsultingTypes().get(1).getTitles().getDefault(), is(consultingType3.getTitles().getDefault()));
assertThat(result.get(1).getConsultingTypes().get(1).getTitles().getLong(), is(consultingType3.getTitles().getLong()));
assertThat(result.get(1).getConsultingTypes().get(1).getId(), is(consultingType3.getId()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
{
"id": 1,
"titles": {
"default": "default"
"default": "default",
"long": "long"
}
}
]
Expand All @@ -16,7 +17,8 @@
{
"id": 0,
"titles": {
"default": "default"
"default": "default",
"long": "long"
}
}
]
Expand Down

0 comments on commit 23891c4

Please sign in to comment.