use of org.jbehave.core.reporters.Format in project jbehave-core by jbehave.
the class SpringStoryReporterBuilderBehaviour method shouldAllowUseOfGettersAndSetters.
@Test
public void shouldAllowUseOfGettersAndSetters() {
SpringStoryReporterBuilder builder = new SpringStoryReporterBuilder();
URL codeLocation = CodeLocations.codeLocationFromClass(this.getClass());
builder.setCodeLocation(codeLocation);
assertThat(builder.getCodeLocation(), equalTo(codeLocation));
List<Format> formats = asList(Format.CONSOLE, Format.HTML);
builder.setFormats(formats);
assertThat(builder.getFormats(), equalTo(formats));
Keywords keywords = new LocalizedKeywords();
builder.setKeywords(keywords);
assertThat(builder.getKeywords(), equalTo(keywords));
String relativeDirectory = "reports";
builder.setRelativeDirectory(relativeDirectory);
assertThat(builder.getRelativeDirectory(), equalTo(relativeDirectory));
assertThat(builder.getOutputDirectory(), endsWith(relativeDirectory));
Properties viewResources = new Properties();
builder.setViewResources(viewResources);
assertThat(builder.getViewResources(), equalTo(viewResources));
boolean reportFailureTrace = true;
builder.setReportFailureTrace(reportFailureTrace);
assertThat(builder.isReportFailureTrace(), equalTo(reportFailureTrace));
FilePathResolver pathResolver = new FileConfiguration().getPathResolver();
builder.setPathResolver(pathResolver);
assertThat(builder.getPathResolver(), equalTo(pathResolver));
}
Aggregations