Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed usages of javax.xml.bind classes #324
- Loading branch information
Jan Schäfer
committed
Oct 8, 2017
1 parent
2c06dcf
commit da88262
Showing
10 changed files
with
103 additions
and
46 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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This subproject contains tests that make use of Java 9 features. | ||
This project is only built when using Java 9. |
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 @@ | ||
|
||
dependencies { | ||
compile project(':jgiven-core') | ||
compile project(':jgiven-junit') | ||
compile project(':jgiven-html5-report') | ||
compile(group: 'junit', name: 'junit', version: junitVersion) | ||
} | ||
|
||
sourceCompatibility = targetCompatibility = 1.9 | ||
|
||
test.finalizedBy(jgivenHtml5Report) |
23 changes: 23 additions & 0 deletions
23
jgiven-java9-tests/src/test/java/com/tngtech/jgiven/tests/java8/Java9Test.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,23 @@ | ||
package com.tngtech.jgiven.tests.java8; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.Test; | ||
|
||
import com.tngtech.jgiven.junit.SimpleScenarioTest; | ||
import com.tngtech.jgiven.report.model.StepModel; | ||
|
||
public class Java9Test extends SimpleScenarioTest<LambdaSteps<?>> { | ||
|
||
@Test | ||
public void lambda_steps_work() { | ||
|
||
given().some_lambda_step( 5, 4 ); | ||
|
||
StepModel step = getScenario().getScenarioCaseModel().getFirstStep(); | ||
assertThat( step.getWord( 2 ).getArgumentInfo().getArgumentName() ).isEqualTo( "a" ); | ||
assertThat( step.getWord( 3 ).getArgumentInfo().getArgumentName() ).isEqualTo( "b" ); | ||
|
||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
jgiven-java9-tests/src/test/java/com/tngtech/jgiven/tests/java8/LambdaSteps.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,16 @@ | ||
package com.tngtech.jgiven.tests.java8; | ||
|
||
import com.tngtech.jgiven.Stage; | ||
import java.util.List; | ||
|
||
public class LambdaSteps<SELF extends LambdaSteps<SELF>> extends Stage<SELF> { | ||
|
||
public SELF some_lambda_step( int a, int b ) { | ||
methodTakingALambda( ( ) -> {} ); | ||
return self(); | ||
} | ||
|
||
private void methodTakingALambda( Runnable runnable ) { | ||
List<Integer> someList = List.of(1,2,3); | ||
} | ||
} |
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
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