An interesting story & special chars
/path/to/story
Narrative:
In order to renovate my house
As a customer
I want to get a loan
Scenario: I ask for a loan
GivenStories:
/given/story1
/given/story2
Given I have a balance of $50
!-- Then ignore me
!-- A comment
When I request $20
When I ask Liz for a loan of $100
When I ask Liz for a loan of $99
When I write special chars <>&"
When I write special chars in parameter <>&"
When I write two parameters ,,, and &&&
Then I should... - try again
/path/to/story
Then I should have a balance of $30 (FAILED)
java.lang.Exception: Expected <30> got <25> at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:61) at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:25) (reflection-invoke) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) ...
Then I should have $20 (NOT PERFORMED)
Then I don't return loan (FAILED)
org.jbehave.core.model.OutcomesTable$OutcomesFailed at org.jbehave.core.model.OutcomesTable.verify(OutcomesTable.java:55) at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:72) at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:25) (reflection-invoke) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) ...
Description | Value | Matcher | Verified |
---|---|---|---|
I don't return all | 100 | <50.0> | No |
A wrong date | 01/01/2011 | "02/01/2011" | No |
org.jbehave.core.model.OutcomesTable$OutcomesFailed at org.jbehave.core.model.OutcomesTable.verify(OutcomesTable.java:55) at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:72) at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:25) (reflection-invoke) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) ...
Scenario: Parametrised Scenario
Examples:
Given money <money>
Then I give it to <to>
money | to |
---|---|
$30 | Mauro |
$50 | Paul |
Example: {money=$30, to=Mauro}
Given money $30
Then I give it to Mauro
Example: {money=$50, to=Paul}
Given money $50
Then I give it to Paul
Then I should have a balance of $30 (FAILED)
java.lang.Exception: Expected <30> got <25> at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:87) at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:25) (reflection-invoke) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) ...
STORY CANCELLED (DURATION 2 s)