Skip to content

Commit 34bea52

Browse files
committed
fix tests
1 parent 87a0075 commit 34bea52

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/spacious_team/broker/report_parser/api/SecurityTransaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@EqualsAndHashCode(callSuper = true, cacheStrategy = LAZY)
4040
public class SecurityTransaction extends AbstractTransaction {
4141
@EqualsAndHashCode.Exclude
42-
private final @Nullable BigDecimal accruedInterest; // НКД, в валюте бумаги. Если задано, то поле currency обязательно
42+
private final @Nullable BigDecimal accruedInterest; // НКД, в валюте бумаги. Если задано, то поле valueCurrency обязательно
4343

4444
@Override
4545
public List<TransactionCashFlow> getTransactionCashFlows() {

src/test/java/org/spacious_team/broker/report_parser/api/SecurityTransactionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void getTransactionCashFlows_accruedInterestIsZero() {
8484
void getTransactionCashFlows_accruedInterestIsNull() {
8585
SecurityTransaction tr = this.tr.toBuilder()
8686
.accruedInterest(null)
87-
.valueCurrency(null)
87+
// can't set "valueCurrency(null)", "valueCurrency" is used by not null "value" field
8888
.build();
8989
expectedCashFlows(tr,
9090
getValueCashFlow(tr),
@@ -105,7 +105,7 @@ void getTransactionCashFlows_valueIsZero() {
105105
void getTransactionCashFlows_valueIsNull() {
106106
SecurityTransaction tr = this.tr.toBuilder()
107107
.value(null)
108-
.valueCurrency(null)
108+
// can't set "valueCurrency(null)", "valueCurrency" is used by not null "accruedInterest" field
109109
.build();
110110
expectedCashFlows(tr,
111111
getAccruedInterestCashFlow(tr),

0 commit comments

Comments
 (0)