feat(udkørsel): 'Lager til' — tvunget aflæsningssted pr. flow (siloer/egne fabrikker; første med plads og vej), XML #storeBuildings (v1.18.0.0)
This commit is contained in:
@@ -307,5 +307,20 @@ do
|
||||
check("RN ukendt køretøj", names.v9, nil)
|
||||
end
|
||||
|
||||
-- RS: tvunget lagermål — storeBuildingIds (toggle, kopi, records roundtrip)
|
||||
do
|
||||
local store, run = ADRuns.createRun(ADRuns.newStore(), "Slurry", "outbound")
|
||||
check("RS tom som standard", #run.storeBuildingIds, 0)
|
||||
store = ADRuns.toggleStoreBuilding(store, run.id, "BGA500kw")
|
||||
store = ADRuns.toggleStoreBuilding(store, run.id, "tank2")
|
||||
check("RS to valgt", table.concat(ADRuns.getRun(store, run.id).storeBuildingIds, ","), "BGA500kw,tank2")
|
||||
store = ADRuns.toggleStoreBuilding(store, run.id, "tank2")
|
||||
check("RS fravalgt igen", table.concat(ADRuns.getRun(store, run.id).storeBuildingIds, ","), "BGA500kw")
|
||||
local records = ADRuns.toRecords(store)
|
||||
check("RS record", records[1].storeBuildings, "BGA500kw")
|
||||
local back = ADRuns.fromRecords(records)
|
||||
check("RS roundtrip", table.concat(ADRuns.getRun(back, run.id).storeBuildingIds, ","), "BGA500kw")
|
||||
end
|
||||
|
||||
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
|
||||
os.exit(failures == 0 and 0 or 1)
|
||||
|
||||
Reference in New Issue
Block a user