Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vvedenin
committed
Apr 13, 2016
1 parent
deea71e
commit 9dfb500
Showing
55 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>1.1-common-frameworks-and-lib</artifactId> | ||
<groupId>com.github.vedenin</groupId> | ||
<version>0.01</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>cucumber</artifactId> | ||
<name>Common frameworks:: Cucumber</name> | ||
|
||
<properties> | ||
<java.version>1.7</java.version> | ||
<junit.version>4.12</junit.version> | ||
<cucumber.version>1.2.4</cucumber.version> | ||
<maven.compiler.version>3.3</maven.compiler.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>info.cukes</groupId> | ||
<artifactId>cucumber-java</artifactId> | ||
<version>${cucumber.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>info.cukes</groupId> | ||
<artifactId>cucumber-junit</artifactId> | ||
<version>${cucumber.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven.compiler.version}</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
<compilerArgument>-Werror</compilerArgument> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
12 changes: 12 additions & 0 deletions
12
hellowords/1.1-common-frameworks-and-lib/cucumber/src/main/java/Belly.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,12 @@ | ||
/** | ||
* Cucumber Hello World | ||
* | ||
* * To run using "maven test" | ||
*/ | ||
public class Belly { | ||
public void eat(int cukes) { | ||
for(int i=0; i< cukes; i++ ){ | ||
System.out.println("I'm eating " + (i + 1) + " cuke"); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
hellowords/1.1-common-frameworks-and-lib/cucumber/src/test/java/HelloWorldTest.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,11 @@ | ||
import cucumber.api.CucumberOptions; | ||
import cucumber.api.junit.Cucumber; | ||
import org.junit.runner.RunWith; | ||
|
||
/** | ||
* To run using "maven test" | ||
*/ | ||
@RunWith(Cucumber.class) | ||
@CucumberOptions(plugin = {"pretty"}) | ||
public class HelloWorldTest { | ||
} |
31 changes: 31 additions & 0 deletions
31
hellowords/1.1-common-frameworks-and-lib/cucumber/src/test/java/Stepdefs.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,31 @@ | ||
import cucumber.api.java.en.Given; | ||
import cucumber.api.java.en.Then; | ||
import cucumber.api.java.en.When; | ||
|
||
/** | ||
* To run using "maven test" | ||
*/ | ||
public class Stepdefs { | ||
@Given("^I have (\\d+) cukes in my belly$") | ||
public void I_have_cukes_in_my_belly(int cukes) throws Throwable { | ||
Belly belly = new Belly(); | ||
belly.eat(cukes); | ||
} | ||
|
||
@When("^I wait (\\d+) seconds$") | ||
public void i_wait_hour(int arg1) throws Throwable { | ||
Thread.sleep(10000); | ||
} | ||
|
||
@Then("^my belly should growl$") | ||
public void my_belly_should_growl() throws Throwable { | ||
System.out.println("My belly growl"); | ||
} | ||
|
||
@Then("^I say Hello World!$") | ||
public void i_say_Hello_World() throws Throwable { | ||
System.out.println(); | ||
System.out.println("Hello World!"); | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
hellowords/1.1-common-frameworks-and-lib/cucumber/src/test/resources/belly.feature
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,7 @@ | ||
Feature: Belly | ||
|
||
Scenario: a few cukes | ||
Given I have 42 cukes in my belly | ||
When I wait 10 seconds | ||
Then my belly should growl | ||
Then I say Hello World! |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ries/dependency_injection/dependency-injection-guice/target/maven-archiver/pom.properties
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,5 +1,5 @@ | ||
#Generated by Maven | ||
#Wed Apr 13 11:29:23 CEST 2016 | ||
#Wed Apr 13 14:45:57 CEST 2016 | ||
version=0.1-SNAPSHOT | ||
groupId=com.github.vedenin | ||
artifactId=dependency-injection-guice |
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