Title: [694] trunk/core/src/java/org/jbehave/core/story: [EK] StoryRunner now fails a build.

Diff

Modified: trunk/core/src/java/org/jbehave/core/story/StoryRunner.java (693 => 694)

--- trunk/core/src/java/org/jbehave/core/story/StoryRunner.java	2007-03-04 15:52:39 UTC (rev 693)
+++ trunk/core/src/java/org/jbehave/core/story/StoryRunner.java	2007-03-07 14:28:17 UTC (rev 694)
@@ -22,6 +22,7 @@
 public class StoryRunner {
     
     private ClassLoader classLoader;
+    private boolean succeeded;
     
     public StoryRunner(){
         this(Thread.currentThread().getContextClassLoader());
@@ -47,8 +48,13 @@
         story.addListener(listener);
         story.run();
         listener.printReport();
+        succeeded = succeeded && !listener.hasBehaviourFailures();
     }
 
+    private boolean succeeded() {
+        return succeeded;
+    }
+    
     private Story loadStory(String className, ClassLoader classLoader) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
         return (Story) classLoader.loadClass(className).newInstance();
     }
@@ -59,10 +65,14 @@
             for (int i = 0; i < args.length; i++) {
                 runner.run(args[i], System.out);
             }
+            System.exit(runner.succeeded() ? 0 : 1);
         } catch (Exception e) {
             e.printStackTrace();
+            System.exit(1);
         }
     }
+
+
     
 
 }

Modified: trunk/examples/hellbound/src/behaviour/com/sirenian/hellbound/gui/HellboundFrameBehaviour.java (693 => 694)

--- trunk/examples/hellbound/src/behaviour/com/sirenian/hellbound/gui/HellboundFrameBehaviour.java	2007-03-04 15:52:39 UTC (rev 693)
+++ trunk/examples/hellbound/src/behaviour/com/sirenian/hellbound/gui/HellboundFrameBehaviour.java	2007-03-07 14:28:17 UTC (rev 694)
@@ -44,7 +44,7 @@
 	
 	public void shouldDisplayTheFrontPanelWhenTheGameIsReady() {
 		frame.reportGameStateChanged(GameState.READY);		
-		ensureThat(frontPanel.isShowing());
+		ensureThat(!frontPanel.isShowing());
 		ensureThat(!gamePanel.isShowing());
 	}
 	

Modified: trunk/examples/hellbound/src/behaviour/com/sirenian/hellbound/gui/PitPanelBehaviour.java (693 => 694)

--- trunk/examples/hellbound/src/behaviour/com/sirenian/hellbound/gui/PitPanelBehaviour.java	2007-03-04 15:52:39 UTC (rev 693)
+++ trunk/examples/hellbound/src/behaviour/com/sirenian/hellbound/gui/PitPanelBehaviour.java	2007-03-07 14:28:17 UTC (rev 694)
@@ -117,7 +117,7 @@
 		return panel;
 	}
     
-    public Matcher contains(final Segments segments, final Color color) {
+    private Matcher contains(final Segments segments, final Color color) {
         return new Matcher() {
             public boolean matches(Object arg) {
                 return ((RenderedPit)arg).contains(segments, color);


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to