assertion -> assertThat inspection: fix template for assertFalse (IDEA-167545)

This commit is contained in:
Dmitry Batkovich
2017-02-09 10:38:15 +03:00
parent 82a060b316
commit db79567112
2 changed files with 3 additions and 3 deletions
@@ -58,7 +58,7 @@ public class MigrateAssertToMatcherAssertInspection extends LocalInspectionTool
ASSERT_METHODS.put("assertNotNull", Pair.create("$obj$", "$obj$, org.hamcrest.CoreMatchers.notNullValue()"));
ASSERT_METHODS.put("assertNull", Pair.create("$obj$", "$obj$, org.hamcrest.CoreMatchers.nullValue()"));
ASSERT_METHODS.put("assertTrue", Pair.create("$cond$", "$cond$, org.hamcrest.CoreMatchers.is(true)"));
ASSERT_METHODS.put("assertFalse", Pair.create("$cond$", "$cond$, org.hamcrest.CoreMatchers.not(org.hamcrest.CoreMatchers.is(false))"));
ASSERT_METHODS.put("assertFalse", Pair.create("$cond$", "$cond$, org.hamcrest.CoreMatchers.is(false)"));
}
public boolean myStaticallyImportMatchers = true;
@@ -13,8 +13,8 @@ public class TestCase {
Assert.assertThat(2, org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo(3));
Assert.assertThat(2, org.hamcrest.number.OrderingComparison.lessThanOrEqualTo(3));
Assert.assertThat(2 != 3, not(is(false)));
Assert.assertThat(2 == 3, not(is(false)));
Assert.assertThat(2 != 3, is(false));
Assert.assertThat(2 == 3, is(false));
Assert.assertThat(2, org.hamcrest.number.OrderingComparison.lessThanOrEqualTo(3));
Assert.assertThat(2, org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo(3));
Assert.assertThat(2, org.hamcrest.number.OrderingComparison.lessThan(3));