@@ -21,12 +21,13 @@ public static ExecutionAssert assertThat(List<ReconcileRecord> actual) {
21
21
22
22
public ExecutionAssert reconciled (DependentResource <?, ?>... dependentResources ) {
23
23
for (int i = 0 ; i < dependentResources .length ; i ++) {
24
- var rr = getReconcileRecordFor (dependentResources [i ]);
24
+ final DependentResource <?, ?> dr = dependentResources [i ];
25
+ var rr = getReconcileRecordFor (dr );
25
26
if (rr .isEmpty ()) {
26
- failWithMessage ("Resource not reconciled: %s with index %d" , dependentResources , i );
27
+ failWithMessage ("Resource not reconciled: %s with index %d" , dr , i );
27
28
} else {
28
29
if (rr .get ().isDeleted ()) {
29
- failWithMessage ("Resource deleted: %s with index %d" , dependentResources , i );
30
+ failWithMessage ("Resource deleted: %s with index %d" , dr , i );
30
31
}
31
32
}
32
33
}
@@ -35,12 +36,13 @@ public ExecutionAssert reconciled(DependentResource<?, ?>... dependentResources)
35
36
36
37
public ExecutionAssert deleted (DependentResource <?, ?>... dependentResources ) {
37
38
for (int i = 0 ; i < dependentResources .length ; i ++) {
38
- var rr = getReconcileRecordFor (dependentResources [i ]);
39
+ final DependentResource <?, ?> dr = dependentResources [i ];
40
+ var rr = getReconcileRecordFor (dr );
39
41
if (rr .isEmpty ()) {
40
- failWithMessage ("Resource not reconciled: %s with index %d" , dependentResources , i );
42
+ failWithMessage ("Resource not reconciled: %s with index %d" , dr , i );
41
43
} else {
42
44
if (!rr .get ().isDeleted ()) {
43
- failWithMessage ("Resource not deleted: %s with index %d" , dependentResources , i );
45
+ failWithMessage ("Resource not deleted: %s with index %d" , dr , i );
44
46
}
45
47
}
46
48
}
@@ -75,17 +77,18 @@ public ExecutionAssert reconciledInOrder(DependentResource<?, ?>... dependentRes
75
77
76
78
public ExecutionAssert notReconciled (DependentResource <?, ?>... dependentResources ) {
77
79
for (int i = 0 ; i < dependentResources .length ; i ++) {
78
- if (getActualDependentResources ().contains (dependentResources [i ])) {
79
- failWithMessage ("Resource was reconciled: %s with index %d" , dependentResources , i );
80
+ final DependentResource <?, ?> dr = dependentResources [i ];
81
+ if (getActualDependentResources ().contains (dr )) {
82
+ failWithMessage ("Resource was reconciled: %s with index %d" , dr , i );
80
83
}
81
84
}
82
85
return this ;
83
86
}
84
87
85
88
private void checkIfReconciled (int i , DependentResource <?, ?>[] dependentResources ) {
86
- if (! getActualDependentResources (). contains ( dependentResources [i ])) {
87
- failWithMessage ( "Dependent resource: %s, not reconciled on place %d" , dependentResources [ i ],
88
- i );
89
+ final DependentResource <?, ?> dr = dependentResources [i ];
90
+ if (! getActualDependentResources (). contains ( dr )) {
91
+ failWithMessage ( "Dependent resource: %s, not reconciled on place %d" , dr , i );
89
92
}
90
93
}
91
94
}
0 commit comments