Skip to content

Commit

Permalink
For #1000: Corrected mathcers
Browse files Browse the repository at this point in the history
  • Loading branch information
paulodamaso committed Jan 25, 2019
1 parent 12b3e74 commit a7f55e5
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
package com.qulice.pmd;

import org.hamcrest.Matchers;
import org.hamcrest.collection.IsIn;
import org.hamcrest.core.IsEqual;
import org.hamcrest.core.IsSame;
import org.hamcrest.core.StringContains;
import org.hamcrest.object.HasToString;
import org.junit.Ignore;
import org.junit.Test;

Expand Down Expand Up @@ -65,8 +68,8 @@ public final class UseStringIsEmptyRuleTest {
@Test
public void detectsLengthLessThanOne() throws Exception {
new PmdAssert(
"StringLengthLessThanOne.java", Matchers.is(false),
Matchers.containsString(
"StringLengthLessThanOne.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand All @@ -80,8 +83,8 @@ public void detectsLengthLessThanOne() throws Exception {
@Test
public void detectsLengthGreaterThanZero() throws Exception {
new PmdAssert(
"StringLengthGreaterThanZero.java", Matchers.is(false),
Matchers.containsString(
"StringLengthGreaterThanZero.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand All @@ -94,8 +97,8 @@ public void detectsLengthGreaterThanZero() throws Exception {
@Test
public void detectsLengthEqualsZero() throws Exception {
new PmdAssert(
"StringLengthEqualsZero.java", Matchers.is(false),
Matchers.containsString(
"StringLengthEqualsZero.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand All @@ -109,8 +112,8 @@ public void detectsLengthEqualsZero() throws Exception {
@Test
public void detectsLengthNotEqualsZero() throws Exception {
new PmdAssert(
"StringLengthNotEqualsZero.java", Matchers.is(false),
Matchers.containsString(
"StringLengthNotEqualsZero.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand All @@ -124,8 +127,8 @@ public void detectsLengthNotEqualsZero() throws Exception {
@Test
public void detectsLengthGreaterOrEqualZero() throws Exception {
new PmdAssert(
"StringLengthGreaterOrEqualZero.java", Matchers.is(false),
Matchers.containsString(
"StringLengthGreaterOrEqualZero.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand All @@ -139,8 +142,8 @@ public void detectsLengthGreaterOrEqualZero() throws Exception {
@Test
public void detectsLengthGreaterOrEqualOne() throws Exception {
new PmdAssert(
"StringLengthGreaterOrEqualOne.java", Matchers.is(false),
Matchers.containsString(
"StringLengthGreaterOrEqualOne.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand All @@ -154,8 +157,8 @@ public void detectsLengthGreaterOrEqualOne() throws Exception {
@Test
public void detectsLengthLessOrEqualZero() throws Exception {
new PmdAssert(
"StringLengthLessOrEqualZero.java", Matchers.is(false),
Matchers.containsString(
"StringLengthLessOrEqualZero.java", new IsEqual<>(false),
new StringContains(
UseStringIsEmptyRuleTest.ERR_MESSAGE
)
).validate();
Expand Down

0 comments on commit a7f55e5

Please sign in to comment.