Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add a way to generate a WithSameValue matcher also when missing parent class
- Loading branch information
Showing
6 changed files
with
107 additions
and
24 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
27 changes: 27 additions & 0 deletions
27
src/test/java/ch/powerunit/extensions/matchers/samples/extension/MyPair2.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,27 @@ | ||
package ch.powerunit.extensions.matchers.samples.extension; | ||
|
||
import org.apache.commons.lang3.tuple.Pair; | ||
|
||
import ch.powerunit.extensions.matchers.ProvideMatchers; | ||
|
||
@ProvideMatchers(allowWeakWithSameValue = true) | ||
public class MyPair2<L,R> extends Pair<L, R> { | ||
|
||
public String test; | ||
|
||
@Override | ||
public R setValue(R arg0) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public L getLeft() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public R getRight() { | ||
return null; | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
src/test/java/ch/powerunit/extensions/matchers/samples/extension/MyTestWithoutGeneric2.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 @@ | ||
package ch.powerunit.extensions.matchers.samples.extension; | ||
|
||
import org.apache.commons.lang3.text.StrBuilder; | ||
|
||
import ch.powerunit.extensions.matchers.ProvideMatchers; | ||
|
||
@ProvideMatchers(allowWeakWithSameValue = true) | ||
public class MyTestWithoutGeneric2 extends StrBuilder { | ||
|
||
public String test; | ||
|
||
} |