1 package com.github.searls.jasmine.runner; 2 3 import com.github.searls.jasmine.config.JasmineConfiguration; 4 import com.github.searls.jasmine.io.scripts.ScriptResolver; 5 6 import java.io.IOException; 7 8 public class SpecRunnerHtmlGeneratorFactory { 9 10 public SpecRunnerHtmlGenerator create(ReporterType reporterType, JasmineConfiguration config, ScriptResolver projectDirScripResolver) { 11 try { 12 return createHtmlGenerator(new HtmlGeneratorConfiguration(reporterType, config, projectDirScripResolver)); 13 } catch (IOException e) { 14 throw new InstantiationError(e.getMessage()); 15 } 16 } 17 18 public SpecRunnerHtmlGenerator createHtmlGenerator(HtmlGeneratorConfiguration configuration) throws IllegalArgumentException { 19 return new DefaultSpecRunnerHtmlGenerator(configuration); 20 } 21 }