Package ro.isdc.wro.model.factory

Examples of ro.isdc.wro.model.factory.ConfigurableModelFactory


  /**
   * {@inheritDoc}
   */
  @Override
  protected WroModelFactory newModelFactory() {
    return new ConfigurableModelFactory() {
      @Override
      protected Properties newProperties() {
        return createProperties();
      }

View Full Code Here


*/
public class TestConfigurableModelFactory {
  private ConfigurableModelFactory victim;
  @Before
  public void setUp() {
    victim = new ConfigurableModelFactory();
  }
View Full Code Here

  }

  @Test
  public void shouldUseCorrectDefaultModelFactory() {
    initFactory(mockFilterConfig, new Properties());
    final ConfigurableModelFactory configurableModelFactory = (ConfigurableModelFactory) AbstractDecorator.getOriginalDecoratedObject(victim.create().getModelFactory());
    assertEquals(SmartWroModelFactory.class, configurableModelFactory.getConfiguredStrategy().getClass());
  }
View Full Code Here

  @Test
  public void shouldUseConfiguredModelFactory() {
    final Properties props = createProperties(ConfigurableModelFactory.KEY, XmlModelFactory.ALIAS);
    initFactory(mockFilterConfig, props);
    final ConfigurableModelFactory configurableModelFactory = (ConfigurableModelFactory) AbstractDecorator.getOriginalDecoratedObject(victim.create().getModelFactory());
    assertEquals(XmlModelFactory.class, configurableModelFactory.getConfiguredStrategy().getClass());
  }
View Full Code Here

    };
  }

  @Override
  protected WroModelFactory newModelFactory() {
    return new ConfigurableModelFactory() {
      @Override
      protected Properties newProperties() {
        final Properties props = new Properties();
        updatePropertiesWithConfiguration(props, ConfigurableModelFactory.KEY);
        return props;
View Full Code Here

TOP

Related Classes of ro.isdc.wro.model.factory.ConfigurableModelFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.