コード例 #1
0
 @Test
 public void testConfigurationWithFile() throws Exception {
   URL url = getClass().getClassLoader().getResource("hazelcast-default.xml");
   System.setProperty("hazelcast.config", url.getFile());
   Config config = new XmlConfigBuilder().build();
   assertEquals(url, config.getConfigurationUrl());
 }
コード例 #2
0
 @Test
 public void testConfigurationURL() throws IOException {
   URL configURL = getClass().getClassLoader().getResource("hazelcast-default.xml");
   Config config = new XmlConfigBuilder(configURL).build();
   assertEquals(configURL, config.getConfigurationUrl());
 }