This commit is contained in:
2026-08-06 15:43:35 +08:00
parent 3ecb8d7613
commit 9c4bae9f5c
3 changed files with 26 additions and 2 deletions
@@ -1,8 +1,11 @@
package com.baiyue.firstleg.service;
import com.baiyue.common.core.exception.BizException;
import com.baiyue.firstleg.dto.UnifiedInboundQuery;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
class UnifiedInboundQueryServiceTest {
@Test
@@ -37,4 +40,15 @@ class UnifiedInboundQueryServiceTest {
.isEqualTo("COMPLETE_DELIVERY");
assertThat(UnifiedInboundQueryService.nextAction("DELIVERED", "DELIVERED", null)).isNull();
}
@Test
void rejectsUnknownReviewStatusBeforeRepositoryQuery() {
UnifiedInboundQuery query = new UnifiedInboundQuery(
null, null, null, null, null, null, null, null,
null, null, "UNKNOWN", null, null, null, null, null, null, "INVALID",
null, null, null, 1, 20);
assertThatThrownBy(() -> new UnifiedInboundQueryService().page(query))
.isInstanceOf(BizException.class);
}
}