Skip to content

Instantly share code, notes, and snippets.

:sourcedir: src/main/java
[source,java]
----
include::{sourcedir}/org/asciidoctor/Asciidoctor.java[]
----
import static org.jbehave.asciidoctor.reporter.AsciidoctorStoryReporter.ASCIIDOC;
//....
public class CalculatorMultStories extends JUnitStory {
@Override
public Configuration configuration() {
return super.configuration().useStoryReporterBuilder(
new StoryReporterBuilder().withDefaultFormats().withFormats(
<dependency>
<groupId>com.lordofthejars.jbehave.report</groupId>
<artifactId>asciidoctor-jbehave-reporter</artifactId>
<version>0.0.1</version>
</dependency>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://dl.bintray.com/lordofthejars/maven</url>
</repository>
<assembly>
<id>doc</id>
<formats>
<format>war</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
@maggandalf
maggandalf / pom.xml
Last active December 31, 2015 21:09
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>assembly</goal>
</goals>
@maggandalf
maggandalf / pom.xml
Last active December 31, 2015 21:09
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>0.1.4-SNAPSHOT</version>
<executions>
<execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
@Glues({FlightDetailsSteps.class, ScheduledFlightsSteps.class})
@Features({"com/wakaleo/bddinaction/chapter9/flightstatus/flight_details.feature", "com/wakaleo/bddinaction/chapter9/flightstatus/scheduled_flights.feature"})
@RunWith(ArquillianCucumber.class)
@Cucumber.Options(format = { "pretty", "html:target/cucumber-html-report", "json:target/report.json" })
@RunAsClient
public class FlightStatusFeaturesIT {
private static final String WEBAPP_SRC = "src/main/webapp";
public static final String REST_FLIGHTS_URL = "rest/flights";
Users should receive alerts depending on price of stocks
Narrative:
In order to sell stocks at optimum price
As a user
I want to receive alerts when stock is above a price
GivenStories: org/asciidoctor/asciidoctorj/extension/jbehave/userstory/refreshable_stocks.story
Scenario: Alerts are switched on/off depending on price and a threshold.
Narrative:
In order to take decisions based on stock prices
As a system
I want to receive all stocks with their prices
Scenario: Receiving stocks and prices
Given stock server
When I connect to it