Skip to content

Commit

Permalink
JBEHAVE-1450 Removed CrossReference.
Browse files Browse the repository at this point in the history
  • Loading branch information
maurotalevi committed Jan 22, 2021
1 parent 32627a4 commit 9546f60
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 586 deletions.
4 changes: 1 addition & 3 deletions distribution/src/site/content/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ <h3>Using ConfigurableEmbedder</h3>
<![CDATA[
public abstract class TraderStory extends JUnitStory {

private final CrossReference xref = new CrossReference();

public TraderStory() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
.doIgnoreFailureInView(true).useThreads(2).useStoryTimeoutInSecs(60);
Expand Down Expand Up @@ -224,7 +222,7 @@ <h3>Using ConfigurableEmbedder</h3>
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withPathResolver(new ResolveToPackagedName())
.withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
.withFailureTrace(true).withFailureTraceCompression(true).withCrossReference(xref))
.withFailureTrace(true).withFailureTraceCompression(true))
.useParameterConverters(parameterConverters)
// use '%' instead of '$' to identify parameters
.useStepPatternParser(new RegexPrefixCapturingPatternParser("%"))
Expand Down
155 changes: 0 additions & 155 deletions distribution/src/site/content/cross-reference.html

This file was deleted.

9 changes: 2 additions & 7 deletions distribution/src/site/content/developing-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ <h3>JUnit-enabled Embeddables</h3>
<![CDATA[
public abstract class TraderStory extends JUnitStory {

private final CrossReference xref = new CrossReference();

public TraderStory() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
.doIgnoreFailureInView(true).useThreads(2).useStoryTimeoutInSecs(60);
Expand Down Expand Up @@ -182,7 +180,7 @@ <h3>JUnit-enabled Embeddables</h3>
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withPathResolver(new ResolveToPackagedName())
.withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
.withFailureTrace(true).withFailureTraceCompression(true).withCrossReference(xref))
.withFailureTrace(true).withFailureTraceCompression(true))
.useParameterConverters(parameterConverters)
// use '%' instead of '$' to identify parameters
.useStepPatternParser(new RegexPrefixCapturingPatternParser("%"))
Expand Down Expand Up @@ -210,8 +208,6 @@ <h3>JUnit-enabled Embeddables</h3>
<![CDATA[
public class TraderStories extends JUnitStories {

private final CrossReference xref = new CrossReference();

public TraderStories() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(false)
.doIgnoreFailureInView(true).doVerboseFailures(true).useThreads(2).useStoryTimeoutInSecs(60);
Expand Down Expand Up @@ -240,8 +236,7 @@ <h3>JUnit-enabled Embeddables</h3>
.withViewResources(viewResources)
.withFormats(CONSOLE, TXT, HTML_TEMPLATE, XML_TEMPLATE)
.withFailureTrace(true)
.withFailureTraceCompression(true)
.withCrossReference(xref))
.withFailureTraceCompression(true))
.useParameterConverters(parameterConverters)
// use '%' instead of '$' to identify parameters
.useStepPatternParser(new RegexPrefixCapturingPatternParser(
Expand Down
4 changes: 1 addition & 3 deletions distribution/src/site/content/reporting-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ <h2>Story Reporters</h2>
<![CDATA[
public abstract class TraderStory extends JUnitStory {

private final CrossReference xref = new CrossReference();

public TraderStory() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
.doIgnoreFailureInView(true).useThreads(2).useStoryTimeoutInSecs(60);
Expand Down Expand Up @@ -87,7 +85,7 @@ <h2>Story Reporters</h2>
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withPathResolver(new ResolveToPackagedName())
.withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
.withFailureTrace(true).withFailureTraceCompression(true).withCrossReference(xref))
.withFailureTrace(true).withFailureTraceCompression(true))
.useParameterConverters(parameterConverters)
// use '%' instead of '$' to identify parameters
.useStepPatternParser(new RegexPrefixCapturingPatternParser("%"))
Expand Down
3 changes: 1 addition & 2 deletions distribution/src/site/content/running-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ <h2>Running Stories in a framework-neutral way</h2>
.useStoryReporterBuilder(new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass))
.withDefaultFormats()
.withFormats(CONSOLE, TXT, HTML, XML)
.withCrossReference(new CrossReference()))
.withFormats(CONSOLE, TXT, HTML, XML))
.useParameterConverters(new ParameterConverters()
.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")))) // use custom date pattern
.useStepPatternParser(new RegexPrefixCapturingPatternParser(
Expand Down
1 change: 0 additions & 1 deletion distribution/src/site/content/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
<page>story-mapping.html</page>
<page>story-timeouts.html</page>
<page>story-transformers.html</page>
<page>cross-reference.html</page>
<page>surefire-reporter.html</page>
<page>context-view.html</page>
<page>multi-threading.html</page>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.jbehave.core.io.LoadFromClasspath;
import org.jbehave.core.model.TableTransformers;
import org.jbehave.core.parsers.RegexPrefixCapturingPatternParser;
import org.jbehave.core.reporters.CrossReference;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.InstanceStepsFactory;
Expand Down Expand Up @@ -47,8 +46,7 @@ public Configuration configuration() {
.useStoryReporterBuilder(new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass))
.withDefaultFormats()
.withFormats(CONSOLE, TXT, HTML, XML)
.withCrossReference(new CrossReference()))
.withFormats(CONSOLE, TXT, HTML, XML))
.useTableTransformers(tableTransformers)
.useParameterConverters(new ParameterConverters(resourceLoader, tableTransformers)
.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")))) // use custom date pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
*/
public class CoreStories extends JUnitStories {

private final CrossReference xref = new CrossReference();
private Context context = new Context();
private Format contextFormat = new ContextOutput(context);

Expand Down Expand Up @@ -87,7 +86,7 @@ public Configuration configuration() {
.withCodeLocation(codeLocationFromClass(embeddableClass))
.withDefaultFormats().withViewResources(viewResources)
.withFormats(contextFormat, ANSI_CONSOLE, TXT, HTML_TEMPLATE, XML_TEMPLATE).withFailureTrace(true)
.withFailureTraceCompression(true).withCrossReference(xref)
.withFailureTraceCompression(true)
.withSurefireReporter(surefireReporter))
.useParameterConverters(parameterConverters)
.useParameterControls(parameterControls)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.jbehave.core.model.TableParsers;
import org.jbehave.core.model.TableTransformers;
import org.jbehave.core.parsers.RegexStoryParser;
import org.jbehave.core.reporters.CrossReference;
import org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.InjectableStepsFactory;
Expand Down Expand Up @@ -51,8 +50,6 @@
*/
public abstract class CoreStory extends JUnitStory {

private final CrossReference xref = new CrossReference();

public CoreStory() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(false)
.doIgnoreFailureInView(true).useThreads(1).useStoryTimeouts("60");
Expand Down Expand Up @@ -88,7 +85,6 @@ public Configuration configuration() {
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withPathResolver(new ResolveToPackagedName())
.withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML_TEMPLATE, XML)
.withCrossReference(xref)
.withFailureTrace(true).withFailureTraceCompression(true))
.useParameterConverters(parameterConverters)
.useParameterControls(parameterControls)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
import org.jbehave.core.context.Context;
import org.jbehave.core.context.ContextView;
import org.jbehave.core.context.JFrameContextView;
import org.jbehave.core.reporters.ContextOutput;
import org.jbehave.core.reporters.CrossReference;
import org.jbehave.core.reporters.Format;
import org.jbehave.core.steps.ContextStepMonitor;
import org.jbehave.core.steps.NullStepMonitor;

/**
* <p>
Expand All @@ -16,11 +14,9 @@
*/
public class JFrameCoreStories extends CoreStories {

private final CrossReference xref = new CrossReference();
private Context context = new Context();
private Format contextFormat = new ContextOutput(context);
private ContextView contextView = new JFrameContextView().sized(640, 120);
private ContextStepMonitor contextStepMonitor = new ContextStepMonitor(context, contextView, xref.getStepMonitor());
private ContextStepMonitor contextStepMonitor = new ContextStepMonitor(context, contextView, new NullStepMonitor());

@Override
public Configuration configuration() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,6 @@ private void handleFailures(ReportsCount count) {
}
}

public void generateCrossReference() {
StoryReporterBuilder builder = configuration().storyReporterBuilder();
if (builder.hasCrossReference()) {
builder.crossReference().serialise(storyManager().performableRoot(), builder.outputDirectory());
}
}

public void generateSurefireReport() {
StoryReporterBuilder builder = configuration().storyReporterBuilder();
if (builder.hasSurefireReporter()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public void run() {
try {
embedder.runStoriesAsPaths(storyPaths());
} finally {
embedder.generateCrossReference();
embedder.generateSurefireReport();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public void run() {
try {
embedder.runStoriesAsPaths(asList(storyPath));
} finally {
embedder.generateCrossReference();
embedder.generateSurefireReport();
}
}
Expand Down
Loading

0 comments on commit 9546f60

Please sign in to comment.