Package at.kugel.tool.buildtray.action

Source Code of at.kugel.tool.buildtray.action.AbstractHtmlRegularExpressionActionsTestCase

package at.kugel.tool.buildtray.action;

import java.net.URL;

import at.kugel.tool.buildtray.config.Config;
import at.kugel.tool.buildtray.config.IntegrationTestConfig;
import at.kugel.tool.buildtray.config.MultiConfig;
import at.kugel.tool.buildtray.config.ReloadingConfig;
import at.kugel.tool.buildtray.status.IntegrationStatus;
import at.kugel.tool.buildtray.status.IntegrationStatusResult;

public abstract class AbstractHtmlRegularExpressionActionsTestCase {

   protected IntegrationTestConfig createConfig(String configPath) {
      return new IntegrationTestConfig(new ReloadingConfig(configPath));
   }

   protected URL getTestDataUrl(String name) {
      return getClass().getClassLoader().getResource(getClass().getPackage().getName().replace('.', '/') + '/' + name);
   }

   protected IntegrationStatusResult refreshWith(Config mockConfig) {
      return refreshWith(new Config[] { mockConfig });
   }

   protected IntegrationStatusResult refreshWith(Config[] configs) {
      IntegrationStatus mockStatusDisplay = new IntegrationStatus();

      HtmlRegularExpressionActions action = new HtmlRegularExpressionActions(new MultiConfig(configs));
      action.setStatusDisplay(mockStatusDisplay);
      action.refresh();

      return mockStatusDisplay.resultContainer;
   }

}
TOP

Related Classes of at.kugel.tool.buildtray.action.AbstractHtmlRegularExpressionActionsTestCase

TOP
Copyright © 2018 www.massapi.com. 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.