-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic hello world step to make sure it can run
- Loading branch information
Showing
9 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
apply plugin: 'java' | ||
|
||
allprojects { | ||
group = 'com.github.jakimli.panda' | ||
version = '0.1.0' | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java' | ||
|
||
ext { | ||
springboot = '2.0.0.RELEASE' | ||
cucumber = '4.0.0' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dependencies { | ||
compile( | ||
"org.springframework.boot:spring-boot-starter:${springboot}" | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
dependencies { | ||
compile project(":core") | ||
|
||
compile( | ||
"io.cucumber:cucumber-java:${cucumber}", | ||
"org.springframework.boot:spring-boot-starter-test:${springboot}" | ||
) | ||
|
||
testCompile( | ||
"io.cucumber:cucumber-junit:${cucumber}" | ||
) | ||
} | ||
|
||
configurations { | ||
cucumberRuntime { | ||
extendsFrom testRuntime | ||
} | ||
} | ||
|
||
task cucumber() { | ||
dependsOn assemble, compileTestJava | ||
doLast { | ||
javaexec { | ||
main = "cucumber.api.cli.Main" | ||
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output | ||
args = ['--plugin', 'pretty', '--glue', 'com.github.jakimli.panda', 'src/test/resources'] | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
steps/src/main/java/com/github/jakimli/panda/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.github.jakimli.panda; | ||
|
||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.ComponentScan; | ||
|
||
@ComponentScan | ||
@SpringBootApplication | ||
public class Application { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.github.jakimli.panda; | ||
|
||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.ContextConfiguration; | ||
|
||
@SpringBootTest | ||
@ContextConfiguration(classes = Application.class) | ||
public class Step { | ||
} |
15 changes: 15 additions & 0 deletions
15
steps/src/main/java/com/github/jakimli/panda/steps/HelloWorldStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.jakimli.panda.steps; | ||
|
||
import com.github.jakimli.panda.Step; | ||
import cucumber.api.java.en.Given; | ||
|
||
import static org.hamcrest.Matchers.is; | ||
import static org.junit.Assert.assertThat; | ||
|
||
public class HelloWorldStep extends Step { | ||
|
||
@Given("hello") | ||
public void hello() { | ||
assertThat(1, is(1)); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
steps/src/test/java/com/github/jakimli/panda/RunCucumberTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.github.jakimli.panda; | ||
|
||
import cucumber.api.junit.Cucumber; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(Cucumber.class) | ||
public class RunCucumberTest { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Hello World | ||
THis is the for test | ||
|
||
Scenario: test scenario | ||
* hello |