Index: vhUnitTest/APPS/EDI/Bestel/impl/BestelService/UnishopBesteller/ProductRepository/ZoekViaKlantEnPakketReferentie/Test.cls.xml =================================================================== diff -u -r37285 -r37462 --- vhUnitTest/APPS/EDI/Bestel/impl/BestelService/UnishopBesteller/ProductRepository/ZoekViaKlantEnPakketReferentie/Test.cls.xml (.../Test.cls.xml) (revision 37285) +++ vhUnitTest/APPS/EDI/Bestel/impl/BestelService/UnishopBesteller/ProductRepository/ZoekViaKlantEnPakketReferentie/Test.cls.xml (.../Test.cls.xml) (revision 37462) @@ -3,30 +3,53 @@ vhUnitTest.TestCase - -DummyKlantID + +999 - -DummyPakketReferentie + +PREF - -DummyProductID + +15 - + +1 + + + +2 + + + + + + + +aTestName:%String + + + + +aTestName:%String + + + + @@ -35,14 +58,8 @@ #dim Substrings = ##class(TECH.ListUtils).CreateListOfDataTypes("KlantId moet ingevuld worden") Do ..ZetVerwachteExceptie(##class(Tools.Test.VerwachteExceptie).%New("TECH.Exceptions.InvalidInputException",Substrings)) - Set ResultaatArray = ##class(%ArrayOfDataTypes).%New() - Do ResultaatArray.SetAt(..#DummyProductID,1) - - Set ProductSelecteerderMock = ##class(vhTest.Mock.BL.Prod.Select).%New() - Do ProductSelecteerderMock.IndienMethodCall("ZoekKlantRefWrapper",$$$ElkeWaarde).DanReturn(ResultaatArray) - - Set ProductRepo = ##class(APPS.EDI.Bestel.impl.BestelService.UnishopBesteller.ProductRepository).%New(ProductSelecteerderMock) - #dim Resultaat As %String = ProductRepo.ZoekViaKlantEnPakketReferentie("",..#DummyPakketReferentie) + Set ProductRepo = ##class(APPS.EDI.Bestel.impl.BestelService.UnishopBesteller.ProductRepository).%New() + Do ProductRepo.ZoekViaKlantEnPakketReferentie("",..#TestPakketReferentie) ]]> @@ -52,42 +69,54 @@ Do ..ZetVerwachteExceptie(##class(Tools.Test.VerwachteExceptie).%New("TECH.Exceptions.InvalidInputException",Substrings)) Set ProductRepo = ##class(APPS.EDI.Bestel.impl.BestelService.UnishopBesteller.ProductRepository).%New() - #dim Resultaat As %String = ProductRepo.ZoekViaKlantEnPakketReferentie("23112","") - Do $$$AssertEquals(Resultaat,"3289") + Do ProductRepo.ZoekViaKlantEnPakketReferentie("23112","") ]]> - + - + + + +ProductId:%String +1 + + + + +KlantId:%String,PakketReferentie:%String,PakketId:%String,ProductId:%String,Type:%String + + Index: APPS/EDI/Bestel/impl/BestelService/UnishopBesteller/ProductRepository.cls.xml =================================================================== diff -u -r37290 -r37462 --- APPS/EDI/Bestel/impl/BestelService/UnishopBesteller/ProductRepository.cls.xml (.../ProductRepository.cls.xml) (revision 37290) +++ APPS/EDI/Bestel/impl/BestelService/UnishopBesteller/ProductRepository.cls.xml (.../ProductRepository.cls.xml) (revision 37462) @@ -9,13 +9,12 @@ -ProductSelecteerder:BL.Prod.Select 1 1 %Status 1 @@ -36,12 +35,23 @@ Set pxCriteria.Zoek = PakketReferentie Set pxCriteria.KLNr = KlantId - #dim ResultaatArray As %ArrayOfDataTypes = ..ProductSelecteerder.ZoekKlantRefWrapper(pxCriteria) + #dim Result As %String = "" + #dim StatusCode As %Status = ..ProductSelecteerder.ZoekKlantRef(pxCriteria,.Result) + Do ##class(TECH.Exceptions.StatusException).ThrowIndienNietOK(StatusCode,"Fout bij ophalen ProductID via Criteria(KlantID en PakketReferentie)") + + #dim Key As %String = "" + Set ResultaatArray = ##class(%ArrayOfDataTypes).%New() + For { + Set Key = $Order(Result(Key)) + Quit:(Key="") + Do ResultaatArray.SetAt(Result(Key), Key) + } + If ResultaatArray.Count() = 0 { - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Er werden geen producten voor de pakketreferentie "_PakketReferentie_"gevonden")) + Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Er werden geen producten voor de pakketreferentie "_PakketReferentie_" gevonden")) } If ResultaatArray.Count() > 1 { - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Er werden meerdere producten voor de pakketreferentie "_PakketReferentie_"gevonden")) + Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Er werden meerdere producten voor de pakketreferentie "_PakketReferentie_" gevonden")) } Quit ResultaatArray.GetNext() Index: BL/Prod/Select.cls.xml =================================================================== diff -u -r37290 -r37462 --- BL/Prod/Select.cls.xml (.../Select.cls.xml) (revision 37290) +++ BL/Prod/Select.cls.xml (.../Select.cls.xml) (revision 37462) @@ -114,28 +114,6 @@ A - -Criteria:pxSelectCriteria -%ArrayOfDataTypes - - - 1 FishEye: Tag 37462 refers to a dead (removed) revision in file `vhTest/Mock/BL/Prod/Select.cls.xml'. FishEye: No comparison available. Pass `N' to diff?