Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
feat: added city to AgencyResponseDTO
Browse files Browse the repository at this point in the history
  • Loading branch information
nicow-vi committed Jun 29, 2020
1 parent f89590b commit a16a605
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ public class AgencyResponseDTO {
@ApiModelProperty(example = "79106", position = 2)
private String postcode;

@ApiModelProperty(example = "Bonn", position = 3)
private String city;

@ApiModelProperty(example = "Our agency provides help for the following topics: Lorem ipsum..",
position = 3)
position = 4)
private String description;

@ApiModelProperty(example = "false", position = 4)
@ApiModelProperty(example = "false", position = 5)
private boolean teamAgency;

@ApiModelProperty(example = "false", position = 5)
@ApiModelProperty(example = "false", position = 6)
private boolean offline;

@ApiModelProperty(example = "0", position = 6)
@ApiModelProperty(example = "0", position = 7)
private int consultingType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private AgencyResponseDTO convertToAgencyResponseDTO(Agency agency) {
return new AgencyResponseDTO(agency.getId() != null ? agency.getId() : null,
(agency.getName() != null) ? agency.getName() : null,
(agency.getPostCode() != null) ? agency.getPostCode() : null,
(agency.getCity() != null) ? agency.getCity() : null,
(agency.getDescription() != null) ? agency.getDescription() : null, agency.isTeamAgency(),
agency.isOffline(), agency.getConsultingType().getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AgencyControllerIT {
private final String PATH_GET_AGENCY = "/agencies/data/";
private final String AGENCY_ID = "12";
private final String INVALIDAGENCY_ID = "12xX";
private final AgencyResponseDTO AGENCY_RESPONSE_DTO = new AgencyResponseDTO(1L, "name", "12345",
private final AgencyResponseDTO AGENCY_RESPONSE_DTO = new AgencyResponseDTO(1L, "name", "12345","testcity",
"description", false, false, ConsultingType.SUCHT.getValue());

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class AgencyServiceTest {
private final String POSTCODE = "postcode";
private final String FIELD_AGENCY_ID = "id";
private final String VALID_FULL_POSTCODE = "12345";
private final String AGENCY_CITY = "testcity";
private final String VALID_MEDIUM_POSTCODE = "884";
private final int VALID_MEDIUM_INT = 3;
private final Long AGENCY_ID = 98L;
Expand All @@ -56,7 +57,7 @@ public class AgencyServiceTest {
private final Agency TEAM_AGENCY = new Agency(AGENCY_ID, 10L, AGENCY_NAME, AGENCY_DESCRIPTION,
VALID_FULL_POSTCODE, "Test city", true, CONSULTING_TYPE_SUCHT, false, null);
private final AgencyResponseDTO AGENCY_RESPONSE_DTO =
new AgencyResponseDTO(AGENCY_ID, AGENCY_NAME, VALID_FULL_POSTCODE, AGENCY_DESCRIPTION, false,
new AgencyResponseDTO(AGENCY_ID, AGENCY_NAME, VALID_FULL_POSTCODE, AGENCY_CITY, AGENCY_DESCRIPTION, false,
false, CONSULTING_TYPE_SUCHT.getValue());
private final int MIN_POSTCODE_SIZE_3 = 3;
private final int MIN_POSTCODE_SIZE_5 = 5;
Expand Down

0 comments on commit a16a605

Please sign in to comment.