Coder Social home page Coder Social logo

xiaoyu-xu / equalsverifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jqno/equalsverifier

0.0 1.0 0.0 33.4 MB

EqualsVerifier can be used in Java unit tests to verify whether the contract for the equals and hashCode methods is met.

Home Page: http://www.jqno.nl/equalsverifier

License: Apache License 2.0

Java 100.00%

equalsverifier's Introduction

Apache License 2.0 Maven Central Build Status Issue resolution

EqualsVerifier can be used in Java unit tests to verify whether the contract for the equals and hashCode methods in a class is met. The Maven coordinates are:

<dependency>
    <groupId>nl.jqno.equalsverifier</groupId>
    <artifactId>equalsverifier</artifactId>
    <version>2.4.8</version>
    <scope>test</scope>
</dependency>

For documentation, please see the project's website.

Pull requests are welcome! If you open one, please also register an issue or send a message to the Google Group, so we can discuss it.

Build

To build EqualsVerifier, you need Maven. Just call mvn clean verify from the command-line, and you're done. Alternatively, you can use any IDE with Maven support.

Project structure

src/

  • nl.jqno.equalsverifier External API
  • nl.jqno.equalsverifier.internal Classes internal to the operation of EqualsVerifier
  • nl.jqno.equalsverifier.internal.checkers Checkers that perform EqualsVerifier's actual verifications
  • nl.jqno.equalsverifier.internal.exceptions Internally used exceptions
  • nl.jqno.equalsverifier.internal.prefabvalues Cache and factories for instances of all types
  • nl.jqno.equalsverifier.internal.reflection Helpers for reflection-based tasks
  • nl.jqno.equalsverifier.internal.util Various helpers

test/

  • javax.persistence Annotations used by integration tests
  • nl.jqno.equalsverifier Unit tests for specific subcomponents of EqualsVerifier
  • nl.jqno.equalsverifier.coverage Code coverage tests, which fail if coverage is less than 100%
  • nl.jqno.equalsverifier.integration.basic_contract Integration tests that cover the contract as stated in java.lang.Object's javadoc
  • nl.jqno.equalsverifier.integration.extended_contract Integration tests that cover specific corner cases in the Java language, and other essential points that are discussed in other sources, such as Effective Java, but not in the javadoc
  • nl.jqno.equalsverifier.integration.extra_features Integration tests that cover non-standard situations that EqualsVerifier supports
  • nl.jqno.equalsverifier.integration.inheritance Integration tests that cover inheritance in equality relations
  • nl.jqno.equalsverifier.integration.operational Integration tests that cover issues that don't pertain to equals or hashCode themselves, but to EqualsVerifier's operation
  • nl.jqno.equalsverifier.testhelpers Utility classes for use in tests
  • nl.jqno.equalsverifier.testhelpers.annotations Annotations used by unit tests and integration tests
  • nl.jqno.equalsverifier.testhelpers.annotations.casefolding More annotations which would clash with other annotations because of casing
  • nl.jqno.equalsverifier.testhelpers.types Various data classes for use in unit tests and integration tests
  • nl.jqno.equalsverifier.util Unit tests for the reflection helpers

lib/

  • equalsverifier-signedjar-test.jar A local Maven repository containing a signed jar, used to test potential ClassLoader issues
    Here's how to install a jar into it:
    mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file \
                             -Dfile=<path-to-file> -DgroupId=<myGroup> \
                             -DartifactId=<myArtifactId> -Dversion=<myVersion> \
                             -Dpackaging=<myPackaging> -DcreateChecksum=true \
                             -DlocalRepositoryPath=lib
    
    The signed jar itself can be found in this repo.

Disclaimer

Copyright 2009-2017 Jan Ouwens

equalsverifier's People

Contributors

jqno avatar nrbperdijk avatar mkordas avatar stephan202 avatar don-vip avatar turbanoff avatar dean-allen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.