commit a2aa1808dae7644ab356dcef2290767e8d027f91 Author: Mauro Talevi <mauro.tal...@aquilonia.org> AuthorDate: Mon, 25 Nov 2013 17:34:35 +0100 Commit: Mauro Talevi <mauro.tal...@aquilonia.org> CommitDate: Mon, 25 Nov 2013 17:34:35 +0100
JBEHAVE-958: Updated to use jbehave project on demo.redmine.org. diff --git a/distribution/src/site/content/using-rest.html b/distribution/src/site/content/using-rest.html index 2316eaa..c4e5f65 100755 --- a/distribution/src/site/content/using-rest.html +++ b/distribution/src/site/content/using-rest.html @@ -14,6 +14,22 @@ <p>REST is typically used to access wikis. Each REST provider has its own API. Currently supported is the <a href="http://redmine.org">Redmine</a> API.</p> +<p>To list the story resource from Redmine</p> +<script type="syntaxhighlighter" class="brush: java"> +<![CDATA[ + ListFromRedmine listFromRedmine = new ListFromRedmine(); + List<String> uris = listFromRedmine("http://demo.redmine.org/project/jbehave/wiki/"); +]]> +</script> + +<p>To load a story resource from a URI:</p> +<script type="syntaxhighlighter" class="brush: java"> +<![CDATA[ + LoadFromRedmine loadFromRedmine = new LoadFromRedmine(); + String text = loadFromRedmine.loadResourceAsText("http://demo.redmine.org/project/jbehave/wiki/A_story"); +]]> +</script> + <div class="clear"> <hr /> </div> diff --git a/examples/rest/src/main/java/org/jbehave/examples/core/rest/stories/redmine.story b/examples/rest/src/main/java/org/jbehave/examples/core/rest/stories/redmine.story index 1386f9b..7bcd868 100644 --- a/examples/rest/src/main/java/org/jbehave/examples/core/rest/stories/redmine.story +++ b/examples/rest/src/main/java/org/jbehave/examples/core/rest/stories/redmine.story @@ -1,6 +1,6 @@ Scenario: Story index is retrieved from Redmine -When index is retrieved from Redmine at http://demo.redmine.org/projects/rossodisera/wiki +When index is retrieved from Redmine at http://demo.redmine.org/projects/jbehave/wiki Then the index contains 2 stories Scenario: Story is loaded from Redmine diff --git a/jbehave-rest/src/test/java/org/jbehave/core/io/rest/redmine/LoadFromRedmineBehaviour.java b/jbehave-rest/src/test/java/org/jbehave/core/io/rest/redmine/LoadFromRedmineBehaviour.java index 009d371..2c34cd9 100644 --- a/jbehave-rest/src/test/java/org/jbehave/core/io/rest/redmine/LoadFromRedmineBehaviour.java +++ b/jbehave-rest/src/test/java/org/jbehave/core/io/rest/redmine/LoadFromRedmineBehaviour.java @@ -18,7 +18,7 @@ public class LoadFromRedmineBehaviour { @Test public void canFormatURIForJSON() { LoadFromRedmine loader = new LoadFromRedmine(Type.JSON); - String url = "http://redmine/project/bdd/wiki/stories/some_story"; + String url = "http://demo.redmine.org/project/jbehave/wiki/some_story"; String text = loader.uri(url, Type.JSON); assertThat(text, equalTo(url+".json")); } @@ -34,7 +34,7 @@ public class LoadFromRedmineBehaviour { @Test public void canFormatURIForXML() { LoadFromRedmine loader = new LoadFromRedmine(Type.XML); - String url = "http://redmine/project/bdd/wiki/stories/some_story"; + String url = "http://demo.redmine.org/project/jbehave/wiki/some_story"; String text = loader.uri(url, Type.XML); assertThat(text, equalTo(url+".xml")); }