use of com.puppycrawl.tools.checkstyle.api.AuditEvent in project checkstyle by checkstyle.
the class SuppressWarningsHolderTest method testIsSuppressed.
@Test
public void testIsSuppressed() throws Exception {
populateHolder("MockEntry", 100, 100, 350, 350);
final AuditEvent event = createAuditEvent("check", 100, 10);
assertWithMessage("Event is not suppressed").that(SuppressWarningsHolder.isSuppressed(event)).isFalse();
}
use of com.puppycrawl.tools.checkstyle.api.AuditEvent in project checkstyle by checkstyle.
the class SuppressWarningsHolderTest method testIsSuppressedAfterEventStart.
@Test
public void testIsSuppressedAfterEventStart() throws Exception {
populateHolder("check", 100, 100, 350, 350);
final AuditEvent event = createAuditEvent("check", 100, 100);
assertWithMessage("Event is not suppressed").that(SuppressWarningsHolder.isSuppressed(event)).isTrue();
}
use of com.puppycrawl.tools.checkstyle.api.AuditEvent in project checkstyle by checkstyle.
the class SuppressWarningsHolderTest method testIsSuppressedAfterEventStart2.
@Test
public void testIsSuppressedAfterEventStart2() throws Exception {
populateHolder("check", 100, 100, 350, 350);
final AuditEvent event = createAuditEvent("check", 100, 0);
assertWithMessage("Event is not suppressed").that(SuppressWarningsHolder.isSuppressed(event)).isTrue();
}
use of com.puppycrawl.tools.checkstyle.api.AuditEvent in project checkstyle by checkstyle.
the class SuppressWarningsHolderTest method testIsSuppressedAfterEventEnd2.
@Test
public void testIsSuppressedAfterEventEnd2() throws Exception {
populateHolder("check", 100, 100, 350, 350);
final AuditEvent event = createAuditEvent("check", 400, 10);
assertWithMessage("Event is not suppressed").that(SuppressWarningsHolder.isSuppressed(event)).isFalse();
}
use of com.puppycrawl.tools.checkstyle.api.AuditEvent in project checkstyle by checkstyle.
the class SuppressWarningsHolderTest method testIsSuppressedAfterEventEnd.
@Test
public void testIsSuppressedAfterEventEnd() throws Exception {
populateHolder("check", 100, 100, 350, 350);
final AuditEvent event = createAuditEvent("check", 350, 352);
assertWithMessage("Event is not suppressed").that(SuppressWarningsHolder.isSuppressed(event)).isFalse();
}
Aggregations