Update blast rate tests to match nozzle-primary formula
Remove the CFM=0→zero test (CFM no longer in the formula path). Update expected values to match the new nozzle-primary tables and corrected TierDefaults CFM/nozzle pairings. Add WetBlasting and RustAndScale substrate coverage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,24 +24,12 @@ public class ShopCapabilityCalculatorTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void GetBlastRateSqFtPerHour_WithNoCompressorCfm_ReturnsZero()
|
public void GetBlastRateSqFtPerHour_PressurePot_Nozzle6_Paint()
|
||||||
{
|
{
|
||||||
|
// PressurePotRateByNozzle(6) = 245 * SubstrateMultiplier(Paint) 1.0 = 245
|
||||||
var costs = new CompanyOperatingCosts
|
var costs = new CompanyOperatingCosts
|
||||||
{
|
{
|
||||||
CompressorCfm = 0m
|
CompressorCfm = 200m,
|
||||||
};
|
|
||||||
|
|
||||||
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(costs);
|
|
||||||
|
|
||||||
Assert.Equal(0m, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void GetBlastRateSqFtPerHour_DerivesRateFromEquipmentInputs()
|
|
||||||
{
|
|
||||||
var costs = new CompanyOperatingCosts
|
|
||||||
{
|
|
||||||
CompressorCfm = 150m,
|
|
||||||
BlastNozzleSize = 6,
|
BlastNozzleSize = 6,
|
||||||
BlastSetupType = BlastSetupType.PressurePot,
|
BlastSetupType = BlastSetupType.PressurePot,
|
||||||
PrimaryBlastSubstrate = BlastSubstrateType.Paint
|
PrimaryBlastSubstrate = BlastSubstrateType.Paint
|
||||||
@@ -49,16 +37,17 @@ public class ShopCapabilityCalculatorTests
|
|||||||
|
|
||||||
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(costs);
|
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(costs);
|
||||||
|
|
||||||
Assert.Equal(58.5m, result);
|
Assert.Equal(245m, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void GetBlastRateSqFtPerHour_ForNamedSetup_UsesSetupOverload()
|
public void GetBlastRateSqFtPerHour_SiphonCabinet_Nozzle4_Mixed()
|
||||||
{
|
{
|
||||||
|
// SiphonCabinetRateByNozzle(4) = 125 * SubstrateMultiplier(Mixed) 0.9 = 112.5
|
||||||
var setup = new CompanyBlastSetup
|
var setup = new CompanyBlastSetup
|
||||||
{
|
{
|
||||||
Name = "Main Cabinet",
|
Name = "Main Cabinet",
|
||||||
CompressorCfm = 7m,
|
CompressorCfm = 42m,
|
||||||
BlastNozzleSize = 4,
|
BlastNozzleSize = 4,
|
||||||
SetupType = BlastSetupType.SiphonCabinet,
|
SetupType = BlastSetupType.SiphonCabinet,
|
||||||
PrimarySubstrate = BlastSubstrateType.Mixed
|
PrimarySubstrate = BlastSubstrateType.Mixed
|
||||||
@@ -66,7 +55,39 @@ public class ShopCapabilityCalculatorTests
|
|||||||
|
|
||||||
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(setup);
|
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(setup);
|
||||||
|
|
||||||
Assert.Equal(1.7m, result);
|
Assert.Equal(112.5m, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void GetBlastRateSqFtPerHour_PressurePot_Nozzle4_RustAndScale()
|
||||||
|
{
|
||||||
|
// PressurePotRateByNozzle(4) = 115 * SubstrateMultiplier(RustAndScale) 0.7 = 80.5
|
||||||
|
var costs = new CompanyOperatingCosts
|
||||||
|
{
|
||||||
|
BlastNozzleSize = 4,
|
||||||
|
BlastSetupType = BlastSetupType.PressurePot,
|
||||||
|
PrimaryBlastSubstrate = BlastSubstrateType.RustAndScale
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(costs);
|
||||||
|
|
||||||
|
Assert.Equal(80.5m, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void GetBlastRateSqFtPerHour_WetBlasting_Is60PctOfPressurePot()
|
||||||
|
{
|
||||||
|
// WetBlasting = PressurePotRateByNozzle(5) * 0.6 * substrate(Paint 1.0) = 175 * 0.6 = 105
|
||||||
|
var costs = new CompanyOperatingCosts
|
||||||
|
{
|
||||||
|
BlastNozzleSize = 5,
|
||||||
|
BlastSetupType = BlastSetupType.WetBlasting,
|
||||||
|
PrimaryBlastSubstrate = BlastSubstrateType.Paint
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = ShopCapabilityCalculator.GetBlastRateSqFtPerHour(costs);
|
||||||
|
|
||||||
|
Assert.Equal(105m, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
@@ -86,10 +107,10 @@ public class ShopCapabilityCalculatorTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(ShopCapabilityTier.Garage, BlastSetupType.SiphonCabinet, 7, 4, BlastSubstrateType.Mixed)]
|
[InlineData(ShopCapabilityTier.Garage, BlastSetupType.SiphonCabinet, 7, 3, BlastSubstrateType.Mixed)]
|
||||||
[InlineData(ShopCapabilityTier.Small, BlastSetupType.PressurePot, 40, 5, BlastSubstrateType.Mixed)]
|
[InlineData(ShopCapabilityTier.Small, BlastSetupType.PressurePot, 49, 3, BlastSubstrateType.Mixed)]
|
||||||
[InlineData(ShopCapabilityTier.Medium, BlastSetupType.PressurePot, 80, 5, BlastSubstrateType.Mixed)]
|
[InlineData(ShopCapabilityTier.Medium, BlastSetupType.PressurePot, 90, 4, BlastSubstrateType.Mixed)]
|
||||||
[InlineData(ShopCapabilityTier.Large, BlastSetupType.PressurePot, 150, 6, BlastSubstrateType.Mixed)]
|
[InlineData(ShopCapabilityTier.Large, BlastSetupType.PressurePot, 150, 5, BlastSubstrateType.Mixed)]
|
||||||
public void TierDefaults_ReturnExpectedPresetValues(
|
public void TierDefaults_ReturnExpectedPresetValues(
|
||||||
ShopCapabilityTier tier,
|
ShopCapabilityTier tier,
|
||||||
BlastSetupType expectedSetup,
|
BlastSetupType expectedSetup,
|
||||||
|
|||||||
Reference in New Issue
Block a user