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 | 835 | this(new UnderscoredToCapitalized()); |
43 | 835 | } |
44 | |
|
45 | |
public FreemarkerViewGenerator(StoryNameResolver nameResolver) { |
46 | 835 | super(nameResolver, new FreemarkerProcessor()); |
47 | 835 | } |
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 | 316 | Properties properties = new Properties(super.defaultViewProperties()); |
59 | 316 | properties.setProperty("views", "ftl/jbehave-views.ftl"); |
60 | 316 | properties.setProperty("maps", "ftl/jbehave-maps.ftl"); |
61 | 316 | properties.setProperty("navigator", "ftl/jbehave-navigator.ftl"); |
62 | 316 | properties.setProperty("reports", "ftl/jbehave-reports-with-totals.ftl"); |
63 | 316 | properties.setProperty("decorated", "ftl/jbehave-report-decorated.ftl"); |
64 | 316 | properties.setProperty("nonDecorated", "ftl/jbehave-report-non-decorated.ftl"); |
65 | 316 | return properties; |
66 | |
} |
67 | |
|
68 | |
} |