Index: vhUnitTest/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder/Test.cls.xml =================================================================== diff -u -r41012 -r41014 --- vhUnitTest/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder/Test.cls.xml (.../Test.cls.xml) (revision 41012) +++ vhUnitTest/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder/Test.cls.xml (.../Test.cls.xml) (revision 41014) @@ -18,9 +18,8 @@ Do DateTimeAPIMock.VerwachtMethodCall("CurrentHorolog").DanReturn("64387,35360") Set KlantPrijsBepalerMock = ##class(vhTest.Mock.APPS.VKP.KlantPrijsBepaler).%New() - #dim IdentNumber As APPS.Blum.OnlineProductConfigurator.dto.IdentNumber = Winkelkar.shoppingCart.directories.GetAt(1).subDirectories.GetAt(1).identnumbers.GetAt(1) #dim CurrentDate As %Date = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentDate() - Do KlantPrijsBepalerMock.VerwachtMethodCall("GeefPrijsInformatie", IdentNumber.identnumber, IdentNumber.amount, CurrentDate).DanReturn(50) + Do KlantPrijsBepalerMock.VerwachtMethodCall("GeefPrijsInformatie", "identnumber", 10, CurrentDate).DanReturn(50) Set VerkoopPrijsAPIMock = ##class(vhTest.Mock.APPS.VKP.VerkoopPrijsAPI).%New() Do VerkoopPrijsAPIMock.VerwachtMethodCall("GeefKlantPrijsBepaler", VanHoeckeKlant).DanReturn(KlantPrijsBepalerMock) @@ -52,9 +51,8 @@ Do DateTimeAPIMock.VerwachtMethodCall("CurrentHorolog").DanReturn("64387,35360") Set KlantPrijsBepalerMock = ##class(vhTest.Mock.APPS.VKP.KlantPrijsBepaler).%New() - #dim FunctionalUnit As APPS.Blum.OnlineProductConfigurator.dto.FunctionalUnit = Winkelkar.shoppingCart.directories.GetAt(1).functionalUnits.GetAt(1) #dim CurrentDate As %Date = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentDate() - Do KlantPrijsBepalerMock.VerwachtMethodCall("GeefPrijsInformatie", FunctionalUnit.identnumbers.GetAt(1).identnumber, FunctionalUnit.identnumbers.GetAt(1).amount * FunctionalUnit.amount, CurrentDate).DanReturn(50) + Do KlantPrijsBepalerMock.VerwachtMethodCall("GeefPrijsInformatie", "identnumber", 10, CurrentDate).DanReturn(50) Set VerkoopPrijsAPIMock = ##class(vhTest.Mock.APPS.VKP.VerkoopPrijsAPI).%New() Do VerkoopPrijsAPIMock.VerwachtMethodCall("GeefKlantPrijsBepaler", VanHoeckeKlant).DanReturn(KlantPrijsBepalerMock) @@ -76,19 +74,19 @@ Set Response = ##class(WS.Vhisie4.WinkelkarExport.SendResponse).%New() Set Response.Winkelkar.Status = "Geslaagd" - Set SenderMock = ##class(vhTest.Mock.WSimpl.Vhisie4.Winkelkar.WinkelkarExport.Sender).%New() - Do SenderMock.VerwachtMethodCall("Send", ..Matches.DataTransferObject(..GeefVhisie4Winkelkar())).DanReturn(Response) + Set SenderStub = ##class(vhTest.Mock.WSimpl.Vhisie4.Winkelkar.WinkelkarExport.Sender).%New() + Do SenderStub.IndienMethodCall("Send", ..Matches.DataTransferObject(..GeefVhisie4Winkelkar())).DanReturn(Response) - Set DateTimeAPIMock = ##class(vhTest.Mock.TECH.DateTime.DateTimeAPI).%New() - Do DateTimeAPIMock.VerwachtMethodCall("CurrentHorolog").DanReturn("64387,35360") + Set DateTimeAPIStub = ##class(vhTest.Mock.TECH.DateTime.DateTimeAPI).%New() + Do DateTimeAPIStub.IndienMethodCall("CurrentHorolog").DanReturn("64387,35360") #dim Winkelkar As APPS.Blum.OnlineProductConfigurator.dto.Winkelkar = ..GeefbpeWinkelkar() Set Winkelkar.transferMode = "ongekendemode" #dim Substrings = ##class(TECH.ListUtils).CreateListOfDataTypes("Blum OPC - Transfermode ongekendemode niet ondersteund !") do ..ZetVerwachteExceptie(##class(Tools.Test.VerwachteExceptie).%New("TECH.Exceptions.InvalidInputException",Substrings)) - Set Converteerder = ##class(APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarVhisie4WinkelkarConverteerder).%New(SenderMock, DateTimeAPIMock) + Set Converteerder = ##class(APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarVhisie4WinkelkarConverteerder).%New(SenderStub, DateTimeAPIStub) #dim IntractoID As %String = Converteerder.Converteer(Winkelkar ,..GeefVanHoeckeKlant()) ]]> @@ -101,24 +99,22 @@ Set Response = ##class(WS.Vhisie4.WinkelkarExport.SendResponse).%New() Set Response.Winkelkar.Status = "NIETGeslaagd" - Set SenderMock = ##class(vhTest.Mock.WSimpl.Vhisie4.Winkelkar.WinkelkarExport.Sender).%New() - Do SenderMock.VerwachtMethodCall("Send", ..Matches.DataTransferObject(..GeefVhisie4Winkelkar())).DanReturn(Response) + Set SenderStub = ##class(vhTest.Mock.WSimpl.Vhisie4.Winkelkar.WinkelkarExport.Sender).%New() + Do SenderStub.IndienMethodCall("Send", ..Matches.DataTransferObject(..GeefVhisie4Winkelkar())).DanReturn(Response) - Set DateTimeAPIMock = ##class(vhTest.Mock.TECH.DateTime.DateTimeAPI).%New() - Do DateTimeAPIMock.VerwachtMethodCall("CurrentHorolog").DanReturn("64387,35360") + Set DateTimeAPIStub = ##class(vhTest.Mock.TECH.DateTime.DateTimeAPI).%New() + Do DateTimeAPIStub.IndienMethodCall("CurrentHorolog").DanReturn("64387,35360") - Set KlantPrijsBepalerMock = ##class(vhTest.Mock.APPS.VKP.KlantPrijsBepaler).%New() - #dim FunctionalUnit As APPS.Blum.OnlineProductConfigurator.dto.FunctionalUnit = Winkelkar.shoppingCart.directories.GetAt(1).functionalUnits.GetAt(1) - #dim CurrentDate As %Date = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentDate() - Do KlantPrijsBepalerMock.VerwachtMethodCall("GeefPrijsInformatie", FunctionalUnit.identnumbers.GetAt(1).identnumber, FunctionalUnit.identnumbers.GetAt(1).amount * FunctionalUnit.amount, CurrentDate).DanReturn(50) + Set KlantPrijsBepalerStub = ##class(vhTest.Mock.APPS.VKP.KlantPrijsBepaler).%New() + Do KlantPrijsBepalerStub.IndienMethodCall("GeefPrijsInformatie", "identnumber", 10, $$$ElkeWaarde).DanReturn(50) - Set VerkoopPrijsAPIMock = ##class(vhTest.Mock.APPS.VKP.VerkoopPrijsAPI).%New() - Do VerkoopPrijsAPIMock.VerwachtMethodCall("GeefKlantPrijsBepaler", VanHoeckeKlant).DanReturn(KlantPrijsBepalerMock) + Set VerkoopPrijsAPIStub = ##class(vhTest.Mock.APPS.VKP.VerkoopPrijsAPI).%New() + Do VerkoopPrijsAPIStub.IndienMethodCall("GeefKlantPrijsBepaler", VanHoeckeKlant).DanReturn(KlantPrijsBepalerStub) #dim Substrings = ##class(TECH.ListUtils).CreateListOfDataTypes("Blum OPC - Er is een fout opgetreden bij het bewaren van de winkelkar voor gebruiker dummy@dum.my!") do ..ZetVerwachteExceptie(##class(Tools.Test.VerwachteExceptie).%New("TECH.Exceptions.InvalidInputException",Substrings)) - Set Converteerder = ##class(APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarVhisie4WinkelkarConverteerder).%New(SenderMock, DateTimeAPIMock, VerkoopPrijsAPIMock) + Set Converteerder = ##class(APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarVhisie4WinkelkarConverteerder).%New(SenderStub, DateTimeAPIStub, VerkoopPrijsAPIStub) #dim IntractoID As %String = Converteerder.Converteer(Winkelkar, VanHoeckeKlant) ]]>