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
5 changed files
with
76 additions
and
3 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
37 changes: 37 additions & 0 deletions
37
src/test/java/ch/powerunit/extensions/matchers/samples/PojoClass.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,37 @@ | ||
/** | ||
* 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.samples; | ||
|
||
import ch.powerunit.extensions.matchers.ProvideMatchers; | ||
|
||
/** | ||
* @author borettim | ||
* | ||
*/ | ||
@ProvideMatchers() | ||
public class PojoClass { | ||
public Class clazzNoGeneric; | ||
|
||
public Class<?> clazzWildcard; | ||
|
||
public Class<? extends Number> clazzExtends; | ||
|
||
public Class<? super String> clazzSuper; | ||
} |
36 changes: 36 additions & 0 deletions
36
src/test/java/ch/powerunit/extensions/matchers/samples/PojoClassMatchersTest.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,36 @@ | ||
/** | ||
* 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.samples; | ||
|
||
import ch.powerunit.Test; | ||
import ch.powerunit.TestSuite; | ||
|
||
public class PojoClassMatchersTest implements TestSuite { | ||
@Test | ||
public void testClass() { | ||
PojoClass ut = new PojoClass(); | ||
ut.clazzNoGeneric = Object.class; | ||
ut.clazzWildcard = String.class; | ||
ut.clazzExtends = Integer.class; | ||
ut.clazzSuper = Comparable.class; | ||
assertThat(ut).is(PojoClassMatchers.pojoClassWith().clazzNoGeneric(Object.class).clazzWildcard(String.class) | ||
.clazzExtends(Integer.class).clazzSuper(Comparable.class)); | ||
} | ||
} |