Index: WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteerder.cls.xml
===================================================================
diff -u -r50777 -r50839
--- WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteerder.cls.xml (.../Decrypteerder.cls.xml) (revision 50777)
+++ WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteerder.cls.xml (.../Decrypteerder.cls.xml) (revision 50839)
@@ -199,9 +199,12 @@
Do ..KlantDataBewaarder.Bewaar(HandelPersonality, KlantData)
} Else {
If ##class(TECH.StringUtils).Contains(LoginParameters.KlantID,"_") {
- Set KlantData = ..HandelKlantDataRepository.GeefViaID(LoginParameters.KlantID)
+ Set KlantData = ..GeefHandelKlantDataDto(LoginParameters)
+ Do ..KlantDataBewaarder.Bewaar(HandelPersonality, KlantData)
} Else {
- Set KlantData = ..HandelKlantDataRepository.GeefViaID(HandelPersonality.GeefPrefix()_LoginParameters.KlantID)
+ Set KlantData = ..GeefHandelKlantDataDto(LoginParameters)
+ Set KlantData.ID = HandelPersonality.GeefPrefix()_KlantData.ID
+ Do ..KlantDataBewaarder.Bewaar(HandelPersonality, KlantData)
}
}
Index: vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteerder/Decrypteer/Test.cls.xml
===================================================================
diff -u -r50197 -r50839
--- vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteerder/Decrypteer/Test.cls.xml (.../Test.cls.xml) (revision 50197)
+++ vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteerder/Decrypteer/Test.cls.xml (.../Test.cls.xml) (revision 50839)
@@ -55,6 +55,7 @@
Set ..LoginParameters.PersonalityID = ##class(DOM.common.enu.Personality).Daro()
Set ..LoginParameters.RemoteIP = "127.0.0.257"
Set ..LoginParameters.Taal = "E"
+ Set ..LoginParameters.KlantNaam = "Een Naam"
Set ..KlantData = ##class(DOM.common.dto.HandelKlantData).%New()
Set ..KlantData.ID = "5"
@@ -79,9 +80,8 @@
Do LoginParameterBepalerMock.VerwachtMethodCall("GeefLoginParameters", ..DecrypteerRequestStub.Ref, ..DecrypteerRequestStub.DataOpt, ..DecrypteerRequestStub.Header.Taal, ..DecrypteerRequestStub.Header.GebruikerIp).ExactAantalKeer(1).DanReturn(..LoginParameters)
#dim HandelPersonalityMock As vhTest.Mock.DOM.common.HandelPersonality = ##class(vhTest.Mock.DOM.common.HandelPersonality).%New()
- //Do HandelPersonalityMock.VerwachtMethodCall("GeefID").DanReturn(##class(DOM.common.enu.Personality).Daro())
Do HandelPersonalityMock.VerwachtMethodCall("GeefPrefix").DanReturn("daro_")
- //Do HandelPersonalityMock.VerwachtMethodCall("Accept", HandelPersonalityMock).DanReturn(..KlantData)
+ Do HandelPersonalityMock.IndienMethodCall("Accept",HandelPersonalityMock).DanReturn(..KlantData)
#dim HandelPersonalityRepositoryMock As vhTest.Mock.TECH.Persistentie.Repository = ##class(vhTest.Mock.TECH.Persistentie.Repository).%New()
Do HandelPersonalityRepositoryMock.VerwachtMethodCall("GeefViaID", ..DecrypteerRequestStub.Header.PersonalityId).DanReturn(HandelPersonalityMock)
@@ -95,8 +95,11 @@
#dim RandomToegelatenLadetypes As %ListOfDataTypes = ##class(TECH.ListUtils).CreateListOfDataTypes("LadeType1", "LadeType2", "LadeType3")
#dim HandelToegelatenLadetypesBepalerMock As vhTest.Mock.DOM.VKP.impl.HandelToegelatenLadetypesBepaler = ##class(vhTest.Mock.DOM.VKP.impl.HandelToegelatenLadetypesBepaler).%New()
Do HandelToegelatenLadetypesBepalerMock.VerwachtMethodCall("Bepaal", ..LoginParameters.PersonalityID).DanReturn(RandomToegelatenLadetypes)
+
+ Set KlantDataBewaarderStub = ##class(vhTest.Mock.APPS.VKP.KlantDataBewaarder).%New()
+ Do KlantDataBewaarderStub.IndienMethodCall("Bewaar",HandelPersonalityMock,$$$ElkeWaarde).DanDoeNiks().ExactAantalKeer(1)
- #dim Decrypteerder As WSimpl.Vhisie4.Auth.HandelAuthenticator.Decrypteerder = ##class(WSimpl.Vhisie4.Auth.HandelAuthenticator.Decrypteerder).%New(LoginParameterBepalerMock, HandelKlantDataRepositoryMock, HandelPersonalityRepositoryMock,..WebshopSessionServiceDummy, KortingBewaarderMock, ..UrlBepalerStub, HandelToegelatenLadetypesBepalerMock)
+ #dim Decrypteerder As WSimpl.Vhisie4.Auth.HandelAuthenticator.Decrypteerder = ##class(WSimpl.Vhisie4.Auth.HandelAuthenticator.Decrypteerder).%New(LoginParameterBepalerMock, HandelKlantDataRepositoryMock, HandelPersonalityRepositoryMock,..WebshopSessionServiceDummy, KortingBewaarderMock, ..UrlBepalerStub, HandelToegelatenLadetypesBepalerMock, KlantDataBewaarderStub)
#dim Response As WS.Vhisie4.Auth.DecrypteerResponse = Decrypteerder.Decrypteer(..DecrypteerRequestStub)
Do $$$AssertEquals(Response.GebruikerId, "1")
@@ -279,6 +282,43 @@
]]>
+
+
+
+