Index: vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/Registreer/Test.cls.xml =================================================================== diff -u -r45704 -r45823 --- vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/Registreer/Test.cls.xml (.../Test.cls.xml) (revision 45704) +++ vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/Registreer/Test.cls.xml (.../Test.cls.xml) (revision 45823) @@ -10,20 +10,13 @@ Set HandelPersonalityStub = ##class(vhTest.Mock.DOM.common.HandelPersonality).%New() Do HandelPersonalityStub.IndienMethodCall("Accept",$$$ElkeWaarde).DanDoeNiks() - #dim HandelKlantDataDummy As DOM.VKP.impl.HandelKlantData = ##class(vhTest.Utils.DOM.VKP.HandelKlantData).StandaardHandelKlantData() - Set HandelKlantDataRepositoryMock = ##class(vhTest.Mock.TECH.Persistentie.Repository).%New() - Do HandelKlantDataRepositoryMock.VerwachtMethodCall("Maak").ExactAantalKeer(0) - Do HandelKlantDataRepositoryMock.VerwachtMethodCall("GeefViaID","daro_"_RegistreerContactGegevensRequestStub.Header.KlantId).ExactAantalKeer(1).DanReturn(HandelKlantDataDummy) - Set HandelPersonalityRepositoryStub = ##class(vhTest.Mock.TECH.Persistentie.Repository).%New() Do HandelPersonalityRepositoryStub.IndienMethodCall("GeefViaID",RegistreerContactGegevensRequestStub.Header.PersonalityId).DanReturn(HandelPersonalityStub) Set SettingsManagerStub = ##class(vhTest.Mock.WSimpl.Vhisie4.SettingsManager).%New() Do SettingsManagerStub.IndienMethodCall("GeefVhisie4Prefix",HandelPersonalityStub).DanReturn("daro_") Do SettingsManagerStub.IndienMethodCall("GeefWebshopVerwerker",HandelPersonalityStub).DanReturn("DARO") - Set WebshopSessionServiceDummy = ##class(vhTest.Dummy.APPS.EC.WebshopSessionService).%New() - Set KlantDataBewaarderStub = ##class(vhTest.Mock.APPS.VKP.KlantDataBewaarder).%New() Do KlantDataBewaarderStub.IndienMethodCall("Bewaar",$$$ElkeWaarde,$$$ElkeWaarde).DanDoeNiks() @@ -43,12 +36,16 @@ Set KortingBewaarderMock = ##class(vhTest.Mock.WSimpl.Unishop.Login.KortingBewaarder).%New() Do KortingBewaarderMock.VerwachtMethodCall("BewaarMeegegevenKorting",RegistreerContactGegevensRequestStub.Ref,DataOpt).ExactAantalKeer(1) - Set Registreerder = ##class(WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder).%New(HandelKlantDataRepositoryMock,HandelPersonalityRepositoryStub,WebshopSessionServiceDummy,KlantDataBewaarderStub,SettingsManagerStub,KortingBewaarderMock,KlantSessieDataBepalerStub) + #dim HandelKlantDataDummy As DOM.VKP.impl.HandelKlantData = ##class(vhTest.Utils.DOM.VKP.HandelKlantData).StandaardHandelKlantData() + Set KlantDataBepalerMock = ##class(vhTest.Mock.WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder.KlantDataBepaler).%New() + Do KlantDataBepalerMock.VerwachtMethodCall("Bepaal",RegistreerContactGegevensRequestStub,HandelPersonalityStub).ExactAantalKeer(1).DanReturn(HandelKlantDataDummy) + + Set Registreerder = ##class(WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder).%New(HandelPersonalityRepositoryStub,KlantDataBewaarderStub,SettingsManagerStub,KortingBewaarderMock,KlantSessieDataBepalerStub,KlantDataBepalerMock) Do Registreerder.Registreer(RegistreerContactGegevensRequestStub) - Do HandelKlantDataRepositoryMock.Verifieer() Do KortingBewaarderMock.Verifieer() Do KlantSessieDataBepalerStub.Verifieer() + Do KlantDataBepalerMock.Verifieer() ]]> @@ -93,58 +90,6 @@ Do Registreerder.Registreer(RegistreerContactGegevensRequestStub) ]]> - - - - - - - - Index: WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml (revision 0) +++ WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml (revision 45823) @@ -0,0 +1,83 @@ + + + +TECH.Mockable + + +DOM.VKP.impl.HandelKlantDataRepository +1 + + + +WSimpl.Vhisie4.SettingsManager +1 + + + +APPS.EC.WebshopSessionService +1 + + + +HandelKlantDataRepository:DOM.VKP.impl.HandelKlantDataRepository,SettingsManager:WSimpl.Vhisie4.SettingsManager,WebshopSessionService:APPS.EC.WebshopSessionService +1 +1 +%Status +1 + + + + +RegistreerContactGegevensRequest:WS.Vhisie4.Auth.RegistreerContactGegevensRequest,HandelPersonality:DOM.common.impl.HandelPersonality +DOM.VKP.impl.HandelKlantData + + + + +KlantId:DOM.VKP.VanHoeckeKlantID,RegistreerContactGegevensRequest:WS.Vhisie4.Auth.RegistreerContactGegevensRequest +1 +DOM.VKP.impl.HandelKlantData + + + + + + Index: vhTest/Fake/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml =================================================================== diff -u --- vhTest/Fake/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml (revision 0) +++ vhTest/Fake/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml (revision 45823) @@ -0,0 +1,19 @@ + + + + +Deze klasse werd automatisch gegenereerd en onderhouden, nieuwe methodes worden automatisch bijgevoegd, bestaande blijven zoals ze zijn. +Een hercompilatie van de basis interface - met een correct werkende studiohook ( v2.20 ++ ) - zorgt ervoor dat deze klasse aangepast wordt +1 +WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder.KlantDataBepaler + + +RegistreerContactGegevensRequest:WS.Vhisie4.Auth.RegistreerContactGegevensRequest,HandelPersonality:DOM.common.impl.HandelPersonality +DOM.VKP.impl.HandelKlantData + + + + + + Index: WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder.cls.xml =================================================================== diff -u -r45633 -r45823 --- WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder.cls.xml (.../ContactGegevensRegistreerder.cls.xml) (revision 45633) +++ WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder.cls.xml (.../ContactGegevensRegistreerder.cls.xml) (revision 45823) @@ -8,11 +8,6 @@ 1 - -DOM.VKP.impl.HandelKlantDataRepository -1 - - APPS.EC.WebshopSessionService 1 @@ -23,13 +18,13 @@ 1 - -WSimpl.Vhisie4.SettingsManager + +WSimpl.Unishop.Login.KortingBewaarder 1 - -WSimpl.Unishop.Login.KortingBewaarder + +WSimpl.Vhisie4.SettingsManager 1 @@ -38,20 +33,24 @@ 1 + +WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder.KlantDataBepaler +1 + + -HandelKlantDataRepository:DOM.VKP.impl.HandelKlantDataRepository,HandelPersonalityRepository:DOM.common.impl.HandelPersonalityRepository,WebshopSessionService:APPS.EC.WebshopSessionService,KlantDataBewaarder:APPS.VKP.KlantDataBewaarder,SettingsManager:WSimpl.Vhisie4.SettingsManager,LoginKortingBewaarder:WSimpl.Unishop.Login.KortingBewaarder,KlantSessieDataBepaler:APPS.EC.KlantSessieDataBepaler +HandelPersonalityRepository:DOM.common.impl.HandelPersonalityRepository,KlantDataBewaarder:APPS.VKP.KlantDataBewaarder,SettingsManager:WSimpl.Vhisie4.SettingsManager,LoginKortingBewaarder:WSimpl.Unishop.Login.KortingBewaarder,KlantSessieDataBepaler:APPS.EC.KlantSessieDataBepaler,KlantDataBepaler:WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder.KlantDataBepaler 1 1 %Status 1 @@ -71,19 +70,8 @@ } Else { #dim HandelPersonality As DOM.common.impl.HandelPersonality = ..HandelPersonalityRepository.GeefViaID(RegistreerContactGegevensRequest.Header.PersonalityId) - #dim KlantId As %String = "" - #dim KlantData As DOM.VKP.impl.HandelKlantData - If RegistreerContactGegevensRequest.Header.KlantId = "" { - Set KlantId = ..SettingsManager.GeefVhisie4Prefix(HandelPersonality)_..WebshopSessionService.GeefVolgendeKlantID(RegistreerContactGegevensRequest.Header.PersonalityId) - Set KlantData = ..GeefHandelKlantDataVoorRegistreer(KlantId,RegistreerContactGegevensRequest) - } Else { - Try { - Set KlantData = ..HandelKlantDataRepository.GeefViaID(..SettingsManager.GeefVhisie4Prefix(HandelPersonality)_RegistreerContactGegevensRequest.Header.KlantId) - } Catch { - Do ##class(TECH.Exceptions.InvalidInputException).Throw("Kon geen klantdata openen met id '"_RegistreerContactGegevensRequest.Header.KlantId_"'") - } - - } + #dim KlantData As DOM.VKP.impl.HandelKlantData = ..KlantDataBepaler.Bepaal(RegistreerContactGegevensRequest, HandelPersonality) + Set KlantData.Naam = RegistreerContactGegevensRequest.Naam Set KlantData.EmailAdres = RegistreerContactGegevensRequest.EmailAdres Set KlantData.StraatEnNr = RegistreerContactGegevensRequest.StraatEnNr @@ -128,29 +116,6 @@ ]]> - -KlantId:DOM.VKP.VanHoeckeKlantID,RegistreerContactGegevensRequest:WS.Vhisie4.Auth.RegistreerContactGegevensRequest -1 -DOM.VKP.impl.HandelKlantData - - - Personality:DOM.common.Personality,KlantData:DOM.common.dto.HandelKlantData 1 Index: vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler/Bepaal/Test.cls.xml =================================================================== diff -u --- vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler/Bepaal/Test.cls.xml (revision 0) +++ vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler/Bepaal/Test.cls.xml (revision 45823) @@ -0,0 +1,110 @@ + + + +vhUnitTest.TestCase + + + + + + + + + + + + + + + + + + + + Index: vhTest/Mock/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml =================================================================== diff -u --- vhTest/Mock/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml (revision 0) +++ vhTest/Mock/WSimpl/Vhisie4/Auth/HandelAuthenticator/ContactGegevensRegistreerder/KlantDataBepaler.cls.xml (revision 45823) @@ -0,0 +1,20 @@ + + + + +Deze klasse werd automatisch gegenereerd en onderhouden - lokale aanpassingen zijn niet nodig. +Een hercompilatie van de basis interface - met een correct werkende studiohook ( v2.20 ++ ) - zorgt ervoor dat deze klasse aangepast wordt +1 +WSimpl.Vhisie4.Auth.HandelAuthenticator.ContactGegevensRegistreerder.KlantDataBepaler,Tools.Mock.MockClassBase +right + + +RegistreerContactGegevensRequest:WS.Vhisie4.Auth.RegistreerContactGegevensRequest,HandelPersonality:DOM.common.impl.HandelPersonality +DOM.VKP.impl.HandelKlantData + + + + + +