package ro.isdc.wro.model.resource.processor.support;

import java.util.HashMap;
import java.util.Map;

import ro.isdc.wro.model.resource.processor.ResourcePostProcessor;
import ro.isdc.wro.model.resource.processor.ResourcePreProcessor;
import ro.isdc.wro.model.resource.processor.decorator.ProcessorDecorator;
import ro.isdc.wro.model.resource.processor.impl.css.ConformColorsCssProcessor;
import ro.isdc.wro.model.resource.processor.impl.css.CssImportPreProcessor;
import ro.isdc.wro.model.resource.processor.impl.css.CssMinProcessor;
import ro.isdc.wro.util.Ordered;


/**
 * A custom processor provider used to test that the processors provided by this provider have precedence over default
 * processors.
 *
 * @author Alex Objelean
 */
public class OrderedProcessorProvider
    implements ProcessorProvider, Ordered {
  public static final String ALIAS = "custom";
  public static ResourcePreProcessor CUSTOM = new ProcessorDecorator(new CssMinProcessor());
  public static ResourcePreProcessor CONFORM_COLORS = new ProcessorDecorator(new ConformColorsCssProcessor());

  /**
   * {@inheritDoc}
   */
  public Map<String, ResourcePreProcessor> providePreProcessors() {
    final Map<String, ResourcePreProcessor> map = new HashMap<String, ResourcePreProcessor>();
    map.put(ALIAS, CUSTOM);
    map.put(CssImportPreProcessor.ALIAS, CONFORM_COLORS);
    return map;
  }

  /**
   * {@inheritDoc}
   */
  public Map<String, ResourcePostProcessor> providePostProcessors() {
    return null;
  }


  /**
   * {@inheritDoc}
   */
  public int getOrder() {
    return Ordered.HIGHEST;
  }
}

@@ -308,164 +308,8 @@
 or;%0A
-import ro.isdc.wro.model.resource.processor.impl.css.ConformColorsCssProcessor;%0Aimport ro.isdc.wro.model.resource.processor.impl.css.CssImportPreProcessor;%0A
 impo
@@ -366,32 +366,32 @@
 ssMinProcessor;%0A
+
 import ro.isdc.w
@@ -804,119 +804,8 @@
 ());
-%0A  public static ResourcePreProcessor CONFORM_COLORS = new ProcessorDecorator(new ConformColorsCssProcessor());
 %0A%0A  
@@ -996,16 +996,16 @@
 sor%3E();%0A
+
     map.
@@ -1028,66 +1028,8 @@
 M);%0A
-    map.put(CssImportPreProcessor.ALIAS, CONFORM_COLORS);%0A
     

fix failing unit tests