Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EqualsVerifier should fail when using allFieldsShouldBeUsed but not all fields where used #67

Closed
GoogleCodeExporter opened this issue Mar 29, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. See code below
2. Second test works as expected
3. First test should fail, because not all fields are used


What is the code (equals method, hashCode method, relevant fields) that
triggers the problem?
public class Dummy {

    private final String name;

    public Dummy(final String name) {
        this.name = name;
    }
}

Test 1:
EqualsVerifier.forClass(Dummy.class).allFieldsShouldBeUsed().usingGetClass().ver
ify();

Test 2:
EqualsVerifier.forClass(Dummy.class).allFieldsShouldBeUsed().verify();


What error message does EqualsVerifier give?


What stacktrace does EqualsVerifier print, when called with the debug()
method?


What did you expect?
Both tests should fail

What version of EqualsVerifier are you using?
1.1.3

Please provide any additional information below.
https://groups.google.com/forum/?fromgroups=&hl=de#!topic/equalsverifier/MxuGgfg
hyE4

Original issue reported on code.google.com by [email protected] on 12 Sep 2012 at 6:58

@GoogleCodeExporter
Copy link
Author

As discussed on the mailinglist; when allFieldsShouldBeUsed() is used, both 
tests should indeed fail.

Original comment by [email protected] on 13 Sep 2012 at 8:48

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Fixed and released!

Original comment by [email protected] on 14 Jan 2013 at 3:54

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

jqno pushed a commit that referenced this issue Aug 23, 2016
minor fix to link color settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant