[ {"name": "a light bulky box is charged on volume, rounded up to the half kilo", "args": [400, 300, 200, 2500, 5000, 500], "expect": {"actualGrams": 2500, "volumetricGrams": 4800, "chargeableGrams": 5000, "basis": "volumetric"}}, {"name": "a heavy small box is charged on actual weight", "args": [400, 300, 200, 6200, 5000, 500], "expect": {"actualGrams": 6200, "volumetricGrams": 4800, "chargeableGrams": 6500, "basis": "actual"}}, {"name": "equal weights: the basis is actual", "args": [400, 300, 200, 4800, 5000, 500], "expect": {"actualGrams": 4800, "volumetricGrams": 4800, "chargeableGrams": 5000, "basis": "actual"}}, {"name": "divisor 6000 makes the same box lighter", "args": [400, 300, 200, 2500, 6000, 500], "expect": {"actualGrams": 2500, "volumetricGrams": 4000, "chargeableGrams": 4000, "basis": "volumetric"}}, {"name": "divisor 4000 makes it heavier", "args": [400, 300, 200, 2500, 4000, 500], "expect": {"actualGrams": 2500, "volumetricGrams": 6000, "chargeableGrams": 6000, "basis": "volumetric"}}, {"name": "volumetric grams round up, where floor division gives 7385", "args": [333, 333, 333, 1000, 5000, 1], "expect": {"actualGrams": 1000, "volumetricGrams": 7386, "chargeableGrams": 7386, "basis": "volumetric"}}, {"name": "billing in whole kilos rounds 7386 g up to 8 kg", "args": [333, 333, 333, 1000, 5000, 1000], "expect": {"actualGrams": 1000, "volumetricGrams": 7386, "chargeableGrams": 8000, "basis": "volumetric"}}, {"name": "a tiny parcel still has at least 1 g of volume", "args": [10, 10, 10, 100, 5000, 100], "expect": {"actualGrams": 100, "volumetricGrams": 1, "chargeableGrams": 100, "basis": "actual"}}, {"name": "a weightless parcel is charged on volume, then the minimum step", "args": [100, 100, 100, 0, 5000, 500], "expect": {"actualGrams": 0, "volumetricGrams": 200, "chargeableGrams": 500, "basis": "volumetric"}}, {"name": "dimension order does not matter", "args": [200, 400, 300, 2500, 5000, 500], "expect": {"actualGrams": 2500, "volumetricGrams": 4800, "chargeableGrams": 5000, "basis": "volumetric"}}, {"name": "an exact billing step is not rounded further", "args": [500, 400, 250, 1000, 5000, 500], "expect": {"actualGrams": 1000, "volumetricGrams": 10000, "chargeableGrams": 10000, "basis": "volumetric"}}, {"name": "a pallet-sized parcel stays exact in integers", "args": [1200, 1000, 1500, 150000, 5000, 1000], "expect": {"actualGrams": 150000, "volumetricGrams": 360000, "chargeableGrams": 360000, "basis": "volumetric"}}, {"name": "a zero dimension is an error", "args": [0, 300, 200, 2500, 5000, 500], "expectError": "dimensions must be 1 mm or more"}, {"name": "a negative weight is an error", "args": [400, 300, 200, -1, 5000, 500], "expectError": "actualGrams must not be negative"}, {"name": "a zero divisor is an error", "args": [400, 300, 200, 2500, 0, 500], "expectError": "divisor must be 1 or more"}, {"name": "a zero billing step is an error", "args": [400, 300, 200, 2500, 5000, 0], "expectError": "roundUpToGrams must be 1 or more"} ]