use of aQute.bnd.connection.settings.SettingsDTO in project bnd by bndtools.
the class SettingsParserTest method testServerSelection.
public void testServerSelection() throws Exception {
SettingsDTO settings = getSettings("server-selection.xml");
assertEquals(1, settings.servers.size());
ServerDTO p = settings.servers.get(0);
assertEquals("httpbin.org", p.id);
assertEquals(null, p.passphrase);
assertEquals(null, p.privateKey);
assertEquals("user", p.username);
assertEquals("passwd", p.password);
}
use of aQute.bnd.connection.settings.SettingsDTO in project bnd by bndtools.
the class SettingsParserTest method testSocksAuth.
public void testSocksAuth() throws Exception {
SettingsDTO settings = getSettings("socks-auth.xml");
assertEquals(1, settings.proxies.size());
ProxyDTO p = settings.proxies.get(0);
assertEquals("myproxy", p.id);
assertEquals(true, p.active);
assertEquals(Type.SOCKS, p.protocol);
assertEquals(1080, p.port);
assertEquals(null, p.nonProxyHosts);
assertEquals("proxyuser", p.username);
assertEquals("somepassword", p.password);
}
use of aQute.bnd.connection.settings.SettingsDTO in project bnd by bndtools.
the class SettingsParserTest method testSocksNoAuth.
public void testSocksNoAuth() throws Exception {
SettingsDTO settings = getSettings("socks-noauth.xml");
assertEquals(1, settings.proxies.size());
ProxyDTO p = settings.proxies.get(0);
assertEquals("myproxy", p.id);
assertEquals(true, p.active);
assertEquals(Type.SOCKS, p.protocol);
assertEquals(1080, p.port);
assertEquals(null, p.nonProxyHosts);
assertEquals(null, p.username);
assertEquals(null, p.password);
}
use of aQute.bnd.connection.settings.SettingsDTO in project bnd by bndtools.
the class SettingsParserTest method testServerSelectionWithTrust.
public void testServerSelectionWithTrust() throws Exception {
SettingsDTO settings = getSettings("server-trust-selection.xml");
assertEquals(1, settings.servers.size());
ServerDTO p = settings.servers.get(0);
assertEquals("httpbin.org", p.id);
assertNotNull(p.trust);
}
use of aQute.bnd.connection.settings.SettingsDTO in project bnd by bndtools.
the class SettingsParserTest method getSettings.
public SettingsDTO getSettings(String name) throws Exception {
File f = aQute.lib.io.IO.getFile("testresources/" + name);
SettingsParser msp = new SettingsParser(f);
SettingsDTO settings = msp.getSettings();
return settings;
}
Aggregations