Index: vhUnitTest/APPS/Halux/Planning/Pitching/impl/BatchPitchDataExporter/ExporteerBatchPitchedDataNaarObjective/Test.cls.xml =================================================================== diff -u -r71699 -r71733 --- vhUnitTest/APPS/Halux/Planning/Pitching/impl/BatchPitchDataExporter/ExporteerBatchPitchedDataNaarObjective/Test.cls.xml (.../Test.cls.xml) (revision 71699) +++ vhUnitTest/APPS/Halux/Planning/Pitching/impl/BatchPitchDataExporter/ExporteerBatchPitchedDataNaarObjective/Test.cls.xml (.../Test.cls.xml) (revision 71733) @@ -41,7 +41,8 @@ @@ -105,121 +108,123 @@ Do ..BatchMock.VerwachtMethodCall("IsReedsGestart").DanReturn(IsReedsGestart) Do ..BatchMock.VerwachtMethodCall("GeefID").DanReturn(DummyBatchId) - Do ..BatchMock.VerwachtMethodCall("GeefCategorie").ExactAantalKeer(1).DanReturn("Legrabox") - #dim BatchPitchedRepositoryMock As BatchPitchedRepositoryMock = ..GeefBatchPitchedRepositoryMock(..BatchMock) + Do ..BatchMock.VerwachtMethodCall("GeefCategorie").ExactAantalKeer(1).DanReturn("Legrabox") + Set DummyBatchPitchedDto = ##class(APPS.Halux.Planning.Pitching.dto.BatchPitched).%New() + #dim BatchPitchedRepositoryMock As vhTest.Mock.APPS.Halux.Planning.Pitching.impl.BatchPitchedRepository = ..GeefBatchPitchedRepositoryMock(..BatchMock, DummyBatchPitchedDto) - #dim BatchesExported As TECH.ListIterator = ..GeefBatchesExportedIterator(DummyBatchId, IsExported) - #dim BatchesExportedLijst As %ListOfObjects = ##class(TECH.ListUtils).IteratorToList(BatchesExported) - Set BatchPitchExportedRepositoryMock = ##class(vhTest.Mock.APPS.Halux.Planning.Pitching.impl.BatchPitchExportedRepository).%New() - Do BatchPitchExportedRepositoryMock.VerwachtMethodCall("ZoekViaBatchId", DummyBatchId).ExactAantalKeer(2).DanReturn(BatchesExported) - Do BatchPitchExportedRepositoryMock.VerwachtMethodCall("Bewaar", BatchesExportedLijst.GetAt(1)).ExactAantalKeer(1).DanDoeNiks() + #dim BatchesExportedLijst As %ListOfObjects = ..GeefBatchesExportedLijst(DummyBatchId, IsExported) + Set BatchPitchExportedServiceMock = ##class(vhTest.Mock.APPS.Halux.Planning.Pitching.impl.BatchPitchExportedService).%New() + Do BatchPitchExportedServiceMock.VerwachtMethodCall("ZoekViaBatchId", DummyBatchId).DanReturn(BatchesExportedLijst) + Do BatchPitchExportedServiceMock.VerwachtMethodCall("MarkeerBatchAlsExportedNaarObjective", DummyBatchId).DanDoeNiks() + Do BatchPitchExportedServiceMock.VerwachtMethodCall("BepaalVolgnummerEnBewaar", DummyBatchPitchedDto).DanDoeNiks() + Set BatchNaarObjectiveUitvoeringInfoRepositoryMock = ##class(vhTest.Mock.APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfoRepository).%New() Do BatchNaarObjectiveUitvoeringInfoRepositoryMock.VerwachtMethodCall("ZoekViaBatchId", DummyBatchId).ExactAantalKeer(1).DanReturn(..GeefLegeUitvoeringInfoIterator()) - Set BatchPitchDataExporter = ##class(APPS.Halux.Planning.Pitching.impl.BatchPitchDataExporter).%New(..MESServiceStub, BatchPitchedRepositoryMock, BatchPitchExportedRepositoryMock, BatchNaarObjectiveUitvoeringInfoRepositoryMock) + Set BatchPitchDataExporter = ##class(APPS.Halux.Planning.Pitching.impl.BatchPitchDataExporter).%New(..MESServiceStub, BatchPitchedRepositoryMock, BatchNaarObjectiveUitvoeringInfoRepositoryMock,, BatchPitchExportedServiceMock) Do BatchPitchDataExporter.ExporteerBatchPitchedDataNaarObjective() Do ..BatchMock.Verifieer() Do BatchPitchedRepositoryMock.Verifieer() - Do BatchPitchExportedRepositoryMock.Verifieer() Do BatchNaarObjectiveUitvoeringInfoRepositoryMock.Verifieer() + Do BatchPitchExportedServiceMock.Verifieer() ]]> - + - + -BatchMock:vhTest.Mock.APPS.Halux.common.Batch +BatchMock:vhTest.Mock.APPS.Halux.common.Batch,BatchPitchedDto:APPS.Halux.Planning.Pitching.dto.BatchPitched 1 vhTest.Mock.APPS.Halux.Planning.Pitching.impl.BatchPitchedRepository -BatchMock:vhTest.Mock.APPS.Halux.common.Batch +BatchMock:vhTest.Mock.APPS.Halux.common.Batch,BatchPitchedDto:APPS.Halux.Planning.Pitching.dto.BatchPitched 1 TECH.Iterator - + BatchId:%String,IsExported:%Boolean,Aantal:%Integer=1 1 TECH.Iterator @@ -234,7 +239,7 @@ Do BatchesExportedLijst.Insert(BatchExportedDto) } - Quit ##class(TECH.ListIterator).%New(BatchesExportedLijst) + Quit BatchesExportedLijst ]]> Index: APPS/Halux/Planning/Pitching/impl/BatchPitchDataExporter.cls.xml =================================================================== diff -u -r71703 -r71733 --- APPS/Halux/Planning/Pitching/impl/BatchPitchDataExporter.cls.xml (.../BatchPitchDataExporter.cls.xml) (revision 71703) +++ APPS/Halux/Planning/Pitching/impl/BatchPitchDataExporter.cls.xml (.../BatchPitchDataExporter.cls.xml) (revision 71733) @@ -13,13 +13,13 @@ 1 - -APPS.Halux.Planning.Pitching.impl.BatchPitchExportedRepository + +APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfoRepository 1 - -APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfoRepository + +APPS.Halux.Planning.Pitching.impl.BatchPitchExportedService 1 @@ -29,16 +29,16 @@ -MESService:APPS.Halux.PPS.MES.MESService="",BatchPitchedRepository:APPS.Halux.Planning.Pitching.impl.BatchPitchedRepository="",BatchPitchExportedRepository:APPS.Halux.Planning.Pitching.impl.BatchPitchExportedRepository="",BatchNaarObjectiveUitvoeringInfoRepository:APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfoRepository="",Logger:vhLib.Logger="" +MESService:APPS.Halux.PPS.MES.MESService="",BatchPitchedRepository:APPS.Halux.Planning.Pitching.impl.BatchPitchedRepository="",BatchNaarObjectiveUitvoeringInfoRepository:APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfoRepository="",Logger:vhLib.Logger="",BatchPitchExportedService:APPS.Halux.Planning.Pitching.impl.BatchPitchExportedService="" 1 1 %Status 1 @@ -70,8 +77,7 @@ %Boolean - - - - Batch:APPS.Halux.common.impl.BatchImpl 1 @@ -103,30 +103,12 @@ #dim UitvoeringInfoLijst As %ListOfObjects = ##class(TECH.ListUtils).IteratorToList(UitvoeringInfoIterator) Do AansturingActie.VerwerkUitvoeringInfoLijst(UitvoeringInfoLijst) + } Else { + Set Exception = ##class(TECH.Exceptions.NotSupportedException).%New("'ExporteerBatchPitchedDataNaarObjective()' is niet geïmplementeerd voor '" _ Batch.GeefCategorie() _ "'.") + Do ..Logger.Error("TriggerBatchNaarObjectiveAansturingActie", Exception.GeefOmschrijving()) } ]]> - - -BatchId:%String -1 - -