1
2
3
4
5 package com.qulice.pmd;
6
7 import org.hamcrest.core.IsEqual;
8 import org.hamcrest.core.StringContains;
9 import org.junit.jupiter.api.Assertions;
10 import org.junit.jupiter.api.Test;
11
12
13
14
15
16
17
18
19 final class PmdUseStringIsEmptyNpeTest {
20
21 @Test
22 void doesNotThrowNullPointerOnPatternMatching() {
23 Assertions.assertDoesNotThrow(
24 () -> new PmdAssert(
25 "UseStringIsEmptyRuleFailsOnPatternMatching.java",
26 new IsEqual<>(false),
27 new StringContains("UnusedLocalVariable")
28 ).assertOk()
29 );
30 }
31 }