Fix unit test build failures after logo service and pricing changes
DepositsController and GiftCertificatesController gained a required ICompanyLogoService constructor parameter in the PDF logo fix; their test factories were not updated and failed to compile on Jenkins. Added Mock.Of<ICompanyLogoService>() to both factory methods and the missing using directive to DepositsControllerTests. PricingCalculationService now only charges oven cost for items that have explicit coating layers (Coats collection non-empty), because sandblast/prep-only and labor items do not go in the oven. Two tests that tested the old "all items count toward oven fraction" logic were updated to include a single coat entry on each item, which restores the expected oven fraction math without changing the tested behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -417,7 +417,8 @@ public class PricingCalculationServiceTests
|
||||
IsAiItem = true,
|
||||
ManualUnitPrice = 200m,
|
||||
Quantity = 1m,
|
||||
SurfaceAreaSqFt = 50m
|
||||
SurfaceAreaSqFt = 50m,
|
||||
Coats = new List<CreateQuoteItemCoatDto> { new() { CoatName = "Base Coat", Sequence = 1 } }
|
||||
},
|
||||
new()
|
||||
{
|
||||
@@ -425,7 +426,8 @@ public class PricingCalculationServiceTests
|
||||
IsLaborItem = true,
|
||||
Quantity = 1m,
|
||||
SurfaceAreaSqFt = 50m,
|
||||
EstimatedMinutes = 60
|
||||
EstimatedMinutes = 60,
|
||||
Coats = new List<CreateQuoteItemCoatDto> { new() { CoatName = "Base Coat", Sequence = 1 } }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -470,14 +472,16 @@ public class PricingCalculationServiceTests
|
||||
Description = "AI item",
|
||||
IsAiItem = true,
|
||||
ManualUnitPrice = 100m,
|
||||
Quantity = 1m
|
||||
Quantity = 1m,
|
||||
Coats = new List<CreateQuoteItemCoatDto> { new() { CoatName = "Base Coat", Sequence = 1 } }
|
||||
},
|
||||
new()
|
||||
{
|
||||
Description = "Shelf item",
|
||||
IsSalesItem = true,
|
||||
ManualUnitPrice = 40m,
|
||||
Quantity = 1m
|
||||
Quantity = 1m,
|
||||
Coats = new List<CreateQuoteItemCoatDto> { new() { CoatName = "Base Coat", Sequence = 1 } }
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user