/** Tests the <i>private</i> method {@code readSystemProperties()}. */
  public void testReadSystemProperties() {

    lnf.setTheme(new DummyTheme());
    lnf.initialize();
    assertEquals(INTEGER_VALUE, lnf.getIntegerSetting(INTEGER_KEY));

    System.setProperty("riena.lnf.setting." + INTEGER_KEY, "4711");
    ReflectionUtils.invokeHidden(lnf, "readSystemProperties");
    assertEquals(Integer.valueOf(4711), lnf.getIntegerSetting(INTEGER_KEY));
  }
  /**
   * Test of the method {@code getIntegerSetting(String, Integer)}.
   *
   * @throws Exception handled by JUnit
   */
  public void testGetIntegerSetting() throws Exception {

    Integer value = lnf.getIntegerSetting(INTEGER_KEY, 300);
    assertEquals(300, value.intValue());

    lnf.setTheme(new DummyTheme());
    lnf.initialize();
    value = lnf.getIntegerSetting(INTEGER_KEY, 300);
    assertEquals(INTEGER_VALUE.intValue(), value.intValue());
  }
Exemple #3
0
 /**
  * @return the default height of the font from the lnf by <code>
  *     LnfKeyConstants.FONTDESCRIPTOR_DEFAULT_HEIGHT</code>.
  */
 protected Integer getDefaultHeight() {
   return lnf.getIntegerSetting(LnfKeyConstants.FONTDESCRIPTOR_DEFAULT_HEIGHT);
 }