394041424344454647
* @author Luigi R. Viggiano */ public class UtilTest { public static SystemProvider setSystem(Object system) { SystemProvider save = Util.system; Util.system = (SystemProvider)system; return save; }
191192193194195196197198199200201
return Util.eq(o1, o2); } @Test public void testExpandUserHomeOnUnix() { SystemProvider save = UtilTest.setSystem(new SystemProviderForTest( new Properties() {{ setProperty("user.home", "/home/john"); }}, new HashMap<String, String>() ));
213214215216217218219220221222223
} } @Test public void testExpandUserHomeOnWindows() { SystemProvider save = UtilTest.setSystem(new SystemProviderForTest( new Properties() {{ setProperty("user.home", "C:\\Users\\John"); }}, new HashMap<String, String>() )); try {