优化
This commit is contained in:
+8
-4
@@ -27,6 +27,9 @@ class InitialWarehouseResourceSeedSqlContractTest {
|
||||
}
|
||||
|
||||
private static void assertSeed(String sql, String yiwuId, String dongguanId, String idPrefix) {
|
||||
int locationSeedStart = sql.indexOf("WHEN zones.zone_index = 0 AND slots.slot_number = 1 THEN 201");
|
||||
int locationSeedEnd = sql.indexOf("DROP PROCEDURE IF EXISTS assert_yiwu_location_seed", locationSeedStart);
|
||||
String locationSeed = sql.substring(locationSeedStart, locationSeedEnd);
|
||||
assertThat(sql)
|
||||
.contains("0," + yiwuId + ",'TP-001','木托盘'")
|
||||
.contains("0," + dongguanId + ",'TP-002','塑料托盘'")
|
||||
@@ -50,11 +53,12 @@ class InitialWarehouseResourceSeedSqlContractTest {
|
||||
.contains("(" + idPrefix + "204,0," + dongguanId + ",'A','A区','A0'")
|
||||
.contains("shared_overflow")
|
||||
.contains("'AVAILABLE'")
|
||||
.doesNotContain("status='AVAILABLE',\n remark=VALUES(remark)")
|
||||
.doesNotContain("status = 'AVAILABLE',\n remark = VALUES(remark)")
|
||||
.doesNotContain("remark=VALUES(remark),\n deleted=0")
|
||||
.doesNotContain("remark = VALUES(remark),\n deleted = 0")
|
||||
.doesNotContain("INSERT INTO wh_location_reservation")
|
||||
.doesNotContain("INSERT INTO wh_location_occupancy");
|
||||
assertThat(locationSeed)
|
||||
.doesNotContain("status='AVAILABLE'")
|
||||
.doesNotContain("status = 'AVAILABLE'")
|
||||
.doesNotContain("deleted=0")
|
||||
.doesNotContain("deleted = 0");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user