Issue 56715: Unit tests for Include/ExcludeMessageFilter
@@ -102,6 +102,16 @@ class RegexpFilterTest {
verify(filterBuilder).setIncludeModuleNameFilter(PATTERN);
}
+ @Test
+ void shouldCallIncludeMessageMethod() {
+ RegexpFilter filter = new IncludeMessage(PATTERN);
+
+ IssueFilterBuilder filterBuilder = mock(IssueFilterBuilder.class);
+ filter.apply(filterBuilder);
+
+ verify(filterBuilder).setIncludeMessageFilter(PATTERN);
+ }
+
@Test
void shouldCallExcludeCategoryMethod() {
RegexpFilter filter = new ExcludeCategory(PATTERN);
@@ -152,4 +162,13 @@ class RegexpFilterTest {
verify(filterBuilder).setExcludeModuleNameFilter(PATTERN);
}
+ @Test
+ void shouldCallExcludeMessageMethod() {
+ RegexpFilter filter = new ExcludeMessage(PATTERN);
+
+ IssueFilterBuilder filterBuilder = mock(IssueFilterBuilder.class);
+ filter.apply(filterBuilder);
+
+ verify(filterBuilder).setExcludeMessageFilter(PATTERN);
+ }
}
\ No newline at end of file
