Skip to main content

The Abbyy Mocks library is used for unit testing scripts that are going to be run within ABBYY Flexicapture. It allows the loading of either an IDocument or IRuleContext object from an XML file that can then be used to run tests against. 

Usage

IDocument​

\${NL}var loadedDoc = MockDocument.LoadFromXml(xmlPath); \${NL}

A copy of the example XML can be found in"G:\Team Drives\Software\ABBYY Mocks\ValidDocument.xml".  Once the document has been loaded in the loadedDoc variable can then be passed into any methods requiring an IDocument object

IRuleContext​

\${NL}var context = MockRuleContext.LoadFromXml(xmlFilePath); \${NL} A copy of the example XML can be found in "G:\Team Drives\Software\ABBYY Mocks\ValidRuleContext.xml". Once the context has been loaded the context variable can then be passed into any methods requiring an IRuleContext object