@Test public void testEqualsCaseInsensitiveLabelName() { final MissingGoToLabelViolation first = new MissingGoToLabelViolation(goToLabel, null); final MissingGoToLabelViolation second = new MissingGoToLabelViolation(StringUtils.swapCase(goToLabel), null); assertThat(first).isEqualTo(second); assertThat(second).isEqualTo(first); assertThat(first.hashCode()).isEqualTo(second.hashCode()); }
@Override public int hashCode() { return new HashCodeBuilder().append(labelName.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); }
MissingGoToLabelViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(labelName.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } }
MissingGoToLabelViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(labelName.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } MissingGoToLabelViolation(final String labelName, final Integer lineNumber); }
MissingGoToLabelViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(labelName.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } MissingGoToLabelViolation(final String labelName, final Integer lineNumber); @Override boolean equals(final Object obj); String getLabelName(); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); @Override int hashCode(); @Override String toString(); }
MissingGoToLabelViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(labelName.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } MissingGoToLabelViolation(final String labelName, final Integer lineNumber); @Override boolean equals(final Object obj); String getLabelName(); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); @Override int hashCode(); @Override String toString();  }