Permalink
Browse files

Fixed the ambiguity issue thanks to Aslak Hellesoy

  • Loading branch information...
1 parent ba88639 commit d561229d5a70ce15c71275815ba4b749fac2e67d Martijn Dashorst committed Jan 4, 2010
@@ -1,3 +1,4 @@
+@counting
Feature: Counting
In order to count the number of clicks on a link
As a user
@@ -1,3 +1,4 @@
+@helloworld
Feature: Helloworld
In order to greet the world
As a user
@@ -6,10 +6,10 @@
import cuke4duke.Given;
import cuke4duke.Then;
-public abstract class WicketSteps {
- private WicketTester tester;
+public class WicketSteps {
+ private static WicketTester tester;
- protected WicketSteps(WebApplication application) {
+ public static void setApplication(WebApplication application) {
tester = new WicketTester(application);
}
@@ -1,9 +1,11 @@
package com.wicketinaction.counting;
import com.wicketinaction.WicketSteps;
+import cuke4duke.Before;
-public class CountingSteps extends WicketSteps {
- public CountingSteps() {
- super(new CountingApplication());
+public class CountingSteps {
+ @Before("@counting")
+ public void setCountingApplication() {
+ WicketSteps.setApplication(new CountingApplication());
}
}
@@ -1,9 +1,11 @@
package com.wicketinaction.helloworld;
import com.wicketinaction.WicketSteps;
+import cuke4duke.Before;
-public class HelloWorldSteps extends WicketSteps {
- public HelloWorldSteps() {
- super(new HelloWorldApplication());
+public class HelloWorldSteps {
+ @Before("@helloworld")
+ public void setHelloWorldApplication() {
+ WicketSteps.setApplication(new HelloWorldApplication());
}
}

0 comments on commit d561229

Please sign in to comment.