I want to set the env variable for fileDirName but not sure how to add
In code:
@Value("${file.dir.name}")
private String fileDirName;
Test case:
def 'test file'() {
when:
def result = service.getFiles()
then:
result.success == Boolean.TRUE
}
Exception:
java.lang.IllegalArgumentException: file name must not be null.
How can I mock the env variable here