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 final class PmdUseStringIsEmptyNpeTest {
19
20 @Test
21 void doesNotThrowNullPointerOnPatternMatching() {
22 Assertions.assertDoesNotThrow(
23 () -> new PmdAssert(
24 "UseStringIsEmptyRuleFailsOnPatternMatching.java",
25 new IsEqual<>(false),
26 new StringContains("UnusedLocalVariable")
27 ).assertOk()
28 );
29 }
30 }