Commit be141e7d authored by Khalid Ali's avatar Khalid Ali
Browse files

Remove a bunch of commented code

parent e832b39f
...@@ -16,11 +16,6 @@ import java.util.Date; ...@@ -16,11 +16,6 @@ import java.util.Date;
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class ListingDto { public class ListingDto {
// @Getter(AccessLevel.NONE)
// @Setter(AccessLevel.NONE)
// private final SimpleDateFormat dateFormat
// = new SimpleDateFormat("yyyy-MM-dd HH:mm");
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
...@@ -50,12 +45,4 @@ public class ListingDto { ...@@ -50,12 +45,4 @@ public class ListingDto {
@JsonProperty("title") @JsonProperty("title")
private String title; private String title;
// public Date getCreateDateConverted() throws ParseException {
// return dateFormat.parse(this.createDate);
// }
//
// public void setCreateDateConverted(Date date) {
// this.createDate = dateFormat.format(date);
// }
} }
...@@ -82,17 +82,11 @@ public class BookshareRestControllerIntegrationTest { ...@@ -82,17 +82,11 @@ public class BookshareRestControllerIntegrationTest {
ListingDto listingDtoNotInDB = modelMapper.map(listingNotInDB, ListingDto.class); ListingDto listingDtoNotInDB = modelMapper.map(listingNotInDB, ListingDto.class);
given(listingService.updateListing(any(ListingEntity.class))).willReturn(listingInDB); given(listingService.updateListing(any(ListingEntity.class))).willReturn(listingInDB);
// given(listingService.updateListing(listingNotInDB)).willReturn(null);
mvc.perform(put("/bs/api/listing/" + listingDtoInDB.getId()) mvc.perform(put("/bs/api/listing/" + listingDtoInDB.getId())
.contentType(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.writeValueAsString(listingDtoInDB))) .content(JsonUtil.writeValueAsString(listingDtoInDB)))
.andExpect(status().isOk()); .andExpect(status().isOk());
// mvc.perform(put("/bs/api/listing/" + listingDtoNotInDB.getId())
// .contentType(MediaType.APPLICATION_JSON)
// .content(JsonUtil.writeValueAsString(listingDtoNotInDB)))
// .andExpect(status().isNotFound());
} }
@Test @Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment