public static void main(String[] args) { new Platform(new PrintWriter(System.out)).report(); } }
public void testPrintAllProperties() { StringWriter out = new StringWriter(); Platform platform = new Platform(new PrintWriter(out)); Set keys = System.getProperties().keySet(); platform.report(keys); // System.out.println(out.toString()); }
public static void main(String[] args) { new Platform(new PrintWriter(System.out)).report(); } }
public void testPrintAllProperties() { StringWriter out = new StringWriter(); Platform platform = new Platform(new PrintWriter(out)); Set keys = System.getProperties().keySet(); platform.report(keys); // System.out.println(out.toString()); }
public void testReport() { System.setProperty("foo", "bar"); System.setProperty("baz", "wiz"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Platform platform = new Platform(new PrintWriter(baos)); List list = new ArrayList(); list.add("foo"); list.add("baz"); platform.report(list); String expected = "foo=bar" + EOL + "baz=wiz" + EOL; assertEquals(expected, new String(baos.toByteArray())); }
public void testReport() { System.setProperty("foo", "bar"); System.setProperty("baz", "wiz"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Platform platform = new Platform(new PrintWriter(baos)); List list = new ArrayList(); list.add("foo"); list.add("baz"); platform.report(list); String expected = "foo=bar" + EOL + "baz=wiz" + EOL; assertEquals(expected, new String(baos.toByteArray())); }
public static void main(String[] args) { new Platform(new PrintWriter(System.out)).report(); } }
public void testGetKeys() { Platform platform = new Platform(new NullPrintWriter()); List keys = platform.platformProps(); assertTrue(keys.contains("os.name")); assertTrue(keys.contains("os.arch")); }
public void testGetKeys() { Platform platform = new Platform(new NullPrintWriter()); List keys = platform.platformProps(); assertTrue(keys.contains("os.name")); assertTrue(keys.contains("os.arch")); }