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
Showing
58 changed files
with
1,616 additions
and
601 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
51 changes: 51 additions & 0 deletions
51
...t-jdk8/children/src/main/java/ch/powerunit/extensions/matchers/multi/children/Pojo24.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,51 @@ | ||
/** | ||
* Powerunit - A JDK1.8 test framework | ||
* Copyright (C) 2014 Mathieu Boretti. | ||
* | ||
* This file is part of Powerunit | ||
* | ||
* Powerunit is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Powerunit is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Powerunit. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package ch.powerunit.extensions.matchers.multi.children; | ||
|
||
import ch.powerunit.extensions.matchers.ProvideMatchers; | ||
import ch.powerunit.extensions.matchers.multi.parentold.Pojo1; | ||
|
||
/** | ||
* @author borettim | ||
* | ||
*/ | ||
@ProvideMatchers | ||
public class Pojo24 extends Pojo1 { | ||
|
||
public String msg2; | ||
|
||
public Pojo24() { | ||
} | ||
|
||
public Pojo24(String msg2) { | ||
this.msg2 = msg2; | ||
} | ||
|
||
public Pojo24(String msg1, String msg2) { | ||
super(msg1); | ||
this.msg2 = msg2; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Pojo24 [msg2=" + msg2 + ", msg1=" + msg1 + "]"; | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...t-jdk8/children/src/main/java/ch/powerunit/extensions/matchers/multi/children/Pojo26.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,47 @@ | ||
/** | ||
* Powerunit - A JDK1.8 test framework | ||
* Copyright (C) 2014 Mathieu Boretti. | ||
* | ||
* This file is part of Powerunit | ||
* | ||
* Powerunit is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Powerunit is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Powerunit. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package ch.powerunit.extensions.matchers.multi.children; | ||
|
||
import ch.powerunit.extensions.matchers.ProvideMatchers; | ||
import ch.powerunit.extensions.matchers.multi.parentold.Pojo1; | ||
|
||
/** | ||
* @author borettim | ||
* | ||
*/ | ||
@ProvideMatchers | ||
public class Pojo26 { | ||
|
||
public Pojo1 field1; | ||
|
||
public Pojo26() { | ||
} | ||
|
||
public Pojo26(Pojo1 field1) { | ||
super(); | ||
this.field1 = field1; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Pojo26 [field1=" + field1 + "]"; | ||
} | ||
|
||
} |
96 changes: 96 additions & 0 deletions
96
...dren/src/test/java/ch/powerunit/extensions/matchers/multi/children/Pojo24MatcherTest.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,96 @@ | ||
/** | ||
* Powerunit - A JDK1.8 test framework | ||
* Copyright (C) 2014 Mathieu Boretti. | ||
* | ||
* This file is part of Powerunit | ||
* | ||
* Powerunit is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Powerunit is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Powerunit. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package ch.powerunit.extensions.matchers.multi.children; | ||
|
||
import ch.powerunit.TestDelegate; | ||
import ch.powerunit.TestSuite; | ||
import ch.powerunit.extensions.matchers.multi.parentold.Pojo1Matchers; | ||
import ch.powerunit.matchers.MatcherTester; | ||
import static ch.powerunit.matchers.MatcherTester.matcher; | ||
import static ch.powerunit.matchers.MatcherTester.value; | ||
|
||
public class Pojo24MatcherTest implements TestSuite { | ||
|
||
//@formatter:off | ||
@TestDelegate | ||
public final MatcherTester<?> tester = testerOfMatcher(Pojo24Matchers.Pojo24MatcherImpl.class) | ||
.with( | ||
matcher((Pojo24Matchers.Pojo24MatcherImpl) Pojo24Matchers.pojo24With().msg2ContainsString("12")) | ||
.describedAs("an instance of ch.powerunit.extensions.matchers.multi.children.Pojo24 with\n[parent ANYTHING]\n[msg2 a string containing \"12\"]\n") | ||
.nullRejected("was null") | ||
.accepting( | ||
new Pojo24("12"), | ||
new Pojo24("121")) | ||
.rejecting( | ||
value("").withMessage("was \"\""), | ||
value(new Pojo24()).withMessage("[msg2 was null]\n"), | ||
value(new Pojo24("11")).withMessage("[msg2 was \"11\"]\n")), | ||
matcher((Pojo24Matchers.Pojo24MatcherImpl) Pojo24Matchers.pojo24With(Pojo1Matchers.pojo1With().msg1("x")).msg2ContainsString("12")) | ||
.describedAs("an instance of ch.powerunit.extensions.matchers.multi.children.Pojo24 with\n[parent an instance of ch.powerunit.extensions.matchers.multi.parentold.Pojo1 with\n[msg1 is \"x\"]\n]\n[msg2 a string containing \"12\"]\n") | ||
.nullRejected("was null") | ||
.accepting( | ||
new Pojo24("x","12"), | ||
new Pojo24("x","121")) | ||
.rejecting( | ||
value("").withMessage("was \"\""), | ||
value(new Pojo24()).withMessage("[parent [msg1 was null]\n]\n[msg2 was null]\n"), | ||
value(new Pojo24("11")).withMessage("[parent [msg1 was null]\n]\n[msg2 was \"11\"]\n"), | ||
value(new Pojo24("z","11")).withMessage("[parent [msg1 was \"z\"]\n]\n[msg2 was \"11\"]\n")), | ||
matcher((Pojo24Matchers.Pojo24MatcherImpl) Pojo24Matchers.pojo24WithSameValue(new Pojo24("x"))) | ||
.describedAs("an instance of ch.powerunit.extensions.matchers.multi.children.Pojo24 with\n[parent an instance of ch.powerunit.extensions.matchers.multi.parentold.Pojo1 with\n[msg1 is null]\n]\n[msg2 is \"x\"]\n") | ||
.nullRejected("was null") | ||
.accepting( | ||
new Pojo24("x")) | ||
.rejecting( | ||
value("").withMessage("was \"\""), | ||
value(new Pojo24()).withMessage("[msg2 was null]\n"), | ||
value(new Pojo24("11")).withMessage("[msg2 was \"11\"]\n")), | ||
matcher((Pojo24Matchers.Pojo24MatcherImpl) Pojo24Matchers.pojo24WithSameValue(new Pojo24("y","x"))) | ||
.describedAs("an instance of ch.powerunit.extensions.matchers.multi.children.Pojo24 with\n[parent an instance of ch.powerunit.extensions.matchers.multi.parentold.Pojo1 with\n[msg1 is \"y\"]\n]\n[msg2 is \"x\"]\n") | ||
.nullRejected("was null") | ||
.accepting( | ||
new Pojo24("y","x")) | ||
.rejecting( | ||
value("").withMessage("was \"\""), | ||
value(new Pojo24()).withMessage("[parent [msg1 was null]\n]\n[msg2 was null]\n"), | ||
value(new Pojo24("11")).withMessage("[parent [msg1 was null]\n]\n[msg2 was \"11\"]\n"), | ||
value(new Pojo24("z","x")).withMessage("[parent [msg1 was \"z\"]\n]\n")), | ||
matcher((Pojo24Matchers.Pojo24MatcherImpl) Pojo24Matchers.pojo24WithSameValue(new Pojo24("y","x"),"msg2")) | ||
.describedAs("an instance of ch.powerunit.extensions.matchers.multi.children.Pojo24 with\n[parent an instance of ch.powerunit.extensions.matchers.multi.parentold.Pojo1 with\n[msg1 is \"y\"]\n]\n[msg2 ANYTHING]\n") | ||
.nullRejected("was null") | ||
.accepting( | ||
new Pojo24("y","x"), | ||
new Pojo24("y","x2")) | ||
.rejecting( | ||
value("").withMessage("was \"\""), | ||
value(new Pojo24()).withMessage("[parent [msg1 was null]\n]\n"), | ||
value(new Pojo24("11")).withMessage("[parent [msg1 was null]\n]\n"), | ||
value(new Pojo24("z","x")).withMessage("[parent [msg1 was \"z\"]\n]\n")), | ||
matcher((Pojo24Matchers.Pojo24MatcherImpl) Pojo24Matchers.pojo24WithSameValue(new Pojo24("y","x"),"msg1")) | ||
.describedAs("an instance of ch.powerunit.extensions.matchers.multi.children.Pojo24 with\n[parent an instance of ch.powerunit.extensions.matchers.multi.parentold.Pojo1 with\n[msg1 is \"y\"]\n]\n[msg2 is \"x\"]\n") | ||
.nullRejected("was null") | ||
.accepting( | ||
new Pojo24("y","x")) | ||
.rejecting( | ||
value("").withMessage("was \"\""), | ||
value(new Pojo24()).withMessage("[parent [msg1 was null]\n]\n[msg2 was null]\n"), | ||
value(new Pojo24("11")).withMessage("[parent [msg1 was null]\n]\n[msg2 was \"11\"]\n"))); | ||
//@formatter:on | ||
} |
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,68 @@ | ||
<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>ch.powerunit.extensions</groupId> | ||
<artifactId>powerunit-extensions-matchers-multimodule-parent-old-it1000</artifactId> | ||
|
||
<parent> | ||
<groupId>ch.powerunit.extensions</groupId> | ||
<artifactId>powerunit-extensions-matchers-multimodule-master-it1000</artifactId> | ||
<version>@project.version@</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<docfilessubdirs>true</docfilessubdirs> | ||
<linksource>false</linksource> | ||
<detectLinks /> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>${java.source.version}</source> | ||
<target>${java.target.version}</target> | ||
<fork>true</fork> | ||
<compilerArgs> | ||
<compilerArg>-J@testcompileargs@</compilerArg> | ||
</compilerArgs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<version>${hamcrest.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.powerunit</groupId> | ||
<artifactId>powerunit</artifactId> | ||
<version>${powerunit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.powerunit.extensions</groupId> | ||
<artifactId>powerunit-extensions-matchers</artifactId> | ||
<version>0.2.0</version><!-- Forcer sur ancienne version --> | ||
</dependency> | ||
</dependencies> | ||
</project> |
45 changes: 45 additions & 0 deletions
45
...jdk8/parent-old/src/main/java/ch/powerunit/extensions/matchers/multi/parentold/Pojo1.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,45 @@ | ||
/** | ||
* Powerunit - A JDK1.8 test framework | ||
* Copyright (C) 2014 Mathieu Boretti. | ||
* | ||
* This file is part of Powerunit | ||
* | ||
* Powerunit is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Powerunit is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Powerunit. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package ch.powerunit.extensions.matchers.multi.parentold; | ||
|
||
import ch.powerunit.extensions.matchers.ProvideMatchers; | ||
|
||
/** | ||
* @author borettim | ||
* | ||
*/ | ||
@ProvideMatchers | ||
public class Pojo1 { | ||
|
||
public String msg1; | ||
|
||
public Pojo1() { | ||
} | ||
|
||
public Pojo1(String msg1) { | ||
this.msg1 = msg1; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Pojo1 [msg1=" + msg1 + "]"; | ||
} | ||
|
||
} |
Oops, something went wrong.