Index: APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator.cls.xml =================================================================== diff -u -r71776 -r71892 --- APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator.cls.xml (.../ProductOptiesGenerator.cls.xml) (revision 71776) +++ APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator.cls.xml (.../ProductOptiesGenerator.cls.xml) (revision 71892) @@ -8,8 +8,8 @@ 1 - -DOM.Halux.AAP.DnaCodeRepository + +APPS.Halux.AAP.DnaCodeService 1 @@ -19,14 +19,14 @@ -ProductApi:DOM.PM.ProductAPI="",DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="" +ProductApi:DOM.PM.ProductAPI="",DnaCodeService:APPS.Halux.AAP.DnaCodeService="" 1 1 %Status 1 1) { - Set Exception = ##class(TECH.Exceptions.DataCorruptException).%New("Meerdere dnacodes gevonden voor toelevering '" _ ToeleveringId _ "', product '" _ ProductId _ "' en sequentienummer '" _ SequentieNummerBinnenBatch _ "'.") - do ##class(TECH.ExceptionHandler).Throw(Exception) - } - Do LijstOpties.Insert(..GeefOptieVoorLade(SequentieNummerLade, "-" _ "DNA-code", DnaCode)) Do LijstOpties.Insert(..GeefOptieVoorLade(SequentieNummerLade, "-" _ "PIN", DnaCode)) Do LijstOpties.Insert(..GeefOptieVoorLade(SequentieNummerLade, "-" _ "SHORTPIN", DnaCodeIngekort)) Index: vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator/GenereerOptiesVoorLade/Test.cls.xml =================================================================== diff -u -r71788 -r71892 --- vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator/GenereerOptiesVoorLade/Test.cls.xml (.../Test.cls.xml) (revision 71788) +++ vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/ProductOptiesGenerator/GenereerOptiesVoorLade/Test.cls.xml (.../Test.cls.xml) (revision 71892) @@ -81,12 +81,9 @@ Set ProductApiMock = ##class(vhTest.Mock.DOM.PM.ProductAPI).%New() Do ProductApiMock.VerwachtMethodCall("GeefProduct", ..#DummyProductId).DanReturn(ProductMock) - Set DnaCode = ##class(DOM.Halux.AAP.DnaCode).%New() - Set DnaCode.DnaCode = ..#DummyDnaCode - #dim DnaCodeIterator As TECH.ItemIterator = ##class(TECH.ListUtils).CreateIteratorOfObjects(DnaCode) - #dim DnaCodeRepositoryMock As vhTest.Mock.DOM.Halux.AAP.DnaCodeRepository = ..GeefDnaCodeRepositoryMock(..#DummyToeleveringId, ..#SequentieNummer, ..#DummyProductId, DnaCodeIterator) + #dim DnaCodeServiceMock As vhTest.Mock.APPS.Halux.AAP.DnaCodeService = ..GeefDnaCodeServiceMock(..#DummyToeleveringId, ..#SequentieNummer, ..#DummyProductId, ..#DummyDnaCode) - Set Generator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.OptieGenerator.ProductOptiesGenerator).%New(ProductApiMock, DnaCodeRepositoryMock) + Set Generator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.OptieGenerator.ProductOptiesGenerator).%New(ProductApiMock, DnaCodeServiceMock) #dim Resultaat As %ListOfObjects = Generator.GenereerOptiesVoorLade(ToeleveringMock, ..UitvoeringInfo) Do $$$AssertEquals(Resultaat.Size, 10) @@ -104,7 +101,7 @@ Do ToeleveringMock.Verifieer() Do ProductMock.Verifieer() Do ProductApiMock.Verifieer() - Do DnaCodeRepositoryMock.Verifieer() + Do DnaCodeServiceMock.Verifieer() ]]> @@ -121,12 +118,9 @@ Set ProductApiMock = ##class(vhTest.Mock.DOM.PM.ProductAPI).%New() Do ProductApiMock.VerwachtMethodCall("GeefProduct", ..#DummyProductId).DanReturn(ProductMock) - Set DnaCode = ##class(DOM.Halux.AAP.DnaCode).%New() - Set DnaCode.DnaCode = ..#DummyDnaCode - #dim DnaCodeIterator As TECH.ItemIterator = ##class(TECH.ListUtils).CreateIteratorOfObjects(DnaCode) - #dim DnaCodeRepositoryMock As vhTest.Mock.DOM.Halux.AAP.DnaCodeRepository = ..GeefDnaCodeRepositoryMock(..#DummyToeleveringId, ..#SequentieNummer, ..#DummyProductId, DnaCodeIterator) + #dim DnaCodeServiceMock As vhTest.Mock.APPS.Halux.AAP.DnaCodeService = ..GeefDnaCodeServiceMock(..#DummyToeleveringId, ..#SequentieNummer, ..#DummyProductId, ..#DummyDnaCode) - Set Generator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.OptieGenerator.ProductOptiesGenerator).%New(ProductApiMock, DnaCodeRepositoryMock) + Set Generator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.OptieGenerator.ProductOptiesGenerator).%New(ProductApiMock, DnaCodeServiceMock) #dim Resultaat As %ListOfObjects = Generator.GenereerOptiesVoorLade(ToeleveringMock, ..UitvoeringInfo) Do $$$AssertEquals(Resultaat.Size, 10) @@ -135,68 +129,10 @@ Do ToeleveringMock.Verifieer() Do ProductMock.Verifieer() Do ProductApiMock.Verifieer() - Do DnaCodeRepositoryMock.Verifieer() + Do DnaCodeServiceMock.Verifieer() ]]> - - - - - - - - ProductId:%String,AxInventTransId:%String,AxConfigId:%String 1 @@ -244,15 +180,15 @@ ]]> - -ToeleveringId:%String,SequentieNummer:%Integer,ProductId:%String,DnaCodeIterator:TECH.Iterator + +ToeleveringId:%String,SequentieNummer:%Integer,ProductId:%String,DnaCode:%String 1 -vhTest.Mock.DOM.Halux.AAP.DnaCodeRepository +vhTest.Mock.APPS.Halux.AAP.DnaCodeService