Created
June 17, 2015 13:21
-
-
Save tagliola/b1f117f6d07e2f1f3abd to your computer and use it in GitHub Desktop.
equalsverifier-115
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
package com.foo.bar; | |
import org.jetbrains.annotations.*; | |
public class MyBaseObject | |
{ | |
@Override | |
@NotNull | |
public MyBaseObject clone() | |
{ | |
try | |
{ | |
return (MyBaseObject) super.clone(); | |
} | |
catch (CloneNotSupportedException aCloneNotSupportedException) | |
{ | |
throw new RuntimeException(aCloneNotSupportedException); | |
} | |
} | |
} |
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
package com.foo.bar; | |
public class MyObject extends MyBaseObject | |
{ | |
// empty | |
} |
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
package com.foo.bar; | |
import org.junit.*; | |
import nl.jqno.equalsverifier.*; | |
public class MyObjectTest | |
{ | |
@Test | |
public void shouldVerifyHashCodeEquals() | |
{ | |
EqualsVerifier.forClass(MyObject.class).usingGetClass().verify(); | |
} | |
} |
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
<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>jqno</groupId> | |
<artifactId>equalsverifier-115</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<java.version>1.8</java.version> | |
</properties> | |
<build> | |
<sourceDirectory>src</sourceDirectory> | |
<plugins> | |
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.3</version> | |
</plugin> | |
<plugin> | |
<groupId>com.torstling.intellij</groupId> | |
<artifactId>notnull-instrumenter-maven-plugin</artifactId> | |
<version>0.1.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>instrument</goal> | |
<goal>tests-instrument</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<dependencies> | |
<dependency> | |
<groupId>com.intellij</groupId> | |
<artifactId>annotations</artifactId> | |
<version>12.0</version> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.12</version> | |
</dependency> | |
<dependency> | |
<groupId>nl.jqno.equalsverifier</groupId> | |
<artifactId>equalsverifier</artifactId> | |
<version>1.7.2</version> | |
</dependency> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment