1 /*
2 * SPDX-FileCopyrightText: Copyright (c) 2011-2026 Yegor Bugayenko
3 * SPDX-License-Identifier: MIT
4 */
5 package com.qulice.pmd;
6
7 import org.hamcrest.Matchers;
8 import org.junit.jupiter.api.Test;
9
10 /**
11 * Test case for {@link PmdValidator}'s recognition of the
12 * {@code io.github.artsok.RepeatedIfExceptionsTest} annotation
13 * as a test method, so the class is not flagged under
14 * {@code TestClassWithoutTestCases}.
15 *
16 * @since 0.25.1
17 */
18 final class PmdTestClassWithoutTestCasesTest {
19
20 @Test
21 void recognisesArtsokRepeatedIfExceptionsTest() throws Exception {
22 new PmdAssert(
23 "RepeatedIfExceptionsTest.java",
24 Matchers.any(Boolean.class),
25 Matchers.not(
26 Matchers.containsString("TestClassWithoutTestCases")
27 )
28 ).assertOk();
29 }
30 }