@Test public void testDefaultUser() throws Exception { String etc = System.getProperty("karaf.etc"); System.setProperty("karaf.etc", "src/test/resources/etc1"); ClientConfig cc = new ClientConfig(new String[0]); assertThat(cc.getUser(), equalTo("karaf")); cc = new ClientConfig(new String[] { "-u", "different-one" }); assertThat(cc.getUser(), equalTo("different-one")); System.setProperty("karaf.etc", "src/test/resources/etc2"); cc = new ClientConfig(new String[0]); assertThat(cc.getUser(), equalTo("test")); if (etc != null) { System.setProperty("karaf.etc", etc); } }
public String getUser() { return user; }
ClientConfig { public String getUser() { return user; } }
ClientConfig { public String getUser() { return user; } ClientConfig(String[] args); }
ClientConfig { public String getUser() { return user; } ClientConfig(String[] args); String getHost(); int getPort(); String getUser(); void setUser(String user); String getPassword(); int getLevel(); int getRetryAttempts(); int getRetryDelay(); String getCommand(); void setCommand(String command); boolean isBatch(); String getFile(); String getKeyFile(); long getIdleTimeout(); }
ClientConfig { public String getUser() { return user; } ClientConfig(String[] args); String getHost(); int getPort(); String getUser(); void setUser(String user); String getPassword(); int getLevel(); int getRetryAttempts(); int getRetryDelay(); String getCommand(); void setCommand(String command); boolean isBatch(); String getFile(); String getKeyFile(); long getIdleTimeout();  }