Refactoring to reuse code
Add option to integrate with DShap extension for DUnit.