Testing Components
It is important to write focused and concise unit tests for your custom components. Attivio provides a number of testing utilities and mock implementations to make writing good unit tests simple. This archetype generation referenced by the README page provides examples of the techniques described here.
Create the component
Configure your component
Optionally "start" your component
If your component uses any of the lifecycle or miscellaneous mix-ins, there is a test utility that will call them and set them up with appropriate mock implementations as needed:
Create a sample document to use in your test
Process the document with your component
Assert conditions on the document
Last updated