| 1 | |
package org.jbehave.core.reporters; |
| 2 | |
|
| 3 | |
import java.util.Properties; |
| 4 | |
|
| 5 | |
import org.jbehave.core.io.StoryNameResolver; |
| 6 | |
import org.jbehave.core.io.UnderscoredToCapitalized; |
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
public class FreemarkerViewGenerator extends TemplateableViewGenerator { |
| 40 | |
|
| 41 | |
public FreemarkerViewGenerator() { |
| 42 | 871 | this(new UnderscoredToCapitalized()); |
| 43 | 871 | } |
| 44 | |
|
| 45 | |
public FreemarkerViewGenerator(StoryNameResolver nameResolver) { |
| 46 | 871 | super(nameResolver, new FreemarkerProcessor()); |
| 47 | 871 | } |
| 48 | |
|
| 49 | |
public FreemarkerViewGenerator(Class<?> templateLoadingFrom) { |
| 50 | 12 | this(new UnderscoredToCapitalized(), templateLoadingFrom); |
| 51 | 12 | } |
| 52 | |
|
| 53 | |
public FreemarkerViewGenerator(StoryNameResolver nameResolver, Class<?> templateLoadingFrom) { |
| 54 | 12 | super(nameResolver, new FreemarkerProcessor(templateLoadingFrom)); |
| 55 | 12 | } |
| 56 | |
|
| 57 | |
public Properties defaultViewProperties() { |
| 58 | 327 | Properties properties = new Properties(); |
| 59 | 327 | properties.setProperty("views", "ftl/jbehave-views.ftl"); |
| 60 | 327 | properties.setProperty("maps", "ftl/jbehave-maps.ftl"); |
| 61 | 327 | properties.setProperty("navigator", "ftl/jbehave-navigator.ftl"); |
| 62 | 327 | properties.setProperty("reports", "ftl/jbehave-reports-with-totals.ftl"); |
| 63 | 327 | properties.setProperty("decorated", "ftl/jbehave-report-decorated.ftl"); |
| 64 | 327 | properties.setProperty("nonDecorated", "ftl/jbehave-report-non-decorated.ftl"); |
| 65 | 327 | properties.setProperty("decorateNonHtml", "true"); |
| 66 | 327 | properties.setProperty("defaultFormats", "stats"); |
| 67 | 327 | properties.setProperty("viewDirectory", "view"); |
| 68 | 327 | return properties; |
| 69 | |
} |
| 70 | |
|
| 71 | |
} |