This commit is contained in:
2026-08-08 14:13:28 +08:00
parent ef5878a85d
commit 87508bba82
7 changed files with 976 additions and 2 deletions
@@ -83,6 +83,19 @@ class OverseasStorageFeeServiceTest {
.isEqualTo(new BigDecimal("0.8"));
}
@Test
void loadsCustomerDetailFromPagedRuleWithoutSecondRuleLookup() {
OverseasStorageFeeRuleEntity rule = rule();
OverseasStorageFeeDtos.PageQuery query = new OverseasStorageFeeDtos.PageQuery(1, 1, 10001L, null);
when(repository.page(query)).thenReturn(new PageResult<>(List.of(rule), 1, 1, 1, 1));
when(repository.findTiers(List.of(10L))).thenReturn(List.of());
var result = service.detailByTenant(10001L);
assertThat(result.customerId()).isEqualTo(10001L);
verify(repository, never()).find(10L);
}
@Test
void detectsStaleUpdate() {
OverseasStorageFeeRuleEntity rule = rule();