Specifically, I\'m trying to create a unit test for a method which requires uses File.separatorChar to build paths on windows and unix. The code must run on bot
I realise this doesn't answer your question directly, but Apache Commons FileNameUtils will do cross-platform filename construction, and may save you writing your own class to do this.