org.assertj.core.api.Assertions.assertThat-s



API Populatity

18 Client projects

Project: org.assertj

Package: org.assertj.core

Project SonarSource/sonarqube in file ...migrations.v51.RemoveRuleMeasuresOnIssuesTest.java (2015-02-04)
@@ -26,8 +26,6 @@ import org.junit.Test;
 import org.sonar.core.persistence.DbTester;
 import org.sonar.server.db.migrations.DatabaseMigration;
 
-import static org.assertj.core.api.Assertions.assertThat;
-
 public class RemoveRuleMeasuresOnIssuesTest {
 
   @ClassRule
@@ -48,7 +46,7 @@ public class RemoveRuleMeasuresOnIssuesTest {
 
     migration.execute();
 
-    assertThat(db.countRowsOfTable("project_measures")).isEqualTo(0);
+    db.assertDbUnit(getClass(), "execute-result.xml", "project_measures");
   }
 
   @Test
Project SonarSource/sonarqube in file ...migrations.v51.RemoveRuleMeasuresOnIssuesTest.java (2015-02-06)
@@ -26,6 +26,8 @@ import org.junit.Test;
 import org.sonar.core.persistence.DbTester;
 import org.sonar.server.db.migrations.DatabaseMigration;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
 public class RemoveRuleMeasuresOnIssuesTest {
 
   @ClassRule
@@ -46,7 +48,7 @@ public class RemoveRuleMeasuresOnIssuesTest {
 
     migration.execute();
 
-    db.assertDbUnit(getClass(), "execute-result.xml", "project_measures");
+    assertThat(db.countRowsOfTable("project_measures")).isEqualTo(0);
   }
 
   @Test
Project cgeo/cgeo in file ...hing.apps.cache.navi.NavigationAppFactoryTest.java (2014-04-22)
@@ -1,5 +1,7 @@
 package cgeo.geocaching.apps.cache.navi;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
 import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
 
 import java.util.HashSet;
@@ -13,7 +15,7 @@ public class NavigationAppFactoryTest extends TestCase {
         for (NavigationAppsEnum navigationApp : NavigationAppsEnum.values()) {
             idSet.add(navigationApp.id);
         }
-        assertEquals("Duplicate id in " + NavigationAppsEnum.class.getSimpleName(), NavigationAppsEnum.values().length, idSet.size());
+        assertThat(idSet).doesNotHaveDuplicates();
     }
 
 }