equalsverifier

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

  • 所有者: jqno/equalsverifier
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Apache License 2.0
Maven Central
Javadoc

Build Status
Dependabot
SemVer stability

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>3.1.12</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: The signed jar itself can be found in this repo.

Disclaimer

Copyright 2009-2019 Jan Ouwens

主要指標

概覽
名稱與所有者jqno/equalsverifier
主編程語言Java
編程語言Java (語言數: 2)
平台
許可證Apache License 2.0
所有者活动
創建於2015-03-29 09:12:21
推送於2025-06-20 09:29:23
最后一次提交
發布數154
最新版本名稱equalsverifier-4.0.2 (發布於 )
第一版名稱equalsverifier-0.1 (發布於 )
用户参与
星數722
關注者數19
派生數82
提交數3.8k
已啟用問題?
問題數349
打開的問題數3
拉請求數678
打開的拉請求數0
關閉的拉請求數53
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?