Index: vhUnitTest/BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator/GenereerProboxInhoudEtiket/Test.cls.xml =================================================================== diff -u -r64668 -r64761 --- vhUnitTest/BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator/GenereerProboxInhoudEtiket/Test.cls.xml (.../Test.cls.xml) (revision 64668) +++ vhUnitTest/BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator/GenereerProboxInhoudEtiket/Test.cls.xml (.../Test.cls.xml) (revision 64761) @@ -76,6 +76,7 @@ #dim CurrentHorolog As TECH.String = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentHorolog() Set ToeleveringAPIMock = ##class(vhTest.Mock.DOM.AKP.ToeleveringAPI).%New() Do Toelevering.IndienMethodCall("GeefDueOutTime").DanReturn(CurrentHorolog) + Do ToeleveringAPIMock.VerwachtMethodCall("BestaatToelevering", $$$DummyString).DanReturn($$$True) Do ToeleveringAPIMock.VerwachtMethodCall("GeefToelevering", ..DnaCode1.Toelevering).DanReturn(Toelevering) Set VerkoopAPIMock = ##class(vhTest.Mock.DOM.VKP.VerkoopAPI).%New() @@ -122,6 +123,7 @@ #dim CurrentHorolog As TECH.String = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentHorolog() Set ToeleveringAPIMock = ##class(vhTest.Mock.DOM.AKP.ToeleveringAPI).%New() Do Toelevering.IndienMethodCall("GeefDueOutTime").DanReturn(CurrentHorolog) + Do ToeleveringAPIMock.VerwachtMethodCall("BestaatToelevering", $$$DummyString).DanReturn($$$True) Do ToeleveringAPIMock.VerwachtMethodCall("GeefToelevering", ..DnaCode1.Toelevering).DanReturn(Toelevering) Set VerkoopAPIMock = ##class(vhTest.Mock.DOM.VKP.VerkoopAPI).%New() @@ -165,7 +167,7 @@ Do OrderAPIMock.VerwachtMethodCall("GeefOrder", ..DnaCode1.OrderId).DanReturn(Order) Set ToeleveringAPIMock = ##class(vhTest.Mock.DOM.AKP.ToeleveringAPI).%New() - Do ToeleveringAPIMock.IndienMethodCall("GeefToelevering", ..DnaCode1.Toelevering).DanException($$$DummyException) + Do ToeleveringAPIMock.VerwachtMethodCall("BestaatToelevering", $$$DummyString).DanReturn($$$False) Set VerkoopAPIMock = ##class(vhTest.Mock.DOM.VKP.VerkoopAPI).%New() #dim Klant As TECH.RegisteredObject = $$$DummyObject @@ -184,6 +186,7 @@ Do PartijAPIMock.Verifieer() Do HtmlInhoudProboxEtiketBepalerMock.Verifieer() Do OrderAPIMock.Verifieer() + Do ToeleveringAPIMock.Verifieer() Do VerkoopAPIMock.Verifieer() Do LogoBepalerMock.Verifieer() ]]> Index: BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator.cls.xml =================================================================== diff -u -r64668 -r64761 --- BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator.cls.xml (.../ProboxInhoudEtiketGenerator.cls.xml) (revision 64668) +++ BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator.cls.xml (.../ProboxInhoudEtiketGenerator.cls.xml) (revision 64761) @@ -72,11 +72,10 @@ #dim Order as DOM.VKP.Order = ..OrderAPI.GeefOrder(DnaCode.OrderId) #dim Toelevering as DOM.AKP.Toelevering = "" - Try { + If (..ToeleveringAPI.BestaatToelevering(ToeleveringId)) { Set Toelevering = ..ToeleveringAPI.GeefToelevering(ToeleveringId) - } Catch { - Set Exception = ##class(TECH.ExceptionHandler).Catch() - do ##class(vhLib.Logger).%New().Warning("BL.PPS.TBX.DocsV1.ProboxInhoudEtiketGenerator", "ProboxInhoudEtiket afgedrukt zonder opvulling 'ProductieWeek': "_ Exception.ToString()) + } Else { + do ##class(vhLib.Logger).%New().Warning("BL.PPS.TBX.DocsV1.ProboxInhoudEtiketGenerator", "ProboxInhoudEtiket afgedrukt zonder opvulling van de parameter 'ProductieWeek'") } Set ProboxInhoudLabel = ##class(BL.Etiket.ProboxInhoud).%New() @@ -93,7 +92,7 @@ Set ProboxInhoudLabel.ToeleveringNr = ToeleveringId Set ProboxInhoudLabel.VerzendingWijze = Order.GeefVerzendingWijze() - If ($$$Not(Toelevering = "")) { + If ($IsObject(Toelevering)) { Set ProboxInhoudLabel.ProductieWeek = $translate($$EXTDATE^vhLib.DataTypes(Toelevering.GeefDueOutTime(),"DW"),"/","") } Else { Set ProboxInhoudLabel.ProductieWeek = ""