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

Some test's assertEquals() parameters are backwards #34

Closed
pietvandongen opened this issue Apr 3, 2015 · 0 comments
Closed

Some test's assertEquals() parameters are backwards #34

pietvandongen opened this issue Apr 3, 2015 · 0 comments

Comments

@pietvandongen
Copy link

The JUnit API defines:

static public void assertEquals(Object expected, Object actual) {
    assertEquals(null, expected, actual);
}

So, the expected value goes first.

@pietvandongen pietvandongen changed the title Some test's assertEquals() parameters are backward Some test's assertEquals() parameters are backwards Apr 3, 2015
abmpicoli added a commit to abmpicoli/exercism-java that referenced this issue Feb 1, 2024
* Add a comment in the Domino class making explicit that
changes in the Domino class are not accepted by the solution. (Believe
me,
I was really surprised during my first submission that my changes in the
Domino class were rejected. As well as my mentee ).

* Change the way equals and hashcode are implemented to use the
  min+max value of each side instead of left+right.

* Added a constraint validation within the Domino class constructor,
that tiles must
  have a maximum number of 9 on each side (this is needed for the hash
implementation).

* In the equals code, a comparison between a Domino and an Object would
generate a
  class cast exception instead of the expected value, false.
abmpicoli added a commit to abmpicoli/exercism-java that referenced this issue Feb 1, 2024
sanderploegsma pushed a commit that referenced this issue Feb 1, 2024
* Issue #34 solution - hashcode for dominoes.

* Add a comment in the Domino class making explicit that
changes in the Domino class are not accepted by the solution. (Believe
me,
I was really surprised during my first submission that my changes in the
Domino class were rejected. As well as my mentee ).

* Change the way equals and hashcode are implemented to use the
  min+max value of each side instead of left+right.

* Added a constraint validation within the Domino class constructor,
that tiles must
  have a maximum number of 9 on each side (this is needed for the hash
implementation).

* In the equals code, a comparison between a Domino and an Object would
generate a
  class cast exception instead of the expected value, false.

* Issue #34 - fix lack of ()

* checkstyle fixes

[no important files changed]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant