KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm writing a test for a file parser class. The parse method receives a file name as parameter, and must open it in order to parse it ( duh ). I've writen a test file, that I put into the test/resources directory inside my project directory, and would like to pass this file to test my parse. Since this project is in CVS, and will be manipulated by others, I can't hard code the file path, so I thought about use the maven ${basedir} property to build the file name in my test. Something like: public void parseTest() { ... sut.parse( ${basedir} + "src/test/resources/testFile" ); ... } Does someone knows how could I achieve this?
Tags (comma-separated)
Save Edits
Cancel