Replace xunit by nunit and add tests