Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Now using SpringStepsFactory. Note that I had to upgrade to Spring 3.…

…1.1 for this
  • Loading branch information...
commit 4edcdfceab91591cad6d34206825bb5607205964 1 parent 4ec8939
Robert Watkins authored July 12, 2012
10  jbehave-spring-hibernate/pom.xml
@@ -18,7 +18,7 @@
18 18
   <dependencies>
19 19
     <dependency>
20 20
       <groupId>org.jbehave</groupId>
21  
-      <artifactId>jbehave-core</artifactId>
  21
+      <artifactId>jbehave-spring</artifactId>
22 22
       <version>3.6.7</version>
23 23
     </dependency>
24 24
     
@@ -26,18 +26,18 @@
26 26
     <dependency>
27 27
         <groupId>org.springframework</groupId>
28 28
         <artifactId>spring-orm</artifactId>
29  
-        <version>3.0.6.RELEASE</version>
  29
+        <version>3.1.1.RELEASE</version>
30 30
     </dependency>
31 31
     
32 32
     <dependency>
33 33
         <groupId>org.springframework</groupId>
34 34
         <artifactId>spring-tx</artifactId>
35  
-        <version>3.0.6.RELEASE</version>
  35
+        <version>3.1.1.RELEASE</version>
36 36
     </dependency>
37 37
     <dependency>
38 38
         <groupId>org.springframework</groupId>
39 39
         <artifactId>spring-aspects</artifactId>
40  
-        <version>3.0.6.RELEASE</version>
  40
+        <version>3.1.1.RELEASE</version>
41 41
     </dependency>
42 42
     
43 43
     <dependency>
@@ -80,7 +80,7 @@
80 80
     <dependency>
81 81
         <groupId>org.springframework</groupId>
82 82
         <artifactId>spring-test</artifactId>
83  
-        <version>3.0.6.RELEASE</version>
  83
+        <version>3.1.1.RELEASE</version>
84 84
         <scope>compile</scope>
85 85
     </dependency>
86 86
     <dependency> <!--  needed to get AOPs around the test cases -->
14  jbehave-spring-hibernate/src/main/java/net/twasink/jbehave/spring/stories/FooServiceStory.java
... ...
@@ -1,15 +1,16 @@
1 1
 package net.twasink.jbehave.spring.stories;
2 2
 
3  
-import net.twasink.jbehave.spring.steps.FooServiceSteps;
  3
+import java.util.List;
4 4
 
5 5
 import org.jbehave.core.configuration.Configuration;
6 6
 import org.jbehave.core.configuration.MostUsefulConfiguration;
7 7
 import org.jbehave.core.junit.JUnitStory;
8  
-import org.jbehave.core.steps.InjectableStepsFactory;
9  
-import org.jbehave.core.steps.InstanceStepsFactory;
  8
+import org.jbehave.core.steps.CandidateSteps;
  9
+import org.jbehave.core.steps.spring.SpringStepsFactory;
10 10
 import org.junit.After;
11 11
 import org.junit.runner.RunWith;
12 12
 import org.springframework.beans.factory.annotation.Autowired;
  13
+import org.springframework.context.ApplicationContext;
13 14
 import org.springframework.jdbc.core.JdbcTemplate;
14 15
 import org.springframework.test.context.ContextConfiguration;
15 16
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -18,7 +19,7 @@
18 19
 @ContextConfiguration("/testContext.xml")
19 20
 public class FooServiceStory extends JUnitStory {
20 21
     @Autowired
21  
-    private FooServiceSteps steps;
  22
+    private ApplicationContext context;
22 23
     
23 24
     @Autowired
24 25
     private JdbcTemplate jdbc;
@@ -32,8 +33,9 @@ public void cleanData() {
32 33
         return new MostUsefulConfiguration();
33 34
     }
34 35
     
35  
-    @Override public InjectableStepsFactory stepsFactory() {
36  
-        return new InstanceStepsFactory(configuration(), steps);
  36
+    @Override
  37
+    public List<CandidateSteps> candidateSteps() {
  38
+        return new SpringStepsFactory(configuration(), context).createCandidateSteps();
37 39
     }
38 40
 
39 41
 }

0 notes on commit 4edcdfc

Please sign in to comment.
Something went wrong with that request. Please try again.