Refactored & fixed xUnit report

This commit fixes some bug in the xUnit report.

I refactored a bit the class handling the report generation and added some tests.