Skip to content

Commit 15031ef

Browse files
test: make BavetRegressionTest aware of indictments
1 parent 8714603 commit 15031ef

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

core/src/test/java/ai/timefold/solver/core/impl/score/stream/bavet/BavetRegressionTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ void joinWithNullKeyFromRight() {
5252

5353
scoreDirector.setWorkingSolution(solution);
5454
assertScore(scoreDirector,
55-
assertMatch(entity1, entity1),
56-
assertMatch(entity2, entity2));
55+
assertMatch(entity1, entity1).withIndictedObjects(entity1),
56+
assertMatch(entity2, entity2).withIndictedObjects(entity2));
5757

5858
// Switch entity1 and entity2 values; now entity2 has null and entity1 does not.
5959
scoreDirector.beforeVariableChanged(entity1, "value");
@@ -63,8 +63,8 @@ void joinWithNullKeyFromRight() {
6363
entity2.setValue(null);
6464
scoreDirector.afterVariableChanged(entity2, "value");
6565
assertScore(scoreDirector,
66-
assertMatch(entity1, entity1),
67-
assertMatch(entity2, entity2));
66+
assertMatch(entity1, entity1).withIndictedObjects(entity1),
67+
assertMatch(entity2, entity2).withIndictedObjects(entity2));
6868

6969
// Put both to null.
7070
scoreDirector.beforeVariableChanged(entity1, "value");
@@ -74,10 +74,10 @@ void joinWithNullKeyFromRight() {
7474
entity2.setValue(null);
7575
scoreDirector.afterVariableChanged(entity2, "value");
7676
assertScore(scoreDirector,
77-
assertMatch(entity1, entity1),
78-
assertMatch(entity1, entity2),
79-
assertMatch(entity2, entity1),
80-
assertMatch(entity2, entity2));
77+
assertMatch(entity1, entity1).withIndictedObjects(entity1),
78+
assertMatch(entity1, entity2).withIndictedObjects(entity1, entity2),
79+
assertMatch(entity2, entity1).withIndictedObjects(entity1, entity2),
80+
assertMatch(entity2, entity2).withIndictedObjects(entity2));
8181
}
8282

8383
@TestTemplate
@@ -491,7 +491,7 @@ void filteringJoinNullConflict() {
491491

492492
scoreDirector.setWorkingSolution(solution);
493493
assertScore(scoreDirector,
494-
assertMatch(entity2, entity2)); // Only entity1 is left, because forEach/join ignore nulls.
494+
assertMatch(entity2, entity2).withIndictedObjects(entity2)); // Only entity1 is left, because forEach/join ignore nulls.
495495

496496
// Switch entity1 and entity2 values; now entity2 has null and entity1 does not.
497497
scoreDirector.beforeVariableChanged(entity1, "value");
@@ -501,7 +501,7 @@ void filteringJoinNullConflict() {
501501
entity2.setValue(null);
502502
scoreDirector.afterVariableChanged(entity2, "value");
503503
assertScore(scoreDirector,
504-
assertMatch(entity1, entity1));
504+
assertMatch(entity1, entity1).withIndictedObjects(entity1));
505505

506506
// Switch entity1 and entity2 values again to test the same from the other side.
507507
scoreDirector.beforeVariableChanged(entity1, "value");
@@ -511,7 +511,7 @@ void filteringJoinNullConflict() {
511511
entity2.setValue(value);
512512
scoreDirector.afterVariableChanged(entity2, "value");
513513
assertScore(scoreDirector,
514-
assertMatch(entity2, entity2));
514+
assertMatch(entity2, entity2).withIndictedObjects(entity2));
515515
}
516516

517517
/**
@@ -653,7 +653,7 @@ void filteringJoinNullConflictDifferentNodes() {
653653

654654
scoreDirector.setWorkingSolution(solution);
655655
assertScore(scoreDirector,
656-
assertMatch(entity2, entity2));
656+
assertMatch(entity2, entity2).withIndictedObjects(entity2));
657657

658658
// Switch entity1 and entity2 values; now entity2 has null and entity1 does not.
659659
scoreDirector.beforeVariableChanged(entity1, "value");
@@ -663,7 +663,7 @@ void filteringJoinNullConflictDifferentNodes() {
663663
entity2.setValue(null);
664664
scoreDirector.afterVariableChanged(entity2, "value");
665665
assertScore(scoreDirector,
666-
assertMatch(entity1, entity1));
666+
assertMatch(entity1, entity1).withIndictedObjects(entity1));
667667

668668
// Switch entity1 and entity2 values again to test the same from the other side.
669669
scoreDirector.beforeVariableChanged(entity1, "value");
@@ -673,7 +673,7 @@ void filteringJoinNullConflictDifferentNodes() {
673673
entity2.setValue(value);
674674
scoreDirector.afterVariableChanged(entity2, "value");
675675
assertScore(scoreDirector,
676-
assertMatch(entity2, entity2));
676+
assertMatch(entity2, entity2).withIndictedObjects(entity2));
677677
}
678678

679679
/**

0 commit comments

Comments
 (0)