@Test public void testBeforeStoryShouldReportWhenStoryDoesNotExist() { Story story = new Story("fakepath"); underTest.beforeStory(story, false); verify(jBehaveTestCase).logComment("Using story file: fakepath", "<pre>File not found: fakepath</pre>"); }
@Override public void beforeStory(final Story story, final boolean givenStory) { String path = story.getPath(); if (!path.equals(BEFORE_STORIES_PATH) && !path.equals(AFTER_STORIES_PATH)) { String message = createFileContentsMessage(path); jBehaveTestCase.logComment("Using story file: " + path, message); } }
JBehaveStoryReporter extends NullStoryReporter { @Override public void beforeStory(final Story story, final boolean givenStory) { String path = story.getPath(); if (!path.equals(BEFORE_STORIES_PATH) && !path.equals(AFTER_STORIES_PATH)) { String message = createFileContentsMessage(path); jBehaveTestCase.logComment("Using story file: " + path, message); } } }
JBehaveStoryReporter extends NullStoryReporter { @Override public void beforeStory(final Story story, final boolean givenStory) { String path = story.getPath(); if (!path.equals(BEFORE_STORIES_PATH) && !path.equals(AFTER_STORIES_PATH)) { String message = createFileContentsMessage(path); jBehaveTestCase.logComment("Using story file: " + path, message); } } JBehaveStoryReporter(final JBehaveTestCase jBehaveTestCase); }
JBehaveStoryReporter extends NullStoryReporter { @Override public void beforeStory(final Story story, final boolean givenStory) { String path = story.getPath(); if (!path.equals(BEFORE_STORIES_PATH) && !path.equals(AFTER_STORIES_PATH)) { String message = createFileContentsMessage(path); jBehaveTestCase.logComment("Using story file: " + path, message); } } JBehaveStoryReporter(final JBehaveTestCase jBehaveTestCase); @Override void beforeStory(final Story story, final boolean givenStory); @Override void beforeScenario(final String scenarioTitle); @Override void example(final Map<String, String> tableRow); @Override void successful(final String step); @Override void notPerformed(final String step); @Override void failed(final String step, final Throwable cause); @Override void pending(final String step); }
JBehaveStoryReporter extends NullStoryReporter { @Override public void beforeStory(final Story story, final boolean givenStory) { String path = story.getPath(); if (!path.equals(BEFORE_STORIES_PATH) && !path.equals(AFTER_STORIES_PATH)) { String message = createFileContentsMessage(path); jBehaveTestCase.logComment("Using story file: " + path, message); } } JBehaveStoryReporter(final JBehaveTestCase jBehaveTestCase); @Override void beforeStory(final Story story, final boolean givenStory); @Override void beforeScenario(final String scenarioTitle); @Override void example(final Map<String, String> tableRow); @Override void successful(final String step); @Override void notPerformed(final String step); @Override void failed(final String step, final Throwable cause); @Override void pending(final String step);  }