testing - Assert file had been created in Junit (Java 6) -
i'd write integration java program takes input file source
directory, copies staging
, writes result of processing output
directory , removes temporary files staging
. it's easy enough check output ok, there easy way check staging area being used correctly? 2 things come mind: monitoring folder file system events (any nice wrappers that?), or advanced permissions game (to allow create not delete). suggestions?
thanks lot!
n.b. java 6 on windows...
assuming you're dead set on doing this, think easiest approach going checking file in staging folder after supposed have been copied , checking it's not there after it's supposed have been deleted.
file f = new file(filepathstring); if(f.exists() && !f.isdirectory()) { /* */}
Comments
Post a Comment