Index: vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator/GenereerOptiesVoorLade/Test.cls.xml
===================================================================
diff -u -r72932 -r72970
--- vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator/GenereerOptiesVoorLade/Test.cls.xml (.../Test.cls.xml) (revision 72932)
+++ vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator/GenereerOptiesVoorLade/Test.cls.xml (.../Test.cls.xml) (revision 72970)
@@ -65,6 +65,7 @@
%String
+DummyFscClaim
@@ -90,7 +91,10 @@
#dim DnaCodeServiceMock As vhTest.Mock.APPS.Halux.AAP.DnaCodeService = ..GeefDnaCodeServiceMock(..#SequentieNummer, ..#DummyProductId, ..#DummyDnaCode)
#dim IngegevenKenmerkenSpaceStepHelperMock As vhTest.Mock.DOM.PM.Maatwerk.Calc.Common.impl.IngegevenKenmerkenSpaceStepHelper = ..GeefIngegevenKenmerkenSpaceStepHelper($$$False, ..LbxKenmerken)
- Set Generator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.OptieGenerator.ProductOptiesGenerator).%New(ProductApiMock, DnaCodeServiceMock, IngegevenKenmerkenSpaceStepHelperMock)
+ #dim HoutCertificaatServiceMock As DOM.PM.HoutCertificaatService = ##class(vhTest.Mock.DOM.PM.HoutCertificaatService).%New()
+ Do HoutCertificaatServiceMock.VerwachtMethodCall("BestaatHoutCertificaat", ..#DummyFscClaim).DanReturn($$$False)
+
+ Set Generator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.OptieGenerator.ProductOptiesGenerator).%New(ProductApiMock, DnaCodeServiceMock, IngegevenKenmerkenSpaceStepHelperMock, , HoutCertificaatServiceMock)
#dim Resultaat As %ListOfObjects = Generator.GenereerOptiesVoorLade(ToeleveringStub, ..UitvoeringInfo)
Do $$$AssertEquals(Resultaat.Size, 10)
@@ -108,6 +112,7 @@
Do ProductMock.Verifieer()
Do ProductApiMock.Verifieer()
Do DnaCodeServiceMock.Verifieer()
+ Do HoutCertificaatServiceMock.Verifieer()
Do IngegevenKenmerkenSpaceStepHelperMock.Verifieer()
]]>
Index: APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator.cls.xml
===================================================================
diff -u -r72932 -r72970
--- APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator.cls.xml (.../ProductOptiesGenerator.cls.xml) (revision 72932)
+++ APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator.cls.xml (.../ProductOptiesGenerator.cls.xml) (revision 72970)
@@ -23,8 +23,13 @@
1
+
+DOM.PM.HoutCertificaatService
+1
+
+
-ProductApi:DOM.PM.ProductAPI="",DnaCodeService:APPS.Halux.AAP.DnaCodeService="",IngegevenKenmerkenSpaceStepHelper:DOM.PM.Maatwerk.Calc.Common.impl.IngegevenKenmerkenSpaceStepHelper="",Logger:vhLib.Logger=""
+ProductApi:DOM.PM.ProductAPI="",DnaCodeService:APPS.Halux.AAP.DnaCodeService="",IngegevenKenmerkenSpaceStepHelper:DOM.PM.Maatwerk.Calc.Common.impl.IngegevenKenmerkenSpaceStepHelper="",Logger:vhLib.Logger="",HoutCertificaatService:DOM.PM.HoutCertificaatService=""
1
1
%Status
@@ -34,6 +39,7 @@
Set ..DnaCodeService = $$$Inject(DnaCodeService, ##class(APPS.Halux.PPS.Activiteit.impl.TBX.KlantEtiketIoCContainer).Instance().Resolve("DnaCodeService"))
Set ..IngegevenKenmerkenSpaceStepHelper = $$$Inject(IngegevenKenmerkenSpaceStepHelper, ##class(DOM.PM.Maatwerk.Calc.Common.impl.IngegevenKenmerkenSpaceStepHelper).%New())
Set ..Logger = $$$Inject(Logger, ##class(vhLib.Logger).%New("CalculatedProduct"))
+ Set ..HoutCertificaatService = $$$Inject(HoutCertificaatService, ##class(DOM.PM.HoutCertificaatService).%New())
Quit $$$OK
]]>
@@ -172,10 +178,9 @@
#dim FSCCode As %String = Product.GeefFSCHout()
#dim FSCLogoUrl As %String = ""
- Set HoutCertificaatService = ##class(DOM.PM.HoutCertificaatService).%New()
- If HoutCertificaatService.BestaatHoutCertificaat(FSCCode){
- #dim HoutCertificaat As DOM.PM.impl.HoutCertificaat = HoutCertificaatService.GeefHoutCertificaat(FSCCode)
- If $$$Not(HoutCertificaat.GeefHoutCertificaatType() = HoutCertificaatService.GeefHoutCertificaat("GEEN").GeefHoutCertificaatType()) {
+ If ..HoutCertificaatService.BestaatHoutCertificaat(FSCCode){
+ #dim HoutCertificaat As DOM.PM.impl.HoutCertificaat = ..HoutCertificaatService.GeefHoutCertificaat(FSCCode)
+ If $$$Not(HoutCertificaat.GeefHoutCertificaatType() = ..HoutCertificaatService.GeefHoutCertificaat("GEEN").GeefHoutCertificaatType()) {
#dim HoutCertificaatLogoNaam As %String = HoutCertificaat.GeefHoutCertificaatType()
#dim blImage As BL.Prod.ImageLink = ##class(BL.Prod.ImageLink).Instantiate()
Set FSCLogoUrl = blImage.GetImageURL("LOGO",HoutCertificaatLogoNaam,"FOPEMBEDPS")