This file contains hidden or 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
package com.javaxp.parameterized_test_example; | |
import static org.junit.Assert.assertEquals; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.List; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; |
This file contains hidden or 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
<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"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.javaxp</groupId> | |
<artifactId>parameterized-test-example</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> |
This file contains hidden or 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
Feature: Cucumber hello world example | |
Scenario Outline: Hello World | |
Given A String name <name> | |
When sayHello method of HelloWorld.java is called | |
Then It should return <output> | |
Examples: | |
| name | output | | |
| World | Hello World | |
This file contains hidden or 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
Feature: Cucumber hello world example | |
HelloWorld - sayHello - name = World | |
Scenario: Hello World # hello-world.feature:3 | |
Given A String name World # HelloWorldSteps.givenInput(String) | |
When sayHello method of HelloWorld.java is called # HelloWorldSteps.whenBusinessLogicCalled() | |
Then It should return Hello World # HelloWorldSteps.thenCheckOutput(String) | |
HelloWorld - sayHello - name = Java | |
Scenario: Hello Java # hello-world.feature:8 |
This file contains hidden or 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
package com.javaxp; | |
import org.junit.runner.RunWith; | |
import cucumber.api.CucumberOptions; | |
import cucumber.api.junit.Cucumber; | |
@RunWith(Cucumber.class) | |
@CucumberOptions(monochrome = true, features = "src/test/resources", plugin = { "pretty" }) | |
public class RunCucumberTest { |
This file contains hidden or 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
package com.javaxp; | |
import org.junit.Assert; | |
import cucumber.api.java.en.Given; | |
import cucumber.api.java.en.Then; | |
import cucumber.api.java.en.When; | |
public class HelloWorldSteps { | |
private HelloWorld helloWorld = new HelloWorld(); |
This file contains hidden or 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
Feature: Cucumber hello world example | |
Scenario: Hello World | |
Given A String name World | |
When sayHello method of HelloWorld.java is called | |
Then It should return Hello World | |
Scenario: Hello Java | |
Given A String name Java | |
When sayHello method of HelloWorld.java is called |
This file contains hidden or 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
<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/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.javaxp</groupId> | |
<artifactId>CucumberHelloWorld</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>CucumberHelloWorld</name> | |
<url>http://maven.apache.org</url> |
This file contains hidden or 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
package com.javaxp; | |
import java.io.File; | |
import java.io.IOException; | |
import org.apache.commons.io.FileUtils; | |
import org.springframework.messaging.Message; | |
import org.springframework.messaging.MessageHandler; | |
import org.springframework.messaging.MessagingException; |
This file contains hidden or 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
package com.javaxp; | |
import java.io.File; | |
import org.springframework.integration.file.FileReadingMessageSource; | |
import org.springframework.integration.file.filters.FileListFilter; | |
public class FilePoller extends FileReadingMessageSource { | |
public FilePoller(File directory, FileListFilter<File> filter) { |