commision date fix
This commit is contained in:
parent
acf80cc78d
commit
52abb281ff
@ -1,7 +1,5 @@
|
||||
package com.plannaplan.responses.models;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import com.plannaplan.entities.Commision;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@ -13,14 +11,14 @@ public class CommisionResponse {
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "Timestamp where the user commit the commision")
|
||||
private Timestamp commisionDate;
|
||||
private String commisionDate;
|
||||
|
||||
public CommisionResponse(Commision commision) {
|
||||
this.id = commision.getId();
|
||||
this.commisionDate = commision.getCommisionDate();
|
||||
this.commisionDate = commision.getCommisionDate().toString();
|
||||
}
|
||||
|
||||
public Timestamp getCommisionDate() {
|
||||
public String getCommisionDate() {
|
||||
return commisionDate;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class CommisionResponseMappersTest {
|
||||
final List<CommisionResponse> resposne = CommisionResponseMappers.mapToResponse(coms);
|
||||
|
||||
assertTrue(resposne.get(0) instanceof CommisionResponse);
|
||||
assertTrue(resposne.get(0).getCommisionDate().equals(coms.get(0).getCommisionDate()));
|
||||
assertTrue(resposne.get(1).getCommisionDate().equals(coms.get(1).getCommisionDate()));
|
||||
assertTrue(resposne.get(0).getCommisionDate().equals(coms.get(0).getCommisionDate().toString()));
|
||||
assertTrue(resposne.get(1).getCommisionDate().equals(coms.get(1).getCommisionDate().toString()));
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,6 @@ public class CommisionResponseTest {
|
||||
final Commision com = new Commision(null);
|
||||
final CommisionResponse comResponse = new CommisionResponse(com);
|
||||
|
||||
assertTrue(comResponse.getCommisionDate().equals(com.getCommisionDate()));
|
||||
assertTrue(comResponse.getCommisionDate().equals(com.getCommisionDate().toString()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user