feat(selfop): sync versioned owner and product directories
This commit is contained in:
+17
@@ -22,6 +22,23 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
/** Synthetic loopback transport only; no supplier or application services. */
|
||||
class LingxingWmsClientTest {
|
||||
@Test void customerDirectoryKeepsNamesAndUsesAccountGate() {
|
||||
response.set(page("current","size",1,1000,1,1,"{\"customerCode\":\"C\",\"customerName\":\"示例货主\",\"status\":\"0\",\"telephoneNo\":\"not-forwarded\"}"));
|
||||
var result=client().queryCustomers(new WarehouseQueryRequest(1,1000),context());
|
||||
assertThat(path.get()).isEqualTo("/openapi/v2/customer/list");
|
||||
assertThat(result.records()).containsExactly(new Customer("C","示例货主","0"));
|
||||
assertThat(completion.get().operation()).isEqualTo(Operation.CUSTOMERS);
|
||||
}
|
||||
@Test void productDirectoryRetainsDeclaredDimensionsAndUnknownMeasurements() {
|
||||
response.set(page("current","size",1,100,1,1,"{\"customerCode\":\"C\",\"sku\":\"SKU\",\"productName\":\"商品\",\"length\":5,\"width\":11,\"height\":5,\"sizeUnit\":\"cm\",\"wmsLength\":\"\",\"wmsWidth\":\"\",\"wmsHeight\":\"\",\"wmsSizeUnit\":\"\"}"));
|
||||
var result=client().queryProducts(new ProductQueryRequest(1,100),context());
|
||||
assertThat(result.records().get(0).length()).isEqualByComparingTo("5");
|
||||
assertThat(result.records().get(0).wmsLength()).isNull();
|
||||
assertThat(result.records().get(0).sku()).isEqualTo("SKU");
|
||||
assertThat(completion.get().operation()).isEqualTo(Operation.PRODUCTS);
|
||||
assertThatThrownBy(()->client().queryProducts(new ProductQueryRequest(1,101),context())).isInstanceOf(LingxingWmsException.class);
|
||||
assertThat(calls.get()).isEqualTo(1);
|
||||
}
|
||||
private static final Instant NOW = Instant.parse("2026-10-12T00:00:00Z");
|
||||
private static final String PRIVATE = "private-secret@example.test";
|
||||
private static final String ORDER = """
|
||||
|
||||
Reference in New Issue
Block a user