mardi 29 septembre 2020

JUnit5: Where is the root of @CsvFileSource defined and can that definition be changed to refer to a different directory?

I started a project as a maven-quickstart and added JUNIT5. There was no resources folder anywhere.

Some time after, one of the testers wanted to add a test that reads from a CSV file. He had some trouble setting up and I recalled from just memory that it will look in test/resources.

We are all fine now but I just can't stop wondering: Is 'test/resources' hard-coded into JUnit? Or is it somehow derived from the project archetype?

Is there a way to edit this reference in the project settings, vm settings or maybe in the very test method?

Aucun commentaire:

Enregistrer un commentaire