Index: vhUnitTest/AXimpl/MessageInProcessor/Verwerk/Test.cls.xml
===================================================================
diff -u -r49403 -r54725
--- vhUnitTest/AXimpl/MessageInProcessor/Verwerk/Test.cls.xml (.../Test.cls.xml) (revision 49403)
+++ vhUnitTest/AXimpl/MessageInProcessor/Verwerk/Test.cls.xml (.../Test.cls.xml) (revision 54725)
@@ -18,13 +18,26 @@
1
+
+TECH.Mail.MailAPI
+1
+
+
+
+AXimpl.VerwerkBestandOpnieuwAanvraagRepository
+1
+
+
aTestName:%String
@@ -37,7 +50,18 @@
-
-
-
-
@@ -126,9 +143,20 @@
Set DirectoryUtilsStub = ##class(vhTest.Mock.TECH.File.DirectoryUtils).%New()
Do DirectoryUtilsStub.IndienMethodCall("CreateIfNotExists",$$$ElkeWaarde).DanDoeNiks()
+
+
+ Set DirectoryList = ##class(%ListOfDataTypes).%New()
+ Set AXUtilsMock = ##class(vhTest.Mock.AXimpl.Utils).%New()
+ Do AXUtilsMock.IndienMethodCall("GeefAXRequestDirectoryList",$$$ElkeWaarde).DanReturn(DirectoryList)
+
+ #dim Path As %String = ##class(TECH.Config.ConfigMgr).Instance().GeefString("AX_IF_IN_RequestPath")
+ #dim FileList as %ListOfDatypes = ##class(TECH.ListUtils).CreateListOfDataTypes(Filename)
+ Set FilesMock = ##class(vhTest.Mock.TECH.Files).%New()
+ Set DummyList = ##class(%ListOfDataTypes).%New()
+ Do FilesMock.IndienMethodCall("GetFilesFromListOfDirectories",..Matches.List( DummyList ),"*.xml",20).DanReturn(##class(TECH.ListIterator).%New( FileList))
+
Set FileAPIMock = ##class(vhTest.Mock.TECH.File.FileAPI).%New()
- Do FileAPIMock.IndienMethodCall("FileExists",Filename).DanReturn($$$True)
Do FileAPIMock.IndienMethodCall("GeefDirectoryUtils").DanReturn(DirectoryUtilsStub)
Do FileAPIMock.VerwachtMethodCall("GeefFileReader",Filename).DanReturn(FileReader)
Do FileAPIMock.IndienMethodCall("MoveFile",Filename,$$$ElkeWaarde).DanException(##class(TECH.Exceptions.GeneralErrorException).%New($$$DummyString))
@@ -139,19 +167,366 @@
Set EventRaiserMock = ##class(vhTest.Mock.AXimpl.EventRaiser).%New()
Do EventRaiserMock.VerwachtMethodCall("RaiseCorruptedRequestReceivedEvent",Filename,..Matches.Stream(Stream))
- #dim MessageInProcessor As AXimpl.MessageInProcessor = ..InitResponseProcessor(FileAPIMock,XmlCorrelaterStub,EventRaiserMock,)
- do MessageInProcessor.Verwerk(Filename)
+ #dim MessageInProcessor As AXimpl.MessageInProcessor = ..InitResponseProcessor(FileAPIMock,XmlCorrelaterStub,EventRaiserMock,,,,,AXUtilsMock,FilesMock)
+ do MessageInProcessor.Verwerk()
do FileAPIMock.Verifieer()
do EventRaiserMock.Verifieer()
]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+
+
+
-FileAPI:TECH.File.FileAPI=..FileAPI,XmlCorrelater:TECH.XMLCorrelater=..XmlCorrelater,EventRaiser:AXimpl.EventRaiser=..EventRaiser,ConfigInMock:AXimpl.ConfigIn=""
+FileAPI:TECH.File.FileAPI=..FileAPI,XmlCorrelater:TECH.XMLCorrelater=..XmlCorrelater,EventRaiser:AXimpl.EventRaiser=..EventRaiser,ConfigInMock:AXimpl.ConfigIn="",VerwerkBestandOpnieuwAanvraagRepository:AXimpl.VerwerkBestandOpnieuwAanvraagRepository=..VerwerkBestandOpnieuwAanvraagRepository,MailAPI:TECH.Mail.MailAPI=..MailAPI,ExceptionLogger:AXimpl.MessageInProcessor.ExceptionLogger="",AXUtils:AXimpl.Utils,Files:TECH.Files
1
AXimpl.MessageInProcessor
-