[Bug #1288] Return null instead of zero in a just created AdvanceMeasurement
Now when you add a new advance measurement, you will have an empty value. A test was fixed due to this change. FEA: ItEr75S04BugFixing
This commit is contained in:
parent
80aa4caea2
commit
492a0470c3
2 changed files with 4 additions and 4 deletions
|
|
@ -95,7 +95,7 @@ public class AdvanceMeasurement extends BaseEntity {
|
|||
|
||||
@NotNull(message = "value not specified")
|
||||
public BigDecimal getValue() {
|
||||
return value != null ? value : BigDecimal.ZERO;
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setAdvanceAssignment(AdvanceAssignment advanceAssignment) {
|
||||
|
|
|
|||
|
|
@ -1082,10 +1082,10 @@ public class OrderElementServiceTest {
|
|||
List<ConstraintViolationDTO> constraintViolations = instanceConstraintViolationsList
|
||||
.get(0).constraintViolations;
|
||||
// Mandatory fields: date
|
||||
assertThat(constraintViolations.size(), equalTo(1));
|
||||
assertThat(constraintViolations.size(), equalTo(2));
|
||||
for (ConstraintViolationDTO constraintViolationDTO : constraintViolations) {
|
||||
System.out.println("### constraintViolationDTO.fieldName: " + constraintViolationDTO.fieldName);
|
||||
assertThat(constraintViolationDTO.fieldName, anyOf(mustEnd("date")));
|
||||
assertThat(constraintViolationDTO.fieldName,
|
||||
anyOf(mustEnd("value"), mustEnd("date")));
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue