コード例 #1
0
  @Test
  public void testSystemSettingsParameterProvider4() {
    // pull a string from pentaho.xml
    SystemSettingsParameterProvider provider = new SystemSettingsParameterProvider();

    String value = provider.getStringParameter("pentaho.xml{bogus}", null);

    Assert.assertEquals("Expected null result", null, value);
  }
コード例 #2
0
  @Test
  public void testSystemSettingsParameterProvider2() throws PlatformInitializationException {
    // pull a string from pentaho.xml
    SystemSettingsParameterProvider provider = new SystemSettingsParameterProvider();

    String value = provider.getStringParameter("pentaho.xml{pentaho-system/log-file}", null);
    Assert.assertEquals("Could not get setting from pentaho.xml", "server.log", value);

    value = (String) provider.getParameter("pentaho.xml{pentaho-system/log-file}");
    Assert.assertEquals("Could not get setting from pentaho.xml", "server.log", value);

    Assert.assertFalse(provider.getParameterNames().hasNext());
  }