14. Specification in jBehave Scenario : new entry is added Given that Urgo published new entry "Hello World" in his blog When aggregator runs Then aggregated blog contains 1 entry with title "Hello World" Scenario : user without Confluence account has his full name as author Given that user with author name urgo.ringo does not have Confluence account and he published new entry "Hello World" in his blog When aggregator runs Then aggregated blog contains entry "Hello World" with author "Urgo Ringo" Scenario : user with Confluence account has his username as author Given that Urgo has Confluence account with username urgo.ringo and he published new entry "Hello World" in his blog When aggregator runs Then it contains entry "Hello World" with author linked to Confluence account with username urgo.ringo
15. Steps public class AddNewEntrySteps { ... @BeforeScenario public void setup() { feed = new SimpleSyndFeed(); plugin = new Confluence( currentDateProvider ); plugin .registerBlogToAggregator( feed ); } ... @AfterScenario public void reset() { plugin .uninstallAggregator(); } }
16. <given> @Given ( "that Urgo published new entry amp;quot;$titleamp;quot; in his blog" ) public void newBlogEntryPublished(String title) { plugin .installAggregator( "urgo.ringo" ); publishNewBlogEntry(title); }