Index: vhTest/Mock/DOM/PM/HoutCertificaat/impl/HoutCertificaatBepalerInput.cls.xml =================================================================== diff -u -r29059 -r33566 --- vhTest/Mock/DOM/PM/HoutCertificaat/impl/HoutCertificaatBepalerInput.cls.xml (.../HoutCertificaatBepalerInput.cls.xml) (revision 29059) +++ vhTest/Mock/DOM/PM/HoutCertificaat/impl/HoutCertificaatBepalerInput.cls.xml (.../HoutCertificaatBepalerInput.cls.xml) (revision 33566) @@ -35,8 +35,8 @@ -ProductID:DOM.common.ProductID,Aantal:TECH.Integer=1 -ProductID:DOM.common.ProductID,Aantal:TECH.Integer=1,IsSamengesteldProduct:%Boolean + Index: DOM/PM/HoutCertificaat/impl/HoutCertificaatBepalerInput.cls.xml =================================================================== diff -u -r29059 -r33566 --- DOM/PM/HoutCertificaat/impl/HoutCertificaatBepalerInput.cls.xml (.../HoutCertificaatBepalerInput.cls.xml) (revision 29059) +++ DOM/PM/HoutCertificaat/impl/HoutCertificaatBepalerInput.cls.xml (.../HoutCertificaatBepalerInput.cls.xml) (revision 33566) @@ -55,16 +55,16 @@ -ProductID:DOM.common.ProductID,Aantal:TECH.Integer=1 +ProductID:DOM.common.ProductID,Aantal:TECH.Integer=1,IsSamengesteldProduct:%Boolean Index: vhUnitTest/DOM/PM/HoutCertificaatService/BepaalCertificaatCode/Test.cls.xml =================================================================== diff -u -r33542 -r33566 --- vhUnitTest/DOM/PM/HoutCertificaatService/BepaalCertificaatCode/Test.cls.xml (.../Test.cls.xml) (revision 33542) +++ vhUnitTest/DOM/PM/HoutCertificaatService/BepaalCertificaatCode/Test.cls.xml (.../Test.cls.xml) (revision 33566) @@ -3,21 +3,41 @@ vhUnitTest.TestCase - + %String UT1001 - + %String UT2001 - + %String UT2002 + +%String +UT3001 + + + +%String +UT3002 + + + +%String +UT3003 + + + +%String +UT3004 + + vhTest.Dummy.DOM.PM.Maatwerk.PRBSData 1 @@ -31,7 +51,6 @@ Do ..CleanUpHoutCertificaten() Set ..PRBSData = ##class(vhTest.Dummy.DOM.PM.Maatwerk.PRBSData).%New() - Do ..MaakTestProductData() ]]> @@ -52,54 +71,122 @@ #dim PEFC80ID As TECH.String = "8030" #dim PEFC70ID As TECH.String = "5050" + Do ..MaakTestProductData1Niveau() + Do ..ZetHoutCertificaat(..#Kind01ProductID,FSCMix70ID) Do ..ZetHoutCertificaat(..#Kind02ProductID,PEFC80ID) Set HoutCertificaatService = ##class(DOM.PM.HoutCertificaatService).%New() #dim ProductAPI As DOM.PM.ProductAPI = ##class(vhTest.Mock.DOM.PM.ProductAPI).MockInstance() - Do ProductAPI.IndienMethodCall("BestaatProduct",..#MoederProductID).DanReturn($$$True) + Do ProductAPI.IndienMethodCall("BestaatProduct",..#Moeder01ProductID).DanReturn($$$True) Do ProductAPI.IndienMethodCall("BestaatProduct",..#Kind01ProductID).DanReturn($$$True) Do ProductAPI.IndienMethodCall("BestaatProduct",..#Kind02ProductID).DanReturn($$$True) // Act - #dim HoutCertificaatCode As TECH.String= HoutCertificaatService.BepaalCertificaatCode(..#MoederProductID) + #dim HoutCertificaatCode As TECH.String= HoutCertificaatService.BepaalCertificaatCode(..#Moeder01ProductID) // Assert Do $$$AssertEquals(HoutCertificaatCode,PEFC70ID) ]]> + + + + - + + + + + + + + + ProductID:TECH.String,HoutCertificaatID:TECH.String 1 @@ -112,6 +199,8 @@ Index: DOM/PM/HoutCertificaatService.cls.xml =================================================================== diff -u -r29059 -r33566 --- DOM/PM/HoutCertificaatService.cls.xml (.../HoutCertificaatService.cls.xml) (revision 29059) +++ DOM/PM/HoutCertificaatService.cls.xml (.../HoutCertificaatService.cls.xml) (revision 33566) @@ -179,7 +179,7 @@ #dim BSPRNr As %String = $piece(BSRec,"\") If (BSPRNr'="") && (..TeltBouwsteenMeeVoorHoutCertificaat(BSPRNr, BSRec)) { Set:(MoetAantalBerekenen) AantalVanBouwsteen = ..GeefProductBouwsteenAantal(PRNr,BSPRNr,BSKey,MoederProductAantal) - Do HoutCertificaatBepalerInput.VoegToeProduct(BSPRNr, AantalVanBouwsteen) + Do HoutCertificaatBepalerInput.VoegToeProduct(BSPRNr, AantalVanBouwsteen, ..ProductAPI.IsSamengesteldProduct(PRNr)) } } } @@ -196,7 +196,7 @@ DOM.PM.impl.HoutCertificaat @@ -232,7 +232,13 @@ PRNr:TECH.String DOM.PM.impl.HoutCertificaat