I've done some small refactoring, and added tests to assert that the custom output directory was created.
Tests can be run with mvn tests.
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running safbuilder.SAFPackageTest
Detected input CSV as:UTF-8
Opened CSV File:/Users/pdietz/Workspaces/personal/SAFBuilder/src/sample_data/AAA_batch-metadata.csv
Output directory is: /Users/pdietz/Workspaces/personal/SAFBuilder/src/sample_data/SimpleArchiveFormat
File: AAA_batch-metadata-language.csv has been used 0 times.
File: AAA_batch-metadata_8859.csv has been used 0 times.
File: AAA_batch-metadata.csv has been used 0 times.
Detected input CSV as:UTF-8
Opened CSV File:/Users/pdietz/Workspaces/personal/SAFBuilder/src/sample_data/AAA_batch-metadata.csv
Output directory is: /Users/pdietz/Workspaces/personal/SAFBuilder/src/sample_data/__test_output__1552360758083
File: AAA_batch-metadata-language.csv has been used 0 times.
File: AAA_batch-metadata_8859.csv has been used 0 times.
File: AAA_batch-metadata.csv has been used 0 times.
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.372 sec
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.733 s
[INFO] Finished at: 2019-03-11T23:19:18-04:00
[INFO] ------------------------------------------------------------------------
This does some small code-cleanup on-top of work by @atla5 in https://github.com/DSpace-Labs/SAFBuilder/pull/15
I've done some small refactoring, and added tests to assert that the custom output directory was created.
Tests can be run with
mvn tests
.