diff options
author | Jose <jose@zeroc.com> | 2013-07-29 17:22:07 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2013-07-29 17:22:07 +0200 |
commit | 2f37792f3f90692b2aa5ec9cc3383c9e02f66c9c (patch) | |
tree | e2968ac4239e7e8182d4cc6fb2f458c95fbb384e /java/test/Ice/properties/Client.java | |
parent | removing INSTALL files (diff) | |
download | ice-2f37792f3f90692b2aa5ec9cc3383c9e02f66c9c.tar.bz2 ice-2f37792f3f90692b2aa5ec9cc3383c9e02f66c9c.tar.xz ice-2f37792f3f90692b2aa5ec9cc3383c9e02f66c9c.zip |
Fixed ICE-5393 - Java / C# load properties doesn't correctly parse Ice.Config with multiple files
Diffstat (limited to 'java/test/Ice/properties/Client.java')
-rw-r--r-- | java/test/Ice/properties/Client.java | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/java/test/Ice/properties/Client.java b/java/test/Ice/properties/Client.java index 9c6e7abae47..77b69c3baea 100644 --- a/java/test/Ice/properties/Client.java +++ b/java/test/Ice/properties/Client.java @@ -37,19 +37,32 @@ public class Client extends test.Util.Application public int run(String[] args) { - System.out.print("testing load properties from UTF-8 path... "); - Ice.InitializationData id = new Ice.InitializationData(); - id.properties = Ice.Util.createProperties(); - id.properties.load(configPath); - test(id.properties.getProperty("Ice.Trace.Network").equals("1")); - test(id.properties.getProperty("Ice.Trace.Protocol").equals("1")); - test(id.properties.getProperty("Config.Path").equals(configPath)); - test(id.properties.getProperty("Ice.ProgramName").equals("PropertiesClient")); - System.out.println("ok"); - System.out.print("testing load properties from UTF-8 path using Ice::Application... "); - PropertiesClient c = new PropertiesClient(); - c.main("", args, configPath); - System.out.println("ok"); + { + System.out.print("testing load properties from UTF-8 path... "); + Ice.Properties properties = Ice.Util.createProperties(); + properties.load(configPath); + test(properties.getProperty("Ice.Trace.Network").equals("1")); + test(properties.getProperty("Ice.Trace.Protocol").equals("1")); + test(properties.getProperty("Config.Path").equals(configPath)); + test(properties.getProperty("Ice.ProgramName").equals("PropertiesClient")); + System.out.println("ok"); + System.out.print("testing load properties from UTF-8 path using Ice::Application... "); + PropertiesClient c = new PropertiesClient(); + c.main("", args, configPath); + System.out.println("ok"); + } + { + // + // Try to load multiple config files. + // + System.out.print("testing using Ice.Config with multiple config files... "); + String[] args1 = new String[]{"--Ice.Config=config/config.1, config/config.2, config/config.3"}; + Ice.Properties properties = Ice.Util.createProperties(args1); + test(properties.getProperty("Config1").equals("Config1")); + test(properties.getProperty("Config2").equals("Config2")); + test(properties.getProperty("Config3").equals("Config3")); + System.out.println("ok"); + } return 0; } |