EqualsVerifier


Source link: https://github.com/jqno/equalsverifier

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</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= -DgroupId= \
    
    -DartifactId= -Dversion= \
    
      -Dpackaging= -DcreateChecksum=true \
    
      -DlocalRepositoryPath=lib 
    The signed jar itself can be found in this repo.

Disclaimer

Copyright 2009-2017 Jan Ouwens

Resources

A pull to refresh view for android, the RecyclerRefreshLayout is based on the SwipeRefreshLayout. Highly customizable, code simplicity, etc.

Synthesize is an android library which can create layout images in background threads, services, etc without inflating them in activity or fragments.

A library to format dates as described in Material Design guidelines.

The idea is simple, use java expressions in layout params like layout_left="view1.right+10dp". It is helpful when LinearLayout and RelativeLayout is not enough for you.

This is an Android specific distribution of the latest versions of SQLite. It contains the latest SQLite version and the Android specific database APIs derived from AOSP packaged as an AAR library distributed on jcenter.

A changelog library for Android.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes