-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#232: fixes NPE when verifying interfaces
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
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
20 changes: 20 additions & 0 deletions
20
src/test/java/nl/jqno/equalsverifier/integration/extended_contract/InterfaceTest.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,20 @@ | ||
package nl.jqno.equalsverifier.integration.extended_contract; | ||
|
||
import nl.jqno.equalsverifier.EqualsVerifier; | ||
import org.junit.Test; | ||
|
||
public class InterfaceTest { | ||
@Test | ||
public void succeed_whenClassIsAnInterface() { | ||
EqualsVerifier.forClass(CharSequence.class) | ||
.verify(); | ||
} | ||
|
||
@Test | ||
public void succeed_whenClassIsAnEmptyInterface() { | ||
EqualsVerifier.forClass(Interface.class) | ||
.verify(); | ||
} | ||
|
||
interface Interface {} | ||
} |