예제 #1
0
  @Test
  public void testInitialisationWorksAsExpected() {

    final StrategyConfigImpl strategyConfig =
        new StrategyConfigImpl(ID, LABEL, DESCRIPTION, CLASSNAME, CONFIG_ITEMS);
    assertEquals(ID, strategyConfig.getId());
    assertEquals(LABEL, strategyConfig.getLabel());
    assertEquals(DESCRIPTION, strategyConfig.getDescription());
    assertEquals(CLASSNAME, strategyConfig.getClassName());
    assertEquals(CONFIG_ITEMS, strategyConfig.getConfigItems());
  }
예제 #2
0
  @Test
  public void testSettersWorkAsExpected() {

    final StrategyConfigImpl strategyConfig = new StrategyConfigImpl(null, null, null, null, null);
    assertEquals(null, strategyConfig.getId());
    assertEquals(null, strategyConfig.getLabel());
    assertEquals(null, strategyConfig.getDescription());
    assertEquals(null, strategyConfig.getClassName());
    assertEquals(null, strategyConfig.getConfigItems());

    strategyConfig.setId(ID);
    assertEquals(ID, strategyConfig.getId());

    strategyConfig.setLabel(LABEL);
    assertEquals(LABEL, strategyConfig.getLabel());

    strategyConfig.setDescription(DESCRIPTION);
    assertEquals(DESCRIPTION, strategyConfig.getDescription());

    strategyConfig.setClassName(CLASSNAME);
    assertEquals(CLASSNAME, strategyConfig.getClassName());

    strategyConfig.setConfigItems(CONFIG_ITEMS);
    assertEquals(CONFIG_ITEMS, strategyConfig.getConfigItems());
  }