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:
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Moq;
|
||||
using PowderCoating.Application.Interfaces;
|
||||
using PowderCoating.Core.Entities;
|
||||
using PowderCoating.Core.Enums;
|
||||
using PowderCoating.Infrastructure.Data;
|
||||
@@ -290,7 +291,8 @@ public class DepositsControllerTests
|
||||
var controller = new DepositsController(
|
||||
uow,
|
||||
userManager.Object,
|
||||
Mock.Of<ILogger<DepositsController>>());
|
||||
Mock.Of<ILogger<DepositsController>>(),
|
||||
Mock.Of<ICompanyLogoService>());
|
||||
|
||||
controller.ControllerContext = new ControllerContext
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user