fix: align smart loading candidate mapping
This commit is contained in:
+11
@@ -16,6 +16,17 @@ class SmartLoadingCandidateMapperContractTest {
|
||||
.satisfies(constructor -> assertThat(constructor.getParameterCount()).isEqualTo(26));
|
||||
}
|
||||
|
||||
@Test
|
||||
void candidateSelectColumnsFollowTheCanonicalConstructorOrder() throws Exception {
|
||||
Method list = SmartLoadingCandidateMapper.class.getDeclaredMethod("candidates", long.class);
|
||||
String sql = String.join(" ", list.getAnnotation(Select.class).value());
|
||||
|
||||
assertThat(sql.indexOf("NULL locked,NULL blockReason"))
|
||||
.isLessThan(sql.indexOf("o.order_status_snapshot orderStatusSnapshot"));
|
||||
assertThat(sql.indexOf("o.order_status_snapshot orderStatusSnapshot"))
|
||||
.isLessThan(sql.indexOf("o.expected_arrival_at expectedArrivalAt"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void selectsLatestApprovedBatch() throws Exception {
|
||||
Method list = SmartLoadingCandidateMapper.class.getDeclaredMethod("candidates", long.class);
|
||||
|
||||
Reference in New Issue
Block a user