use of nl.jqno.equalsverifier.EqualsVerifierReport in project checkstyle by checkstyle.
the class LineColumnTest method testEqualsAndHashCode.
@Test
public void testEqualsAndHashCode() {
final EqualsVerifierReport ev = EqualsVerifier.forClass(LineColumn.class).usingGetClass().report();
assertWithMessage("Error: " + ev.getMessage()).that(ev.isSuccessful()).isTrue();
}
use of nl.jqno.equalsverifier.EqualsVerifierReport in project checkstyle by checkstyle.
the class SuppressWithPlainTextCommentFilterTest method testEqualsAndHashCodeOfSuppressionClass.
/**
* Our goal is 100% test coverage, for this we use white-box testing.
* So we need access to the implementation details. For this reason, it is necessary
* to use reflection to gain access to the inner type {@code Suppression} here.
*/
@Test
public void testEqualsAndHashCodeOfSuppressionClass() throws ClassNotFoundException {
final Class<?> suppressionClass = TestUtil.getInnerClassType(SuppressWithPlainTextCommentFilter.class, "Suppression");
final EqualsVerifierReport ev = EqualsVerifier.forClass(suppressionClass).usingGetClass().report();
assertWithMessage("Error: " + ev.getMessage()).that(ev.isSuccessful()).isTrue();
}
use of nl.jqno.equalsverifier.EqualsVerifierReport in project checkstyle by checkstyle.
the class SuppressionCommentFilterTest method testEqualsAndHashCodeOfTagClass.
@Test
public void testEqualsAndHashCodeOfTagClass() {
final Object tag = getTagsAfterExecutionOnDefaultFilter("//CHECKSTYLE:OFF").get(0);
final EqualsVerifierReport ev = EqualsVerifier.forClass(tag.getClass()).usingGetClass().report();
assertWithMessage("Error: " + ev.getMessage()).that(ev.isSuccessful()).isTrue();
}
use of nl.jqno.equalsverifier.EqualsVerifierReport in project checkstyle by checkstyle.
the class XpathFilterElementTest method testEqualsAndHashCode.
@Test
public void testEqualsAndHashCode() throws Exception {
final XPathEvaluator xpathEvaluator = new XPathEvaluator(Configuration.newConfiguration());
final EqualsVerifierReport ev = EqualsVerifier.forClass(XpathFilterElement.class).withPrefabValues(XPathExpression.class, xpathEvaluator.createExpression("//METHOD_DEF"), xpathEvaluator.createExpression("//VARIABLE_DEF")).usingGetClass().withIgnoredFields("fileRegexp", "checkRegexp", "messageRegexp", "xpathExpression").report();
assertWithMessage("Error: " + ev.getMessage()).that(ev.isSuccessful()).isTrue();
}
use of nl.jqno.equalsverifier.EqualsVerifierReport in project checkstyle by checkstyle.
the class CsvFilterElementTest method testEqualsAndHashCode.
@Test
public void testEqualsAndHashCode() {
final EqualsVerifierReport ev = EqualsVerifier.forClass(CsvFilterElement.class).usingGetClass().report();
assertWithMessage("Error: " + ev.getMessage()).that(ev.isSuccessful()).isTrue();
}
Aggregations