Skip to content

Commit 79f4ac2

Browse files
committed
Add failing tests for isolation and objects
1 parent 7a085ca commit 79f4ac2

File tree

14 files changed

+108
-8
lines changed

14 files changed

+108
-8
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Feature: Isolated
2+
3+
Scenario: First test
4+
Given I set the list of values to
5+
| 1 |
6+
| 2 |
7+
| 3 |
8+
And I multiply by 2
9+
Then the list of values is
10+
| 2 |
11+
| 4 |
12+
| 6 |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Feature: Isolated 2
2+
3+
Scenario: Second test
4+
Given I set the list of values to
5+
| 10 |
6+
And I multiply by 2
7+
Then the list of values is
8+
| 20 |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Feature: As Cucumber Scala, I want to be able to use steps defined in objects even though they will persist their state across scenarios
2+
3+
Scenario: First scenario
4+
Given I have a calculator
5+
When I do 2 + 2
6+
Then I got 4
7+
8+
Scenario: Second scenario
9+
Given I have a calculator
10+
When I do 5 + 6
11+
Then I got 11

scala/sources/src/test/scala/tests/RunCukesTest.scala renamed to scala/sources/src/test/scala/tests/cukes/RunCukesTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests
1+
package tests.cukes
22

33
import io.cucumber.junit.{Cucumber, CucumberOptions}
44
import org.junit.runner.RunWith

scala/sources/src/test/scala/tests/StepDefs.scala renamed to scala/sources/src/test/scala/tests/cukes/StepDefs.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package tests
1+
package tests.cukes
22

33
import java.util.{List => JList, Map => JMap}
44

55
import io.cucumber.datatable.DataTable
66
import io.cucumber.scala.{EN, ScalaDsl}
77
import junit.framework.Assert._
8-
import tests.model.{Cukes, Person, Snake}
8+
import tests.cukes.model.{Cukes, Person, Snake}
99

1010
import scala.collection.JavaConverters._
1111

scala/sources/src/test/scala/tests/TypeRegistryConfiguration.scala renamed to scala/sources/src/test/scala/tests/cukes/TypeRegistryConfiguration.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests
1+
package tests.cukes
22

33
import java.lang.reflect.Type
44
import java.util
@@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
88
import io.cucumber.core.api.{TypeRegistry, TypeRegistryConfigurer}
99
import io.cucumber.cucumberexpressions.{ParameterByTypeTransformer, ParameterType, Transformer}
1010
import io.cucumber.datatable.{DataTableType, TableCellByTypeTransformer, TableEntryByTypeTransformer, TableEntryTransformer}
11-
import tests.model.{Cukes, Person, Snake}
11+
import tests.cukes.model.{Cukes, Person, Snake}
1212

1313
class TypeRegistryConfiguration extends TypeRegistryConfigurer {
1414

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
package tests.model
1+
package tests.cukes.model
22

33
case class Cukes(number: Int, color: String)

scala/sources/src/test/scala/tests/model/Person.scala renamed to scala/sources/src/test/scala/tests/cukes/model/Person.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests.model
1+
package tests.cukes.model
22

33
/**
44
* Test model for a "Person"

scala/sources/src/test/scala/tests/model/Snake.scala renamed to scala/sources/src/test/scala/tests/cukes/model/Snake.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tests.model
1+
package tests.cukes.model
22

33
/**
44
* Test model "Snake" to exercise the custom mapper functionality

0 commit comments

Comments
 (0)