30
30
package com .qulice .pmd ;
31
31
32
32
import org .hamcrest .Matchers ;
33
+ import org .hamcrest .collection .IsIn ;
33
34
import org .hamcrest .core .IsEqual ;
35
+ import org .hamcrest .core .IsSame ;
34
36
import org .hamcrest .core .StringContains ;
37
+ import org .hamcrest .object .HasToString ;
35
38
import org .junit .Ignore ;
36
39
import org .junit .Test ;
37
40
@@ -65,8 +68,8 @@ public final class UseStringIsEmptyRuleTest {
65
68
@ Test
66
69
public void detectsLengthLessThanOne () throws Exception {
67
70
new PmdAssert (
68
- "StringLengthLessThanOne.java" , Matchers . is (false ),
69
- Matchers . containsString (
71
+ "StringLengthLessThanOne.java" , new IsEqual <> (false ),
72
+ new StringContains (
70
73
UseStringIsEmptyRuleTest .ERR_MESSAGE
71
74
)
72
75
).validate ();
@@ -80,8 +83,8 @@ public void detectsLengthLessThanOne() throws Exception {
80
83
@ Test
81
84
public void detectsLengthGreaterThanZero () throws Exception {
82
85
new PmdAssert (
83
- "StringLengthGreaterThanZero.java" , Matchers . is (false ),
84
- Matchers . containsString (
86
+ "StringLengthGreaterThanZero.java" , new IsEqual <> (false ),
87
+ new StringContains (
85
88
UseStringIsEmptyRuleTest .ERR_MESSAGE
86
89
)
87
90
).validate ();
@@ -94,8 +97,8 @@ public void detectsLengthGreaterThanZero() throws Exception {
94
97
@ Test
95
98
public void detectsLengthEqualsZero () throws Exception {
96
99
new PmdAssert (
97
- "StringLengthEqualsZero.java" , Matchers . is (false ),
98
- Matchers . containsString (
100
+ "StringLengthEqualsZero.java" , new IsEqual <> (false ),
101
+ new StringContains (
99
102
UseStringIsEmptyRuleTest .ERR_MESSAGE
100
103
)
101
104
).validate ();
@@ -109,8 +112,8 @@ public void detectsLengthEqualsZero() throws Exception {
109
112
@ Test
110
113
public void detectsLengthNotEqualsZero () throws Exception {
111
114
new PmdAssert (
112
- "StringLengthNotEqualsZero.java" , Matchers . is (false ),
113
- Matchers . containsString (
115
+ "StringLengthNotEqualsZero.java" , new IsEqual <> (false ),
116
+ new StringContains (
114
117
UseStringIsEmptyRuleTest .ERR_MESSAGE
115
118
)
116
119
).validate ();
@@ -124,8 +127,8 @@ public void detectsLengthNotEqualsZero() throws Exception {
124
127
@ Test
125
128
public void detectsLengthGreaterOrEqualZero () throws Exception {
126
129
new PmdAssert (
127
- "StringLengthGreaterOrEqualZero.java" , Matchers . is (false ),
128
- Matchers . containsString (
130
+ "StringLengthGreaterOrEqualZero.java" , new IsEqual <> (false ),
131
+ new StringContains (
129
132
UseStringIsEmptyRuleTest .ERR_MESSAGE
130
133
)
131
134
).validate ();
@@ -139,8 +142,8 @@ public void detectsLengthGreaterOrEqualZero() throws Exception {
139
142
@ Test
140
143
public void detectsLengthGreaterOrEqualOne () throws Exception {
141
144
new PmdAssert (
142
- "StringLengthGreaterOrEqualOne.java" , Matchers . is (false ),
143
- Matchers . containsString (
145
+ "StringLengthGreaterOrEqualOne.java" , new IsEqual <> (false ),
146
+ new StringContains (
144
147
UseStringIsEmptyRuleTest .ERR_MESSAGE
145
148
)
146
149
).validate ();
@@ -154,8 +157,8 @@ public void detectsLengthGreaterOrEqualOne() throws Exception {
154
157
@ Test
155
158
public void detectsLengthLessOrEqualZero () throws Exception {
156
159
new PmdAssert (
157
- "StringLengthLessOrEqualZero.java" , Matchers . is (false ),
158
- Matchers . containsString (
160
+ "StringLengthLessOrEqualZero.java" , new IsEqual <> (false ),
161
+ new StringContains (
159
162
UseStringIsEmptyRuleTest .ERR_MESSAGE
160
163
)
161
164
).validate ();
0 commit comments