diff options
840 files changed, 1323 insertions, 1419 deletions
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java index a1bf3abf804..0e312383c2c 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java @@ -21,7 +21,7 @@ package org.sonar.plugins.core; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CorePluginTest { @Test diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/DefaultResourceTypesTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/DefaultResourceTypesTest.java index 29fde147b42..55817f9baeb 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/DefaultResourceTypesTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/DefaultResourceTypesTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceTypeTree; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultResourceTypesTest { @Test diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/UserManagedMetricsTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/UserManagedMetricsTest.java index 40d94938378..97a9e218b74 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/UserManagedMetricsTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/UserManagedMetricsTest.java @@ -24,7 +24,7 @@ import org.sonar.api.measures.Metric; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserManagedMetricsTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboardTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboardTest.java index b5f79bb88de..a89ebdbfa59 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboardTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboardTest.java @@ -34,7 +34,7 @@ import org.sonar.plugins.core.widgets.measures.MeasureFilterListWidget; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectDefaultDashboardTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectDefaultDashboardTest.java index ad3afee325c..ec6bea6406b 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectDefaultDashboardTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectDefaultDashboardTest.java @@ -24,7 +24,7 @@ import org.sonar.api.web.Dashboard; import org.sonar.api.web.DashboardLayout; import org.sonar.plugins.core.CorePlugin; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectDefaultDashboardTest { ProjectDefaultDashboard template = new ProjectDefaultDashboard(); diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectIssuesDashboardTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectIssuesDashboardTest.java index 25bff8ef637..364c0d8f1df 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectIssuesDashboardTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectIssuesDashboardTest.java @@ -25,7 +25,7 @@ import org.sonar.api.web.Dashboard; import org.sonar.api.web.DashboardLayout; import org.sonar.plugins.core.CorePlugin; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectIssuesDashboardTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectTimeMachineDashboardTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectTimeMachineDashboardTest.java index ad9fafd0574..e207bfe2be8 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectTimeMachineDashboardTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/ProjectTimeMachineDashboardTest.java @@ -25,7 +25,7 @@ import org.sonar.api.web.Dashboard.Widget; import org.sonar.api.web.DashboardLayout; import org.sonar.plugins.core.CorePlugin; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectTimeMachineDashboardTest { ProjectTimeMachineDashboard template = new ProjectTimeMachineDashboard(); diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountFalsePositivesDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountFalsePositivesDecoratorTest.java index b6170a01723..cb8007f0b81 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountFalsePositivesDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountFalsePositivesDecoratorTest.java @@ -33,7 +33,7 @@ import org.sonar.java.api.JavaClass; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class CountFalsePositivesDecoratorTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecoratorTest.java index 10513e64918..be9b8ae586c 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecoratorTest.java @@ -49,7 +49,7 @@ import java.util.Date; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyDouble; import static org.mockito.Matchers.argThat; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesSensorTest.java index ea27308e778..e1c70330963 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesSensorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesSensorTest.java @@ -25,7 +25,7 @@ import org.sonar.api.resources.Project; import org.sonar.core.issue.db.IssueChangeDao; import org.sonar.core.issue.db.IssueDao; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesStackTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesStackTest.java index 08cb3cfc3d6..ed7782e138b 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesStackTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/InitialOpenIssuesStackTest.java @@ -36,7 +36,7 @@ import java.io.IOException; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class InitialOpenIssuesStackTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java index f9a9c64eef3..45cc268f96e 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingDecoratorTest.java @@ -53,7 +53,7 @@ import java.util.Collections; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyCollection; import static org.mockito.Matchers.anyString; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java index bef10585986..7fb8b6a9103 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java @@ -39,7 +39,7 @@ import java.util.Arrays; import java.util.Collections; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/SourceHashHolderTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/SourceHashHolderTest.java index 5c9c9c9a5ce..c9942c852b4 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/SourceHashHolderTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/SourceHashHolderTest.java @@ -28,7 +28,7 @@ import org.sonar.batch.scan.LastLineHashes; import static org.apache.commons.codec.digest.DigestUtils.md5; import static org.apache.commons.codec.digest.DigestUtils.md5Hex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/ChangesOnMyIssueNotificationDispatcherTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/ChangesOnMyIssueNotificationDispatcherTest.java index 5acb7c37dd2..4dcf50b80e0 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/ChangesOnMyIssueNotificationDispatcherTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/ChangesOnMyIssueNotificationDispatcherTest.java @@ -28,7 +28,7 @@ import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.sonar.api.notifications.*; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest.java index 2e317cbcef0..de29cf1ac29 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest.java @@ -33,7 +33,7 @@ import org.sonar.api.user.User; import org.sonar.api.user.UserFinder; import org.sonar.plugins.emailnotifications.api.EmailMessage; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewFalsePositiveNotificationDispatcherTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewFalsePositiveNotificationDispatcherTest.java index 721cd69da82..91520d22c18 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewFalsePositiveNotificationDispatcherTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewFalsePositiveNotificationDispatcherTest.java @@ -28,7 +28,7 @@ import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.sonar.api.notifications.*; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; import static org.mockito.Mockito.verifyNoMoreInteractions; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java index 14df710a9bd..ff7777cc39d 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java @@ -31,7 +31,7 @@ import org.sonar.plugins.emailnotifications.api.EmailMessage; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/SendIssueNotificationsPostJobTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/SendIssueNotificationsPostJobTest.java index 60eb45659bd..5b3e5eb413a 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/SendIssueNotificationsPostJobTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/SendIssueNotificationsPostJobTest.java @@ -41,7 +41,7 @@ import org.sonar.core.issue.IssuesBySeverity; import java.util.Arrays; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Matchers.eq; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/IssueTrackingBlocksRecognizerTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/IssueTrackingBlocksRecognizerTest.java index d48126b7d0c..55d84685253 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/IssueTrackingBlocksRecognizerTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/IssueTrackingBlocksRecognizerTest.java @@ -21,7 +21,7 @@ package org.sonar.plugins.core.issue.tracking; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueTrackingBlocksRecognizerTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/RollingFileHashesTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/RollingFileHashesTest.java index db1050c761b..50c3d0eefa0 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/RollingFileHashesTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/tracking/RollingFileHashesTest.java @@ -22,7 +22,7 @@ package org.sonar.plugins.core.issue.tracking; import org.junit.Test; import static org.apache.commons.codec.digest.DigestUtils.md5Hex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RollingFileHashesTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/MyFavouritesFilterTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/MyFavouritesFilterTest.java index f93a49f1dde..3c894cdb439 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/MyFavouritesFilterTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/MyFavouritesFilterTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.web.Filter; import org.sonar.plugins.core.CorePlugin; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MyFavouritesFilterTest { @Test diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/ProjectFilterTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/ProjectFilterTest.java index 80e33c06687..9e7a96a5781 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/ProjectFilterTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/measurefilters/ProjectFilterTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.web.Filter; import org.sonar.plugins.core.CorePlugin; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectFilterTest { @Test diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java index ff67d9a1659..dd551860aa7 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.resources.Project; import org.sonar.api.security.ResourcePermissions; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class ApplyProjectRolesDecoratorTest { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java index 4ca1bd15a5e..1db7fca5f62 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Scopes; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.anyDouble; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageMeasurementFilterTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageMeasurementFilterTest.java index 072dea5844e..85ca73d04bf 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageMeasurementFilterTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageMeasurementFilterTest.java @@ -29,7 +29,7 @@ import org.sonar.api.resources.File; import org.sonar.api.resources.Resource; import org.sonar.core.config.ExclusionProperties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FileHashSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FileHashSensorTest.java index 3044ef773ab..f0c32fad7c5 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FileHashSensorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FileHashSensorTest.java @@ -34,7 +34,7 @@ import org.sonar.core.source.SnapshotDataTypes; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FilesDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FilesDecoratorTest.java index a7a38e4b346..76cb6ab8c82 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FilesDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/FilesDecoratorTest.java @@ -34,7 +34,7 @@ import org.sonar.api.resources.Resource; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyDouble; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java index 3ceb343672a..78cbe32cfaa 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Scopes; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyDouble; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java index ccb7abcf907..e88e72596ed 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Scopes; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.anyDouble; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java index 4b89904efee..87dd7f9ae6d 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Scopes; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.anyDouble; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java index e4dbb3dbc94..c7c36505448 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Scopes; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyDouble; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java index 1b3c0db8a18..988094c2315 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Scopes; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.anyDouble; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java index bf93fc11e6f..0d51d4a55ac 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java @@ -31,7 +31,7 @@ import org.sonar.core.i18n.DefaultI18n; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.*; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java index 007fb9c083b..966b6475ca9 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.resources.Project; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.doubleThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java index f283585e5bf..ae1e8630786 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TendencyAnalyserTest { static TendencyAnalyser.SlopeData analyse(Double... values) { diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java index c7c1876bf6c..4f6569e08cd 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java @@ -41,7 +41,7 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase; import java.util.Arrays; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/widgets/CoreWidgetsTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/widgets/CoreWidgetsTest.java index 0bed91fc0a5..0cf8aeb9eb0 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/widgets/CoreWidgetsTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/widgets/CoreWidgetsTest.java @@ -34,7 +34,7 @@ import java.util.Collection; import java.util.Set; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CoreWidgetsTest { @@ -83,7 +83,7 @@ public class CoreWidgetsTest { @Test public void should_be_registered_as_an_extension() { for (CoreWidget widget : widgets()) { - assertThat(new CorePlugin().getExtensions()).as("Widget not registered: " + widget.getClass()).contains(widget.getClass()); + assertThat(new CorePlugin().getExtensions()).contains(widget.getClass()); } } diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java index 7d1bbeb4a5c..29308bf2e5f 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java @@ -21,7 +21,7 @@ package org.sonar.plugins.cpd; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CpdPluginTest { diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java index 7724fa6f725..660d7c142ce 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java @@ -28,7 +28,7 @@ import org.sonar.api.resources.Java; import org.sonar.batch.duplication.BlockCache; import org.sonar.plugins.cpd.index.IndexFactory; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class CpdSensorTest { diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/DefaultCpdEngineTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/DefaultCpdEngineTest.java index 6dc28f4e64d..8ecac586a3b 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/DefaultCpdEngineTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/DefaultCpdEngineTest.java @@ -26,7 +26,7 @@ import org.sonar.api.config.Settings; import org.sonar.api.resources.Project; import org.sonar.batch.duplication.BlockCache; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/index/IndexFactoryTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/index/IndexFactoryTest.java index e97ab77daf7..2dc24d171d5 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/index/IndexFactoryTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/index/IndexFactoryTest.java @@ -30,7 +30,7 @@ import org.sonar.batch.bootstrap.AnalysisMode; import org.sonar.batch.index.ResourceCache; import org.sonar.core.duplication.DuplicationDao; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/medium/CpdMediumTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/medium/CpdMediumTest.java index c864f996438..44de4e1e576 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/medium/CpdMediumTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/medium/CpdMediumTest.java @@ -39,7 +39,7 @@ import java.io.File; import java.io.IOException; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CpdMediumTest { diff --git a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationChannelTest.java b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationChannelTest.java index c413d352399..cd7113e44e0 100644 --- a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationChannelTest.java +++ b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationChannelTest.java @@ -37,7 +37,7 @@ import java.net.ServerSocket; import java.util.List; import static junit.framework.Assert.fail; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationsPluginTest.java b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationsPluginTest.java index 1343bf889ba..1043f27773e 100644 --- a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationsPluginTest.java +++ b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/EmailNotificationsPluginTest.java @@ -21,7 +21,7 @@ package org.sonar.plugins.emailnotifications; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EmailNotificationsPluginTest { @Test diff --git a/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitPluginTest.java b/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitPluginTest.java index d175cdcbe91..caccdf6632e 100644 --- a/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitPluginTest.java +++ b/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitPluginTest.java @@ -21,7 +21,7 @@ package org.sonar.plugins.scm.git; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GitPluginTest { diff --git a/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitScmProviderTest.java b/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitScmProviderTest.java index 12db816ee9c..09a54b15499 100644 --- a/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitScmProviderTest.java +++ b/plugins/sonar-git-plugin/src/test/java/org/sonar/plugins/scm/git/GitScmProviderTest.java @@ -28,7 +28,7 @@ import org.sonar.api.scan.filesystem.PathResolver; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GitScmProviderTest { diff --git a/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java index b61b2fdc608..f086398dd62 100644 --- a/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java +++ b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java @@ -22,7 +22,7 @@ package org.sonar.plugins.l10n; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EnglishPackPluginTest { @Test diff --git a/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnBlameCommandTest.java b/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnBlameCommandTest.java index f306fe3fc60..6b0ce9aa09e 100644 --- a/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnBlameCommandTest.java +++ b/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnBlameCommandTest.java @@ -46,7 +46,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyLong; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnPluginTest.java b/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnPluginTest.java index 745067f838e..cc4af84faf8 100644 --- a/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnPluginTest.java +++ b/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnPluginTest.java @@ -21,7 +21,7 @@ package org.sonar.plugins.scm.svn; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SvnPluginTest { diff --git a/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnScmProviderTest.java b/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnScmProviderTest.java index 36359e68f41..89da5df4b18 100644 --- a/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnScmProviderTest.java +++ b/plugins/sonar-svn-plugin/src/test/java/org/sonar/plugins/scm/svn/SvnScmProviderTest.java @@ -27,7 +27,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class SvnScmProviderTest { diff --git a/plugins/sonar-xoo-plugin/pom.xml b/plugins/sonar-xoo-plugin/pom.xml index 618ba6124c7..32fc1f0adf4 100644 --- a/plugins/sonar-xoo-plugin/pom.xml +++ b/plugins/sonar-xoo-plugin/pom.xml @@ -37,20 +37,10 @@ <!-- unit testing --> <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> <scope>test</scope> </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> </dependencies> <build> diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java index d5913f277a8..a1685820fcc 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java @@ -21,7 +21,7 @@ package org.sonar.xoo; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class XooPluginTest { diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java index 31d109e3653..7a80fc56d57 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java @@ -34,7 +34,7 @@ import org.sonar.api.batch.sensor.issue.internal.DefaultIssue; import org.sonar.api.config.Settings; import org.sonar.xoo.Xoo; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java index 184e8d47074..8f52bb8d36e 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.server.debt.DebtRemediationFunction; import org.sonar.api.server.rule.RulesDefinition; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class XooRulesDefinitionTest { @@ -917,9 +917,9 @@ </exclusions> </dependency> <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> - <version>1.4</version> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>1.7.0</version> </dependency> <dependency> <groupId>xpp3</groupId> diff --git a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaCommandTest.java b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaCommandTest.java index 689f061ff06..c6e96e1e3f4 100644 --- a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaCommandTest.java +++ b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaCommandTest.java @@ -26,7 +26,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class JavaCommandTest { diff --git a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaProcessLauncherTest.java b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaProcessLauncherTest.java index 80def695fb1..f88481019c8 100644 --- a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaProcessLauncherTest.java +++ b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/JavaProcessLauncherTest.java @@ -21,8 +21,8 @@ package org.sonar.process.monitor; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class JavaProcessLauncherTest { diff --git a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java index 289b371c46c..46200f45b7b 100644 --- a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java +++ b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java @@ -37,8 +37,8 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class MonitorTest { diff --git a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/TimeoutsTest.java b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/TimeoutsTest.java index dc5e63055ae..be954cb149f 100644 --- a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/TimeoutsTest.java +++ b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/TimeoutsTest.java @@ -21,7 +21,7 @@ package org.sonar.process.monitor; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TimeoutsTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java b/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java index 8350eafaa3e..58e4d594fea 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java @@ -32,8 +32,8 @@ import java.io.File; import java.security.InvalidKeyException; import java.security.Key; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class AesCipherTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java b/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java index cd92bbf4e7e..6ed9dc357cb 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java @@ -30,8 +30,8 @@ import java.io.File; import java.util.Map; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ConfigurationUtilsTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/LifecycleTest.java b/server/sonar-process/src/test/java/org/sonar/process/LifecycleTest.java index 0ab9f3a29ba..11b267b3e77 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/LifecycleTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/LifecycleTest.java @@ -21,7 +21,7 @@ package org.sonar.process; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.process.Lifecycle.State; public class LifecycleTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/LoopbackAddressTest.java b/server/sonar-process/src/test/java/org/sonar/process/LoopbackAddressTest.java index 8ccafff1f66..782923d9aee 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/LoopbackAddressTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/LoopbackAddressTest.java @@ -27,8 +27,8 @@ import java.net.NetworkInterface; import java.util.Collections; import java.util.Enumeration; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class LoopbackAddressTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java b/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java index 83841c79952..de339683db6 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java @@ -19,14 +19,14 @@ */ package org.sonar.process; -import org.fest.assertions.Assertions; +import org.assertj.core.api.Assertions; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import java.io.File; -import static org.fest.assertions.Fail.fail; +import static org.junit.Assert.fail; public class MinimumViableSystemTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java b/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java index 052c67d94fe..c14aa4daa9b 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java @@ -22,7 +22,7 @@ package org.sonar.process; import org.junit.Test; import org.sonar.test.TestUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NetworkUtilsTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessCommandsTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessCommandsTest.java index 984fbed74f7..0e163a8f1e3 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/ProcessCommandsTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/ProcessCommandsTest.java @@ -26,8 +26,8 @@ import org.junit.rules.TemporaryFolder; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java index e24f51b62e1..1857b7cc93b 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java @@ -32,8 +32,8 @@ import org.sonar.process.test.StandardProcess; import java.io.File; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class ProcessEntryPointTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessUtilsTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessUtilsTest.java index 1a18d5983ae..fa97e2ae2f4 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/ProcessUtilsTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/ProcessUtilsTest.java @@ -22,7 +22,7 @@ package org.sonar.process; import org.junit.Test; import org.sonar.test.TestUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProcessUtilsTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java b/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java index 25feeef39b8..8af1e96c086 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java @@ -27,8 +27,8 @@ import java.io.File; import java.io.IOException; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class PropsTest { diff --git a/server/sonar-process/src/test/java/org/sonar/process/SystemExitTest.java b/server/sonar-process/src/test/java/org/sonar/process/SystemExitTest.java index e02b07cf555..d2bb4e495c5 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/SystemExitTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/SystemExitTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.concurrent.atomic.AtomicInteger; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SystemExitTest { diff --git a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java index 8a9823eccc6..3b012798916 100644 --- a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java +++ b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java @@ -39,8 +39,8 @@ import org.sonar.process.Props; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class SearchServerTest { diff --git a/server/sonar-search/src/test/java/org/sonar/search/SearchSettingsTest.java b/server/sonar-search/src/test/java/org/sonar/search/SearchSettingsTest.java index ee24ef492a0..78828e1804f 100644 --- a/server/sonar-search/src/test/java/org/sonar/search/SearchSettingsTest.java +++ b/server/sonar-search/src/test/java/org/sonar/search/SearchSettingsTest.java @@ -31,8 +31,8 @@ import java.io.File; import java.io.IOException; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class SearchSettingsTest { diff --git a/server/sonar-search/src/test/java/org/sonar/search/script/UpdateListScriptTest.java b/server/sonar-search/src/test/java/org/sonar/search/script/UpdateListScriptTest.java index a645cb99647..d0b6a19da8b 100644 --- a/server/sonar-search/src/test/java/org/sonar/search/script/UpdateListScriptTest.java +++ b/server/sonar-search/src/test/java/org/sonar/search/script/UpdateListScriptTest.java @@ -29,8 +29,8 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class UpdateListScriptTest { diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java index 4b5eb5eeb2f..843308ca2ea 100644 --- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java +++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java @@ -38,7 +38,7 @@ import java.sql.SQLException; import java.util.Timer; import java.util.concurrent.atomic.AtomicLong; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SourceDbBenchmarkTest { diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java index 313b407ffbc..1fa0fde3b81 100644 --- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java +++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java @@ -40,7 +40,7 @@ import java.util.List; import java.util.Timer; import java.util.concurrent.atomic.AtomicLong; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Performance tests of the Elasticsearch index sourcelines diff --git a/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java index 436654e69fc..d89298a63db 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java @@ -41,7 +41,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Iterator; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActivityBackendMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java index 2bd347355dc..71fec3c117d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java @@ -43,7 +43,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Iterator; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActivityServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/activity/RubyQProfileActivityServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/activity/RubyQProfileActivityServiceTest.java index ddc33112ad5..10a2e55b65f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/activity/RubyQProfileActivityServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/activity/RubyQProfileActivityServiceTest.java @@ -39,7 +39,7 @@ import org.sonar.server.search.Result; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java index 802fba978d9..1a2cd967c17 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java @@ -35,7 +35,7 @@ import org.sonar.core.persistence.DbSession; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ActivityDaoTest extends AbstractDaoTestCase { diff --git a/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java index 3559f3cc83a..36920b23461 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java @@ -32,7 +32,7 @@ import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActivitiesWebServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/ConnectorsTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/ConnectorsTest.java index bef81bc8035..70ba503943b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/app/ConnectorsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/app/ConnectorsTest.java @@ -32,8 +32,8 @@ import java.net.InetAddress; import java.util.Map; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.argThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/WebappTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/WebappTest.java index 27dbdc6d77a..db343c6e919 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/app/WebappTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/app/WebappTest.java @@ -30,8 +30,8 @@ import org.sonar.process.Props; import java.io.File; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.RETURNS_DEEP_STUBS; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/AuthenticationWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/AuthenticationWsTest.java index e4d33fb790b..4fc95886c14 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/AuthenticationWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/AuthenticationWsTest.java @@ -25,7 +25,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AuthenticationWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java index 91d007d7a39..6fbf6aa4ce4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchIndexTest.java @@ -31,7 +31,7 @@ import org.sonar.api.platform.Server; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java index a51eee53dd0..d2a01b11f67 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java @@ -35,7 +35,7 @@ import org.sonar.server.ws.WsTester; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsActionTest.java index cffed5b6aa9..70789b842e8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsActionTest.java @@ -29,7 +29,7 @@ import org.mockito.runners.MockitoJUnitRunner; import org.sonar.batch.protocol.input.ProjectReferentials; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsLoaderMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsLoaderMediumTest.java index 42a8b6bec2b..c4ccf2ae1f2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsLoaderMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectReferentialsLoaderMediumTest.java @@ -57,8 +57,8 @@ import java.util.List; import java.util.Map; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProjectReferentialsLoaderMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentCleanerServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentCleanerServiceMediumTest.java index de5149cb00f..5c2268872f3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentCleanerServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentCleanerServiceMediumTest.java @@ -46,7 +46,7 @@ import org.sonar.server.search.IndexClient; import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ComponentCleanerServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentQueryTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentQueryTest.java index de83dd77452..0b2136f67ff 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentQueryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentQueryTest.java @@ -23,7 +23,7 @@ package org.sonar.server.component; import org.junit.Test; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ComponentQueryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentServiceMediumTest.java index f54fad6aa91..0720efa9422 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentServiceMediumTest.java @@ -20,7 +20,7 @@ package org.sonar.server.component; -import org.fest.assertions.Fail; +import org.assertj.core.api.Fail; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; @@ -45,8 +45,8 @@ import org.sonar.server.user.MockUserSession; import java.util.Arrays; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ComponentServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentsFinderSortTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentsFinderSortTest.java index 08b98c5eab7..1e2cd6f51e7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ComponentsFinderSortTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ComponentsFinderSortTest.java @@ -27,7 +27,7 @@ import org.sonar.core.component.ComponentDto; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/DefaultComponentFinderTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/DefaultComponentFinderTest.java index c1f4f5bc43c..50c4b4c4d6f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/DefaultComponentFinderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/DefaultComponentFinderTest.java @@ -28,7 +28,7 @@ import java.util.Iterator; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultComponentFinderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/DefaultRubyComponentServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/DefaultRubyComponentServiceTest.java index d41bc6beca9..b9483a0015f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/DefaultRubyComponentServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/DefaultRubyComponentServiceTest.java @@ -35,7 +35,7 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyListOf; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java index 8e3532cbe8e..ac8fafe3fe1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/db/ComponentDaoTest.java @@ -36,7 +36,7 @@ import java.util.Date; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -336,13 +336,11 @@ public class ComponentDaoTest extends AbstractDaoTestCase { // From root project List<ComponentDto> modules = dao.findChildrenModulesFromModule(session, "org.struts:struts"); - assertThat(modules).hasSize(2); - assertThat(modules).onProperty("id").containsOnly(2L, 3L); + assertThat(modules).extracting("id").containsOnly(2L, 3L); // From module modules = dao.findChildrenModulesFromModule(session, "org.struts:struts-core"); - assertThat(modules).hasSize(1); - assertThat(modules).onProperty("id").containsOnly(3L); + assertThat(modules).extracting("id").containsOnly(3L); // From sub module modules = dao.findChildrenModulesFromModule(session, "org.struts:struts-data"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/db/SnapshotDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/db/SnapshotDaoTest.java index 742cc8d8da6..897b9cf7102 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/db/SnapshotDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/db/SnapshotDaoTest.java @@ -32,7 +32,7 @@ import org.sonar.core.persistence.DbSession; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -180,7 +180,7 @@ public class SnapshotDaoTest extends AbstractDaoTestCase { List<SnapshotDto> snapshots = sut.findSnapshotAndChildrenOfProjectScope(session, defaultSnapshot().setId(1L)); assertThat(snapshots).isNotEmpty(); - assertThat(snapshots).onProperty("id").containsOnly(1L, 6L); + assertThat(snapshots).extracting("id").containsOnly(1L, 6L); } @Test @@ -190,13 +190,13 @@ public class SnapshotDaoTest extends AbstractDaoTestCase { // From root project List<SnapshotDto> snapshots = sut.findChildrenModulesFromModule(session, "org.struts:struts"); assertThat(snapshots).hasSize(2); - assertThat(snapshots).onProperty("id").containsOnly(2L, 3L); - assertThat(snapshots).onProperty("last").containsOnly(true); + assertThat(snapshots).extracting("id").containsOnly(2L, 3L); + assertThat(snapshots).extracting("last").containsOnly(true); // From module snapshots = sut.findChildrenModulesFromModule(session, "org.struts:struts-core"); assertThat(snapshots).hasSize(1); - assertThat(snapshots).onProperty("id").containsOnly(3L); + assertThat(snapshots).extracting("id").containsOnly(3L); // From sub module snapshots = sut.findChildrenModulesFromModule(session, "org.struts:struts-data"); @@ -213,9 +213,9 @@ public class SnapshotDaoTest extends AbstractDaoTestCase { List<SnapshotDto> snapshots = sut.findSnapshotAndChildrenOfProjectScope(session, snapshot); assertThat(snapshots).hasSize(2); - assertThat(snapshots).onProperty("id").containsOnly(1L, 6L); - assertThat(snapshots).onProperty("last").containsOnly(false); - assertThat(snapshots).onProperty("status").containsOnly(SnapshotDto.STATUS_PROCESSED); + assertThat(snapshots).extracting("id").containsOnly(1L, 6L); + assertThat(snapshots).extracting("last").containsOnly(false); + assertThat(snapshots).extracting("status").containsOnly(SnapshotDto.STATUS_PROCESSED); } @Test @@ -228,8 +228,8 @@ public class SnapshotDaoTest extends AbstractDaoTestCase { List<SnapshotDto> snapshots = sut.findSnapshotAndChildrenOfProjectScope(session, snapshot); assertThat(snapshots).hasSize(2); - assertThat(snapshots).onProperty("id").containsOnly(1L, 6L); - assertThat(snapshots).onProperty("last").containsOnly(false); + assertThat(snapshots).extracting("id").containsOnly(1L, 6L); + assertThat(snapshots).extracting("last").containsOnly(false); } @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java index 4f1ddb7aeb6..6060174b54e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java @@ -50,7 +50,7 @@ import java.util.List; import java.util.Locale; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyListOf; import static org.mockito.Matchers.anyString; diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentsWsTest.java index 0119854b736..0e88b962bec 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentsWsTest.java @@ -29,7 +29,7 @@ import org.sonar.api.utils.Durations; import org.sonar.server.db.DbClient; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ComponentsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/EventsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/EventsWsTest.java index 16fbad5bce7..4246751004b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/EventsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/EventsWsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EventsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java index 9a978d15338..162fc47f59d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ResourcesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ResourcesWsTest.java index 497a9fa5fcf..ddf33774804 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ResourcesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ResourcesWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResourcesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportLogMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportLogMediumTest.java index 0b39ea16aca..200aa32f00e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportLogMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportLogMediumTest.java @@ -38,7 +38,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.core.activity.Activity.Type.ANALYSIS_REPORT; import static org.sonar.core.computation.db.AnalysisReportDto.Status.FAILED; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportQueueMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportQueueMediumTest.java index 27517509500..2b76903a7ca 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportQueueMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportQueueMediumTest.java @@ -42,7 +42,7 @@ import org.sonar.server.user.MockUserSession; import java.io.InputStream; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.core.computation.db.AnalysisReportDto.Status.SUCCESS; import static org.sonar.core.computation.db.AnalysisReportDto.Status.WORKING; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportServiceTest.java index 8c2cd60fc71..875ace20192 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportServiceTest.java @@ -37,7 +37,7 @@ import org.sonar.core.persistence.MyBatis; import java.io.File; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageFactoryTest.java index 492e71a44dc..87bc106e734 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageFactoryTest.java @@ -27,7 +27,7 @@ import org.sonar.core.issue.db.IssueStorage; import org.sonar.core.persistence.MyBatis; import org.sonar.server.db.DbClient; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ComputeEngineIssueStorageFactoryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageTest.java index 933ff910566..341d03becd3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ComputeEngineIssueStorageTest.java @@ -48,7 +48,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/db/AnalysisReportDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/db/AnalysisReportDaoTest.java index 501c5351620..436bfdb8c44 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/db/AnalysisReportDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/db/AnalysisReportDaoTest.java @@ -39,7 +39,7 @@ import java.io.File; import java.io.InputStream; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.core.computation.db.AnalysisReportDto.Status.PENDING; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepRegistryTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepRegistryTest.java index 5db55fa8dad..eece386a927 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepRegistryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/step/ComputationStepRegistryTest.java @@ -23,8 +23,8 @@ package org.sonar.server.computation.step; import org.junit.Test; import org.sonar.server.source.IndexSourceLinesStep; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class ComputationStepRegistryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/step/PurgeDatastoresStepMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/step/PurgeDatastoresStepMediumTest.java index 21b6b02d4a4..124c1fa1fd8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/step/PurgeDatastoresStepMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/step/PurgeDatastoresStepMediumTest.java @@ -42,7 +42,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PurgeDatastoresStepMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java index 4330952f233..02b436940f0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComputationWebServiceTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.RequestHandler; import org.sonar.api.server.ws.WebService; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ComputationWebServiceTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/HistoryWsActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/HistoryWsActionMediumTest.java index a5129ddee25..51e8ca6c117 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/HistoryWsActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/HistoryWsActionMediumTest.java @@ -47,7 +47,7 @@ import org.sonar.server.ws.WsTester; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * TODO replace this medium test by a small test diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java index e975b07069d..346d871631f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/IsQueueEmptyWebServiceTest.java @@ -32,7 +32,7 @@ import java.io.ByteArrayOutputStream; import java.io.OutputStream; import java.util.ArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java index 9ab7d2b213a..3618bcefda6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java @@ -30,7 +30,7 @@ import org.sonar.server.ws.WsTester; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.core.computation.db.AnalysisReportDto.Status.PENDING; diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java index 98a18eccd13..b3cff05cacd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitReportWsActionTest.java @@ -29,7 +29,7 @@ import org.sonar.server.ws.WsTester; import java.io.InputStream; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class SubmitReportWsActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/config/ws/PropertiesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/config/ws/PropertiesWsTest.java index ec6ed930d71..3cec6c83eb5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/config/ws/PropertiesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/config/ws/PropertiesWsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PropertiesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/BaseDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/BaseDaoTest.java index 19ac5038335..2d825b1a423 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/BaseDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/BaseDaoTest.java @@ -37,7 +37,7 @@ import org.sonar.test.DbTests; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class BaseDaoTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/DatabaseCheckerTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/DatabaseCheckerTest.java index c4c5844e68e..6889c71da67 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/DatabaseCheckerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/DatabaseCheckerTest.java @@ -29,8 +29,8 @@ import org.sonar.core.persistence.dialect.Oracle; import java.sql.SQLException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/DbClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/DbClientTest.java index 2074349b439..878a8b79a6e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/DbClientTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/DbClientTest.java @@ -31,7 +31,7 @@ import org.sonar.server.qualityprofile.db.ActiveRuleDao; import org.sonar.server.rule.db.RuleDao; import org.sonar.test.DbTests; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class DbClientTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/EmbeddedDatabaseTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/EmbeddedDatabaseTest.java index 055d9223acb..29edb659620 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/EmbeddedDatabaseTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/EmbeddedDatabaseTest.java @@ -33,7 +33,7 @@ import java.io.IOException; import java.sql.DriverManager; import static junit.framework.Assert.fail; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EmbeddedDatabaseTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/ResultSetIteratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/ResultSetIteratorTest.java index bfc7a43c3ac..df297adf618 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/ResultSetIteratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/ResultSetIteratorTest.java @@ -34,8 +34,8 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.NoSuchElementException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; @Category(DbTests.class) public class ResultSetIteratorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java index 141c536da4b..09a5c0a11c4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java @@ -33,8 +33,8 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; @Category(DbTests.class) public class BaseDataChangeTest extends AbstractDaoTestCase { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigrationsTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigrationsTest.java index 4bf9403f7d2..1386ae5b725 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigrationsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigrationsTest.java @@ -22,7 +22,7 @@ package org.sonar.server.db.migrations; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DatabaseMigrationsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java index c453676f57c..c2ce5a734b8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java @@ -34,7 +34,7 @@ import org.sonar.server.db.DbClient; import java.sql.Connection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyBoolean; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ProgressTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ProgressTest.java index 72b000a1ddb..d7800ebf86a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ProgressTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ProgressTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; import org.slf4j.Logger; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationConvertersTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationConvertersTest.java index 170589941dc..99fa0dde46f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationConvertersTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationConvertersTest.java @@ -28,8 +28,8 @@ import java.util.List; import java.util.TimerTask; import java.util.concurrent.Callable; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationMigrationTest.java index 730318bc457..ef8117c3620 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v36/ViolationMigrationTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.config.Settings; import org.sonar.core.persistence.DbTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ViolationMigrationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/IssueChangelogMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/IssueChangelogMigrationTest.java index 68c80e59856..76b89914aec 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/IssueChangelogMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/IssueChangelogMigrationTest.java @@ -32,7 +32,7 @@ import org.sonar.core.persistence.DbTester; import org.sonar.core.properties.PropertiesDao; import org.sonar.core.properties.PropertyDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/WorkDurationConvertorTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/WorkDurationConvertorTest.java index 843bfa0a344..d1dbd9a48f5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/WorkDurationConvertorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/WorkDurationConvertorTest.java @@ -24,8 +24,8 @@ import org.junit.Test; import org.sonar.core.properties.PropertiesDao; import org.sonar.core.properties.PropertyDto; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ChangeLogMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ChangeLogMigrationTest.java index 81e0a8dab96..699581a22b6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ChangeLogMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ChangeLogMigrationTest.java @@ -36,7 +36,7 @@ import org.sonar.server.db.DbClient; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ConvertProfileMeasuresMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ConvertProfileMeasuresMigrationTest.java index 988fb6de771..e7325c14cb7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ConvertProfileMeasuresMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/ConvertProfileMeasuresMigrationTest.java @@ -30,7 +30,7 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ConvertProfileMeasuresMigrationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/FeedQProfileKeysMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/FeedQProfileKeysMigrationTest.java index 7e27aa10216..b485ae17d02 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/FeedQProfileKeysMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v44/FeedQProfileKeysMigrationTest.java @@ -27,7 +27,7 @@ import org.sonar.core.persistence.DbTester; import org.sonar.core.qualityprofile.db.QualityProfileDao; import org.sonar.core.qualityprofile.db.QualityProfileDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class FeedQProfileKeysMigrationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest.java index d6a0e9be9f1..6b5b85be6d1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest.java @@ -31,7 +31,7 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DeleteMeasuresOnDeletedProfilesMigrationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java index 81f5d5a01c1..1560bce72e4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.core.persistence.DbTester; import org.sonar.server.db.migrations.DatabaseMigration; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DeleteUnescapedActivitiesTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java index c62906df7ed..17b2e0ae512 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java @@ -26,7 +26,7 @@ import org.sonar.api.utils.System2; import org.sonar.core.persistence.DbTester; import org.sonar.server.db.migrations.DatabaseMigration; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java index 95cd383fdab..20aec985042 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java @@ -32,7 +32,7 @@ import org.sonar.core.persistence.migration.v50.Migration50Mapper; import org.sonar.server.db.DbClient; import org.sonar.server.db.migrations.DatabaseMigration; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PopulateProjectsUuidColumnsMigrationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java index fc655e4a650..251a261795b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java @@ -29,7 +29,7 @@ import org.sonar.server.db.migrations.DatabaseMigration; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java index b72969dcc20..5a9ca798aa8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java @@ -26,7 +26,7 @@ import org.sonar.api.utils.System2; import org.sonar.core.persistence.DbTester; import org.sonar.server.db.migrations.DatabaseMigration; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtCharacteristicsXMLImporterTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtCharacteristicsXMLImporterTest.java index 41ad62857a2..9d04d96d86c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtCharacteristicsXMLImporterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtCharacteristicsXMLImporterTest.java @@ -27,8 +27,8 @@ import org.sonar.api.server.debt.DebtCharacteristic; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.sonar.server.debt.DebtModelXMLExporter.DebtModel; public class DebtCharacteristicsXMLImporterTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtMediumTest.java index 6a4434ea5ef..c0b0c174862 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtMediumTest.java @@ -30,7 +30,7 @@ import org.sonar.server.platform.Platform; import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DebtMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelBackupTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelBackupTest.java index ac001b84a4c..5988ce6db05 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelBackupTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelBackupTest.java @@ -58,7 +58,7 @@ import java.util.Date; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelLookupTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelLookupTest.java index a0390191cc9..202e3c7f2b3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelLookupTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelLookupTest.java @@ -30,7 +30,7 @@ import org.sonar.core.technicaldebt.db.CharacteristicDao; import org.sonar.core.technicaldebt.db.CharacteristicDto; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelOperationsTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelOperationsTest.java index 3f2d1c6e314..9f580a290ee 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelOperationsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelOperationsTest.java @@ -50,8 +50,8 @@ import org.sonar.server.user.MockUserSession; import java.util.Date; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doAnswer; diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelPluginRepositoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelPluginRepositoryTest.java index 0197ce7ec9a..f6d21825030 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelPluginRepositoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelPluginRepositoryTest.java @@ -39,7 +39,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import static org.mockito.Matchers.anyString; diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelXMLExporterTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelXMLExporterTest.java index 8251e6095ca..08e5e653345 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelXMLExporterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtModelXMLExporterTest.java @@ -36,7 +36,7 @@ import java.util.List; import java.util.regex.Pattern; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertTrue; import static org.sonar.server.debt.DebtModelXMLExporter.DebtModel; import static org.sonar.server.debt.DebtModelXMLExporter.RuleDebt; diff --git a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtRulesXMLImporterTest.java b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtRulesXMLImporterTest.java index 80181a91100..087e96116d9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/debt/DebtRulesXMLImporterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/debt/DebtRulesXMLImporterTest.java @@ -29,8 +29,8 @@ import org.sonar.api.utils.ValidationMessages; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.sonar.server.debt.DebtModelXMLExporter.RuleDebt; public class DebtRulesXMLImporterTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsParserTest.java b/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsParserTest.java index c9e3857d21d..d9d09a7c7e2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsParserTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsParserTest.java @@ -41,7 +41,7 @@ import java.io.File; import java.io.IOException; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsWsTest.java index 3e77df43941..6e146a4a2ee 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/duplication/ws/DuplicationsWsTest.java @@ -27,7 +27,7 @@ import org.sonar.server.db.DbClient; import org.sonar.server.measure.persistence.MeasureDao; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class DuplicationsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/BulkIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/BulkIndexerTest.java index 0d855cdfe70..5bf17aa0922 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/BulkIndexerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/BulkIndexerTest.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.unit.ByteSizeValue; import org.junit.Rule; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BulkIndexerTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/DefaultIndexSettingsTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/DefaultIndexSettingsTest.java index a6f8eb33106..36e98501ff1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/DefaultIndexSettingsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/DefaultIndexSettingsTest.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.collect.ImmutableMap; import org.junit.Test; import org.sonar.test.TestUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultIndexSettingsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsClientTest.java index 6549a6f08a7..bce0c2bd641 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/EsClientTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsClientTest.java @@ -40,7 +40,7 @@ import org.sonar.server.es.request.ProxyRefreshRequestBuilder; import org.sonar.server.es.request.ProxySearchRequestBuilder; import org.sonar.server.es.request.ProxySearchScrollRequestBuilder; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EsClientTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java index 417f93f7c96..2cc58e8f6a4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java @@ -52,7 +52,7 @@ import java.io.FileInputStream; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EsTester extends ExternalResource { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java index 8f46e89cc6b..06ba9d18d4a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java @@ -30,7 +30,7 @@ import javax.annotation.CheckForNull; import java.io.IOException; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IndexCreatorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java index 1b8b8bfe319..2fe786325ae 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java @@ -21,8 +21,8 @@ package org.sonar.server.es; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class IndexDefinitionContextTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java index 00a2143e6b5..958247d87a5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IndexDefinitionHashTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/NewIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/NewIndexTest.java index f44d95a6b4c..5e6102c6108 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/NewIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/NewIndexTest.java @@ -21,13 +21,12 @@ package org.sonar.server.es; import com.google.common.collect.ImmutableMap; import org.elasticsearch.common.settings.Settings; -import org.fest.assertions.MapAssert; import org.junit.Test; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class NewIndexTest { @@ -70,11 +69,11 @@ public class NewIndexTest { assertThat(mapping.getAttributes().get("dynamic")).isEqualTo("true"); assertThat(mapping).isNotNull(); assertThat(mapping.getProperty("foo_field")).isInstanceOf(Map.class); - assertThat((Map) mapping.getProperty("foo_field")).includes(MapAssert.entry("type", "string")); + assertThat((Map) mapping.getProperty("foo_field")).containsEntry("type", "string"); assertThat((Map) mapping.getProperty("byte_field")).isNotEmpty(); assertThat((Map) mapping.getProperty("double_field")).isNotEmpty(); assertThat((Map) mapping.getProperty("dt_field")).isNotEmpty(); - assertThat((Map) mapping.getProperty("int_field")).includes(MapAssert.entry("type", "integer")); + assertThat((Map) mapping.getProperty("int_field")).containsEntry("type", "integer"); assertThat((Map) mapping.getProperty("long_field")).isNotEmpty(); assertThat((Map) mapping.getProperty("short_field")).isNotEmpty(); assertThat((Map) mapping.getProperty("uuid_path_field")).isNotEmpty(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/SortingTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/SortingTest.java index eab76595c31..db1874a929d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/SortingTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/SortingTest.java @@ -30,8 +30,8 @@ import org.sonar.server.exceptions.BadRequestException; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class SortingTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyBulkRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyBulkRequestBuilderTest.java index eee35ee4fd2..d56df24ef34 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyBulkRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyBulkRequestBuilderTest.java @@ -32,7 +32,7 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.es.EsTester; import org.sonar.server.es.FakeIndexDefinition; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProxyBulkRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterHealthRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterHealthRequestBuilderTest.java index 3efdab661ab..6abbd47e057 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterHealthRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterHealthRequestBuilderTest.java @@ -29,8 +29,8 @@ import org.junit.Test; import org.sonar.core.profiling.Profiling; import org.sonar.server.es.EsTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyClusterHealthRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStateRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStateRequestBuilderTest.java index 58b11ddba85..6f220a693f8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStateRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStateRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.api.config.Settings; import org.sonar.core.profiling.Profiling; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyClusterStateRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStatsRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStatsRequestBuilderTest.java index b63fedbd158..937abf83ba5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStatsRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyClusterStatsRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.api.config.Settings; import org.sonar.core.profiling.Profiling; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyClusterStatsRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCountRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCountRequestBuilderTest.java index 206fb338eac..01f73380d16 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCountRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCountRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyCountRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCreateIndexRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCreateIndexRequestBuilderTest.java index 17e3e368f1d..fbf7338e951 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCreateIndexRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyCreateIndexRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.api.config.Settings; import org.sonar.core.profiling.Profiling; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyCreateIndexRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteByQueryRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteByQueryRequestBuilderTest.java index bbb130fd5ca..2c81fff5231 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteByQueryRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteByQueryRequestBuilderTest.java @@ -29,8 +29,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyDeleteByQueryRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteRequestBuilderTest.java index fe04a3d236b..f475542b091 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyDeleteRequestBuilderTest.java @@ -26,8 +26,8 @@ import org.sonar.api.config.Settings; import org.sonar.core.profiling.Profiling; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyDeleteRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyFlushRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyFlushRequestBuilderTest.java index 823e5c9029c..48991566840 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyFlushRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyFlushRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyFlushRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyGetRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyGetRequestBuilderTest.java index 318d890ed4c..c7307039880 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyGetRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyGetRequestBuilderTest.java @@ -29,8 +29,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyGetRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndexRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndexRequestBuilderTest.java index 4a78049279e..d9c0527d792 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndexRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndexRequestBuilderTest.java @@ -29,8 +29,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.es.EsTester; import org.sonar.server.es.FakeIndexDefinition; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyIndexRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesExistsRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesExistsRequestBuilderTest.java index 3fd4bc16c45..4446bbe9c9e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesExistsRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesExistsRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyIndicesExistsRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesStatsRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesStatsRequestBuilderTest.java index 70509adc10f..65110596a1a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesStatsRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyIndicesStatsRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyIndicesStatsRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyMultiGetRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyMultiGetRequestBuilderTest.java index 3d78ed4d18a..eba934555b4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyMultiGetRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyMultiGetRequestBuilderTest.java @@ -31,8 +31,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyMultiGetRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyNodesStatsRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyNodesStatsRequestBuilderTest.java index 765a91edfc6..e4c89d4fb7b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyNodesStatsRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyNodesStatsRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyNodesStatsRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyPutMappingRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyPutMappingRequestBuilderTest.java index d3cb2bb06db..817b6af5cb0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyPutMappingRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyPutMappingRequestBuilderTest.java @@ -33,8 +33,8 @@ import org.sonar.server.search.SearchClient; import java.util.HashMap; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyPutMappingRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyRefreshRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyRefreshRequestBuilderTest.java index b8be869bc0b..0f6cdc487af 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyRefreshRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxyRefreshRequestBuilderTest.java @@ -29,8 +29,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxyRefreshRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchRequestBuilderTest.java index 3d3ce021aa6..202c9a60f34 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchRequestBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.core.profiling.Profiling; import org.sonar.server.search.IndexDefinition; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxySearchRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchScrollRequestBuilderTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchScrollRequestBuilderTest.java index 3192b2ed000..87a83c1adcf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchScrollRequestBuilderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/request/ProxySearchScrollRequestBuilderTest.java @@ -27,8 +27,8 @@ import org.sonar.api.config.Settings; import org.sonar.core.profiling.Profiling; import org.sonar.server.search.SearchClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProxySearchScrollRequestBuilderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/exceptions/BadRequestExceptionTest.java b/server/sonar-server/src/test/java/org/sonar/server/exceptions/BadRequestExceptionTest.java index d9247211061..3708610ccfd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/exceptions/BadRequestExceptionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/exceptions/BadRequestExceptionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.exceptions; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BadRequestExceptionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/exceptions/ServerExceptionTest.java b/server/sonar-server/src/test/java/org/sonar/server/exceptions/ServerExceptionTest.java index cb780e3383d..a430e294aba 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/exceptions/ServerExceptionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/exceptions/ServerExceptionTest.java @@ -22,7 +22,7 @@ package org.sonar.server.exceptions; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ServerExceptionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/exceptions/VerificationsTest.java b/server/sonar-server/src/test/java/org/sonar/server/exceptions/VerificationsTest.java index 57e2df0d00e..7d5398d215c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/exceptions/VerificationsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/exceptions/VerificationsTest.java @@ -21,8 +21,8 @@ package org.sonar.server.exceptions; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class VerificationsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java index b403e5d7f90..06733f80b39 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java @@ -46,8 +46,8 @@ import org.sonar.server.user.UserSession; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionTest.java index 1255d5fe109..939b355c973 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionTest.java @@ -27,7 +27,7 @@ import org.sonar.server.user.UserSession; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java index a14aaa61361..26ac975139a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/AssignActionTest.java @@ -38,7 +38,7 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java index d2a83f13b89..96814ebce70 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/CommentActionTest.java @@ -32,8 +32,8 @@ import org.sonar.server.user.MockUserSession; import java.util.Map; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java index 135abb515ee..10a2efadbcc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java @@ -52,8 +52,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeQueryTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeQueryTest.java index 990384443e6..50bea42997b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeQueryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeQueryTest.java @@ -28,8 +28,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class IssueBulkChangeQueryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceMediumTest.java index ccc3253e947..65fe47c44cf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceMediumTest.java @@ -56,8 +56,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class IssueBulkChangeServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceTest.java index 75bb47d6536..7393260d2e9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueBulkChangeServiceTest.java @@ -53,8 +53,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; import static com.google.common.collect.Sets.newHashSet; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyListOf; import static org.mockito.Matchers.anyMap; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogFormatterTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogFormatterTest.java index d7059917aac..b1bb6353453 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogFormatterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogFormatterTest.java @@ -32,7 +32,7 @@ import org.sonar.api.utils.Durations; import java.util.List; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogServiceTest.java index 92565268338..2c56df4a070 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueChangelogServiceTest.java @@ -35,7 +35,7 @@ import org.sonar.server.user.MockUserSession; import java.util.Arrays; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java index 8736d21262c..ccbd8422d61 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java @@ -53,7 +53,7 @@ import org.sonar.server.user.MockUserSession; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueCommentServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java index aef72597a68..90fcbff51b3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java @@ -48,8 +48,8 @@ import org.sonar.server.user.MockUserSession; import java.util.Collections; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryServiceTest.java index c4f0b795917..bc1bb2f7fe3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryServiceTest.java @@ -42,8 +42,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; import static java.util.Arrays.asList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryTest.java index eb1b56d2d0b..379dd6395b9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryTest.java @@ -28,7 +28,7 @@ import org.sonar.api.rule.Severity; import java.util.Date; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueQueryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java index b1733955afc..405e97b9a7e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java @@ -66,9 +66,10 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; +import static org.junit.Assert.fail; + public class IssueServiceMediumTest { @@ -502,8 +503,8 @@ public class IssueServiceMediumTest { session.commit(); index(); - assertThat(service.listTagsForComponent(project.uuid(), 5)).includes(entry("convention", 3L), entry("bug", 2L), entry("java8", 1L)); - assertThat(service.listTagsForComponent(project.uuid(), 2)).includes(entry("convention", 3L), entry("bug", 2L)).excludes(entry("java8", 1L)); + assertThat(service.listTagsForComponent(project.uuid(), 5)).contains(entry("convention", 3L), entry("bug", 2L), entry("java8", 1L)); + assertThat(service.listTagsForComponent(project.uuid(), 2)).contains(entry("convention", 3L), entry("bug", 2L)).doesNotContainEntry("java8", 1L); assertThat(service.listTagsForComponent("other", 10)).isEmpty(); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueTesting.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueTesting.java index cef689ede3e..bc23b617107 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueTesting.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueTesting.java @@ -32,7 +32,7 @@ import org.sonar.core.rule.RuleDto; import org.sonar.server.issue.index.IssueDoc; import org.sonar.server.rule.RuleTesting; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueTesting { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssuesFinderSortTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssuesFinderSortTest.java index d90ba4bfbfd..eb064aa9232 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssuesFinderSortTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssuesFinderSortTest.java @@ -21,7 +21,7 @@ package org.sonar.server.issue; import org.apache.commons.lang.time.DateUtils; -import org.fest.assertions.Assertions; +import org.assertj.core.api.Assertions; import org.junit.Test; import org.sonar.core.issue.db.IssueDto; @@ -29,7 +29,7 @@ import java.util.Date; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java index e7d1b7ef08e..53ee7d8d03c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/PlanActionTest.java @@ -38,7 +38,7 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ResultTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ResultTest.java index a473fd57e12..624ae5cd799 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ResultTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ResultTest.java @@ -21,7 +21,7 @@ package org.sonar.server.issue; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResultTest { @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/RulesAggregationTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/RulesAggregationTest.java index 7ae8476846f..9931c01354c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/RulesAggregationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/RulesAggregationTest.java @@ -25,7 +25,7 @@ import org.sonar.api.rule.RuleKey; import org.sonar.core.rule.RuleDto; import org.sonar.server.rule.RuleTesting; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RulesAggregationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueStorageTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueStorageTest.java index d4206b24013..7c8025960e6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueStorageTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ServerIssueStorageTest.java @@ -44,7 +44,7 @@ import org.sonar.server.issue.index.IssueIndexer; import java.util.Collection; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java index 0d8c24078a5..cb2f6cc1deb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/SetSeverityActionTest.java @@ -35,8 +35,8 @@ import org.sonar.server.user.UserSessionTestUtils; import java.util.Map; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/TransitionActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/TransitionActionTest.java index d7de0cc7686..eece7949291 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/TransitionActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/TransitionActionTest.java @@ -34,8 +34,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java index 4dc67fe4c8e..be974819dc6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanServiceTest.java @@ -20,7 +20,6 @@ package org.sonar.server.issue.actionplan; -import org.fest.assertions.Fail; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,7 +34,12 @@ import org.sonar.api.web.UserRole; import org.sonar.core.issue.ActionPlanStats; import org.sonar.core.issue.DefaultActionPlan; import org.sonar.core.issue.IssueUpdater; -import org.sonar.core.issue.db.*; +import org.sonar.core.issue.db.ActionPlanDao; +import org.sonar.core.issue.db.ActionPlanDto; +import org.sonar.core.issue.db.ActionPlanStatsDao; +import org.sonar.core.issue.db.ActionPlanStatsDto; +import org.sonar.core.issue.db.IssueDto; +import org.sonar.core.issue.db.IssueStorage; import org.sonar.core.persistence.DbSession; import org.sonar.core.resource.ResourceDao; import org.sonar.core.resource.ResourceDto; @@ -49,7 +53,8 @@ import org.sonar.server.user.UserSession; import java.util.Collection; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; @@ -112,7 +117,7 @@ public class ActionPlanServiceTest { try { actionPlanService.create(actionPlan, unauthorizedUserSession); - Fail.fail(); + fail(); } catch (Exception e) { assertThat(e).isInstanceOf(ForbiddenException.class); } @@ -204,7 +209,7 @@ public class ActionPlanServiceTest { try { actionPlanService.findOpenByProjectKey(projectKey, unauthorizedUserSession); - Fail.fail(); + fail(); } catch (Exception e) { assertThat(e).isInstanceOf(ForbiddenException.class); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanWsTest.java index f01abb4ca51..433c78b1895 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/actionplan/ActionPlanWsTest.java @@ -25,7 +25,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionPlanWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueDaoTest.java index 4d4dfa34d10..a42a1287b29 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueDaoTest.java @@ -34,7 +34,7 @@ import org.sonar.server.rule.RuleTesting; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class IssueDaoTest extends AbstractDaoTestCase { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterServiceTest.java index 5daf70019d2..53441e2b8c0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterServiceTest.java @@ -54,8 +54,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.anyMap; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterWsTest.java index 82125ccc627..6a6e902af5b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterWsTest.java @@ -27,7 +27,7 @@ import org.mockito.runners.MockitoJUnitRunner; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @RunWith(MockitoJUnitRunner.class) public class IssueFilterWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/filter/ShowActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/filter/ShowActionTest.java index 372ada944ef..9b4fed07449 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/filter/ShowActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/filter/ShowActionTest.java @@ -30,8 +30,8 @@ import org.sonar.server.exceptions.NotFoundException; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationDaoTest.java index 59354cc3f03..917378abbb3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationDaoTest.java @@ -34,7 +34,7 @@ import org.sonar.test.DbTests; import java.sql.Connection; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class IssueAuthorizationDaoTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationIndexerTest.java index 1d34bd31693..52f5c381b14 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationIndexerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueAuthorizationIndexerTest.java @@ -33,7 +33,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class IssueAuthorizationIndexerTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java index 241479d5751..0e5b70d0d0b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java @@ -25,7 +25,7 @@ import org.sonar.process.ProcessConstants; import org.sonar.server.es.IndexDefinition; import org.sonar.server.es.NewIndex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueIndexDefinitionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexMediumTest.java index 838e8a8b2ea..ca58e5240bc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexMediumTest.java @@ -62,7 +62,7 @@ import java.util.Date; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueIndexMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java index 7c5bef0c5e1..22ca688cf24 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java @@ -32,7 +32,7 @@ import org.sonar.test.DbTests; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class IssueIndexerTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueResultSetIteratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueResultSetIteratorTest.java index 049175aba2d..ca05d7c35d2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueResultSetIteratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueResultSetIteratorTest.java @@ -34,7 +34,7 @@ import org.sonar.test.DbTests; import java.sql.Connection; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class IssueResultSetIteratorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ComponentTagsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ComponentTagsActionTest.java index 1dd86e25218..bd0e07d1491 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ComponentTagsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/ComponentTagsActionTest.java @@ -32,7 +32,7 @@ import org.sonar.server.ws.WsTester; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueTagsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueTagsActionTest.java index dda5f3d4f81..fccb68f4ea4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueTagsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueTagsActionTest.java @@ -30,7 +30,7 @@ import org.sonar.api.server.ws.WebService.Param; import org.sonar.server.issue.IssueService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssuesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssuesWsTest.java index 42d276ae99b..4c71a10c75d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssuesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssuesWsTest.java @@ -38,7 +38,7 @@ import org.sonar.server.issue.actionplan.ActionPlanService; import org.sonar.server.rule.RuleService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class IssuesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java index de4c047100f..4c2efa43f02 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java @@ -55,7 +55,7 @@ import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SearchActionMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SetTagsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SetTagsActionTest.java index 5c9c9abcb7c..abaf650afb6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SetTagsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SetTagsActionTest.java @@ -30,7 +30,7 @@ import org.sonar.api.server.ws.WebService.Param; import org.sonar.server.issue.IssueService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterConditionTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterConditionTest.java index 5f5ec58c18e..40dc254a62d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterConditionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterConditionTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.measures.Metric; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureFilterConditionTest { @Rule diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterContextTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterContextTest.java index 0a3edb136a6..25097563b08 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterContextTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterContextTest.java @@ -21,7 +21,7 @@ package org.sonar.server.measure; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureFilterContextTest { @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterEngineTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterEngineTest.java index 285bc40f77f..efba9273d2f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterEngineTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterEngineTest.java @@ -28,7 +28,7 @@ import org.sonar.core.profiling.Profiling; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Matchers.refEq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterExecutorTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterExecutorTest.java index d7cfb473f8b..860bf9ef7d1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterExecutorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterExecutorTest.java @@ -37,7 +37,7 @@ import java.util.Arrays; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class MeasureFilterExecutorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterFactoryTest.java index cd2b01ea4a9..c6bb445317c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterFactoryTest.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.Map; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterTest.java index 89469a18d8b..169e0d4322a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/MeasureFilterTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import java.util.Arrays; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureFilterTest { @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MeasureDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MeasureDaoTest.java index c343c550b79..4f1260a0ad8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MeasureDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MeasureDaoTest.java @@ -32,7 +32,7 @@ import org.sonar.core.persistence.DbSession; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureDaoTest extends AbstractDaoTestCase { diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MetricDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MetricDaoTest.java index af2188460e7..81bbd179c4c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MetricDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/persistence/MetricDaoTest.java @@ -27,7 +27,7 @@ import org.sonar.core.measure.db.MetricDto; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.DbSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricDaoTest extends AbstractDaoTestCase { diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/ws/ManualMeasuresWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/ws/ManualMeasuresWsTest.java index aafaab973b6..abc4eda6937 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/ws/ManualMeasuresWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/ws/ManualMeasuresWsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ManualMeasuresWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/ws/MetricsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/ws/MetricsWsTest.java index e5005ad332d..86dd7bfc471 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/ws/MetricsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/ws/MetricsWsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/ws/TimeMachineWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/ws/TimeMachineWsTest.java index 25c29b65132..fd688197b40 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/ws/TimeMachineWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/ws/TimeMachineWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TimeMachineWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationCenterTest.java b/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationCenterTest.java index 5e786bc8bb3..604efb86d35 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationCenterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationCenterTest.java @@ -26,7 +26,7 @@ import org.mockito.MockitoAnnotations; import org.sonar.api.notifications.NotificationChannel; import org.sonar.api.notifications.NotificationDispatcherMetadata; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NotificationCenterTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java index 0e65b0deea9..e4647eff872 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java @@ -29,7 +29,7 @@ import org.sonar.api.notifications.NotificationDispatcher; import org.sonar.core.notification.DefaultNotificationManager; import org.sonar.jpa.session.DatabaseSessionFactory; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.same; diff --git a/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationTest.java b/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationTest.java index 60b08fcf881..00bc619be41 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/notifications/NotificationTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.api.notifications.Notification; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NotificationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ApplyPermissionTemplateQueryTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ApplyPermissionTemplateQueryTest.java index 334c46c77db..8bb2bbfb571 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ApplyPermissionTemplateQueryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ApplyPermissionTemplateQueryTest.java @@ -30,7 +30,7 @@ import org.sonar.server.exceptions.BadRequestException; import java.util.Collections; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ApplyPermissionTemplateQueryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionServiceMediumTest.java index f0a6aebb57f..fcd9d1ecd9e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionServiceMediumTest.java @@ -45,7 +45,7 @@ import javax.annotation.Nullable; import java.util.Collection; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * New tests should be added in order to be able to remove InternalPermissionServiceTest diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionTemplateServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionTemplateServiceTest.java index 6175f0d4096..f6938b9172f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionTemplateServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/InternalPermissionTemplateServiceTest.java @@ -47,7 +47,7 @@ import org.sonar.server.user.MockUserSession; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) @@ -183,11 +183,11 @@ public class InternalPermissionTemplateServiceTest { PermissionTemplate permissionTemplate = service.selectPermissionTemplate("my template"); assertThat(permissionTemplate.getUsersForPermission(GlobalPermissions.DASHBOARD_SHARING)).isEmpty(); - assertThat(permissionTemplate.getUsersForPermission(GlobalPermissions.SCAN_EXECUTION)).onProperty("userName").containsOnly("user_scan", "user_scan_and_dry_run"); - assertThat(permissionTemplate.getUsersForPermission(GlobalPermissions.DRY_RUN_EXECUTION)).onProperty("userName").containsOnly("user_dry_run", "user_scan_and_dry_run"); + assertThat(permissionTemplate.getUsersForPermission(GlobalPermissions.SCAN_EXECUTION)).extracting("userName").containsOnly("user_scan", "user_scan_and_dry_run"); + assertThat(permissionTemplate.getUsersForPermission(GlobalPermissions.DRY_RUN_EXECUTION)).extracting("userName").containsOnly("user_dry_run", "user_scan_and_dry_run"); assertThat(permissionTemplate.getGroupsForPermission(GlobalPermissions.DASHBOARD_SHARING)).isEmpty(); - assertThat(permissionTemplate.getGroupsForPermission(GlobalPermissions.SCAN_EXECUTION)).onProperty("groupName").containsOnly("scan_group"); - assertThat(permissionTemplate.getGroupsForPermission(GlobalPermissions.SYSTEM_ADMIN)).onProperty("groupName").containsOnly("admin_group"); + assertThat(permissionTemplate.getGroupsForPermission(GlobalPermissions.SCAN_EXECUTION)).extracting("groupName").containsOnly("scan_group"); + assertThat(permissionTemplate.getGroupsForPermission(GlobalPermissions.SYSTEM_ADMIN)).extracting("groupName").containsOnly("admin_group"); } @Test @@ -201,9 +201,9 @@ public class InternalPermissionTemplateServiceTest { List<PermissionTemplate> templates = service.selectAllPermissionTemplates(); assertThat(templates).hasSize(2); - assertThat(templates).onProperty("id").containsOnly(1L, 2L); - assertThat(templates).onProperty("name").containsOnly("template1", "template2"); - assertThat(templates).onProperty("description").containsOnly("template1", "template2"); + assertThat(templates).extracting("id").containsOnly(1L, 2L); + assertThat(templates).extracting("name").containsOnly("template1", "template2"); + assertThat(templates).extracting("description").containsOnly("template1", "template2"); } @Test @@ -219,9 +219,9 @@ public class InternalPermissionTemplateServiceTest { List<PermissionTemplate> templates = service.selectAllPermissionTemplates("org.sample.Sample"); assertThat(templates).hasSize(2); - assertThat(templates).onProperty("id").containsOnly(1L, 2L); - assertThat(templates).onProperty("name").containsOnly("template1", "template2"); - assertThat(templates).onProperty("description").containsOnly("template1", "template2"); + assertThat(templates).extracting("id").containsOnly(1L, 2L); + assertThat(templates).extracting("name").containsOnly("template1", "template2"); + assertThat(templates).extracting("description").containsOnly("template1", "template2"); } @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionChangeTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionChangeTest.java index e2fa99558db..87c437fff3c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionChangeTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionChangeTest.java @@ -29,7 +29,7 @@ import org.sonar.server.exceptions.BadRequestException; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PermissionChangeTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionFinderTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionFinderTest.java index b540c4492f8..21e311749cf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionFinderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionFinderTest.java @@ -34,8 +34,8 @@ import org.sonar.server.exceptions.NotFoundException; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.*; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryParserTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryParserTest.java index e8f8bdebee1..df43f956656 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryParserTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryParserTest.java @@ -26,7 +26,7 @@ import org.sonar.core.permission.PermissionQuery; import java.util.Map; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PermissionQueryParserTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryTest.java index cff05ed7eae..f2a57a6c611 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionQueryTest.java @@ -23,8 +23,8 @@ package org.sonar.server.permission; import org.junit.Test; import org.sonar.core.permission.PermissionQuery; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class PermissionQueryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateTest.java index 98ac29467b1..20a1e56bd6e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateTest.java @@ -26,7 +26,7 @@ import org.sonar.core.permission.PermissionTemplateDto; import org.sonar.core.permission.PermissionTemplateGroupDto; import org.sonar.core.permission.PermissionTemplateUserDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PermissionTemplateTest { @@ -56,13 +56,13 @@ public class PermissionTemplateTest { assertThat(permissionTemplate.getKey()).isEqualTo("key"); assertThat(permissionTemplate.getDescription()).isEqualTo("description"); assertThat(permissionTemplate.getUsersForPermission("unmatchedPermission")).isEmpty(); - assertThat(permissionTemplate.getUsersForPermission("permission1")).onProperty("userName").containsOnly("user1", "user2"); - assertThat(permissionTemplate.getUsersForPermission("permission1")).onProperty("userId").containsOnly(1L, 2L); - assertThat(permissionTemplate.getUsersForPermission("permission1")).onProperty("userLogin").containsOnly("login1", "login2"); - assertThat(permissionTemplate.getUsersForPermission("permission2")).onProperty("userName").containsOnly("user1"); - assertThat(permissionTemplate.getUsersForPermission("permission2")).onProperty("userId").containsOnly(1L); - assertThat(permissionTemplate.getUsersForPermission("permission2")).onProperty("userLogin").containsOnly("login1"); - assertThat(permissionTemplate.getGroupsForPermission("permission3")).onProperty("groupName").containsOnly("group1", "group2", null); - assertThat(permissionTemplate.getGroupsForPermission("permission3")).onProperty("groupId").containsOnly(1L, 2L, null); + assertThat(permissionTemplate.getUsersForPermission("permission1")).extracting("userName").containsOnly("user1", "user2"); + assertThat(permissionTemplate.getUsersForPermission("permission1")).extracting("userId").containsOnly(1L, 2L); + assertThat(permissionTemplate.getUsersForPermission("permission1")).extracting("userLogin").containsOnly("login1", "login2"); + assertThat(permissionTemplate.getUsersForPermission("permission2")).extracting("userName").containsOnly("user1"); + assertThat(permissionTemplate.getUsersForPermission("permission2")).extracting("userId").containsOnly(1L); + assertThat(permissionTemplate.getUsersForPermission("permission2")).extracting("userLogin").containsOnly("login1"); + assertThat(permissionTemplate.getGroupsForPermission("permission3")).extracting("groupName").containsOnly("group1", "group2", null); + assertThat(permissionTemplate.getGroupsForPermission("permission3")).extracting("groupId").containsOnly(1L, 2L, null); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/PermissionsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/PermissionsWsTest.java index b7c057dcf5b..0204f65a18b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/PermissionsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/PermissionsWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PermissionsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/BackendCleanupMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/BackendCleanupMediumTest.java index d65d6936d41..78e76a05280 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/BackendCleanupMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/BackendCleanupMediumTest.java @@ -48,7 +48,7 @@ import org.sonar.server.rule.index.RuleIndex; import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BackendCleanupMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerFileSystemTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerFileSystemTest.java index 0aa1be4b8ea..c352047a81e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerFileSystemTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/DefaultServerFileSystemTest.java @@ -26,7 +26,7 @@ import org.sonar.api.platform.ServerFileSystem; import java.io.File; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultServerFileSystemTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/MasterServletFilterTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/MasterServletFilterTest.java index c7ad620c488..b8423116006 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/MasterServletFilterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/MasterServletFilterTest.java @@ -37,7 +37,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java index 920853a8463..a896f815fad 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java @@ -31,7 +31,7 @@ import java.net.URISyntaxException; import java.util.Arrays; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java index 4ac7c640fc1..e0082c5af9d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java @@ -27,7 +27,7 @@ import org.junit.Test; import java.net.InetAddress; import java.net.UnknownHostException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java index 13552476953..1766cb82459 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java @@ -31,7 +31,7 @@ import org.sonar.process.ProcessConstants; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertThat; public class ServerImplTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java index ca465ee4097..6801327f647 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerSettingsTest.java @@ -27,7 +27,7 @@ import org.sonar.api.config.PropertyDefinitions; import java.util.Map; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ServerSettingsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/SettingsChangeNotifierTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/SettingsChangeNotifierTest.java index 01f76e65968..25570eb271e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/SettingsChangeNotifierTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/SettingsChangeNotifierTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.mockito.ArgumentMatcher; import org.sonar.api.config.GlobalPropertyChangeHandler; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/SwitchLogbackAppenderTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/SwitchLogbackAppenderTest.java index 84b45a5230b..b2c33c4e60a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/SwitchLogbackAppenderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/SwitchLogbackAppenderTest.java @@ -32,7 +32,7 @@ import org.sonar.server.computation.ComputationWorkerLauncher; import java.net.URL; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SwitchLogbackAppenderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/TempFolderProviderTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/TempFolderProviderTest.java index 0c38032d4b8..0f66f406e1d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/TempFolderProviderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/TempFolderProviderTest.java @@ -28,7 +28,7 @@ import org.sonar.api.utils.TempFolder; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartHandlerTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartHandlerTest.java index 5080f639eec..832f80f2585 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartHandlerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartHandlerTest.java @@ -26,7 +26,7 @@ import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.platform.Platform; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Fail.fail; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ServerWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ServerWsTest.java index 0fe35a51a2b..2328a9ac435 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ServerWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ServerWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ServerWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/SystemWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/SystemWsTest.java index 8c4ad647520..132f77d4f35 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/SystemWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/SystemWsTest.java @@ -25,7 +25,7 @@ import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; import org.sonar.server.platform.Platform; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class SystemWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/InstalledPluginReferentialFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/InstalledPluginReferentialFactoryTest.java index 733bbf01655..40e1ada4f35 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/InstalledPluginReferentialFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/InstalledPluginReferentialFactoryTest.java @@ -25,7 +25,7 @@ import org.sonar.api.platform.PluginRepository; import org.sonar.core.plugins.DefaultPluginMetadata; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/MimeTypesTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/MimeTypesTest.java index f0122993eeb..6c5f4412026 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/MimeTypesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/MimeTypesTest.java @@ -21,7 +21,7 @@ package org.sonar.server.plugins; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MimeTypesTest { @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java index 093d54c07d5..f98c49dd844 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java @@ -41,8 +41,8 @@ import java.io.File; import java.net.URI; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyBoolean; import static org.mockito.Matchers.argThat; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginReferentialMetadataConverterTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginReferentialMetadataConverterTest.java index 63a27878875..a7cc85c9694 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginReferentialMetadataConverterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginReferentialMetadataConverterTest.java @@ -25,7 +25,7 @@ import org.sonar.core.plugins.DefaultPluginMetadata; import org.sonar.updatecenter.common.PluginReferential; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java index ed4932e7166..fea094c3b9a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginJarsInstallerTest.java @@ -34,8 +34,8 @@ import org.sonar.server.platform.DefaultServerFileSystem; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java index 41a0b4cc6b8..5f1898dae31 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java @@ -28,7 +28,7 @@ import org.sonar.core.plugins.DefaultPluginMetadata; import java.io.File; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java index c6f5e13b245..05e4a0855ed 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java index d8a1f2e7904..9c9e5a5bf6a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java @@ -31,7 +31,7 @@ import org.sonar.updatecenter.common.Version; import java.net.URI; import java.net.URISyntaxException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsFactoryTest.java index 7a02b665a6c..d894cf48f65 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsFactoryTest.java @@ -31,7 +31,7 @@ import org.sonar.core.properties.PropertyDto; import java.util.Map; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ProjectSettingsFactoryTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsTest.java b/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsTest.java index 144592e6d09..b8f99fcc2a2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/properties/ProjectSettingsTest.java @@ -27,7 +27,7 @@ import org.sonar.api.config.Settings; import java.util.HashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/QualityGatesTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/QualityGatesTest.java index abb27e79fd2..0e7c397ceb4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/QualityGatesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/QualityGatesTest.java @@ -57,7 +57,7 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.anyString; @@ -301,14 +301,14 @@ public class QualityGatesTest { String operator = "LT"; String warningThreshold = "90"; when(dao.selectById(qGateId)).thenReturn(new QualityGateDto().setId(qGateId)); - Integer metricId = 10; + int metricId = 10; Metric coverage = Mockito.spy(CoreMetrics.COVERAGE); when(coverage.getId()).thenReturn(metricId); when(metricFinder.findByKey(metricKey)).thenReturn(coverage); QualityGateConditionDto newCondition = qGates.createCondition(qGateId, metricKey, operator, warningThreshold, null, null); assertThat(newCondition.getQualityGateId()).isEqualTo(qGateId); - assertThat(newCondition.getMetricId()).isEqualTo(metricId); + assertThat(newCondition.getMetricId()).isEqualTo((long)metricId); assertThat(newCondition.getOperator()).isEqualTo(operator); assertThat(newCondition.getWarningThreshold()).isEqualTo(warningThreshold); assertThat(newCondition.getErrorThreshold()).isNull(); @@ -323,7 +323,7 @@ public class QualityGatesTest { String operator = "LT"; String errorThreshold = "80"; when(dao.selectById(qGateId)).thenReturn(new QualityGateDto().setId(qGateId)); - Integer metricId = 10; + int metricId = 10; Metric newCoverage = Mockito.spy(CoreMetrics.NEW_COVERAGE); when(newCoverage.getId()).thenReturn(metricId); when(metricFinder.findByKey(metricKey)).thenReturn(newCoverage); @@ -331,7 +331,7 @@ public class QualityGatesTest { QualityGateConditionDto newCondition = qGates.createCondition(qGateId, metricKey, operator, null, errorThreshold, period); assertThat(newCondition.getQualityGateId()).isEqualTo(qGateId); - assertThat(newCondition.getMetricId()).isEqualTo(metricId); + assertThat(newCondition.getMetricId()).isEqualTo((long)metricId); assertThat(newCondition.getMetricKey()).isEqualTo(metricKey); assertThat(newCondition.getOperator()).isEqualTo(operator); assertThat(newCondition.getWarningThreshold()).isNull(); @@ -437,7 +437,7 @@ public class QualityGatesTest { final QualityGateConditionDto condition = new QualityGateConditionDto().setId(condId) .setMetricId(666L).setOperator("GT").setWarningThreshold("123"); when(conditionDao.selectById(condId)).thenReturn(condition); - Integer metricId = 10; + int metricId = 10; Metric newCoverage = Mockito.spy(CoreMetrics.NEW_COVERAGE); when(newCoverage.getId()).thenReturn(metricId); when(metricFinder.findByKey(metricKey)).thenReturn(newCoverage); @@ -445,7 +445,7 @@ public class QualityGatesTest { assertThat(qGates.updateCondition(condId, metricKey, operator, null, errorThreshold, period)).isEqualTo(condition); assertThat(condition.getId()).isEqualTo(condId); - assertThat(condition.getMetricId()).isEqualTo(metricId); + assertThat(condition.getMetricId()).isEqualTo((long)metricId); assertThat(condition.getMetricKey()).isEqualTo(metricKey); assertThat(condition.getOperator()).isEqualTo(operator); assertThat(condition.getWarningThreshold()).isNull(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java index 282c1d05635..091c5a6494b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java @@ -29,7 +29,7 @@ import org.sonar.core.qualitygate.db.QualityGateDto; import org.sonar.core.template.LoadedTemplateDao; import org.sonar.core.template.LoadedTemplateDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.anyString; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesAppActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesAppActionTest.java index 53e3fac86d2..7cbbb3db16d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesAppActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesAppActionTest.java @@ -40,7 +40,7 @@ import java.util.Collection; import java.util.Locale; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java index f710b51a7b9..d36da7bfd60 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QGatesWsTest.java @@ -43,7 +43,7 @@ import org.sonar.server.ws.WsTester; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleBackendMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleBackendMediumTest.java index eddf30bb67f..8d0d44d89c7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleBackendMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleBackendMediumTest.java @@ -51,7 +51,7 @@ import java.util.List; import java.util.Map; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActiveRuleBackendMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java index 4027f63930f..c57d29fb178 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java @@ -33,7 +33,7 @@ import org.sonar.server.activity.index.ActivityIndex; import org.sonar.server.db.DbClient; import org.sonar.server.tester.ServerTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActiveRuleChangeMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInProfilesTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInProfilesTest.java index a3d74116fde..b0769b244e5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInProfilesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInProfilesTest.java @@ -23,7 +23,7 @@ package org.sonar.server.qualityprofile; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BuiltInProfilesTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperMediumTest.java index e27bc2cf9f6..035026141f2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperMediumTest.java @@ -43,8 +43,8 @@ import java.io.StringReader; import java.io.StringWriter; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class QProfileBackuperMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierMediumTest.java index bb57205b03b..814d5095bff 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierMediumTest.java @@ -41,8 +41,8 @@ import javax.annotation.Nullable; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class QProfileCopierMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java index 8c0f19312c8..e9ebde65167 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java @@ -46,8 +46,8 @@ import java.io.Reader; import java.io.Writer; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class QProfileExportersTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryMediumTest.java index 21340c976c1..1028ae79a70 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryMediumTest.java @@ -39,8 +39,8 @@ import org.sonar.server.search.IndexClient; import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.sonar.server.qualityprofile.QProfileTesting.XOO_P1_KEY; import static org.sonar.server.qualityprofile.QProfileTesting.XOO_P2_KEY; import static org.sonar.server.qualityprofile.QProfileTesting.XOO_P3_KEY; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileNameTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileNameTest.java index ad57cc44ad4..d978d3dbac3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileNameTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileNameTest.java @@ -21,7 +21,7 @@ package org.sonar.server.qualityprofile; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class QProfileNameTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileProjectOperationsMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileProjectOperationsMediumTest.java index 1e3104f3069..37b02397f37 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileProjectOperationsMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileProjectOperationsMediumTest.java @@ -36,7 +36,7 @@ import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; import org.sonar.server.user.UserSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class QProfileProjectOperationsMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileServiceMediumTest.java index ba027b787d2..aa59c62aacd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileServiceMediumTest.java @@ -58,7 +58,7 @@ import java.io.Writer; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.server.qualityprofile.QProfileTesting.XOO_P1_KEY; import static org.sonar.server.qualityprofile.QProfileTesting.XOO_P2_KEY; diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTest.java index 042a5dfcb88..b6023693a60 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTest.java @@ -22,7 +22,7 @@ package org.sonar.server.qualityprofile; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class QProfileTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesMediumTest.java index 507e03dcdfa..be46ca7fc9c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesMediumTest.java @@ -46,7 +46,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Map; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RegisterQualityProfilesMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java index 70555f56880..8df38ef8ef2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java @@ -52,8 +52,8 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.sonar.server.qualityprofile.QProfileTesting.*; public class RuleActivatorMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java index 90ed92a3398..c2093edc7f6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java @@ -28,7 +28,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @RunWith(MockitoJUnitRunner.class) public class ProfilesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumTest.java index 6ec7fba2913..7c3371c2f64 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumTest.java @@ -48,8 +48,8 @@ import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class QProfilesWsMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsTest.java index 544ec58392d..9b30116c775 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsTest.java @@ -28,7 +28,7 @@ import org.sonar.server.qualityprofile.QProfileService; import org.sonar.server.rule.RuleService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class QProfilesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/DefaultRuleFinderMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/DefaultRuleFinderMediumTest.java index c22538525e4..04bf1ddf430 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/DefaultRuleFinderMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/DefaultRuleFinderMediumTest.java @@ -19,7 +19,7 @@ */ package org.sonar.server.rule; -import org.fest.assertions.Assertions; +import org.assertj.core.api.Assertions; import org.junit.*; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; @@ -33,7 +33,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Collections; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Deprecated public class DefaultRuleFinderMediumTest { @@ -128,7 +128,7 @@ public class DefaultRuleFinderMediumTest { Assertions.assertThat(finder.findAll(RuleQuery.create().withRepositoryKey("checkstyle"))).hasSize(2); // find_all_enabled - Assertions.assertThat(finder.findAll(RuleQuery.create())).onProperty("id").containsOnly(1, 3, 4, 5); + Assertions.assertThat(finder.findAll(RuleQuery.create())).extracting("id").containsOnly(1, 3, 4, 5); Assertions.assertThat(finder.findAll(RuleQuery.create())).hasSize(4); // do_not_find_disabled_rules @@ -167,7 +167,7 @@ public class DefaultRuleFinderMediumTest { @Test public void find_all_not_include_removed_rule() { // find rule with id 2 is REMOVED - Assertions.assertThat(finder.findAll(RuleQuery.create())).onProperty("id").containsOnly(1, 3, 4, 5); + Assertions.assertThat(finder.findAll(RuleQuery.create())).extracting("id").containsOnly(1, 3, 4, 5); } @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java index aca4a6157a1..2acfab4484d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java @@ -42,8 +42,8 @@ import java.util.Arrays; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesMediumTest.java index 8e91538ac7c..292b0e3effb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesMediumTest.java @@ -60,8 +60,8 @@ import java.util.List; import java.util.Map; import static com.google.common.collect.Sets.newHashSet; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RegisterRulesMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesTest.java index 226964802b6..930515c1de7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesTest.java @@ -45,7 +45,7 @@ import org.sonar.server.rule.db.RuleDao; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java index 3be473ffae7..62cb7da516a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RubyRuleServiceTest.java @@ -41,7 +41,7 @@ import java.util.List; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleBackendMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleBackendMediumTest.java index b805a2babf4..6ee776eddd0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleBackendMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleBackendMediumTest.java @@ -44,7 +44,7 @@ import org.sonar.server.tester.ServerTester; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Test persistence in db and indexation in es (--> integration of DAOs and Indexes) diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleCreatorMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleCreatorMediumTest.java index 9d4fb384ecc..8b013c8e299 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleCreatorMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleCreatorMediumTest.java @@ -43,8 +43,8 @@ import org.sonar.server.tester.ServerTester; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleCreatorMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleDeleterMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleDeleterMediumTest.java index 3a26f766b4c..8043f0838e8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleDeleterMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleDeleterMediumTest.java @@ -44,7 +44,7 @@ import org.sonar.server.tester.ServerTester; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RuleDeleterMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleOperationsTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleOperationsTest.java index f7b8b8070ac..8f10df6d4da 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleOperationsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleOperationsTest.java @@ -41,7 +41,7 @@ import org.sonar.server.rule.db.RuleDao; import org.sonar.server.user.MockUserSession; import org.sonar.server.user.UserSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleRepositoriesTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleRepositoriesTest.java index be71187ff0e..35c7e0939ab 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleRepositoriesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleRepositoriesTest.java @@ -22,7 +22,7 @@ package org.sonar.server.rule; import org.junit.Test; import org.sonar.api.server.rule.RulesDefinition; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RuleRepositoriesTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleServiceMediumTest.java index 08e16ed42b2..d203f55c21e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleServiceMediumTest.java @@ -44,8 +44,8 @@ import java.util.Collections; import java.util.Set; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleTagHelperTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleTagHelperTest.java index 3a216db889e..5d61ed462ea 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleTagHelperTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleTagHelperTest.java @@ -25,8 +25,8 @@ import org.sonar.core.rule.RuleDto; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleTagHelperTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleUpdaterMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleUpdaterMediumTest.java index 3b6470364c1..21c7c613fda 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RuleUpdaterMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RuleUpdaterMediumTest.java @@ -54,8 +54,8 @@ import org.sonar.server.user.UserSession; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleUpdaterMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/RulesDefinitionLoaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/RulesDefinitionLoaderTest.java index 74fb2b09d35..9eadfbae4a9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/RulesDefinitionLoaderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/RulesDefinitionLoaderTest.java @@ -22,7 +22,7 @@ package org.sonar.server.rule; import org.junit.Test; import org.sonar.api.server.rule.RulesDefinition; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class RulesDefinitionLoaderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/db/RuleDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/db/RuleDaoTest.java index 3c2cc8527fa..15ce8518841 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/db/RuleDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/db/RuleDaoTest.java @@ -39,7 +39,7 @@ import org.sonar.server.rule.RuleTesting; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/index/RuleIndexMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/index/RuleIndexMediumTest.java index 64062056661..b842bad4de9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/index/RuleIndexMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/index/RuleIndexMediumTest.java @@ -63,8 +63,8 @@ import java.util.Map; import java.util.Set; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleIndexMediumTest { @@ -1003,9 +1003,9 @@ public class RuleIndexMediumTest { // 1 Facet with no filters at all Map<String, Collection<FacetValue>> facets = index.search(new RuleQuery(), new QueryContext().addFacets(Arrays.asList("languages", "repositories", "tags"))).getFacets(); assertThat(facets.keySet()).hasSize(3); - assertThat(facets.get(RuleIndex.FACET_LANGUAGES)).onProperty("key").containsOnly("cpp", "java", "cobol"); - assertThat(facets.get(RuleIndex.FACET_REPOSITORIES)).onProperty("key").containsOnly("xoo", "foo"); - assertThat(facets.get(RuleIndex.FACET_TAGS)).onProperty("key").containsOnly("systag1", "systag2", "T1", "T2", "T3", "T4"); + assertThat(facets.get(RuleIndex.FACET_LANGUAGES)).extracting("key").containsOnly("cpp", "java", "cobol"); + assertThat(facets.get(RuleIndex.FACET_REPOSITORIES)).extracting("key").containsOnly("xoo", "foo"); + assertThat(facets.get(RuleIndex.FACET_TAGS)).extracting("key").containsOnly("systag1", "systag2", "T1", "T2", "T3", "T4"); // 2 Facet with a language filter // -- lang facet should still have all language @@ -1014,7 +1014,7 @@ public class RuleIndexMediumTest { , new QueryContext().addFacets(Arrays.asList("languages", "repositories", "tags"))); assertThat(result.getHits()).hasSize(3); assertThat(result.getFacets()).hasSize(3); - assertThat(result.getFacets().get(RuleIndex.FACET_LANGUAGES)).onProperty("key").containsOnly("cpp", "java", "cobol"); + assertThat(result.getFacets().get(RuleIndex.FACET_LANGUAGES)).extracting("key").containsOnly("cpp", "java", "cobol"); // 3 facet with 2 filters // -- lang facet for tag T2 @@ -1026,9 +1026,9 @@ public class RuleIndexMediumTest { , new QueryContext().addFacets(Arrays.asList("languages", "repositories", "tags"))); assertThat(result.getHits()).hasSize(1); assertThat(result.getFacets().keySet()).hasSize(3); - assertThat(result.getFacets().get(RuleIndex.FACET_LANGUAGES)).onProperty("key").containsOnly("cpp", "java"); - assertThat(result.getFacets().get(RuleIndex.FACET_REPOSITORIES)).onProperty("key").containsOnly("foo"); - assertThat(result.getFacets().get(RuleIndex.FACET_TAGS)).onProperty("key").containsOnly("systag1", "systag2", "T2", "T3"); + assertThat(result.getFacets().get(RuleIndex.FACET_LANGUAGES)).extracting("key").containsOnly("cpp", "java"); + assertThat(result.getFacets().get(RuleIndex.FACET_REPOSITORIES)).extracting("key").containsOnly("foo"); + assertThat(result.getFacets().get(RuleIndex.FACET_TAGS)).extracting("key").containsOnly("systag1", "systag2", "T2", "T3"); // 4 facet with 2 filters // -- lang facet for tag T2 @@ -1040,9 +1040,9 @@ public class RuleIndexMediumTest { , new QueryContext().addFacets(Arrays.asList("languages", "repositories", "tags"))); assertThat(result.getHits()).hasSize(2); assertThat(result.getFacets().keySet()).hasSize(3); - assertThat(result.getFacets().get(RuleIndex.FACET_LANGUAGES)).onProperty("key").containsOnly("cpp", "java"); - assertThat(result.getFacets().get(RuleIndex.FACET_REPOSITORIES)).onProperty("key").containsOnly("foo", "xoo"); - assertThat(result.getFacets().get(RuleIndex.FACET_TAGS)).onProperty("key").containsOnly("systag1", "systag2", "T1", "T2", "T3"); + assertThat(result.getFacets().get(RuleIndex.FACET_LANGUAGES)).extracting("key").containsOnly("cpp", "java"); + assertThat(result.getFacets().get(RuleIndex.FACET_REPOSITORIES)).extracting("key").containsOnly("foo", "xoo"); + assertThat(result.getFacets().get(RuleIndex.FACET_TAGS)).extracting("key").containsOnly("systag1", "systag2", "T1", "T2", "T3"); } private static List<String> ruleKeys(List<Rule> rules) { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/CreateActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/CreateActionMediumTest.java index 5b758cce991..8ba84ec7e23 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/CreateActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/CreateActionMediumTest.java @@ -41,8 +41,8 @@ import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; @RunWith(MockitoJUnitRunner.class) public class CreateActionMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleMappingTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleMappingTest.java index 1bc90e35cd2..7b6228f4189 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleMappingTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleMappingTest.java @@ -28,7 +28,7 @@ import org.sonar.server.search.QueryContext; import org.sonar.server.search.ws.SearchOptions; import org.sonar.server.text.MacroInterpreter; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class RuleMappingTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java index dab9d2f7f4d..2144994aaa7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceMediumTest.java @@ -52,7 +52,7 @@ import java.util.Calendar; import java.util.Collections; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RulesWebServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/UpdateActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/UpdateActionMediumTest.java index 39d09b8673f..68b64822c2e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/UpdateActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/UpdateActionMediumTest.java @@ -41,8 +41,8 @@ import org.sonar.server.tester.ServerTester; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class UpdateActionMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java index ecf06853c40..82b6a5e3e74 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java @@ -26,8 +26,8 @@ import java.util.Collections; import java.util.Date; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class BaseDocTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/BaseIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/BaseIndexTest.java index faa6976f211..9eeecef377d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/BaseIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/BaseIndexTest.java @@ -35,7 +35,7 @@ import java.io.Serializable; import java.util.Collections; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BaseIndexTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/FacetValueTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/FacetValueTest.java index 8ffb58fe109..8b066698e8b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/FacetValueTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/FacetValueTest.java @@ -21,7 +21,7 @@ package org.sonar.server.search; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FacetValueTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/IndexClientMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/IndexClientMediumTest.java index c3d82cd1d88..d15cc397251 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/IndexClientMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/IndexClientMediumTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.server.rule.index.RuleIndex; import org.sonar.server.tester.ServerTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IndexClientMediumTest{ diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/NodeHealthPerformanceTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/NodeHealthPerformanceTest.java index 0c419fac5c6..3245130257c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/NodeHealthPerformanceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/NodeHealthPerformanceTest.java @@ -21,7 +21,7 @@ package org.sonar.server.search; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NodeHealthPerformanceTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/QueryContextTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/QueryContextTest.java index 2ac3cdfa51c..bdf59fb6822 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/QueryContextTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/QueryContextTest.java @@ -27,8 +27,8 @@ import org.sonar.server.user.MockUserSession; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class QueryContextTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/SearchClientMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/SearchClientMediumTest.java index d9d2c510931..038d841cf8f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/SearchClientMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/SearchClientMediumTest.java @@ -25,8 +25,8 @@ import org.junit.ClassRule; import org.junit.Test; import org.sonar.server.tester.ServerTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class SearchClientMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java index 0d050d41866..9aee9fe7806 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java @@ -35,7 +35,7 @@ import java.util.Date; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SearchHealthMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/action/DeleteKeyTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/action/DeleteKeyTest.java index 5798b0da109..b7a587f9da2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/action/DeleteKeyTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/action/DeleteKeyTest.java @@ -27,8 +27,8 @@ import org.sonar.server.search.IndexDefinition; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/action/RefreshIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/action/RefreshIndexTest.java index 2776286d77c..b3eb3e785b2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/action/RefreshIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/action/RefreshIndexTest.java @@ -27,8 +27,8 @@ import org.sonar.server.search.IndexDefinition; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/ws/SearchOptionsTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/ws/SearchOptionsTest.java index 0d802c8aa6d..d4bcee11a82 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/ws/SearchOptionsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/ws/SearchOptionsTest.java @@ -31,7 +31,7 @@ import org.sonar.server.search.Result; import java.io.StringWriter; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/DecorationDataHolderTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/DecorationDataHolderTest.java index 44866632f2c..147813f98f1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/DecorationDataHolderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/DecorationDataHolderTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DecorationDataHolderTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/HtmlSourceDecoratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/HtmlSourceDecoratorTest.java index b1c17c20059..6a7b23c8ca1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/HtmlSourceDecoratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/HtmlSourceDecoratorTest.java @@ -23,7 +23,7 @@ package org.sonar.server.source; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HtmlSourceDecoratorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/HtmlTextDecoratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/HtmlTextDecoratorTest.java index c02a0e819e3..9f21bfff3fd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/HtmlTextDecoratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/HtmlTextDecoratorTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.server.source.HtmlTextDecorator.CR_END_OF_LINE; import static org.sonar.server.source.HtmlTextDecorator.LF_END_OF_LINE; diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/OpeningHtmlTagTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/OpeningHtmlTagTest.java index a0047cdb233..71b3db5eae5 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/OpeningHtmlTagTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/OpeningHtmlTagTest.java @@ -22,7 +22,7 @@ package org.sonar.server.source; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class OpeningHtmlTagTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/SourceServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/SourceServiceTest.java index aac22010b27..77c359e228c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/SourceServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/SourceServiceTest.java @@ -39,8 +39,8 @@ import org.sonar.server.user.MockUserSession; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexDefinitionTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexDefinitionTest.java index c556e27a039..4c5af2a2567 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexDefinitionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexDefinitionTest.java @@ -25,7 +25,7 @@ import org.sonar.process.ProcessConstants; import org.sonar.server.es.IndexDefinition; import org.sonar.server.es.NewIndex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SourceLineIndexDefinitionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexTest.java index ced283fc0bb..71044d301ed 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.sonar.api.config.Settings; import org.sonar.server.es.EsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SourceLineIndexTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexerTest.java index 8df6fde2940..ed3a5dc49c2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexerTest.java @@ -28,7 +28,6 @@ import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; -import org.fest.assertions.MapAssert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -47,7 +46,8 @@ import java.util.Date; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; import static org.sonar.server.source.index.SourceLineIndexDefinition.*; @Category(DbTests.class) @@ -107,16 +107,16 @@ public class SourceLineIndexerTest { assertThat(fileSearch.getHits().getTotalHits()).isEqualTo(1L); Map<String, Object> fields = fileSearch.getHits().getHits()[0].sourceAsMap(); assertThat(fields).hasSize(9); - assertThat(fields).includes( - MapAssert.entry(FIELD_PROJECT_UUID, "abcd"), - MapAssert.entry(FIELD_FILE_UUID, "efgh"), - MapAssert.entry(FIELD_LINE, 1), - MapAssert.entry(FIELD_SCM_REVISION, "cafebabe"), - MapAssert.entry(FIELD_SCM_DATE, "2014-01-01T11:34:56.000Z"), - MapAssert.entry(FIELD_SCM_AUTHOR, "polop"), - MapAssert.entry(FIELD_SOURCE, "package org.sonar.server.source;"), - MapAssert.entry(FIELD_DUPLICATIONS, duplications) - ); + assertThat(fields).contains( + entry(FIELD_PROJECT_UUID, "abcd"), + entry(FIELD_FILE_UUID, "efgh"), + entry(FIELD_LINE, 1), + entry(FIELD_SCM_REVISION, "cafebabe"), + entry(FIELD_SCM_DATE, "2014-01-01T11:34:56.000Z"), + entry(FIELD_SCM_AUTHOR, "polop"), + entry(FIELD_SOURCE, "package org.sonar.server.source;"), + entry(FIELD_DUPLICATIONS, duplications) + ); } @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineResultSetIteratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineResultSetIteratorTest.java index bc1551915c1..5d19f58a2b1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineResultSetIteratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineResultSetIteratorTest.java @@ -31,8 +31,8 @@ import org.sonar.test.DbTests; import java.sql.Connection; import java.sql.PreparedStatement; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; @Category(DbTests.class) public class SourceLineResultSetIteratorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/ws/HashActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/ws/HashActionTest.java index 5ed6696facb..650dcafc901 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/ws/HashActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/ws/HashActionTest.java @@ -35,8 +35,8 @@ import org.sonar.server.exceptions.NotFoundException; import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/ws/LinesActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/ws/LinesActionTest.java index ddbb959010b..0b49bbf16cb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/ws/LinesActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/ws/LinesActionTest.java @@ -48,8 +48,8 @@ import java.util.Date; import java.util.Map; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/ws/RawActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/ws/RawActionTest.java index 5b11c4fb8a1..ed2f15ef01e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/ws/RawActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/ws/RawActionTest.java @@ -37,7 +37,7 @@ import org.sonar.server.user.MockUserSession; import org.sonar.server.ws.WsTester; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/source/ws/SourcesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/source/ws/SourcesWsTest.java index db22e8bb0a8..ea2143a9d76 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/source/ws/SourcesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/source/ws/SourcesWsTest.java @@ -30,7 +30,7 @@ import org.sonar.server.source.SourceService; import org.sonar.server.source.index.SourceLineIndex; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class SourcesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java index 560c66847cd..c5540d8ff9b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java @@ -35,7 +35,7 @@ import org.sonar.server.db.DbClient; import org.sonar.server.rule.db.RuleDao; import org.sonar.test.DbTests; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @Category(DbTests.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java index b46a06d8a2a..d95498ecb60 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java @@ -30,7 +30,7 @@ import org.sonar.server.platform.DefaultServerFileSystem; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -58,7 +58,7 @@ public class JdbcDriverDeployerTest { assertThat(deployedIndex).exists(); assertThat(deployedFile).exists(); - assertThat(deployedFile).hasSize(driver.length()); + assertThat(deployedFile).hasContentEqualTo(driver); assertThat(Files.toString(deployedIndex, Charsets.UTF_8)).isEqualTo("my-driver.jar|02b97f7bc37b2b68fc847fcc3fc1c156"); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterDashboardsTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterDashboardsTest.java index 6d6e638a71e..64988ba63bd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterDashboardsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterDashboardsTest.java @@ -40,7 +40,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Matchers.eq; diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java index 9e375adfd29..4cb2153786f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java @@ -31,7 +31,7 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewMeasureFiltersTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewMeasureFiltersTest.java index 1799b43ef96..ddb9a393b51 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewMeasureFiltersTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewMeasureFiltersTest.java @@ -30,7 +30,7 @@ import org.sonar.core.measure.db.MeasureFilterDto; import org.sonar.core.template.LoadedTemplateDao; import org.sonar.core.template.LoadedTemplateDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; diff --git a/server/sonar-server/src/test/java/org/sonar/server/test/CoverageServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/test/CoverageServiceTest.java index 7cc65583e1d..7bf569fe196 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/test/CoverageServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/test/CoverageServiceTest.java @@ -38,7 +38,7 @@ import org.sonar.server.user.MockUserSession; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/test/ws/CoverageWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/test/ws/CoverageWsTest.java index aa1ad9e8667..4529abf38bf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/test/ws/CoverageWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/test/ws/CoverageWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.WebService; import org.sonar.server.test.CoverageService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class CoverageWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/test/ws/TestsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/test/ws/TestsWsTest.java index 50290be7023..9d3f4ce3b25 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/test/ws/TestsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/test/ws/TestsWsTest.java @@ -27,7 +27,7 @@ import org.sonar.core.component.SnapshotPerspectives; import org.sonar.server.db.DbClient; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class TestsWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/text/MacroInterpreterTest.java b/server/sonar-server/src/test/java/org/sonar/server/text/MacroInterpreterTest.java index 3579c90964c..44ec7978d17 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/text/MacroInterpreterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/text/MacroInterpreterTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.api.platform.Server; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/text/RubyTextServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/text/RubyTextServiceTest.java index 1ccdd6a1709..ef43ebf1a4c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/text/RubyTextServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/text/RubyTextServiceTest.java @@ -21,7 +21,7 @@ package org.sonar.server.text; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java index b3c4a22177c..6697f578d43 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java @@ -31,7 +31,7 @@ import org.sonar.api.utils.Durations; import java.util.Date; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyProfilingTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyProfilingTest.java index ad23d886b05..5682a59eda8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyProfilingTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyProfilingTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.sonar.api.config.Settings; import org.sonar.core.profiling.Profiling; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class JRubyProfilingTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/PageDecorationsTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/PageDecorationsTest.java index a6f761c0d42..cae2dbb7782 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/PageDecorationsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/PageDecorationsTest.java @@ -24,7 +24,7 @@ import org.sonar.api.web.PageDecoration; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class PageDecorationsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java index 4bff9fb717f..b1f9351f3c2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java @@ -37,7 +37,7 @@ import org.sonar.api.web.WidgetScope; import java.util.List; import static com.google.common.collect.Iterables.getOnlyElement; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.greaterThan; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java index e10387fb557..7143e4d7b7e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java @@ -30,7 +30,7 @@ import org.sonar.api.web.Widget; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/updatecenter/ws/UpdateCenterWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/updatecenter/ws/UpdateCenterWsTest.java index 913a14308c8..0208a7d859c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/updatecenter/ws/UpdateCenterWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/updatecenter/ws/UpdateCenterWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RailsHandler; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UpdateCenterWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/DefaultUserServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/DefaultUserServiceTest.java index 98a8f308a8a..94af4444276 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/DefaultUserServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/DefaultUserServiceTest.java @@ -39,8 +39,8 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/DoPrivilegedTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/DoPrivilegedTest.java index 75a8bc7a32b..5fbdf07f4b4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/DoPrivilegedTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/DoPrivilegedTest.java @@ -21,7 +21,7 @@ package org.sonar.server.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DoPrivilegedTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipFinderTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipFinderTest.java index 581eaa863be..090369bb2b2 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipFinderTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipFinderTest.java @@ -26,7 +26,7 @@ import org.mockito.ArgumentCaptor; import org.sonar.core.user.*; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.eq; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipServiceTest.java index b185ad413ed..55688bfe10e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/GroupMembershipServiceTest.java @@ -32,8 +32,8 @@ import org.sonar.server.exceptions.NotFoundException; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; /** * Use BbUnit tests because there's no IT on this feature for the moment diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/MockUserSessionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/MockUserSessionTest.java index 2646b845eac..8a2b0acc4f9 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/MockUserSessionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/MockUserSessionTest.java @@ -21,7 +21,7 @@ package org.sonar.server.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MockUserSessionTest { @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/RubyUserSessionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/RubyUserSessionTest.java index 24737aecc3a..6a32744ea58 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/RubyUserSessionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/RubyUserSessionTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Locale; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RubyUserSessionTest { @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java index 650db3d1447..d97ddbc314e 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java @@ -26,7 +26,7 @@ import org.sonar.api.security.LoginPasswordAuthenticator; import org.sonar.api.security.SecurityRealm; import org.sonar.api.utils.SonarException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserServiceMediumTest.java index e24dbb3321b..578bf64518d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserServiceMediumTest.java @@ -37,7 +37,7 @@ import org.sonar.server.user.index.UserDoc; import org.sonar.server.user.index.UserIndexDefinition; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserServiceMediumTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionFilterTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionFilterTest.java index efb3d7f1082..461e0f041a1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionFilterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionFilterTest.java @@ -28,7 +28,7 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionTest.java index 59a76d1fe9c..e85708125fa 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserSessionTest.java @@ -34,7 +34,7 @@ import java.util.Arrays; import java.util.Locale; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterTest.java index 91b845e7690..148e47da4cf 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterTest.java @@ -52,8 +52,8 @@ import org.sonar.server.util.Validation; import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/db/GroupDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/db/GroupDaoTest.java index a422d3b04b0..281f65e00ea 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/db/GroupDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/db/GroupDaoTest.java @@ -29,7 +29,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.DbSession; import org.sonar.core.user.GroupDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/db/UserDaoTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/db/UserDaoTest.java index 054d320e1e6..4c7ffa0386f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/db/UserDaoTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/db/UserDaoTest.java @@ -30,8 +30,8 @@ import org.sonar.core.persistence.DbTester; import org.sonar.core.user.UserDto; import org.sonar.server.exceptions.NotFoundException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class UserDaoTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java index 0030581de4f..3c0c0285248 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java @@ -25,7 +25,7 @@ import org.sonar.process.ProcessConstants; import org.sonar.server.es.IndexDefinition; import org.sonar.server.es.NewIndex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserIndexDefinitionTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexTest.java index 34a9a9415fe..096e4076bae 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexTest.java @@ -27,8 +27,8 @@ import org.sonar.api.config.Settings; import org.sonar.server.es.EsTester; import org.sonar.server.exceptions.NotFoundException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class UserIndexTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexerTest.java index 56b3d282b95..405fa782333 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserIndexerTest.java @@ -30,7 +30,7 @@ import org.sonar.test.DbTests; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class UserIndexerTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserResultSetIteratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserResultSetIteratorTest.java index 939c03c382d..39847370545 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/index/UserResultSetIteratorTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/index/UserResultSetIteratorTest.java @@ -34,7 +34,7 @@ import org.sonar.test.DbTests; import java.sql.Connection; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @Category(DbTests.class) public class UserResultSetIteratorTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java index e9148ecb3c3..bacff868cec 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java @@ -40,7 +40,7 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/FavoritesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/FavoritesWsTest.java index 184414f8a39..d35d5220e43 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/FavoritesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/FavoritesWsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FavoritesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java index 7d4c7c2ab0f..c56aeb5d441 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java @@ -38,7 +38,7 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UserPropertiesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UserPropertiesWsTest.java index bbedb353032..38cf64ef5a3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UserPropertiesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UserPropertiesWsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserPropertiesWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsTest.java index 3a3290019a1..ac816d868e1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsTest.java @@ -28,7 +28,7 @@ import org.sonar.api.server.ws.WebService; import org.sonar.server.user.UserService; import org.sonar.server.ws.WsTester; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class UsersWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/BooleanTypeValidationTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/BooleanTypeValidationTest.java index 031a1e98468..e10d437fe07 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/BooleanTypeValidationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/BooleanTypeValidationTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.server.exceptions.BadRequestException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class BooleanTypeValidationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/FloatTypeValidationTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/FloatTypeValidationTest.java index b5830388efb..1863814c486 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/FloatTypeValidationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/FloatTypeValidationTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.server.exceptions.BadRequestException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class FloatTypeValidationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/IntegerTypeValidationTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/IntegerTypeValidationTest.java index 4ba7acf9eed..823fae859b1 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/IntegerTypeValidationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/IntegerTypeValidationTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.server.exceptions.BadRequestException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class IntegerTypeValidationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/ProgressLoggerTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/ProgressLoggerTest.java index c48af360617..2fde99f4572 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/ProgressLoggerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/ProgressLoggerTest.java @@ -24,7 +24,7 @@ import org.slf4j.Logger; import java.util.concurrent.atomic.AtomicLong; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/RubyUtilsTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/RubyUtilsTest.java index ddf05daa089..59174852d8c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/RubyUtilsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/RubyUtilsTest.java @@ -27,8 +27,8 @@ import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.SonarException; import static java.util.Arrays.asList; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RubyUtilsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/SlugTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/SlugTest.java index b0345b6f875..f6043d19aad 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/SlugTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/SlugTest.java @@ -21,7 +21,7 @@ package org.sonar.server.util; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SlugTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/StringListTypeValidationTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/StringListTypeValidationTest.java index 3977228c636..95d56d08eb0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/StringListTypeValidationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/StringListTypeValidationTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.sonar.server.exceptions.BadRequestException; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class StringListTypeValidationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/StringTypeValidationTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/StringTypeValidationTest.java index b9aae7ec1f1..76460347386 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/StringTypeValidationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/StringTypeValidationTest.java @@ -23,7 +23,7 @@ package org.sonar.server.util; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class StringTypeValidationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/TextTypeValidationTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/TextTypeValidationTest.java index e498f85043f..02ce599aa22 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/TextTypeValidationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/TextTypeValidationTest.java @@ -23,7 +23,7 @@ package org.sonar.server.util; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TextTypeValidationTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/TypeValidationsTest.java b/server/sonar-server/src/test/java/org/sonar/server/util/TypeValidationsTest.java index fc2331d5f86..36696b0adb8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/util/TypeValidationsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/util/TypeValidationsTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.sonar.server.exceptions.BadRequestException; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import static org.mockito.Mockito.*; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java index 7e1faf62fad..d4e29d785b7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/ListingWsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.server.ws.RequestHandler; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ListingWsTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java index f6cdb3c604b..376842ed5da 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceEngineTest.java @@ -43,7 +43,7 @@ import java.io.InputStream; import java.util.Locale; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java index c4b55bb164f..0ae7b212cc0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java @@ -41,7 +41,7 @@ import java.net.HttpURLConnection; import java.net.URL; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * @since 4.2 diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java index fc23e4d7c9e..63889f42730 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java @@ -19,7 +19,6 @@ */ package org.sonar.wsclient; -import org.fest.assertions.MapAssert; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.sonar.wsclient.internal.HttpRequestFactory; @@ -34,8 +33,8 @@ import org.sonar.wsclient.user.internal.DefaultUserClient; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; @@ -122,8 +121,8 @@ public class SonarClientTest { verify(requestFactory).get(eq("api/foo"), paramsCapture.capture()); Map params = paramsCapture.getValue(); assertThat(params).hasSize(2); - assertThat(params).includes(MapAssert.entry("key", "the_key")); - assertThat(params).includes(MapAssert.entry("max", 10)); + assertThat(params).containsEntry("key", "the_key"); + assertThat(params).containsEntry("max", 10); } @Test @@ -137,7 +136,7 @@ public class SonarClientTest { verify(requestFactory).post(eq("api/foo"), paramsCapture.capture()); Map params = paramsCapture.getValue(); assertThat(params).hasSize(1); - assertThat(params).includes(MapAssert.entry("max", 10)); + assertThat(params).containsEntry("max", 10); } @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/base/HttpExceptionTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/base/HttpExceptionTest.java index 04e3fc048fe..a45a98f8798 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/base/HttpExceptionTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/base/HttpExceptionTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.base; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HttpExceptionTest { @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/EncodingUtilsTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/EncodingUtilsTest.java index 169111ac43c..899a81d9c30 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/EncodingUtilsTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/EncodingUtilsTest.java @@ -23,9 +23,9 @@ import org.junit.Test; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; +import static org.junit.Assert.fail; public class EncodingUtilsTest { @Test @@ -37,16 +37,16 @@ public class EncodingUtilsTest { @Test public void test_string_array_param() { - assertThat(EncodingUtils.toQueryParam(new String[]{"foo", "bar"})).isEqualTo("foo,bar"); - assertThat(EncodingUtils.toQueryParam(new String[]{"foo"})).isEqualTo("foo"); - assertThat(EncodingUtils.toQueryParam(new String[]{""})).isEqualTo(""); + assertThat(EncodingUtils.toQueryParam(new String[] {"foo", "bar"})).isEqualTo("foo,bar"); + assertThat(EncodingUtils.toQueryParam(new String[] {"foo"})).isEqualTo("foo"); + assertThat(EncodingUtils.toQueryParam(new String[] {""})).isEqualTo(""); } @Test public void test_toMap() { assertThat(EncodingUtils.toMap()).isEmpty(); - assertThat(EncodingUtils.toMap("foo", "bar")).hasSize(1).includes(entry("foo", "bar")); - assertThat(EncodingUtils.toMap("1", "one", "2", "two")).hasSize(2).includes(entry("1", "one"), entry("2", "two")); + assertThat(EncodingUtils.toMap("foo", "bar")).hasSize(1).containsEntry("foo", "bar"); + assertThat(EncodingUtils.toMap("1", "one", "2", "two")).hasSize(2).contains(entry("1", "one"), entry("2", "two")); assertThat(EncodingUtils.toMap("foo", null)).isEmpty(); } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java index a4ff84c215a..0e790b07650 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java @@ -32,8 +32,8 @@ import java.text.SimpleDateFormat; import java.util.Collections; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class HttpRequestFactoryTest { @Rule diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/ActionPlanQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/ActionPlanQueryTest.java index 35a1071cb9f..6a04d8a2227 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/ActionPlanQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/ActionPlanQueryTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionPlanQueryTest { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/BulkChangeQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/BulkChangeQueryTest.java index b161ba4d3d2..68dd9003526 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/BulkChangeQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/BulkChangeQueryTest.java @@ -22,8 +22,7 @@ package org.sonar.wsclient.issue; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; public class BulkChangeQueryTest { @@ -42,13 +41,12 @@ public class BulkChangeQueryTest { .comment("My bulk comment") .sendNotifications(false); - assertThat(query.urlParams()).hasSize(5).includes( - entry("issues", "ABCD,EFGH"), - entry("actions", "assign"), - entry("assign.assignee", "geoffrey"), - entry("comment", "My bulk comment"), - entry("sendNotifications", "false") - ); + assertThat(query.urlParams()).hasSize(5) + .containsEntry("issues", "ABCD,EFGH") + .containsEntry("actions", "assign") + .containsEntry("assign.assignee", "geoffrey") + .containsEntry("comment", "My bulk comment") + .containsEntry("sendNotifications", "false"); } @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java index cb19cf35c63..a13ba3d456a 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java @@ -24,8 +24,8 @@ import org.junit.Test; import java.text.ParseException; import java.text.SimpleDateFormat; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; + public class IssueQueryTest { @Test @@ -62,28 +62,28 @@ public class IssueQueryTest { .pageIndex(4); assertThat(query.urlParams()).hasSize(22); - assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ")); - assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval")); - assertThat(query.urlParams()).includes(entry("assigned", true)); - assertThat(query.urlParams()).includes(entry("planned", true)); - assertThat(query.urlParams()).includes(entry("components", "Action.java,Filter.java")); - assertThat(query.urlParams()).includes(entry("onComponentOnly", true)); - assertThat(query.urlParams()).includes(entry("rules", "squid:AvoidCycle")); - assertThat(query.urlParams()).includes(entry("actionPlans", "ABC")); - assertThat(query.urlParams()).includes(entry("resolutions", "FIXED,FALSE-POSITIVE")); - assertThat(query.urlParams()).includes(entry("resolved", true)); - assertThat(query.urlParams()).includes(entry("hideRules", true)); - assertThat(query.urlParams()).includes(entry("statuses", "OPEN,CLOSED")); - assertThat(query.urlParams()).includes(entry("severities", "BLOCKER,INFO")); - assertThat(query.urlParams()).includes(entry("reporters", "login1,login2")); - assertThat(query.urlParams()).includes(entry("languages", "xoo,java")); - assertThat((String)query.urlParams().get("createdBefore")).startsWith("2015-12-13T05:59:50"); - assertThat((String)query.urlParams().get("createdAfter")).startsWith("2012-01-23T13:40:50"); - assertThat((String)query.urlParams().get("createdAt")).startsWith("2015-01-02T05:59:50"); - assertThat(query.urlParams()).includes(entry("sort", "ASSIGNEE")); - assertThat(query.urlParams()).includes(entry("asc", false)); - assertThat(query.urlParams()).includes(entry("pageSize", 5)); - assertThat(query.urlParams()).includes(entry("pageIndex", 4)); + assertThat(query.urlParams()).containsEntry("issues", "ABCDE,FGHIJ"); + assertThat(query.urlParams()).containsEntry("assignees", "arthur,perceval"); + assertThat(query.urlParams()).containsEntry("assigned", true); + assertThat(query.urlParams()).containsEntry("planned", true); + assertThat(query.urlParams()).containsEntry("components", "Action.java,Filter.java"); + assertThat(query.urlParams()).containsEntry("onComponentOnly", true); + assertThat(query.urlParams()).containsEntry("rules", "squid:AvoidCycle"); + assertThat(query.urlParams()).containsEntry("actionPlans", "ABC"); + assertThat(query.urlParams()).containsEntry("resolutions", "FIXED,FALSE-POSITIVE"); + assertThat(query.urlParams()).containsEntry("resolved", true); + assertThat(query.urlParams()).containsEntry("hideRules", true); + assertThat(query.urlParams()).containsEntry("statuses", "OPEN,CLOSED"); + assertThat(query.urlParams()).containsEntry("severities", "BLOCKER,INFO"); + assertThat(query.urlParams()).containsEntry("reporters", "login1,login2"); + assertThat(query.urlParams()).containsEntry("languages", "xoo,java"); + assertThat((String) query.urlParams().get("createdBefore")).startsWith("2015-12-13T05:59:50"); + assertThat((String) query.urlParams().get("createdAfter")).startsWith("2012-01-23T13:40:50"); + assertThat((String) query.urlParams().get("createdAt")).startsWith("2015-01-02T05:59:50"); + assertThat(query.urlParams()).containsEntry("sort", "ASSIGNEE"); + assertThat(query.urlParams()).containsEntry("asc", false); + assertThat(query.urlParams()).containsEntry("pageSize", 5); + assertThat(query.urlParams()).containsEntry("pageIndex", 4); } @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java index a695d78c2b8..da23f49cb19 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/NewIssueTest.java @@ -21,8 +21,9 @@ package org.sonar.wsclient.issue; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; + public class NewIssueTest { @Test @@ -41,7 +42,7 @@ public class NewIssueTest { .severity("BLOCKER") .attribute("JIRA", "FOO-123"); - assertThat(newIssue.urlParams()).hasSize(7).includes( + assertThat(newIssue.urlParams()).hasSize(7).contains( entry("component", "Action.java"), entry("effortToFix", 4.2), entry("message", "the message"), @@ -58,7 +59,7 @@ public class NewIssueTest { .component("Action.java") .rule("squid:AvoidCycle"); - assertThat(newIssue.urlParams()).hasSize(2).includes( + assertThat(newIssue.urlParams()).containsOnly( entry("component", "Action.java"), entry("rule", "squid:AvoidCycle") ); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java index 5cdbe5296e5..9621c9878fc 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java @@ -35,9 +35,9 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; +import static org.junit.Assert.fail; public class DefaultActionPlanClientTest { @@ -88,12 +88,12 @@ public class DefaultActionPlanClientTest { NewActionPlan.create().name("Short term").project("org.sonar.Sample").description("Short term issues").deadLine(stringToDate("2014-01-01"))); assertThat(httpServer.requestedPath()).isEqualTo("/api/action_plans/create"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("project", "org.sonar.Sample"), entry("description", "Short term issues"), entry("name", "Short term"), entry("deadLine", "2014-01-01") - ); + ); assertThat(result).isNotNull(); } @@ -107,12 +107,12 @@ public class DefaultActionPlanClientTest { UpdateActionPlan.create().key("382f6f2e-ad9d-424a-b973-9b065e04348a").name("Short term").description("Short term issues").deadLine(stringToDate("2014-01-01"))); assertThat(httpServer.requestedPath()).isEqualTo("/api/action_plans/update"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a"), entry("description", "Short term issues"), entry("name", "Short term"), entry("deadLine", "2014-01-01") - ); + ); assertThat(result).isNotNull(); } @@ -124,9 +124,9 @@ public class DefaultActionPlanClientTest { client.delete("382f6f2e-ad9d-424a-b973-9b065e04348a"); assertThat(httpServer.requestedPath()).isEqualTo("/api/action_plans/delete"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a") - ); + ); } @Test @@ -142,9 +142,9 @@ public class DefaultActionPlanClientTest { assertThat(e.status()).isEqualTo(500); assertThat(e.url()).startsWith("http://localhost"); assertThat(e.url()).endsWith("/api/action_plans/delete"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a") - ); + ); } } @@ -157,9 +157,7 @@ public class DefaultActionPlanClientTest { ActionPlan result = client.open("382f6f2e-ad9d-424a-b973-9b065e04348a"); assertThat(httpServer.requestedPath()).isEqualTo("/api/action_plans/open"); - assertThat(httpServer.requestParams()).includes( - entry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a") - ); + assertThat(httpServer.requestParams()).containsEntry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a"); assertThat(result).isNotNull(); } @@ -172,9 +170,7 @@ public class DefaultActionPlanClientTest { ActionPlan result = client.close("382f6f2e-ad9d-424a-b973-9b065e04348a"); assertThat(httpServer.requestedPath()).isEqualTo("/api/action_plans/close"); - assertThat(httpServer.requestParams()).includes( - entry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a") - ); + assertThat(httpServer.requestParams()).containsEntry("key", "382f6f2e-ad9d-424a-b973-9b065e04348a"); assertThat(result).isNotNull(); } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java index acfcc508a64..2ec92b57076 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java @@ -25,13 +25,19 @@ import org.junit.Test; import org.sonar.wsclient.MockHttpServerInterceptor; import org.sonar.wsclient.base.HttpException; import org.sonar.wsclient.internal.HttpRequestFactory; -import org.sonar.wsclient.issue.*; +import org.sonar.wsclient.issue.BulkChange; +import org.sonar.wsclient.issue.BulkChangeQuery; +import org.sonar.wsclient.issue.Issue; +import org.sonar.wsclient.issue.IssueClient; +import org.sonar.wsclient.issue.IssueComment; +import org.sonar.wsclient.issue.IssueQuery; +import org.sonar.wsclient.issue.Issues; +import org.sonar.wsclient.issue.NewIssue; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class DefaultIssueClientTest { @@ -77,10 +83,9 @@ public class DefaultIssueClientTest { Issue result = client.setSeverity("ABCDE", "BLOCKER"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/set_severity"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE"), - entry("severity", "BLOCKER") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ABCDE") + .containsEntry("severity", "BLOCKER"); assertThat(result).isNotNull(); } @@ -93,10 +98,9 @@ public class DefaultIssueClientTest { Issue result = client.assign("ABCDE", "emmerik"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/assign"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE"), - entry("assignee", "emmerik") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ABCDE") + .containsEntry("assignee", "emmerik"); assertThat(result).isNotNull(); } @@ -109,10 +113,9 @@ public class DefaultIssueClientTest { Issue result = client.assignToMe("ABCDE"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/assign"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE"), - entry("me", "true") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ABCDE") + .containsEntry("me", "true"); assertThat(result).isNotNull(); } @@ -125,9 +128,7 @@ public class DefaultIssueClientTest { Issue result = client.assign("ABCDE", null); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/assign"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE") - ); + assertThat(httpServer.requestParams()).containsEntry("issue", "ABCDE"); assertThat(result).isNotNull(); } @@ -140,10 +141,9 @@ public class DefaultIssueClientTest { Issue result = client.plan("ABCDE", "DEFGH"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/plan"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE"), - entry("plan", "DEFGH") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ABCDE") + .containsEntry("plan", "DEFGH"); assertThat(result).isNotNull(); } @@ -156,9 +156,7 @@ public class DefaultIssueClientTest { Issue result = client.plan("ABCDE", null); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/plan"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE") - ); + assertThat(httpServer.requestParams()).containsEntry("issue", "ABCDE"); assertThat(result).isNotNull(); } @@ -171,10 +169,9 @@ public class DefaultIssueClientTest { Issue result = client.create(NewIssue.create().component("Action.java").rule("squid:AvoidCycle")); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/create"); - assertThat(httpServer.requestParams()).includes( - entry("component", "Action.java"), - entry("rule", "squid:AvoidCycle") - ); + assertThat(httpServer.requestParams()) + .containsEntry("component", "Action.java") + .containsEntry("rule", "squid:AvoidCycle"); assertThat(result).isNotNull(); } @@ -205,10 +202,9 @@ public class DefaultIssueClientTest { Issue result = client.doTransition("ABCDE", "resolve"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/do_transition"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE"), - entry("transition", "resolve") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ABCDE") + .containsEntry("transition", "resolve"); assertThat(result).isNotNull(); } @@ -221,10 +217,9 @@ public class DefaultIssueClientTest { IssueComment comment = client.addComment("ISSUE-1", "this is my comment"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/add_comment"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ISSUE-1"), - entry("text", "this is my comment") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ISSUE-1") + .containsEntry("text", "this is my comment"); assertThat(comment).isNotNull(); assertThat(comment.key()).isEqualTo("COMMENT-123"); assertThat(comment.htmlText()).isEqualTo("this is my comment"); @@ -259,10 +254,9 @@ public class DefaultIssueClientTest { Issue result = client.doAction("ABCDE", "tweet"); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/do_action"); - assertThat(httpServer.requestParams()).includes( - entry("issue", "ABCDE"), - entry("actionKey", "tweet") - ); + assertThat(httpServer.requestParams()) + .containsEntry("issue", "ABCDE") + .containsEntry("actionKey", "tweet"); assertThat(result).isNotNull(); } @@ -280,11 +274,10 @@ public class DefaultIssueClientTest { BulkChange result = client.bulkChange(query); assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/bulk_change"); - assertThat(httpServer.requestParams()).includes( - entry("assign.assignee", "geoffrey"), - entry("issues", "ABCD,EFGH"), - entry("actions", "assign") - ); + assertThat(httpServer.requestParams()) + .containsEntry("assign.assignee", "geoffrey") + .containsEntry("issues", "ABCD,EFGH") + .containsEntry("actions", "assign"); assertThat(result).isNotNull(); } } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java index b1fc2296da0..c4db8a6f4e5 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java @@ -28,7 +28,7 @@ import org.sonar.wsclient.user.User; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueJsonParserTest { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/permissions/DefaultPermissionClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/permissions/DefaultPermissionClientTest.java index 33a08c7f01d..8b2eee82059 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/permissions/DefaultPermissionClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/permissions/DefaultPermissionClientTest.java @@ -27,8 +27,7 @@ import org.sonar.wsclient.MockHttpServerInterceptor; import org.sonar.wsclient.internal.HttpRequestFactory; import org.sonar.wsclient.permissions.internal.DefaultPermissionClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultPermissionClientTest { @@ -52,10 +51,9 @@ public class DefaultPermissionClientTest { client.addPermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/add"); - assertThat(httpServer.requestParams()).includes( - entry("user", "daveloper"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("user", "daveloper") + .containsEntry("permission", "admin"); } @Test @@ -66,11 +64,10 @@ public class DefaultPermissionClientTest { client.addPermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/add"); - assertThat(httpServer.requestParams()).includes( - entry("user", "daveloper"), - entry("component", "org.sample.Sample"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("user", "daveloper") + .containsEntry("component", "org.sample.Sample") + .containsEntry("permission", "admin"); } @Test @@ -81,10 +78,9 @@ public class DefaultPermissionClientTest { client.addPermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/add"); - assertThat(httpServer.requestParams()).includes( - entry("group", "my_group"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("group", "my_group") + .containsEntry("permission", "admin"); } @Test @@ -95,11 +91,10 @@ public class DefaultPermissionClientTest { client.addPermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/add"); - assertThat(httpServer.requestParams()).includes( - entry("group", "my_group"), - entry("component", "org.sample.Sample"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("group", "my_group") + .containsEntry("component", "org.sample.Sample") + .containsEntry("permission", "admin"); } @Test @@ -110,10 +105,9 @@ public class DefaultPermissionClientTest { client.removePermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/remove"); - assertThat(httpServer.requestParams()).includes( - entry("user", "daveloper"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("user", "daveloper") + .containsEntry("permission", "admin"); } @Test @@ -124,11 +118,10 @@ public class DefaultPermissionClientTest { client.removePermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/remove"); - assertThat(httpServer.requestParams()).includes( - entry("user", "daveloper"), - entry("component", "org.sample.Sample"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("user", "daveloper") + .containsEntry("component", "org.sample.Sample") + .containsEntry("permission", "admin"); } @Test @@ -139,10 +132,9 @@ public class DefaultPermissionClientTest { client.removePermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/remove"); - assertThat(httpServer.requestParams()).includes( - entry("group", "my_group"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("group", "my_group") + .containsEntry("permission", "admin"); } @Test @@ -153,10 +145,9 @@ public class DefaultPermissionClientTest { client.removePermission(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/permissions/remove"); - assertThat(httpServer.requestParams()).includes( - entry("group", "my_group"), - entry("component", "org.sample.Sample"), - entry("permission", "admin") - ); + assertThat(httpServer.requestParams()) + .containsEntry("group", "my_group") + .containsEntry("component", "org.sample.Sample") + .containsEntry("permission", "admin"); } } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/NewProjectTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/NewProjectTest.java index bdac8beddb7..eb01a0b8b9a 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/NewProjectTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/NewProjectTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NewProjectTest { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/internal/DefaultProjectClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/internal/DefaultProjectClientTest.java index 3dc9dc5754b..2ee276378dd 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/internal/DefaultProjectClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/project/internal/DefaultProjectClientTest.java @@ -27,8 +27,8 @@ import org.sonar.wsclient.project.NewProject; import org.sonar.wsclient.project.Project; import org.sonar.wsclient.project.ProjectClient; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; public class DefaultProjectClientTest { @@ -45,10 +45,10 @@ public class DefaultProjectClientTest { Project result = client.create(NewProject.create().key("polop").name("Polop")); assertThat(httpServer.requestedPath()).isEqualTo("/api/projects/create"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("key", "polop"), entry("name", "Polop") - ); + ); assertThat(result).isNotNull(); } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qprofile/internal/DefaultQProfileClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qprofile/internal/DefaultQProfileClientTest.java index 9ee9ed21d4a..c3b987e1e6c 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qprofile/internal/DefaultQProfileClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qprofile/internal/DefaultQProfileClientTest.java @@ -26,8 +26,7 @@ import org.sonar.wsclient.MockHttpServerInterceptor; import org.sonar.wsclient.internal.HttpRequestFactory; import org.sonar.wsclient.qprofile.QProfileResult; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultQProfileClientTest { @@ -44,9 +43,7 @@ public class DefaultQProfileClientTest { QProfileResult result = client.restoreDefault("java"); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualityprofiles/restore_default"); - assertThat(httpServer.requestParams()).includes( - entry("language", "java") - ); + assertThat(httpServer.requestParams()).containsEntry("language", "java"); assertThat(result).isNotNull(); assertThat(result.infos()).containsOnly("Some info"); assertThat(result.warnings()).containsOnly("Some warnings"); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qualitygate/internal/DefaultQualityGateClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qualitygate/internal/DefaultQualityGateClientTest.java index f6cb803a6a9..ea4d796edd9 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qualitygate/internal/DefaultQualityGateClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/qualitygate/internal/DefaultQualityGateClientTest.java @@ -23,14 +23,20 @@ import org.junit.Rule; import org.junit.Test; import org.sonar.wsclient.MockHttpServerInterceptor; import org.sonar.wsclient.internal.HttpRequestFactory; -import org.sonar.wsclient.qualitygate.*; +import org.sonar.wsclient.qualitygate.NewCondition; +import org.sonar.wsclient.qualitygate.QualityGate; +import org.sonar.wsclient.qualitygate.QualityGateClient; +import org.sonar.wsclient.qualitygate.QualityGateCondition; +import org.sonar.wsclient.qualitygate.QualityGateDetails; +import org.sonar.wsclient.qualitygate.QualityGates; +import org.sonar.wsclient.qualitygate.UpdateCondition; import java.net.HttpURLConnection; import java.util.Collection; import java.util.Iterator; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; public class DefaultQualityGateClientTest { @@ -47,9 +53,7 @@ public class DefaultQualityGateClientTest { QualityGate result = client.create("Ninth"); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/create"); - assertThat(httpServer.requestParams()).includes( - entry("name", "Ninth") - ); + assertThat(httpServer.requestParams()).containsEntry("name", "Ninth"); assertThat(result).isNotNull(); assertThat(result.id()).isEqualTo(666L); assertThat(result.name()).isEqualTo("Ninth"); @@ -60,7 +64,7 @@ public class DefaultQualityGateClientTest { HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.stubResponseBody( - "{\"qualitygates\":[{\"id\":666,\"name\":\"Ninth\"},{\"id\":42,\"name\":\"Golden\"},{\"id\":43,\"name\":\"Star\"}],\"default\":42}"); + "{\"qualitygates\":[{\"id\":666,\"name\":\"Ninth\"},{\"id\":42,\"name\":\"Golden\"},{\"id\":43,\"name\":\"Star\"}],\"default\":42}"); QualityGateClient client = new DefaultQualityGateClient(requestFactory); QualityGates qGates = client.list(); @@ -76,7 +80,7 @@ public class DefaultQualityGateClientTest { HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.stubResponseBody( - "{}"); + "{}"); QualityGateClient client = new DefaultQualityGateClient(requestFactory); QualityGates qGates = client.list(); @@ -97,10 +101,10 @@ public class DefaultQualityGateClientTest { QualityGate result = client.rename(666L, "Hell"); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/rename"); - assertThat(httpServer.requestParams()).includes( - entry("id", "666"), - entry("name", "Hell") - ); + assertThat(httpServer.requestParams()).contains( + entry("id", "666"), + entry("name", "Hell") + ); assertThat(result).isNotNull(); } @@ -211,9 +215,7 @@ public class DefaultQualityGateClientTest { client.destroy(666L); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/destroy"); - assertThat(httpServer.requestParams()).includes( - entry("id", "666") - ); + assertThat(httpServer.requestParams()).containsEntry("id", "666"); } @Test @@ -226,9 +228,7 @@ public class DefaultQualityGateClientTest { client.setDefault(666L); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/set_as_default"); - assertThat(httpServer.requestParams()).includes( - entry("id", "666") - ); + assertThat(httpServer.requestParams()).containsEntry("id", "666"); } @Test @@ -255,14 +255,14 @@ public class DefaultQualityGateClientTest { .metricKey("new_coverage").operator("LT").warningThreshold("90").errorThreshold("80").period(3)); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/create_condition"); - assertThat(httpServer.requestParams()).includes( - entry("gateId", "12345"), - entry("metric", "new_coverage"), - entry("op", "LT"), - entry("warning", "90"), - entry("error", "80"), - entry("period", "3") - ); + assertThat(httpServer.requestParams()).contains( + entry("gateId", "12345"), + entry("metric", "new_coverage"), + entry("op", "LT"), + entry("warning", "90"), + entry("error", "80"), + entry("period", "3") + ); assertThat(result).isNotNull(); assertThat(result.id()).isEqualTo(42L); } @@ -278,14 +278,14 @@ public class DefaultQualityGateClientTest { .metricKey("ncloc").operator("GT").warningThreshold("1000").errorThreshold("2000").period(1)); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/update_condition"); - assertThat(httpServer.requestParams()).includes( - entry("id", "12345"), - entry("metric", "ncloc"), - entry("op", "GT"), - entry("warning", "1000"), - entry("error", "2000"), - entry("period", "1") - ); + assertThat(httpServer.requestParams()).contains( + entry("id", "12345"), + entry("metric", "ncloc"), + entry("op", "GT"), + entry("warning", "1000"), + entry("error", "2000"), + entry("period", "1") + ); assertThat(result).isNotNull(); assertThat(result.id()).isEqualTo(12345L); } @@ -297,12 +297,10 @@ public class DefaultQualityGateClientTest { httpServer.stubStatusCode(HttpURLConnection.HTTP_NO_CONTENT); QualityGateClient client = new DefaultQualityGateClient(requestFactory); - client.deleteCondition(666L);; + client.deleteCondition(666L); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/delete_condition"); - assertThat(httpServer.requestParams()).includes( - entry("id", "666") - ); + assertThat(httpServer.requestParams()).containsEntry("id", "666"); } @Test @@ -315,10 +313,10 @@ public class DefaultQualityGateClientTest { client.selectProject(666L, 999L); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/select"); - assertThat(httpServer.requestParams()).includes( - entry("gateId", "666"), - entry("projectId", "999") - ); + assertThat(httpServer.requestParams()).contains( + entry("gateId", "666"), + entry("projectId", "999") + ); } @Test @@ -331,9 +329,9 @@ public class DefaultQualityGateClientTest { client.deselectProject(666L, 999L); assertThat(httpServer.requestedPath()).isEqualTo("/api/qualitygates/deselect"); - assertThat(httpServer.requestParams()).includes( - entry("gateId", "666"), - entry("projectId", "999") - ); + assertThat(httpServer.requestParams()).contains( + entry("gateId", "666"), + entry("projectId", "999") + ); } } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java index e759a5f61cc..f77016df44b 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java @@ -29,7 +29,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import static junit.framework.Assert.assertEquals; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AbstractQueryTest { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationQueryTest.java index 69963f2a95f..d667080dccf 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationQueryTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AuthenticationQueryTest extends QueryTestCase { @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationTest.java index 2557933ef64..cfd9df67935 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AuthenticationTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AuthenticationTest { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricCreateQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricCreateQueryTest.java index 5b74b164dda..227f313bad4 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricCreateQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricCreateQueryTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricCreateQueryTest extends QueryTestCase { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricDeleteQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricDeleteQueryTest.java index a65f2cfc7a8..4c7af3bd1de 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricDeleteQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricDeleteQueryTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricDeleteQueryTest extends QueryTestCase { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricUpdateQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricUpdateQueryTest.java index 09f0bce3a70..f5baf38b934 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricUpdateQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricUpdateQueryTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricUpdateQueryTest extends QueryTestCase { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java index 54cec20583b..c9ca8401391 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResourceQueryTest extends QueryTestCase { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerSetupQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerSetupQueryTest.java index e7f899a06c7..1863a7f7881 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerSetupQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerSetupQueryTest.java @@ -21,7 +21,7 @@ package org.sonar.wsclient.services; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ServerSetupQueryTest extends QueryTestCase { @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java index a23e3a14871..70ab0e1cbf7 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java @@ -29,7 +29,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TimeMachineQueryTest extends QueryTestCase { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java index 7d550852fda..79c869e5c25 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java @@ -27,8 +27,8 @@ import org.sonar.wsclient.system.Migration; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyMap; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshallerTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshallerTest.java index 0cbdc303d83..c0742aeab1c 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshallerTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/AuthenticationUnmarshallerTest.java @@ -22,8 +22,8 @@ package org.sonar.wsclient.unmarshallers; import org.junit.Test; import org.sonar.wsclient.services.Authentication; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class AuthenticationUnmarshallerTest extends UnmarshallerTestCase { @Test diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java index a6221b4c2eb..60d1f1223e6 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java @@ -25,7 +25,7 @@ import org.sonar.wsclient.services.TimeMachine; import java.util.Calendar; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TimeMachineUnmarshallerTest extends UnmarshallerTestCase { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java index 47a4361423d..e59927c5dde 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java @@ -29,8 +29,8 @@ import org.sonar.wsclient.user.internal.DefaultUserClient; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; public class DefaultUserClientTest { @@ -61,7 +61,7 @@ public class DefaultUserClientTest { assertThat(simon.email()).isNull(); assertThat(simon.active()).isTrue(); } - + @Test public void should_create_user() throws Exception { httpServer.stubResponseBody("{\"user\":{\"login\":\"daveloper\",\"name\":\"daveloper\",\"email\":null}}"); @@ -70,17 +70,17 @@ public class DefaultUserClientTest { User createdUser = client.create(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/users/create"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("login", "daveloper"), entry("password", "pass1"), entry("password_confirmation", "pass1") - ); + ); assertThat(createdUser).isNotNull(); assertThat(createdUser.login()).isEqualTo("daveloper"); assertThat(createdUser.name()).isEqualTo("daveloper"); assertThat(createdUser.email()).isNull(); } - + @Test public void should_update_user() throws Exception { httpServer.stubResponseBody("{\"user\":{\"login\":\"daveloper\",\"name\":\"daveloper\",\"email\":\"new_email\"}}"); @@ -89,16 +89,16 @@ public class DefaultUserClientTest { User updatedUser = client.update(params); assertThat(httpServer.requestedPath()).isEqualTo("/api/users/update"); - assertThat(httpServer.requestParams()).includes( + assertThat(httpServer.requestParams()).contains( entry("login", "daveloper"), entry("email", "new_email") - ); + ); assertThat(updatedUser).isNotNull(); assertThat(updatedUser.login()).isEqualTo("daveloper"); assertThat(updatedUser.name()).isEqualTo("daveloper"); assertThat(updatedUser.email()).isEqualTo("new_email"); } - + @Test public void should_deactivate_user() throws Exception { httpServer.stubStatusCode(200); @@ -106,9 +106,7 @@ public class DefaultUserClientTest { client.deactivate("daveloper"); assertThat(httpServer.requestedPath()).isEqualTo("/api/users/deactivate"); - assertThat(httpServer.requestParams()).includes( - entry("login", "daveloper") - ); + assertThat(httpServer.requestParams()).containsEntry("login", "daveloper"); } private void assertThatGetRequestUrlContains(String baseUrl, String... parameters) { diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java index 46ce726f59f..20f4b9893d4 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserQueryTest { @Test diff --git a/sonar-application/src/test/java/org/sonar/application/AppTest.java b/sonar-application/src/test/java/org/sonar/application/AppTest.java index 9d5c0e48826..370bff02686 100644 --- a/sonar-application/src/test/java/org/sonar/application/AppTest.java +++ b/sonar-application/src/test/java/org/sonar/application/AppTest.java @@ -34,7 +34,7 @@ import java.io.IOException; import java.util.List; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; @@ -87,7 +87,7 @@ public class AppTest { ArgumentCaptor<List<JavaCommand>> argument = ArgumentCaptor.forClass(listClass); verify(monitor).start(argument.capture()); - assertThat(argument.getValue()).onProperty("key").containsOnly("search", "web"); + assertThat(argument.getValue()).extracting("key").containsOnly("search", "web"); } @Test @@ -102,7 +102,7 @@ public class AppTest { ArgumentCaptor<List<JavaCommand>> argument = ArgumentCaptor.forClass(listClass); verify(monitor).start(argument.capture()); - assertThat(argument.getValue()).onProperty("key").containsOnly("search"); + assertThat(argument.getValue()).extracting("key").containsOnly("search"); } @Test diff --git a/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java b/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java index bc40a48acc8..fa57d8d353d 100644 --- a/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java +++ b/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class CommandLineParserTest { diff --git a/sonar-application/src/test/java/org/sonar/application/DefaultSettingsTest.java b/sonar-application/src/test/java/org/sonar/application/DefaultSettingsTest.java index 317c6fd7f04..65825455863 100644 --- a/sonar-application/src/test/java/org/sonar/application/DefaultSettingsTest.java +++ b/sonar-application/src/test/java/org/sonar/application/DefaultSettingsTest.java @@ -25,7 +25,7 @@ import org.sonar.test.TestUtils; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultSettingsTest { diff --git a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java index c5f47749e80..e5dec849289 100644 --- a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java +++ b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java @@ -30,8 +30,8 @@ import org.sonar.process.Props; import java.io.File; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class JdbcSettingsTest { diff --git a/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java b/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java index 7c37363bb68..c54f8f4d2dc 100644 --- a/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java +++ b/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java @@ -30,8 +30,8 @@ import java.io.File; import java.io.IOException; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class PropsBuilderTest { diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/GlobalReferentialsTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/GlobalReferentialsTest.java index 0fc741e3910..cc4593cbbb7 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/GlobalReferentialsTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/GlobalReferentialsTest.java @@ -19,12 +19,11 @@ */ package org.sonar.batch.protocol.input; -import org.fest.assertions.MapAssert; import org.json.JSONException; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GlobalReferentialsTest { @@ -65,6 +64,6 @@ public class GlobalReferentialsTest { assertThat(metric.bestValue()).isEqualTo(1.0); assertThat(metric.isOptimizedBestValue()).isTrue(); - assertThat(ref.globalSettings()).includes(MapAssert.entry("prop", "value")); + assertThat(ref.globalSettings()).containsEntry("prop", "value"); } } diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectReferentialsTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectReferentialsTest.java index 96af4da66fc..12cdedcb4ce 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectReferentialsTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectReferentialsTest.java @@ -19,7 +19,6 @@ */ package org.sonar.batch.protocol.input; -import org.fest.assertions.MapAssert; import org.json.JSONException; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -28,7 +27,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectReferentialsTest { @@ -84,13 +83,13 @@ public class ProjectReferentialsTest { assertThat(activeRule.severity()).isEqualTo("MAJOR"); assertThat(activeRule.internalKey()).isEqualTo("rule1"); assertThat(activeRule.language()).isEqualTo("java"); - assertThat(activeRule.params()).includes(MapAssert.entry("param1", "value1")); + assertThat(activeRule.params()).containsEntry("param1", "value1"); assertThat(activeRule.param("param1")).isEqualTo("value1"); QProfile qProfile = ref.qProfiles().iterator().next(); assertThat(qProfile.key()).isEqualTo("squid-java"); assertThat(qProfile.name()).isEqualTo("Java"); assertThat(qProfile.rulesUpdatedAt()).isEqualTo(new SimpleDateFormat("dd/MM/yyyy").parse("14/03/1984")); - assertThat(ref.settings("foo")).includes(MapAssert.entry("prop", "value")); + assertThat(ref.settings("foo")).containsEntry("prop", "value"); assertThat(ref.fileData("foo2", "src/main/java/Foo3.java")).isNull(); diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/QProfileTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/QProfileTest.java index 460d1720405..d28bdbbe489 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/QProfileTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/QProfileTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.text.ParseException; import java.text.SimpleDateFormat; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class QProfileTest { diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/ReportHelperTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/ReportHelperTest.java index 2cfc9ef745f..d79fb5a96d8 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/ReportHelperTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/ReportHelperTest.java @@ -30,7 +30,7 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ReportHelperTest { diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/component/ReportComponentsTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/component/ReportComponentsTest.java index f97cf26b28e..0df08d6d0df 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/component/ReportComponentsTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/component/ReportComponentsTest.java @@ -27,7 +27,7 @@ import org.sonar.batch.protocol.output.component.ReportComponent.Type; import java.text.SimpleDateFormat; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ReportComponentsTest { diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/issue/ReportIssueTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/issue/ReportIssueTest.java index be09bf98811..36770b20e9f 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/issue/ReportIssueTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/issue/ReportIssueTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.text.SimpleDateFormat; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ReportIssueTest { diff --git a/sonar-batch/pom.xml b/sonar-batch/pom.xml index 2696cbe7fff..63b2fd4af99 100644 --- a/sonar-batch/pom.xml +++ b/sonar-batch/pom.xml @@ -149,16 +149,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>com.google.code.bean-matchers</groupId> <artifactId>bean-matchers</artifactId> <scope>test</scope> diff --git a/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java b/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java index fe32fdab252..fee6a665262 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java @@ -38,7 +38,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DecoratorsSelectorTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/DefaultFileLinesContextTest.java b/sonar-batch/src/test/java/org/sonar/batch/DefaultFileLinesContextTest.java index 57520582d01..9bf9dc201d4 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/DefaultFileLinesContextTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultFileLinesContextTest.java @@ -31,7 +31,7 @@ import org.sonar.api.resources.Directory; import org.sonar.api.resources.Resource; import org.sonar.api.resources.Scopes; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; diff --git a/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java index ff3d20c6ddc..ff5fdc5d159 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java @@ -33,7 +33,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import static org.mockito.Matchers.any; diff --git a/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java index f58614e424d..d07a94a44d8 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java @@ -30,8 +30,8 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase; import java.text.SimpleDateFormat; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java b/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java index 49c86e0c486..4c15e5de14d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java @@ -24,7 +24,7 @@ import org.sonar.api.utils.DateUtils; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/AnalysisModeTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/AnalysisModeTest.java index aafcb3f5cea..9863d9421e1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/AnalysisModeTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/AnalysisModeTest.java @@ -25,7 +25,7 @@ import org.sonar.api.CoreProperties; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AnalysisModeTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseSessionFactoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseSessionFactoryTest.java index c87514b21ee..7106ac25ff7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseSessionFactoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseSessionFactoryTest.java @@ -22,7 +22,7 @@ package org.sonar.batch.bootstrap; import org.junit.Test; import org.sonar.api.database.DatabaseSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class BatchDatabaseSessionFactoryTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java index 63236587eed..c2db3bf384e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java @@ -24,7 +24,7 @@ import org.sonar.api.config.Settings; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class BatchDatabaseTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java index 52b80a87d5d..2209c57431a 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginJarInstallerTest.java @@ -30,7 +30,7 @@ import org.sonar.home.cache.FileCacheBuilder; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BatchPluginJarInstallerTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java index 9153769ff23..9563fafd318 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java @@ -36,7 +36,7 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapContainerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapContainerTest.java index c31bd9fea47..8a4ca2f24b6 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapContainerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapContainerTest.java @@ -33,7 +33,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapPropertiesTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapPropertiesTest.java index 97ed5e45be1..0b88040cd9a 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapPropertiesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapPropertiesTest.java @@ -24,8 +24,8 @@ import org.junit.Test; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; public class BootstrapPropertiesTest { @Test @@ -34,7 +34,7 @@ public class BootstrapPropertiesTest { map.put("foo", "bar"); BootstrapProperties wrapper = new BootstrapProperties(map); - assertThat(wrapper.properties()).hasSize(1).includes(entry("foo", "bar")); + assertThat(wrapper.properties()).containsOnly(entry("foo", "bar")); assertThat(wrapper.properties()).isNotSameAs(map); map.put("put", "after_copy"); diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java index b6d0a0783cb..401d2da433f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java @@ -36,7 +36,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java index 7cdf031df38..23b0196947b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java @@ -27,7 +27,7 @@ import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.batch.SupportedEnvironment; import org.sonar.batch.bootstrapper.EnvironmentInformation; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ExtensionUtilsTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/FileCacheProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/FileCacheProviderTest.java index 2b04c46e5df..e0408eae0a3 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/FileCacheProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/FileCacheProviderTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.config.Settings; import org.sonar.home.cache.FileCache; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FileCacheProviderTest { @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/GlobalSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/GlobalSettingsTest.java index da6d442ec39..eb605d9c3bf 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/GlobalSettingsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/GlobalSettingsTest.java @@ -29,7 +29,7 @@ import org.sonar.batch.protocol.input.GlobalReferentials; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class GlobalSettingsTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/JdbcDriverHolderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/JdbcDriverHolderTest.java index 3d3dcad38db..c3c2ba86b8e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/JdbcDriverHolderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/JdbcDriverHolderTest.java @@ -30,7 +30,7 @@ import org.sonar.home.cache.FileCache; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/MetricProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/MetricProviderTest.java index 1af98413155..17365e66c38 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/MetricProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/MetricProviderTest.java @@ -27,7 +27,7 @@ import org.sonar.api.measures.Metrics; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricProviderTest { @Test @@ -36,7 +36,7 @@ public class MetricProviderTest { List<Metric> metrics = provider.provide(); assertThat(metrics).hasSize(CoreMetrics.getMetrics().size()); - assertThat(metrics).onProperty("key").contains("ncloc"); + assertThat(metrics).extracting("key").contains("ncloc"); } @Test @@ -50,6 +50,6 @@ public class MetricProviderTest { List<Metric> metrics = provider.provide(); assertThat(metrics.size()).isEqualTo(1 + CoreMetrics.getMetrics().size()); - assertThat(metrics).onProperty("key").contains("custom"); + assertThat(metrics).extracting("key").contains("custom"); } } diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PluginDownloaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PluginDownloaderTest.java index acb2a29c46c..a9c85431c82 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PluginDownloaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PluginDownloaderTest.java @@ -29,7 +29,7 @@ import org.sonar.home.cache.FileCache; import java.io.File; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doThrow; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PreviewDatabaseTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PreviewDatabaseTest.java index 3140d9dd298..8be7e4a6fa3 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PreviewDatabaseTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/PreviewDatabaseTest.java @@ -35,7 +35,7 @@ import org.sonar.api.utils.TempFolder; import java.io.File; import java.net.SocketTimeoutException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java index 9c9b930f99d..b5843e2bad9 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java @@ -42,7 +42,7 @@ import java.io.IOException; import static javax.servlet.http.HttpServletResponse.SC_OK; import static org.apache.commons.io.IOUtils.write; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerMetadataTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerMetadataTest.java index 8ffde190527..6425547672e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerMetadataTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerMetadataTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.CoreProperties; import org.sonar.api.config.Settings; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TaskContainerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TaskContainerTest.java index 41616656012..95ca145c161 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TaskContainerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TaskContainerTest.java @@ -27,7 +27,7 @@ import org.sonar.batch.scan.ProjectReactorBuilder; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TaskContainerTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempFolderProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempFolderProviderTest.java index 605a768851f..9db9e6d1013 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempFolderProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempFolderProviderTest.java @@ -29,7 +29,7 @@ import org.sonar.api.utils.TempFolder; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TempFolderProviderTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/EnvironmentInformationTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/EnvironmentInformationTest.java index b0063446978..3511ac6163c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/EnvironmentInformationTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/EnvironmentInformationTest.java @@ -21,7 +21,7 @@ package org.sonar.batch.bootstrapper; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EnvironmentInformationTest { @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/LoggingConfigurationTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/LoggingConfigurationTest.java index d3726b09073..f8783192273 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/LoggingConfigurationTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrapper/LoggingConfigurationTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class LoggingConfigurationTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersionTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersionTest.java index 3ab4bd8c498..da160c87a4f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersionTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousVersionTest.java @@ -24,7 +24,7 @@ import org.sonar.api.CoreProperties; import org.sonar.api.database.model.Snapshot; import org.sonar.jpa.test.AbstractDbUnitTestCase; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PastSnapshotFinderByPreviousVersionTest extends AbstractDbUnitTestCase { diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java index 1d478932f02..b35f4b8990b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java @@ -24,7 +24,7 @@ import org.sonar.api.CoreProperties; import org.sonar.api.database.model.Snapshot; import org.sonar.jpa.test.AbstractDbUnitTestCase; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PastSnapshotFinderByVersionTest extends AbstractDbUnitTestCase { diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java index 4ef68e12506..26fcd948d18 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java @@ -26,7 +26,7 @@ import org.sonar.api.resources.Qualifiers; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PastSnapshotTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java index 8af5c78517f..13fba27e2ea 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java @@ -28,7 +28,7 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase; import java.util.Date; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/DebtDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/DebtDecoratorTest.java index 6edbbab8fbf..945a3d7614b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/DebtDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/DebtDecoratorTest.java @@ -57,7 +57,7 @@ import org.sonar.api.utils.Duration; import java.util.Collections; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/DebtModelProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/DebtModelProviderTest.java index a61e4e18063..f233dc79bef 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/DebtModelProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/DebtModelProviderTest.java @@ -31,7 +31,7 @@ import org.sonar.core.technicaldebt.db.CharacteristicDao; import org.sonar.core.technicaldebt.db.CharacteristicDto; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/IssueChangelogDebtCalculatorTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/IssueChangelogDebtCalculatorTest.java index 3edc5c54f47..ab0e14b93a9 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/IssueChangelogDebtCalculatorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/IssueChangelogDebtCalculatorTest.java @@ -31,7 +31,7 @@ import org.sonar.api.utils.Duration; import java.util.Date; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueChangelogDebtCalculatorTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/NewDebtDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/NewDebtDecoratorTest.java index a80a19feac1..0bb25ad1d82 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/NewDebtDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/NewDebtDecoratorTest.java @@ -50,7 +50,7 @@ import org.sonar.batch.debt.NewDebtDecorator; import java.util.Date; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.*; diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java index 9948ee5b3c4..b71425b3ffb 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java @@ -41,7 +41,7 @@ import org.sonar.api.resources.Qualifiers; import org.sonar.api.test.IsMeasure; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingGridTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingGridTest.java index cabf747826a..830b6319e15 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingGridTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingGridTest.java @@ -25,7 +25,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SqaleRatingGridTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java index 13f93eedbcc..157808bde5d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java @@ -29,7 +29,7 @@ import org.sonar.api.config.Settings; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Metric; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SqaleRatingSettingsTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/design/DirectoryDsmDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/design/DirectoryDsmDecoratorTest.java index 48a7b814361..598bf4d6f88 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/design/DirectoryDsmDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/design/DirectoryDsmDecoratorTest.java @@ -38,7 +38,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/design/ProjectDsmDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/design/ProjectDsmDecoratorTest.java index 3850d032de8..c18da1fdde9 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/design/ProjectDsmDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/design/ProjectDsmDecoratorTest.java @@ -35,7 +35,7 @@ import org.sonar.api.resources.Project; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/design/SubProjectDsmDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/design/SubProjectDsmDecoratorTest.java index f4f2b4203a9..94d7d621108 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/design/SubProjectDsmDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/design/SubProjectDsmDecoratorTest.java @@ -35,7 +35,7 @@ import org.sonar.api.resources.Project; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/duplication/DuplicationCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/duplication/DuplicationCacheTest.java index 6317093f00a..32503c21ef9 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/duplication/DuplicationCacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/duplication/DuplicationCacheTest.java @@ -33,7 +33,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DuplicationCacheTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/events/BatchStepEventTest.java b/sonar-batch/src/test/java/org/sonar/batch/events/BatchStepEventTest.java index 4cb3b6fa76d..78e87c3a2b8 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/events/BatchStepEventTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/events/BatchStepEventTest.java @@ -21,7 +21,7 @@ package org.sonar.batch.events; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/highlighting/DefaultHighlightingBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/highlighting/DefaultHighlightingBuilderTest.java index 7b7ff906d24..d5875d5c973 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/highlighting/DefaultHighlightingBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/highlighting/DefaultHighlightingBuilderTest.java @@ -25,7 +25,7 @@ import org.sonar.api.batch.sensor.highlighting.TypeOfText; import org.sonar.batch.index.ComponentDataCache; import org.sonar.core.source.SnapshotDataTypes; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataBuilderTest.java index c132dcba477..40a8d5164f1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataBuilderTest.java @@ -26,7 +26,7 @@ import org.junit.rules.ExpectedException; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.COMMENT; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.CPP_DOC; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.KEYWORD; @@ -59,9 +59,9 @@ public class SyntaxHighlightingDataBuilderTest { @Test public void should_order_by_start_then_end_offset() throws Exception { - assertThat(highlightingRules).onProperty("startPosition").containsOnly(0, 10, 12, 24, 24, 42); - assertThat(highlightingRules).onProperty("endPosition").containsOnly(10, 12, 20, 38, 65, 50); - assertThat(highlightingRules).onProperty("textType").containsOnly(COMMENT, KEYWORD, COMMENT, KEYWORD, CPP_DOC, KEYWORD); + assertThat(highlightingRules).extracting("startPosition").containsOnly(0, 10, 12, 24, 24, 42); + assertThat(highlightingRules).extracting("endPosition").containsOnly(10, 12, 20, 38, 65, 50); + assertThat(highlightingRules).extracting("textType").containsOnly(COMMENT, KEYWORD, COMMENT, KEYWORD, CPP_DOC, KEYWORD); } @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataTest.java b/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataTest.java index 6ab0249878e..cf8e825e5cb 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/highlighting/SyntaxHighlightingDataTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.COMMENT; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.CPP_DOC; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.KEYWORD; diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java index f631ef864ec..9bae728f375 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java @@ -26,7 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CacheTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java index 65a4333e58b..35c8ec22309 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java @@ -33,8 +33,8 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class CachesTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/ComponentDataCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/ComponentDataCacheTest.java index 3a8835e7a3c..5fa9587f424 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/ComponentDataCacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/ComponentDataCacheTest.java @@ -25,7 +25,7 @@ import org.junit.ClassRule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ComponentDataCacheTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java index b37474770b9..ca7a86e791c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java @@ -44,7 +44,7 @@ import org.sonar.batch.scan.measure.MeasureCache; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java index 8beab279cbf..b5cfb38c063 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java @@ -42,7 +42,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java index 466947602c0..33eb06086d0 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import org.sonar.api.resources.File; import org.sonar.api.resources.Resource; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ResourceCacheTest { @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/ResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/ResourcePersisterTest.java index 90eb8fa23ef..3f9503165ad 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/ResourcePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/ResourcePersisterTest.java @@ -50,7 +50,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java index 8f7289f2466..6e7d6d606f8 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java @@ -54,7 +54,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssuableTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssuableTest.java index 90721058222..26d1fccd060 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssuableTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssuableTest.java @@ -28,7 +28,7 @@ import org.sonar.api.resources.Project; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssueFilterChainTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssueFilterChainTest.java index 7ce47e45e0c..e61cb09ffec 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssueFilterChainTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultIssueFilterChainTest.java @@ -19,13 +19,13 @@ */ package org.sonar.batch.issue; -import org.fest.assertions.Fail; import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.issue.batch.IssueFilter; import org.sonar.api.issue.batch.IssueFilterChain; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class DefaultIssueFilterChainTest { @@ -61,7 +61,7 @@ public class DefaultIssueFilterChainTest { class FailingFilter implements IssueFilter { @Override public boolean accept(Issue issue, IssueFilterChain chain) { - Fail.fail(); + fail(); return false; } @@ -70,27 +70,27 @@ public class DefaultIssueFilterChainTest { @Test public void should_accept_if_all_filters_pass() throws Exception { assertThat(new DefaultIssueFilterChain( - new PassingFilter(), - new PassingFilter(), - new PassingFilter() + new PassingFilter(), + new PassingFilter(), + new PassingFilter() ).accept(issue)).isTrue(); } @Test public void should_accept_and_not_go_further_if_filter_accepts() throws Exception { assertThat(new DefaultIssueFilterChain( - new PassingFilter(), - new AcceptingFilter(), - new FailingFilter() + new PassingFilter(), + new AcceptingFilter(), + new FailingFilter() ).accept(issue)).isTrue(); } @Test public void should_refuse_and_not_go_further_if_filter_refuses() throws Exception { assertThat(new DefaultIssueFilterChain( - new PassingFilter(), - new RefusingFilter(), - new FailingFilter() + new PassingFilter(), + new RefusingFilter(), + new FailingFilter() ).accept(issue)).isFalse(); } } diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultProjectIssuesTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultProjectIssuesTest.java index aa275deb567..2cc9d8b4498 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultProjectIssuesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/DefaultProjectIssuesTest.java @@ -29,7 +29,7 @@ import org.sonar.api.rule.Severity; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/IssuableFactoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/IssuableFactoryTest.java index 4753023ccbc..c24e04a1ded 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/IssuableFactoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/IssuableFactoryTest.java @@ -28,7 +28,7 @@ import org.sonar.api.resources.Project; import org.sonar.batch.ProjectTree; import org.sonar.core.component.ResourceComponent; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class IssuableFactoryTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/IssueCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/IssueCacheTest.java index d1cb4dd4844..2119f1c3ed9 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/IssueCacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/IssueCacheTest.java @@ -39,7 +39,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueCacheTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/IssueFiltersTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/IssueFiltersTest.java index d487aeadd6b..4cc35d488ce 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/IssueFiltersTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/IssueFiltersTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java index 1516c7a8ddb..a4cf6a1329b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java @@ -43,8 +43,8 @@ import org.sonar.api.utils.MessageException; import java.util.Calendar; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/EnforceIssuesFilterTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/EnforceIssuesFilterTest.java index 95145bccd18..4cdb67cb1da 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/EnforceIssuesFilterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/EnforceIssuesFilterTest.java @@ -31,7 +31,7 @@ import org.sonar.api.issue.Issue; import org.sonar.api.issue.batch.IssueFilterChain; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.WildcardPattern; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/IgnoreIssuesFilterTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/IgnoreIssuesFilterTest.java index 8cfe69b160c..22efcb7e62d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/IgnoreIssuesFilterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/IgnoreIssuesFilterTest.java @@ -29,7 +29,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.issue.batch.IssueFilterChain; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java index a0707867019..19ee6556694 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java @@ -28,7 +28,7 @@ import org.sonar.api.config.Settings; import org.sonar.api.utils.SonarException; import org.sonar.core.config.IssueExclusionProperties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueExclusionPatternInitializerTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java index eae28d70c05..699753d5e78 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java @@ -26,7 +26,7 @@ import org.sonar.api.config.PropertyDefinitions; import org.sonar.api.config.Settings; import org.sonar.core.config.IssueExclusionProperties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueInclusionPatternInitializerTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssuePatternTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssuePatternTest.java index 27a1a7f07b9..71a4c1194b1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssuePatternTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/IssuePatternTest.java @@ -26,7 +26,7 @@ import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.rule.RuleKey; import org.sonar.api.rules.Rule; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/LineRangeTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/LineRangeTest.java index c23d2936219..e45c92ee53f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/LineRangeTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/LineRangeTest.java @@ -23,7 +23,7 @@ package org.sonar.batch.issue.ignore.pattern; import org.sonar.batch.issue.ignore.pattern.LineRange; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class LineRangeTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternDecoderTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternDecoderTest.java index fecf1bde062..c3b235e4e65 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternDecoderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternDecoderTest.java @@ -30,7 +30,7 @@ import org.sonar.api.utils.SonarException; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PatternDecoderTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternMatcherTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternMatcherTest.java index f3d2aa8438d..57cd8cfd17e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternMatcherTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/pattern/PatternMatcherTest.java @@ -34,7 +34,7 @@ import org.sonar.api.rules.Rule; import java.io.IOException; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsLoaderTest.java index c75f69fcb24..30002ec7f4c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsLoaderTest.java @@ -39,7 +39,7 @@ import java.io.File; import java.io.IOException; import static com.google.common.base.Charsets.UTF_8; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/sonar-batch/src/test/java/org/sonar/batch/language/LanguageDistributionDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/language/LanguageDistributionDecoratorTest.java index 34f728cc232..cb9d52bae9e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/language/LanguageDistributionDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/language/LanguageDistributionDecoratorTest.java @@ -39,7 +39,7 @@ import org.sonar.api.utils.KeyValueFormat; import java.util.Collections; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectBootstrapperTest.java b/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectBootstrapperTest.java index f4f7ea66051..43635198209 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectBootstrapperTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectBootstrapperTest.java @@ -30,7 +30,7 @@ import org.sonar.api.batch.bootstrap.ProjectReactor; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectConverterTest.java b/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectConverterTest.java index e9b449a63a4..db3e3513e26 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectConverterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/maven/MavenProjectConverterTest.java @@ -39,7 +39,7 @@ import java.net.URISyntaxException; import java.util.Arrays; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertNull; diff --git a/sonar-batch/src/test/java/org/sonar/batch/maven/SonarMavenProjectBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/maven/SonarMavenProjectBuilderTest.java index 16cbd06bc1e..6b0c8f26bee 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/maven/SonarMavenProjectBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/maven/SonarMavenProjectBuilderTest.java @@ -28,7 +28,7 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java index 3a7ee29254f..9dd41b52076 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java @@ -39,7 +39,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FileSystemMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/highlighting/HighlightingMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/highlighting/HighlightingMediumTest.java index 145bcca4ccc..3572e2d2691 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/highlighting/HighlightingMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/highlighting/HighlightingMediumTest.java @@ -37,7 +37,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HighlightingMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesMediumTest.java index f89d9d3e7a2..89f926e296f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesMediumTest.java @@ -34,7 +34,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssuesMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesOnDirMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesOnDirMediumTest.java index cd936f2d101..ac15f4c67c1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesOnDirMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/issues/IssuesOnDirMediumTest.java @@ -33,7 +33,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssuesOnDirMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java index b88278c525a..6787ae5710f 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java @@ -32,7 +32,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasuresMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/scm/ScmMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/scm/ScmMediumTest.java index 77e16bc80d0..b7aacbcd2d1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/scm/ScmMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/scm/ScmMediumTest.java @@ -34,7 +34,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ScmMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/symbol/SymbolMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/symbol/SymbolMediumTest.java index 38d513e87af..ec00c3a288b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/symbol/SymbolMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/symbol/SymbolMediumTest.java @@ -34,7 +34,7 @@ import org.sonar.xoo.XooPlugin; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SymbolMediumTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java index 3516ab363fb..1fd1c4e081c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java @@ -35,7 +35,7 @@ import org.sonar.batch.events.EventBus; import org.sonar.batch.scan.measure.MeasureCache; import org.sonar.core.measure.MeasurementFilters; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java index c530121fd45..111bb24a9ae 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java @@ -21,7 +21,7 @@ package org.sonar.batch.phases; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PhasesTest { @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/profiling/PhasesSumUpTimeProfilerTest.java b/sonar-batch/src/test/java/org/sonar/batch/profiling/PhasesSumUpTimeProfilerTest.java index 6424548f97b..861903dda67 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/profiling/PhasesSumUpTimeProfilerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/profiling/PhasesSumUpTimeProfilerTest.java @@ -59,7 +59,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java index 91f7a4fc72a..1ea0ce1c220 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java @@ -27,8 +27,8 @@ import org.sonar.api.measures.Measure; import org.sonar.api.measures.Metric; import org.sonar.core.qualitygate.db.QualityGateConditionDto; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/GenerateQualityGateEventsTest.java b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/GenerateQualityGateEventsTest.java index edf86e96729..83cab61793e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/GenerateQualityGateEventsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/GenerateQualityGateEventsTest.java @@ -40,7 +40,7 @@ import org.sonar.batch.qualitygate.QualityGate; import java.util.Arrays; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; diff --git a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateProviderTest.java index 1c34d5add48..6c9b252f33d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateProviderTest.java @@ -34,7 +34,7 @@ import java.net.HttpURLConnection; import java.net.URI; import java.util.Iterator; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) diff --git a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateVerifierTest.java b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateVerifierTest.java index f33205097d1..26447e6e792 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateVerifierTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/QualityGateVerifierTest.java @@ -46,7 +46,7 @@ import org.sonar.core.timemachine.Periods; import java.util.ArrayList; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.argThat; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java index fa46843d94e..c76eacef5be 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java @@ -30,7 +30,7 @@ import org.sonar.api.test.IsMeasure; import java.util.Arrays; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.*; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java index cc77fe913ef..9142cf4da6d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java @@ -56,7 +56,7 @@ import org.sonar.batch.index.EventPersister; import java.util.Arrays; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.argThat; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java index cae57ace39e..2da2400c0cd 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java @@ -30,7 +30,7 @@ import org.sonar.core.UtcDateUtils; import java.util.Collections; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.*; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java index 35df2bc2d61..e1a52981d12 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java @@ -27,8 +27,8 @@ import org.sonar.api.profiles.RulesProfile; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProviderTest.java index 42ab22fed38..e14e9fb7fda 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProviderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProviderTest.java @@ -39,8 +39,8 @@ import org.sonar.api.utils.Durations; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.rule.RuleDao; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; @RunWith(MockitoJUnitRunner.class) public class RulesProviderTest extends AbstractDaoTestCase { diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java index e3eba53ad2a..131f3a0b6e4 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/rule/UsedQProfilesTest.java @@ -25,7 +25,7 @@ import org.sonar.core.UtcDateUtils; import java.util.Arrays; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UsedQProfilesTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/DeprecatedProjectReactorBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/DeprecatedProjectReactorBuilderTest.java index c3deb16032a..8aa7f9a1485 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/DeprecatedProjectReactorBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/DeprecatedProjectReactorBuilderTest.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DeprecatedProjectReactorBuilderTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/LanguageVerifierTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/LanguageVerifierTest.java index eb19d5428ea..1c9531cefc1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/LanguageVerifierTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/LanguageVerifierTest.java @@ -30,7 +30,7 @@ import org.sonar.api.utils.MessageException; import org.sonar.batch.languages.DefaultLanguagesReferential; import org.sonar.batch.languages.LanguagesReferential; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class LanguageVerifierTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/LastLineHashesTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/LastLineHashesTest.java index 7490781fc2d..de9abac80a0 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/LastLineHashesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/LastLineHashesTest.java @@ -29,7 +29,7 @@ import org.sonar.batch.bootstrap.ServerClient; import java.net.URI; import java.net.URISyntaxException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java index a7a12f16e2c..6a8e64d6ccf 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java @@ -33,7 +33,7 @@ import org.sonar.batch.protocol.input.ProjectReferentials; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectExclusionsTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectExclusionsTest.java index 8981db03845..703201bf1af 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectExclusionsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectExclusionsTest.java @@ -24,7 +24,7 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.bootstrap.ProjectReactor; import org.sonar.api.config.Settings; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectExclusionsTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectLockTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectLockTest.java index 70ffce722d7..5424028b132 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectLockTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectLockTest.java @@ -30,8 +30,8 @@ import org.sonar.batch.bootstrap.AnalysisMode; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java index f8f1f3640ad..efc81035a6d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java @@ -36,7 +36,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectReactorBuilderTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectScanContainerTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectScanContainerTest.java index 057998e6a11..ca6a0aa84e5 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectScanContainerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectScanContainerTest.java @@ -47,7 +47,7 @@ import org.sonar.batch.scan.maven.MavenPluginExecutor; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectSettingsTest.java index 8cede90928b..c75f7aafb3d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectSettingsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectSettingsTest.java @@ -37,7 +37,7 @@ import org.sonar.batch.protocol.input.ProjectReferentials; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java index 602f3ea641b..5af58671091 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java @@ -30,7 +30,7 @@ import org.sonar.batch.bootstrap.TaskContainer; import org.sonar.batch.phases.Phases; import org.sonar.core.resource.ResourceDao; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ScanTaskTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/SensorContextAdapterTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/SensorContextAdapterTest.java index 291321df154..a5610c66aa2 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/SensorContextAdapterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/SensorContextAdapterTest.java @@ -55,7 +55,7 @@ import org.sonar.batch.duplication.BlockCache; import org.sonar.batch.duplication.DuplicationCache; import org.sonar.batch.index.ComponentDataCache; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/AdditionalFilePredicatesTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/AdditionalFilePredicatesTest.java index a5f57f5c4c8..ff6e76e0857 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/AdditionalFilePredicatesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/AdditionalFilePredicatesTest.java @@ -28,7 +28,7 @@ import org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AdditionalFilePredicatesTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java index 315191efc1c..5e55be940d5 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DefaultModuleFileSystemTest.java @@ -36,7 +36,7 @@ import java.io.IOException; import java.nio.charset.Charset; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DeprecatedFileFiltersTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DeprecatedFileFiltersTest.java index 60cc12871d5..4066080360b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DeprecatedFileFiltersTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DeprecatedFileFiltersTest.java @@ -31,7 +31,7 @@ import org.sonar.api.scan.filesystem.FileType; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ExclusionFiltersTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ExclusionFiltersTest.java index 8b864f2c491..02478075c9c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ExclusionFiltersTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ExclusionFiltersTest.java @@ -30,7 +30,7 @@ import org.sonar.api.scan.filesystem.FileExclusions; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ExclusionFiltersTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/FileMetadataTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/FileMetadataTest.java index 4a4822f5a70..3b9cec76fdb 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/FileMetadataTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/FileMetadataTest.java @@ -30,7 +30,7 @@ import java.io.File; import static org.apache.commons.codec.digest.DigestUtils.md5; import static org.apache.commons.codec.digest.DigestUtils.md5Hex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FileMetadataTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactoryTest.java index bb78a170c84..48941e1e208 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactoryTest.java @@ -25,7 +25,7 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.scan.filesystem.PathResolver; import org.sonar.batch.bootstrap.AnalysisMode; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class InputFileBuilderFactoryTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderTest.java index 91fcbfa0c78..cf2a1cbe22b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputFileBuilderTest.java @@ -33,7 +33,7 @@ import org.sonar.batch.bootstrap.AnalysisMode; import java.io.File; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputPathCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputPathCacheTest.java index 521230b5826..1a38d6e998c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputPathCacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/InputPathCacheTest.java @@ -33,7 +33,7 @@ import org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile; import org.sonar.batch.index.Caches; import org.sonar.batch.index.CachesTest; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class InputPathCacheTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactoryTest.java index 2cb4b862f1a..af30dcfc706 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactoryTest.java @@ -26,7 +26,7 @@ import org.sonar.api.resources.Languages; import org.sonar.batch.languages.DefaultLanguagesReferential; import org.sonar.batch.languages.LanguagesReferential; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class LanguageDetectionFactoryTest { @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionTest.java index a892042a8d4..e9155fd9c8a 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/LanguageDetectionTest.java @@ -37,7 +37,7 @@ import java.io.File; import java.io.IOException; import static junit.framework.Assert.fail; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.spy; public class LanguageDetectionTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java index 78868ef607c..53ee455adfb 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java @@ -31,7 +31,7 @@ import org.sonar.api.utils.TempFolder; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ModuleFileSystemInitializerTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/PreviousFileHashLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/PreviousFileHashLoaderTest.java index 6ae7fef716a..efcd5b3894d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/PreviousFileHashLoaderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/PreviousFileHashLoaderTest.java @@ -37,7 +37,7 @@ import java.util.Arrays; import java.util.Date; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java index 79042b1b86f..8d6cf8bfaf8 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ProjectFileSystemAdapterTest.java @@ -28,7 +28,7 @@ import org.sonar.api.resources.Project; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class ProjectFileSystemAdapterTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionFactoryTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionFactoryTest.java index 46bf71ecc8b..5b1badcd0a5 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionFactoryTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionFactoryTest.java @@ -22,7 +22,7 @@ package org.sonar.batch.scan.filesystem; import org.junit.Test; import org.sonar.batch.protocol.input.ProjectReferentials; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class StatusDetectionFactoryTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionTest.java index e40df46c172..4e93f7d5210 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/StatusDetectionTest.java @@ -24,7 +24,7 @@ import org.sonar.api.batch.fs.InputFile; import org.sonar.batch.protocol.input.FileData; import org.sonar.batch.protocol.input.ProjectReferentials; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class StatusDetectionTest { @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java index 49d777d8310..c082ce65143 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java @@ -48,7 +48,7 @@ import org.sonar.batch.index.CachesTest; import java.util.Date; import java.util.Iterator; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/report/JsonReportTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/report/JsonReportTest.java index ad7194360e4..f815408bf48 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan/report/JsonReportTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan/report/JsonReportTest.java @@ -57,7 +57,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.TimeZone; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyListOf; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java index 0f79c6521cd..b26434d3048 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scan2/AnalyzerOptimizerTest.java @@ -31,7 +31,7 @@ import org.sonar.api.batch.rule.internal.ActiveRulesBuilder; import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor; import org.sonar.api.rule.RuleKey; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AnalyzerOptimizerTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/source/CodeColorizersTest.java b/sonar-batch/src/test/java/org/sonar/batch/source/CodeColorizersTest.java index 4fa2716b081..58f1d3f86c8 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/source/CodeColorizersTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/source/CodeColorizersTest.java @@ -37,7 +37,7 @@ import java.io.File; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CodeColorizersTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/source/DefaultHighlightableTest.java b/sonar-batch/src/test/java/org/sonar/batch/source/DefaultHighlightableTest.java index da0966aee6e..a14e4fe91d1 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/source/DefaultHighlightableTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/source/DefaultHighlightableTest.java @@ -28,7 +28,7 @@ import org.sonar.batch.highlighting.SyntaxHighlightingData; import org.sonar.batch.index.ComponentDataCache; import org.sonar.core.source.SnapshotDataTypes; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/source/DefaultSymbolTableTest.java b/sonar-batch/src/test/java/org/sonar/batch/source/DefaultSymbolTableTest.java index 09394231a34..c23fcd2831d 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/source/DefaultSymbolTableTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/source/DefaultSymbolTableTest.java @@ -26,7 +26,7 @@ import org.junit.rules.ExpectedException; import org.sonar.api.source.Symbol; import org.sonar.api.source.Symbolizable; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultSymbolTableTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/source/HighlightableBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/source/HighlightableBuilderTest.java index b41d6ee4559..4a26c3b4bbf 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/source/HighlightableBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/source/HighlightableBuilderTest.java @@ -28,7 +28,7 @@ import org.sonar.api.source.Highlightable; import org.sonar.batch.index.ComponentDataCache; import org.sonar.core.component.ResourceComponent; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class HighlightableBuilderTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/source/SymbolizableBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/source/SymbolizableBuilderTest.java index e4c73dfd0b5..f2138c9a721 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/source/SymbolizableBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/source/SymbolizableBuilderTest.java @@ -26,7 +26,7 @@ import org.sonar.api.component.Perspective; import org.sonar.api.source.Symbolizable; import org.sonar.batch.index.ComponentDataCache; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class SymbolizableBuilderTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/symbol/DefaultSymbolTableBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/symbol/DefaultSymbolTableBuilderTest.java index c68156c0a2d..8e125a74d04 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/symbol/DefaultSymbolTableBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/symbol/DefaultSymbolTableBuilderTest.java @@ -33,7 +33,7 @@ import java.util.ArrayList; import java.util.Map; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-batch/src/test/java/org/sonar/batch/tasks/TasksTest.java b/sonar-batch/src/test/java/org/sonar/batch/tasks/TasksTest.java index cd8c0cf1d38..5c4315890c2 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/tasks/TasksTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/tasks/TasksTest.java @@ -27,7 +27,7 @@ import org.sonar.api.task.TaskDefinition; import org.sonar.api.utils.SonarException; import org.sonar.batch.scan.ScanTask; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TasksTest { diff --git a/sonar-batch/src/test/java/org/sonar/batch/util/DeprecatedKeyUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/util/DeprecatedKeyUtilsTest.java index 989bcd27ceb..e365775bb02 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/util/DeprecatedKeyUtilsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/util/DeprecatedKeyUtilsTest.java @@ -21,7 +21,7 @@ package org.sonar.batch.util; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DeprecatedKeyUtilsTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java index 7e2616ea209..c68eb7b128d 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.channel.CodeReader; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CDocTokenizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java index ffb379c0637..bd1a02d13b8 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java @@ -21,7 +21,7 @@ package org.sonar.colorizer; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.colorizer.SyntaxHighlighterTestingHarness.highlight; public class CaseInsensitiveKeywordsTokenizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java index b60d3d1b683..ed30d457e95 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java @@ -33,7 +33,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CodeColorizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java index 60b5880e0ee..7fade116c20 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java @@ -22,7 +22,7 @@ package org.sonar.colorizer; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HtmlCodeBuilderTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java index 00919dfcd7c..ff69b9b1e05 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java @@ -22,7 +22,7 @@ package org.sonar.colorizer; import org.junit.Test; import org.sonar.channel.CodeReader; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HtmlDecoratorTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java index b3176402377..f4a897952c1 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java @@ -28,7 +28,7 @@ import java.io.IOException; import java.io.StringReader; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HtmlRendererTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java index 0e6ced24860..7d94020a7cd 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java @@ -21,7 +21,7 @@ package org.sonar.colorizer; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.colorizer.SyntaxHighlighterTestingHarness.highlight; public class JavaAnnotationTokenizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java index 90fd7a22731..5301d59803c 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java @@ -21,7 +21,7 @@ package org.sonar.colorizer; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class JavaKeywordsTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java index 01527269a29..c04f293b4b8 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java @@ -23,7 +23,7 @@ import java.util.List; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class JavaTokenizersTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java index 809c27794ff..732dfe4abce 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java @@ -21,7 +21,7 @@ package org.sonar.colorizer; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.colorizer.SyntaxHighlighterTestingHarness.highlight; public class JavadocTokenizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java index e36736db923..79c85809690 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java @@ -19,7 +19,7 @@ */ package org.sonar.colorizer; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.colorizer.SyntaxHighlighterTestingHarness.highlight; import org.junit.Test; diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java index 192e386287b..defb7dd1f4b 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java @@ -24,7 +24,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.channel.CodeReader; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MultilinesDocTokenizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java index 86475b2587d..bfaf042231c 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java @@ -21,7 +21,7 @@ package org.sonar.colorizer; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.colorizer.SyntaxHighlighterTestingHarness.highlight; public class RegexpTokenizerTest { diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java index 07548806439..3e5272cd6c4 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java @@ -25,7 +25,7 @@ import org.sonar.channel.CodeReader; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TokenizerDispatcherTest { diff --git a/sonar-core/src/test/java/org/sonar/core/UtcDateUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/UtcDateUtilsTest.java index c4d77d23034..40c9df1e3f9 100644 --- a/sonar-core/src/test/java/org/sonar/core/UtcDateUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/UtcDateUtilsTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class UtcDateUtilsTest { diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java index e54956f50e3..e6a1c431a8d 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.component; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ComponentDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java index 8b8c33025cc..650996e9c8d 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java @@ -26,7 +26,7 @@ import org.sonar.api.resources.Directory; import org.sonar.api.resources.Library; import org.sonar.api.resources.Project; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ComponentKeysTest { diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java index 377b9b53242..39f24e8a805 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentVertexTest.java @@ -26,7 +26,7 @@ import org.sonar.api.component.mock.MockSourceFile; import org.sonar.api.resources.Qualifiers; import org.sonar.core.graph.BeanGraph; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/component/GraphPerspectiveBuilderTest.java b/sonar-core/src/test/java/org/sonar/core/component/GraphPerspectiveBuilderTest.java index 0184a224c4f..2de2110104f 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/GraphPerspectiveBuilderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/GraphPerspectiveBuilderTest.java @@ -27,7 +27,7 @@ import org.sonar.api.component.Perspective; import org.sonar.api.component.mock.MockSourceFile; import org.sonar.core.graph.BeanVertex; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/component/PerspectiveBuilderTest.java b/sonar-core/src/test/java/org/sonar/core/component/PerspectiveBuilderTest.java index d8ebcf24966..4275f2c63d9 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/PerspectiveBuilderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/PerspectiveBuilderTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.component.Component; import org.sonar.api.component.Perspective; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PerspectiveBuilderTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java b/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java index 5b060c9e1e0..de50b2ceb5a 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ResourceComponentTest.java @@ -25,8 +25,8 @@ import org.sonar.api.database.model.Snapshot; import org.sonar.api.resources.File; import org.sonar.api.resources.Resource; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ResourceComponentTest { diff --git a/sonar-core/src/test/java/org/sonar/core/component/SnapshotDtoTest.java b/sonar-core/src/test/java/org/sonar/core/component/SnapshotDtoTest.java index ac13ac5a2b8..13ed081c220 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/SnapshotDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/SnapshotDtoTest.java @@ -23,7 +23,7 @@ package org.sonar.core.component; import org.junit.Test; import org.sonar.api.utils.DateUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SnapshotDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DataCleanerPropertiesTest.java b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DataCleanerPropertiesTest.java index da34eb61566..d6fc2766cef 100644 --- a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DataCleanerPropertiesTest.java +++ b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DataCleanerPropertiesTest.java @@ -22,7 +22,7 @@ package org.sonar.core.computation.dbcleaner; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DataCleanerPropertiesTest { diff --git a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTaskTest.java b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTaskTest.java index d1b2c782187..1742a7e3729 100644 --- a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTaskTest.java +++ b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTaskTest.java @@ -34,7 +34,7 @@ import org.sonar.core.computation.dbcleaner.period.DefaultPeriodCleaner; import org.sonar.core.resource.ResourceDao; import org.sonar.core.resource.ResourceDto; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.argThat; diff --git a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/DeleteAllFilterTest.java b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/DeleteAllFilterTest.java index 2a84512355e..57be167fc5d 100644 --- a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/DeleteAllFilterTest.java +++ b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/DeleteAllFilterTest.java @@ -28,7 +28,7 @@ import org.sonar.core.purge.PurgeableSnapshotDto; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DeleteAllFilterTest { @@ -42,6 +42,6 @@ public class DeleteAllFilterTest { DbCleanerTestUtils.createSnapshotWithDate(3L, "2012-01-01") )); - assertThat(toDelete).onProperty("snapshotId").containsOnly(1L, 2L); + assertThat(toDelete).extracting("snapshotId").containsOnly(1L, 2L); } } diff --git a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/KeepOneFilterTest.java b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/KeepOneFilterTest.java index 02d655767ae..c449eddc134 100644 --- a/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/KeepOneFilterTest.java +++ b/sonar-core/src/test/java/org/sonar/core/computation/dbcleaner/period/KeepOneFilterTest.java @@ -34,7 +34,7 @@ import java.util.Calendar; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class KeepOneFilterTest { diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java index 5f3b028baa7..f96c5fe7632 100644 --- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java @@ -24,7 +24,7 @@ import org.sonar.api.config.PropertyDefinition; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CorePropertyDefinitionsTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/dependency/DependencyMapperTest.java b/sonar-core/src/test/java/org/sonar/core/dependency/DependencyMapperTest.java index d41362a3f0a..5c16ce4108e 100644 --- a/sonar-core/src/test/java/org/sonar/core/dependency/DependencyMapperTest.java +++ b/sonar-core/src/test/java/org/sonar/core/dependency/DependencyMapperTest.java @@ -29,7 +29,7 @@ import org.sonar.core.persistence.MyBatis; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DependencyMapperTest extends AbstractDaoTestCase { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/dependency/ResourceSnapshotMapperTest.java b/sonar-core/src/test/java/org/sonar/core/dependency/ResourceSnapshotMapperTest.java index a5156d36759..b721690ba58 100644 --- a/sonar-core/src/test/java/org/sonar/core/dependency/ResourceSnapshotMapperTest.java +++ b/sonar-core/src/test/java/org/sonar/core/dependency/ResourceSnapshotMapperTest.java @@ -29,7 +29,7 @@ import org.sonar.core.persistence.MyBatis; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResourceSnapshotMapperTest extends AbstractDaoTestCase { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/graph/BeanElementTest.java b/sonar-core/src/test/java/org/sonar/core/graph/BeanElementTest.java index 6170d427eb7..69fd68da899 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/BeanElementTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/BeanElementTest.java @@ -24,7 +24,7 @@ import com.tinkerpop.blueprints.impls.tg.TinkerGraph; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BeanElementTest { diff --git a/sonar-core/src/test/java/org/sonar/core/graph/BeanElementsTest.java b/sonar-core/src/test/java/org/sonar/core/graph/BeanElementsTest.java index 8c6696954bd..eb5f4d09c6f 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/BeanElementsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/BeanElementsTest.java @@ -26,7 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BeanElementsTest { TinkerGraph graph; diff --git a/sonar-core/src/test/java/org/sonar/core/graph/BeanGraphTest.java b/sonar-core/src/test/java/org/sonar/core/graph/BeanGraphTest.java index bacaed5ce4e..8054f745878 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/BeanGraphTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/BeanGraphTest.java @@ -24,7 +24,7 @@ import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.impls.tg.TinkerGraph; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BeanGraphTest { diff --git a/sonar-core/src/test/java/org/sonar/core/graph/EdgePathTest.java b/sonar-core/src/test/java/org/sonar/core/graph/EdgePathTest.java index 3a1a5895f84..a254e777634 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/EdgePathTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/EdgePathTest.java @@ -24,7 +24,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EdgePathTest { diff --git a/sonar-core/src/test/java/org/sonar/core/graph/GraphUtilTest.java b/sonar-core/src/test/java/org/sonar/core/graph/GraphUtilTest.java index 399b0463905..748f09a0203 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/GraphUtilTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/GraphUtilTest.java @@ -26,7 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GraphUtilTest { diff --git a/sonar-core/src/test/java/org/sonar/core/graph/SubGraphTest.java b/sonar-core/src/test/java/org/sonar/core/graph/SubGraphTest.java index 18706e43fb5..9323c28e6d2 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/SubGraphTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/SubGraphTest.java @@ -27,7 +27,7 @@ import com.tinkerpop.blueprints.impls.tg.TinkerGraph; import com.tinkerpop.blueprints.util.GraphHelper; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SubGraphTest { diff --git a/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonUtilTest.java b/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonUtilTest.java index 1390a3f5bf3..607ffc3d0a0 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonUtilTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonUtilTest.java @@ -41,7 +41,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GraphsonUtilTest { private final String vertexJson1 = "{\"name\":\"marko\",\"age\":29,\"_id\":1,\"_type\":\"vertex\"}"; diff --git a/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonWriterTest.java b/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonWriterTest.java index 740e68ce665..3243d28ea50 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonWriterTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/graphson/GraphsonWriterTest.java @@ -29,7 +29,7 @@ import org.junit.Test; import java.io.ByteArrayOutputStream; import java.io.StringWriter; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GraphsonWriterTest { diff --git a/sonar-core/src/test/java/org/sonar/core/graph/jdbc/GraphDaoTest.java b/sonar-core/src/test/java/org/sonar/core/graph/jdbc/GraphDaoTest.java index f44635119fe..4b84ef03c87 100644 --- a/sonar-core/src/test/java/org/sonar/core/graph/jdbc/GraphDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/graph/jdbc/GraphDaoTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.core.persistence.AbstractDaoTestCase; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GraphDaoTest extends AbstractDaoTestCase { private GraphDao dao; diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java index 631497985f6..b859c92bc86 100644 --- a/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java +++ b/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java @@ -35,7 +35,7 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/DurationLabelTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/DurationLabelTest.java index 7a8dacca2b1..96a9f5efafe 100644 --- a/sonar-core/src/test/java/org/sonar/core/i18n/DurationLabelTest.java +++ b/sonar-core/src/test/java/org/sonar/core/i18n/DurationLabelTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @RunWith(MockitoJUnitRunner.class) public class DurationLabelTest { diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java index b7ffe6eb2cc..57db8e33aef 100644 --- a/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java @@ -29,7 +29,7 @@ import org.sonar.api.platform.PluginRepository; import java.net.URL; import java.net.URLClassLoader; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class I18nClassloaderTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanDeadlineComparatorTest.java b/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanDeadlineComparatorTest.java index 74fd98baaef..2132f0b32fe 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanDeadlineComparatorTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanDeadlineComparatorTest.java @@ -27,7 +27,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionPlanDeadlineComparatorTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanStatsTest.java b/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanStatsTest.java index cdbd60af51c..f37d730aa86 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanStatsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/ActionPlanStatsTest.java @@ -26,7 +26,7 @@ import org.sonar.api.issue.ActionPlan; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionPlanStatsTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java index 30b34609c00..d3475234280 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueBuilderTest.java @@ -25,7 +25,7 @@ import org.sonar.api.issue.internal.DefaultIssue; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultIssueBuilderTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssueChangeContextTest.java b/sonar-core/src/test/java/org/sonar/core/issue/IssueChangeContextTest.java index 473f4cdd658..d6e304a309d 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssueChangeContextTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/IssueChangeContextTest.java @@ -24,7 +24,7 @@ import org.sonar.api.issue.internal.IssueChangeContext; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueChangeContextTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssueFilterSerializerTest.java b/sonar-core/src/test/java/org/sonar/core/issue/IssueFilterSerializerTest.java index 55ec65cfe5e..5b992dd50d1 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssueFilterSerializerTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/IssueFilterSerializerTest.java @@ -27,7 +27,7 @@ import java.util.Map; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newLinkedHashMap; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueFilterSerializerTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java b/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java index ca625c8dc81..5f7e01e6c92 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java @@ -38,7 +38,7 @@ import java.util.Arrays; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java b/sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java index 5373ebef6eb..0ff082750e3 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/IssueUpdaterTest.java @@ -31,7 +31,7 @@ import org.sonar.core.user.DefaultUser; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.core.issue.IssueUpdater.*; public class IssueUpdaterTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssuesBySeverityTest.java b/sonar-core/src/test/java/org/sonar/core/issue/IssuesBySeverityTest.java index 6f330bfcc6a..8c62cb7ece2 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssuesBySeverityTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/IssuesBySeverityTest.java @@ -22,7 +22,7 @@ package org.sonar.core.issue; import org.junit.Test; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssuesBySeverityTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanDaoTest.java index 99d00d700f2..642cee05239 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanDaoTest.java @@ -30,7 +30,7 @@ import java.util.Collection; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionPlanDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanStatsDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanStatsDaoTest.java index 3f022735c9e..c86a0dcb59a 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanStatsDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/ActionPlanStatsDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionPlanStatsDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java index 29dba1d2455..91dcc972914 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java @@ -35,7 +35,7 @@ import java.util.Collections; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class IssueChangeDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java index 54eb020edfc..ae7523836dc 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java @@ -26,7 +26,7 @@ import org.sonar.api.utils.DateUtils; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueChangeDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java index cdc28b07b26..e55d83bfd1e 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java @@ -29,7 +29,7 @@ import org.sonar.api.utils.DateUtils; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.DbSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java index bfaff4bda1d..aee61d1fc0f 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java @@ -32,7 +32,7 @@ import java.util.Arrays; import java.util.Calendar; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterDaoTest.java index 2447b6e1b21..da240bd11e0 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueFilterDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterFavouriteDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterFavouriteDaoTest.java index 53135a412c2..52722038590 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterFavouriteDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueFilterFavouriteDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueFilterFavouriteDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java index 2d55a55e13b..a26c27e8dde 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java @@ -27,7 +27,7 @@ import org.sonar.api.utils.DateUtils; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.MyBatis; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IssueMapperTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/UpdateConflictResolverTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/UpdateConflictResolverTest.java index 87e1a5c971e..f3a251acca3 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/UpdateConflictResolverTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/UpdateConflictResolverTest.java @@ -27,7 +27,7 @@ import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; import org.sonar.api.utils.DateUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class UpdateConflictResolverTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsEndOfLifeTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsEndOfLifeTest.java index ebc4104d0c3..57823a87d7b 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsEndOfLifeTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsEndOfLifeTest.java @@ -22,7 +22,7 @@ package org.sonar.core.issue.workflow; import org.junit.Test; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IsEndOfLifeTest { DefaultIssue issue = new DefaultIssue(); diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsManualTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsManualTest.java index 3a62ead632d..7deaf627aa6 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsManualTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IsManualTest.java @@ -22,7 +22,7 @@ package org.sonar.core.issue.workflow; import org.junit.Test; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IsManualTest { DefaultIssue issue = new DefaultIssue(); diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java index 65b53358f16..46d0db5ba0d 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/IssueWorkflowTest.java @@ -37,8 +37,8 @@ import java.util.Collection; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class IssueWorkflowTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/SetEndOfLifeResolutionTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/SetEndOfLifeResolutionTest.java index 13306007242..4a2f88e0685 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/SetEndOfLifeResolutionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/SetEndOfLifeResolutionTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.*; public class SetEndOfLifeResolutionTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateMachineTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateMachineTest.java index 546858522b2..0f4640fc583 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateMachineTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateMachineTest.java @@ -21,7 +21,7 @@ package org.sonar.core.issue.workflow; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class StateMachineTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateTest.java index 853292df751..4845435612c 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/StateTest.java @@ -21,8 +21,8 @@ package org.sonar.core.issue.workflow; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class StateTest { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/workflow/TransitionTest.java b/sonar-core/src/test/java/org/sonar/core/issue/workflow/TransitionTest.java index b3b3eb2da38..0ac9809fdec 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/workflow/TransitionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/workflow/TransitionTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import org.sonar.api.issue.condition.Condition; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/measure/MeasurementFiltersTest.java b/sonar-core/src/test/java/org/sonar/core/measure/MeasurementFiltersTest.java index 88ae7264e02..cc0f1022f84 100644 --- a/sonar-core/src/test/java/org/sonar/core/measure/MeasurementFiltersTest.java +++ b/sonar-core/src/test/java/org/sonar/core/measure/MeasurementFiltersTest.java @@ -19,15 +19,13 @@ */ package org.sonar.core.measure; -import org.fest.util.Arrays; +import org.assertj.core.util.Arrays; import org.junit.Test; import org.sonar.api.measures.Measure; import org.sonar.api.resources.Resource; -import static org.fest.assertions.Assertions.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verifyZeroInteractions; -import static org.mockito.Mockito.when; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; public class MeasurementFiltersTest { diff --git a/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureDtoTest.java b/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureDtoTest.java index 833efb19116..81aecce8171 100644 --- a/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureDtoTest.java @@ -22,8 +22,8 @@ package org.sonar.core.measure.db; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class MeasureDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureFilterDaoTest.java b/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureFilterDaoTest.java index 311b2ddece1..013ad0f02e6 100644 --- a/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureFilterDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureFilterDaoTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.core.persistence.AbstractDaoTestCase; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureFilterDaoTest extends AbstractDaoTestCase { private MeasureFilterDao dao; diff --git a/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureKeyTest.java b/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureKeyTest.java index fcc643b17a6..342aa6e0b18 100644 --- a/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureKeyTest.java +++ b/sonar-core/src/test/java/org/sonar/core/measure/db/MeasureKeyTest.java @@ -22,8 +22,8 @@ package org.sonar.core.measure.db; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class MeasureKeyTest { diff --git a/sonar-core/src/test/java/org/sonar/core/measure/db/MetricDtoTest.java b/sonar-core/src/test/java/org/sonar/core/measure/db/MetricDtoTest.java index 3dc9cbc437f..16b18154068 100644 --- a/sonar-core/src/test/java/org/sonar/core/measure/db/MetricDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/measure/db/MetricDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.measure.db; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MetricDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java b/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java index 838e1ad46bc..015b2e72e46 100644 --- a/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java +++ b/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java @@ -40,7 +40,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; diff --git a/sonar-core/src/test/java/org/sonar/core/notification/db/NotificationQueueDaoTest.java b/sonar-core/src/test/java/org/sonar/core/notification/db/NotificationQueueDaoTest.java index e48fca30a84..39a837707b0 100644 --- a/sonar-core/src/test/java/org/sonar/core/notification/db/NotificationQueueDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/notification/db/NotificationQueueDaoTest.java @@ -28,7 +28,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Arrays; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NotificationQueueDaoTest extends AbstractDaoTestCase { @@ -78,7 +78,7 @@ public class NotificationQueueDaoTest extends AbstractDaoTestCase { Collection<NotificationQueueDto> result = dao.findOldest(3); assertThat(result).hasSize(3); - assertThat(result).onProperty("id").containsOnly(1L, 2L, 3L); + assertThat(result).extracting("id").containsOnly(1L, 2L, 3L); result = dao.findOldest(6); assertThat(result).hasSize(4); diff --git a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDaoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDaoTest.java index 18b495e3e0a..7a054560f48 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupWithPermissionDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDtoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDtoTest.java index b04c08b794b..bbff4ba4c58 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.permission; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupWithPermissionDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTemplateDaoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTemplateDaoTest.java index 8f3ee7d8ae2..6ab511947d3 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTemplateDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTemplateDaoTest.java @@ -27,7 +27,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupWithPermissionTemplateDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTest.java b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTest.java index d442c7d087f..6d2fc0fe0ff 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/GroupWithPermissionTest.java @@ -21,7 +21,7 @@ package org.sonar.core.permission; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupWithPermissionTest { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/PermissionFacadeTest.java b/sonar-core/src/test/java/org/sonar/core/permission/PermissionFacadeTest.java index 1a6472b6017..324bcb61995 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/PermissionFacadeTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/PermissionFacadeTest.java @@ -34,7 +34,7 @@ import org.sonar.core.resource.ResourceDao; import org.sonar.core.user.RoleDao; import org.sonar.core.user.UserDao; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/permission/PermissionTemplateDaoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/PermissionTemplateDaoTest.java index 0bb6f825edd..e4c5b8de4ec 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/PermissionTemplateDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/PermissionTemplateDaoTest.java @@ -33,7 +33,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class PermissionTemplateDaoTest extends AbstractDaoTestCase { @@ -104,14 +104,14 @@ public class PermissionTemplateDaoTest extends AbstractDaoTestCase { assertThat(permissionTemplate.getKee()).isEqualTo("my_template_20130102_030405"); assertThat(permissionTemplate.getDescription()).isEqualTo("my description"); assertThat(permissionTemplate.getUsersPermissions()).hasSize(3); - assertThat(permissionTemplate.getUsersPermissions()).onProperty("userId").containsOnly(1L, 2L, 1L); - assertThat(permissionTemplate.getUsersPermissions()).onProperty("userLogin").containsOnly("login1", "login2", "login2"); - assertThat(permissionTemplate.getUsersPermissions()).onProperty("userName").containsOnly("user1", "user2", "user2"); - assertThat(permissionTemplate.getUsersPermissions()).onProperty("permission").containsOnly("user_permission1", "user_permission1", "user_permission2"); + assertThat(permissionTemplate.getUsersPermissions()).extracting("userId").containsOnly(1L, 2L, 1L); + assertThat(permissionTemplate.getUsersPermissions()).extracting("userLogin").containsOnly("login1", "login2", "login2"); + assertThat(permissionTemplate.getUsersPermissions()).extracting("userName").containsOnly("user1", "user2", "user2"); + assertThat(permissionTemplate.getUsersPermissions()).extracting("permission").containsOnly("user_permission1", "user_permission1", "user_permission2"); assertThat(permissionTemplate.getGroupsPermissions()).hasSize(3); - assertThat(permissionTemplate.getGroupsPermissions()).onProperty("groupId").containsOnly(1L, 2L, null); - assertThat(permissionTemplate.getGroupsPermissions()).onProperty("groupName").containsOnly("group1", "group2", null); - assertThat(permissionTemplate.getGroupsPermissions()).onProperty("permission").containsOnly("group_permission1", "group_permission1", "group_permission2"); + assertThat(permissionTemplate.getGroupsPermissions()).extracting("groupId").containsOnly(1L, 2L, null); + assertThat(permissionTemplate.getGroupsPermissions()).extracting("groupName").containsOnly("group1", "group2", null); + assertThat(permissionTemplate.getGroupsPermissions()).extracting("permission").containsOnly("group_permission1", "group_permission1", "group_permission2"); } @Test @@ -146,10 +146,10 @@ public class PermissionTemplateDaoTest extends AbstractDaoTestCase { List<PermissionTemplateDto> permissionTemplates = permissionTemplateDao.selectAllPermissionTemplates(); assertThat(permissionTemplates).hasSize(3); - assertThat(permissionTemplates).onProperty("id").containsOnly(1L, 2L, 3L); - assertThat(permissionTemplates).onProperty("name").containsOnly("template1", "template2", "template3"); - assertThat(permissionTemplates).onProperty("kee").containsOnly("template1_20130102_030405", "template2_20130102_030405", "template3_20130102_030405"); - assertThat(permissionTemplates).onProperty("description").containsOnly("description1", "description2", "description3"); + assertThat(permissionTemplates).extracting("id").containsOnly(1L, 2L, 3L); + assertThat(permissionTemplates).extracting("name").containsOnly("template1", "template2", "template3"); + assertThat(permissionTemplates).extracting("kee").containsOnly("template1_20130102_030405", "template2_20130102_030405", "template3_20130102_030405"); + assertThat(permissionTemplates).extracting("description").containsOnly("description1", "description2", "description3"); } @Test diff --git a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDaoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDaoTest.java index 0265d269137..44d365c61df 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDaoTest.java @@ -30,7 +30,7 @@ import javax.annotation.Nullable; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserWithPermissionDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDtoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDtoTest.java index 5d1ac683d62..665d6e6401a 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.permission; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserWithPermissionDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTemplateDaoTest.java b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTemplateDaoTest.java index e0f0aea1167..5cfa6fd43c1 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTemplateDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTemplateDaoTest.java @@ -31,7 +31,7 @@ import javax.annotation.Nullable; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserWithPermissionTemplateDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTest.java b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTest.java index a0a32aa9e76..9bb731b564c 100644 --- a/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/permission/UserWithPermissionTest.java @@ -21,7 +21,7 @@ package org.sonar.core.permission; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserWithPermissionTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java index 08333600084..7ef1161ef17 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DaoUtilsTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseUtilsTest.java index adbb7bf487f..06f313be843 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseUtilsTest.java @@ -28,7 +28,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseVersionTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseVersionTest.java index 58d03a6adb4..bf22c224c5d 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseVersionTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseVersionTest.java @@ -22,7 +22,7 @@ package org.sonar.core.persistence; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DatabaseVersionTest extends AbstractDaoTestCase { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java index bd92cb7043a..3e5fdece620 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java @@ -27,7 +27,7 @@ import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DdlUtilsTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java index 094c68aac59..5de19270781 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.dialect.PostgreSql; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultDatabaseTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/H2DatabaseTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/H2DatabaseTest.java index b302ed84a5a..60df556b76c 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/H2DatabaseTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/H2DatabaseTest.java @@ -27,7 +27,7 @@ import org.junit.Test; import java.sql.Connection; import java.sql.SQLException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class H2DatabaseTest { H2Database db = new H2Database("sonar2", true); diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/PreviewDatabaseFactoryTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/PreviewDatabaseFactoryTest.java index 0aaf8ad5061..1df75d5fade 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/PreviewDatabaseFactoryTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/PreviewDatabaseFactoryTest.java @@ -39,7 +39,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PreviewDatabaseFactoryTest extends AbstractDaoTestCase { PreviewDatabaseFactory localDatabaseFactory; diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/SemaphoreDaoTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/SemaphoreDaoTest.java index 5ffbc499c6e..a2652f1aaa1 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/SemaphoreDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/SemaphoreDaoTest.java @@ -32,7 +32,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicInteger; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SemaphoreDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java index d0c90b27650..7981df76eab 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java @@ -22,7 +22,7 @@ package org.sonar.core.persistence.dialect; import org.junit.Test; import org.sonar.api.utils.MessageException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DialectUtilsTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java index aa5d0df4995..86e4838c3ff 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java @@ -21,7 +21,7 @@ package org.sonar.core.persistence.dialect; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class H2Test { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java index d4b5162a08d..930bd8398f2 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java @@ -21,7 +21,7 @@ package org.sonar.core.persistence.dialect; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MsSqlTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java index fa8c77437ba..32ad0160c39 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java @@ -21,7 +21,7 @@ package org.sonar.core.persistence.dialect; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MySqlTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java index 62886fa5feb..b7e7814fe0e 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class OracleSequenceGeneratorTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java index c653d8111c1..d50f7ccc2b0 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java @@ -21,7 +21,7 @@ package org.sonar.core.persistence.dialect; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class OracleTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java index 5c9cfca8c13..d90dcaeee27 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PostgreSQLSequenceGeneratorTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java index 5b62d359d9f..5eeabda0239 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java @@ -21,7 +21,7 @@ package org.sonar.core.persistence.dialect; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PostgreSqlTest { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/profiling/InvocationUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/profiling/InvocationUtilsTest.java index df597c98bc5..728eb940982 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/profiling/InvocationUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/profiling/InvocationUtilsTest.java @@ -19,13 +19,13 @@ */ package org.sonar.core.persistence.profiling; -import org.fest.assertions.Fail; import org.junit.Test; import java.sql.Connection; import java.sql.SQLException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -48,7 +48,7 @@ public class InvocationUtilsTest { try { InvocationUtils.invokeQuietly(target, Connection.class.getMethod("prepareStatement", String.class), new Object[] { failSql }); - Fail.fail(); + fail(); } catch (Throwable t) { assertThat(t).isInstanceOf(SQLException.class); } @@ -62,7 +62,7 @@ public class InvocationUtilsTest { try { InvocationUtils.invokeQuietly(target, Object.class.getMethod("wait"), new Object[0]); - Fail.fail(); + fail(); } catch (Throwable t) { assertThat(t).isInstanceOf(IllegalStateException.class); } diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/profiling/PersistenceProfilingTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/profiling/PersistenceProfilingTest.java index ab0739942b0..11e637661c9 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/profiling/PersistenceProfilingTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/profiling/PersistenceProfilingTest.java @@ -33,7 +33,7 @@ import org.sonar.core.profiling.Profiling; import java.io.ByteArrayInputStream; import java.sql.*; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java b/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java index d3f819392b5..f738ada38c7 100644 --- a/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java +++ b/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java @@ -28,7 +28,7 @@ import java.util.List; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Ordering.natural; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultPluginMetadataTest { @@ -106,7 +106,7 @@ public class DefaultPluginMetadataTest { .setName("PMD"); List<DefaultPluginMetadata> plugins = Arrays.asList(pmd, checkstyle); - assertThat(natural().sortedCopy(plugins)).onProperty("key").containsExactly("checkstyle", "pmd"); + assertThat(natural().sortedCopy(plugins)).extracting("key").containsExactly("checkstyle", "pmd"); } @Test diff --git a/sonar-core/src/test/java/org/sonar/core/plugins/PluginClassloadersTest.java b/sonar-core/src/test/java/org/sonar/core/plugins/PluginClassloadersTest.java index 120680b1998..bbf91377797 100644 --- a/sonar-core/src/test/java/org/sonar/core/plugins/PluginClassloadersTest.java +++ b/sonar-core/src/test/java/org/sonar/core/plugins/PluginClassloadersTest.java @@ -35,7 +35,7 @@ import java.io.File; import java.util.Arrays; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; diff --git a/sonar-core/src/test/java/org/sonar/core/plugins/PluginJarInstallerTest.java b/sonar-core/src/test/java/org/sonar/core/plugins/PluginJarInstallerTest.java index 59532abc28f..3fc177f99d4 100644 --- a/sonar-core/src/test/java/org/sonar/core/plugins/PluginJarInstallerTest.java +++ b/sonar-core/src/test/java/org/sonar/core/plugins/PluginJarInstallerTest.java @@ -28,7 +28,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PluginJarInstallerTest { diff --git a/sonar-core/src/test/java/org/sonar/core/preview/PreviewCacheTest.java b/sonar-core/src/test/java/org/sonar/core/preview/PreviewCacheTest.java index 834e319a060..c635741e6d4 100644 --- a/sonar-core/src/test/java/org/sonar/core/preview/PreviewCacheTest.java +++ b/sonar-core/src/test/java/org/sonar/core/preview/PreviewCacheTest.java @@ -39,7 +39,7 @@ import org.sonar.core.resource.ResourceDto; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.anyString; diff --git a/sonar-core/src/test/java/org/sonar/core/properties/PropertiesDaoTest.java b/sonar-core/src/test/java/org/sonar/core/properties/PropertiesDaoTest.java index 12aae6b86ee..ea73c7b1357 100644 --- a/sonar-core/src/test/java/org/sonar/core/properties/PropertiesDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/properties/PropertiesDaoTest.java @@ -31,7 +31,7 @@ import org.sonar.core.persistence.DbSession; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; @@ -149,8 +149,8 @@ public class PropertiesDaoTest extends AbstractDaoTestCase { List<PropertyDto> properties = dao.selectProjectProperties(10L); assertThat(properties.size(), is(2)); - assertThat(properties).onProperty("key").containsOnly("struts.one", "user.two"); - assertThat(properties).onProperty("value").containsOnly("one", "two"); + assertThat(properties).extracting("key").containsOnly("struts.one", "user.two"); + assertThat(properties).extracting("value").containsOnly("one", "two"); } @Test @@ -159,12 +159,12 @@ public class PropertiesDaoTest extends AbstractDaoTestCase { List<PropertyDto> properties = dao.findChildrenModuleProperties("org.struts:struts", session); assertThat(properties.size(), is(3)); - assertThat(properties).onProperty("key").containsOnly("core.one", "core.two", "data.one"); - assertThat(properties).onProperty("value").containsOnly("one", "two"); + assertThat(properties).extracting("key").containsOnly("core.one", "core.two", "data.one"); + assertThat(properties).extracting("value").containsOnly("one", "two"); properties = dao.findChildrenModuleProperties("org.struts:struts-core", session); assertThat(properties.size(), is(1)); - assertThat(properties).onProperty("key").containsOnly("data.one"); + assertThat(properties).extracting("key").containsOnly("data.one"); assertThat(dao.findChildrenModuleProperties("org.struts:struts-data", session).size(), is(0)); } diff --git a/sonar-core/src/test/java/org/sonar/core/properties/PropertyDtoTest.java b/sonar-core/src/test/java/org/sonar/core/properties/PropertyDtoTest.java index 96cb9f0b891..cd352bff05e 100644 --- a/sonar-core/src/test/java/org/sonar/core/properties/PropertyDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/properties/PropertyDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.properties; import org.junit.Test; import org.sonar.core.persistence.AbstractDaoTestCase; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PropertyDtoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/purge/IdUuidPairsTest.java b/sonar-core/src/test/java/org/sonar/core/purge/IdUuidPairsTest.java index 5fc436735b2..102000fe5c7 100644 --- a/sonar-core/src/test/java/org/sonar/core/purge/IdUuidPairsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/purge/IdUuidPairsTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IdUuidPairsTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/purge/PurgeConfigurationTest.java b/sonar-core/src/test/java/org/sonar/core/purge/PurgeConfigurationTest.java index 7995f0eb49c..d545ed63d0a 100644 --- a/sonar-core/src/test/java/org/sonar/core/purge/PurgeConfigurationTest.java +++ b/sonar-core/src/test/java/org/sonar/core/purge/PurgeConfigurationTest.java @@ -24,7 +24,7 @@ import org.sonar.api.utils.DateUtils; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PurgeConfigurationTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java b/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java index 421b5362283..0683bade2de 100644 --- a/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java @@ -31,7 +31,7 @@ import org.sonar.core.resource.ResourceDao; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDaoTest.java b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDaoTest.java index 66c998ff978..2ca41dc05c5 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectQgateAssociationDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDtoTest.java b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDtoTest.java index 90f8c979a53..98cd26c1874 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.qualitygate.db; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectQgateAssociationDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationQueryTest.java b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationQueryTest.java index 260f14605ef..6269c92139c 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationQueryTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/ProjectQgateAssociationQueryTest.java @@ -22,8 +22,8 @@ package org.sonar.core.qualitygate.db; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ProjectQgateAssociationQueryTest { diff --git a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDaoTest.java b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDaoTest.java index 5ac75ac4b01..6ca42061c5b 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDaoTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.core.persistence.AbstractDaoTestCase; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class QualityGateConditionDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDtoTest.java b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDtoTest.java index 1e00c59c378..ea8b962caa6 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateConditionDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.qualitygate.db; import org.junit.Test; import org.sonar.api.measures.Metric.ValueType; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.api.measures.Metric.ValueType.*; import static org.sonar.core.qualitygate.db.QualityGateConditionDto.isOperatorAllowed; diff --git a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateDaoTest.java b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateDaoTest.java index 5447ebd0afc..e5dd4364e58 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualitygate/db/QualityGateDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Collection; import java.util.Iterator; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class QualityGateDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleDaoTest.java index 2b22304ee20..c3d8ede823c 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleDaoTest.java @@ -27,7 +27,7 @@ import org.sonar.core.persistence.DbSession; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActiveRuleDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleKeyTest.java b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleKeyTest.java index 165ca07afbd..89c2970dba1 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleKeyTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleKeyTest.java @@ -22,8 +22,8 @@ package org.sonar.core.qualityprofile.db; import org.junit.Test; import org.sonar.api.rule.RuleKey; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ActiveRuleKeyTest { diff --git a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleParamDtoTest.java b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleParamDtoTest.java index 88745afabfe..c8238bb7740 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleParamDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/ActiveRuleParamDtoTest.java @@ -26,7 +26,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActiveRuleParamDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/QualityProfileDaoTest.java b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/QualityProfileDaoTest.java index 21386e7be70..ea836070470 100644 --- a/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/QualityProfileDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/qualityprofile/db/QualityProfileDaoTest.java @@ -30,7 +30,7 @@ import org.sonar.core.persistence.DbSession; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-core/src/test/java/org/sonar/core/resource/DefaultResourcePermissionsTest.java b/sonar-core/src/test/java/org/sonar/core/resource/DefaultResourcePermissionsTest.java index a3795070864..2a8c5bcbccc 100644 --- a/sonar-core/src/test/java/org/sonar/core/resource/DefaultResourcePermissionsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/resource/DefaultResourcePermissionsTest.java @@ -36,7 +36,7 @@ import org.sonar.core.persistence.DbSession; import org.sonar.core.user.RoleDao; import org.sonar.core.user.UserDao; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultResourcePermissionsTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java index a071e054929..78752e11a62 100644 --- a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java @@ -41,7 +41,7 @@ import java.util.Collections; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -71,7 +71,7 @@ public class ResourceDaoTest extends AbstractDaoTestCase { List<ResourceDto> resources = dao.getDescendantProjects(1L); - assertThat(resources).onProperty("id").containsOnly(2L); + assertThat(resources).extracting("id").containsOnly(2L); } @Test @@ -145,7 +145,7 @@ public class ResourceDaoTest extends AbstractDaoTestCase { setupData("fixture"); List<ResourceDto> resources = dao.getResources(ResourceQuery.create().setQualifiers(new String[] {"TRK", "BRC"})); - assertThat(resources).onProperty("qualifier").containsOnly("TRK", "BRC"); + assertThat(resources).extracting("qualifier").containsOnly("TRK", "BRC"); resources = dao.getResources(ResourceQuery.create().setQualifiers(new String[] {"XXX"})); assertThat(resources).isEmpty(); diff --git a/sonar-core/src/test/java/org/sonar/core/resource/ResourceKeyUpdaterDaoTest.java b/sonar-core/src/test/java/org/sonar/core/resource/ResourceKeyUpdaterDaoTest.java index 2865cf48338..fe0d55bd040 100644 --- a/sonar-core/src/test/java/org/sonar/core/resource/ResourceKeyUpdaterDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/resource/ResourceKeyUpdaterDaoTest.java @@ -27,7 +27,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResourceKeyUpdaterDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java index 0c5d788048e..6794e0e47f1 100644 --- a/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RuleDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDaoTest.java b/sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDaoTest.java index 8e4e0274048..9e4644a657b 100644 --- a/sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDaoTest.java @@ -28,7 +28,7 @@ import org.sonar.core.persistence.DbSession; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FileSourceDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/source/db/SnapshotDataDaoTest.java b/sonar-core/src/test/java/org/sonar/core/source/db/SnapshotDataDaoTest.java index 07441469e9c..5f567aa414c 100644 --- a/sonar-core/src/test/java/org/sonar/core/source/db/SnapshotDataDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/source/db/SnapshotDataDaoTest.java @@ -27,7 +27,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SnapshotDataDaoTest extends AbstractDaoTestCase { @@ -43,9 +43,9 @@ public class SnapshotDataDaoTest extends AbstractDaoTestCase { public void select_snapshot_data_by_snapshot_id() throws Exception { Collection<SnapshotDataDto> data = dao.selectSnapshotData(10L, Lists.newArrayList("highlight_syntax", "symbol")); - assertThat(data).onProperty("snapshotId").containsOnly(10L, 10L); - assertThat(data).onProperty("dataType").containsOnly("highlight_syntax", "symbol"); - assertThat(data).onProperty("data").containsOnly("0,10,k;", "20,25,20,35,45;"); + assertThat(data).extracting("snapshotId").containsOnly(10L, 10L); + assertThat(data).extracting("dataType").containsOnly("highlight_syntax", "symbol"); + assertThat(data).extracting("data").containsOnly("0,10,k;", "20,25,20,35,45;"); } @Test @@ -63,9 +63,9 @@ public class SnapshotDataDaoTest extends AbstractDaoTestCase { Collection<SnapshotDataDto> serializedData = dao.selectSnapshotData(11L, Lists.newArrayList("highlight_syntax")); - assertThat(serializedData).onProperty("snapshotId").containsOnly(11L); - assertThat(serializedData).onProperty("dataType").containsOnly(dataType); - assertThat(serializedData).onProperty("data").containsOnly(data); + assertThat(serializedData).extracting("snapshotId").containsOnly(11L); + assertThat(serializedData).extracting("dataType").containsOnly(dataType); + assertThat(serializedData).extracting("data").containsOnly(data); } @Test @@ -73,8 +73,8 @@ public class SnapshotDataDaoTest extends AbstractDaoTestCase { Collection<SnapshotDataDto> data = dao.selectSnapshotDataByComponentKey("org.apache.struts:struts:Dispatcher", Lists.newArrayList("highlight_syntax", "symbol")); assertThat(data).isNotEmpty(); - assertThat(data).onProperty("snapshotId").containsOnly(10L, 10L); - assertThat(data).onProperty("dataType").containsOnly("highlight_syntax", "symbol"); - assertThat(data).onProperty("data").containsOnly("0,10,k;", "20,25,20,35,45;"); + assertThat(data).extracting("snapshotId").containsOnly(10L, 10L); + assertThat(data).extracting("dataType").containsOnly("highlight_syntax", "symbol"); + assertThat(data).extracting("data").containsOnly("0,10,k;", "20,25,20,35,45;"); } } diff --git a/sonar-core/src/test/java/org/sonar/core/technicaldebt/DefaultTechnicalDebtModelTest.java b/sonar-core/src/test/java/org/sonar/core/technicaldebt/DefaultTechnicalDebtModelTest.java index a22036ed58e..f0a97767e0e 100644 --- a/sonar-core/src/test/java/org/sonar/core/technicaldebt/DefaultTechnicalDebtModelTest.java +++ b/sonar-core/src/test/java/org/sonar/core/technicaldebt/DefaultTechnicalDebtModelTest.java @@ -27,7 +27,7 @@ import org.sonar.api.batch.debt.internal.DefaultDebtModel; import org.sonar.api.rule.RuleKey; import org.sonar.api.technicaldebt.batch.internal.DefaultCharacteristic; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTechnicalDebtModelTest { diff --git a/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDaoTest.java b/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDaoTest.java index 0379af02c46..fa86283adf7 100644 --- a/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDaoTest.java @@ -28,7 +28,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CharacteristicDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDtoTest.java b/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDtoTest.java index 40fd1f56756..28b278d2e0b 100644 --- a/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/technicaldebt/db/CharacteristicDtoTest.java @@ -25,7 +25,7 @@ import org.sonar.api.technicaldebt.batch.internal.DefaultCharacteristic; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CharacteristicDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/test/DefaultTestCaseTest.java b/sonar-core/src/test/java/org/sonar/core/test/DefaultTestCaseTest.java index c528ab4847a..683460628a8 100644 --- a/sonar-core/src/test/java/org/sonar/core/test/DefaultTestCaseTest.java +++ b/sonar-core/src/test/java/org/sonar/core/test/DefaultTestCaseTest.java @@ -34,7 +34,7 @@ import org.sonar.core.graph.BeanGraph; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTestCaseTest { diff --git a/sonar-core/src/test/java/org/sonar/core/test/DefaultTestPlanTest.java b/sonar-core/src/test/java/org/sonar/core/test/DefaultTestPlanTest.java index 5280d62a60c..aa04ede303f 100644 --- a/sonar-core/src/test/java/org/sonar/core/test/DefaultTestPlanTest.java +++ b/sonar-core/src/test/java/org/sonar/core/test/DefaultTestPlanTest.java @@ -27,7 +27,7 @@ import org.sonar.api.test.MutableTestCase; import org.sonar.api.test.TestPlan; import org.sonar.core.graph.BeanGraph; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTestPlanTest { @Rule diff --git a/sonar-core/src/test/java/org/sonar/core/test/DefaultTestableTest.java b/sonar-core/src/test/java/org/sonar/core/test/DefaultTestableTest.java index 18bf9b76946..23e92bb71d8 100644 --- a/sonar-core/src/test/java/org/sonar/core/test/DefaultTestableTest.java +++ b/sonar-core/src/test/java/org/sonar/core/test/DefaultTestableTest.java @@ -30,7 +30,7 @@ import org.sonar.core.graph.BeanGraph; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTestableTest { diff --git a/sonar-core/src/test/java/org/sonar/core/test/TestPlanBuilderTest.java b/sonar-core/src/test/java/org/sonar/core/test/TestPlanBuilderTest.java index 86cfca8e51f..0b455e57cf8 100644 --- a/sonar-core/src/test/java/org/sonar/core/test/TestPlanBuilderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/test/TestPlanBuilderTest.java @@ -25,7 +25,7 @@ import org.sonar.api.test.MutableTestPlan; import org.sonar.core.component.ComponentVertex; import org.sonar.core.component.ScanGraph; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestPlanBuilderTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/test/TestableBuilderTest.java b/sonar-core/src/test/java/org/sonar/core/test/TestableBuilderTest.java index aa7ee7537b0..e9a962fb237 100644 --- a/sonar-core/src/test/java/org/sonar/core/test/TestableBuilderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/test/TestableBuilderTest.java @@ -25,7 +25,7 @@ import org.sonar.api.test.MutableTestable; import org.sonar.core.component.ComponentVertex; import org.sonar.core.component.ScanGraph; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestableBuilderTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java index 2bb589fbfc9..a8296eebebe 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java @@ -26,8 +26,8 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.resource.ResourceDao; import org.sonar.core.resource.ResourceDto; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class AuthorDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/user/AuthorizationDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/AuthorizationDaoTest.java index e73dc65e787..2e267d391ad 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/AuthorizationDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/AuthorizationDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.Collection; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AuthorizationDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java b/sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java index 8a1f8c482bc..55da48e5823 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java @@ -26,7 +26,7 @@ import org.sonar.api.user.UserQuery; import java.util.Arrays; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class DefaultUserFinderTest { diff --git a/sonar-core/src/test/java/org/sonar/core/user/DefaultUserTest.java b/sonar-core/src/test/java/org/sonar/core/user/DefaultUserTest.java index 2b3be54e068..6028a82dd3d 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/DefaultUserTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/DefaultUserTest.java @@ -21,7 +21,7 @@ package org.sonar.core.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultUserTest { @Test diff --git a/sonar-core/src/test/java/org/sonar/core/user/GroupDtoTest.java b/sonar-core/src/test/java/org/sonar/core/user/GroupDtoTest.java index 87b6db2ff52..47f9fbd71aa 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/GroupDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/GroupDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDaoTest.java index 03acafecc34..bad880abb04 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDaoTest.java @@ -26,7 +26,7 @@ import org.sonar.core.persistence.AbstractDaoTestCase; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupMembershipDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDtoTest.java b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDtoTest.java index 38efb7ae25e..f4825d7441e 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipDtoTest.java @@ -22,7 +22,7 @@ package org.sonar.core.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupMembershipDtoTest { diff --git a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipQueryTest.java b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipQueryTest.java index 2eea2241021..393e9288fb5 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipQueryTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipQueryTest.java @@ -22,8 +22,8 @@ package org.sonar.core.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class GroupMembershipQueryTest { diff --git a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipTest.java b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipTest.java index e95b9514d28..82bd34a88d9 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/GroupMembershipTest.java @@ -21,7 +21,7 @@ package org.sonar.core.user; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class GroupMembershipTest { diff --git a/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java index 2860e31a546..0895598841d 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java @@ -29,7 +29,7 @@ import org.sonar.core.permission.GlobalPermissions; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.DbSession; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RoleDaoTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/user/RoleMapperTest.java b/sonar-core/src/test/java/org/sonar/core/user/RoleMapperTest.java index 7569e9ff8ba..fc521984917 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/RoleMapperTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/RoleMapperTest.java @@ -26,7 +26,7 @@ import org.junit.Test; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.MyBatis; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RoleMapperTest extends AbstractDaoTestCase { diff --git a/sonar-core/src/test/java/org/sonar/core/user/UserDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/UserDaoTest.java index 3c04d31eab1..92150278869 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/UserDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/UserDaoTest.java @@ -33,7 +33,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -82,7 +82,7 @@ public class UserDaoTest extends AbstractDaoTestCase { Collection<UserDto> users = dao.selectUsersByLogins(Arrays.asList("marius", "inactive_user", "other")); assertThat(users).hasSize(2); - assertThat(users).onProperty("login").containsOnly("marius", "inactive_user"); + assertThat(users).extracting("login").containsOnly("marius", "inactive_user"); } @Test diff --git a/sonar-deprecated/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java index 374ec6dd199..4a8148b3c86 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java @@ -29,7 +29,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class BatchExtensionDictionnaryTest { diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java index d0a14fd17ea..f783eade75f 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java @@ -28,7 +28,7 @@ import org.sonar.api.utils.SonarException; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; @@ -41,7 +41,7 @@ public class AnnotationCheckFactoryTest { public void createCheckWithoutProperties() { RulesProfile profile = RulesProfile.create("repo", "java"); ActiveRule activeRule = profile.activateRule(Rule.create("repo", "org.sonar.api.checks.CheckWithoutProperties", ""), null); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithoutProperties.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithoutProperties.class)); Object check = factory.getCheck(activeRule); assertNotNull(check); @@ -56,7 +56,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("pattern", "foo"); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithStringProperty.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithStringProperty.class)); Object check = factory.getCheck(activeRule); assertNotNull(check); @@ -74,7 +74,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("unknown", "bar"); - AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithStringProperty.class)); + AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithStringProperty.class)); } @Test @@ -87,7 +87,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("max", "300"); activeRule.setParameter("ignore", "true"); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithPrimitiveProperties.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithPrimitiveProperties.class)); Object check = factory.getCheck(activeRule); assertThat(((CheckWithPrimitiveProperties) check).getMax()).isEqualTo(300); @@ -102,7 +102,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("max", "300"); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithIntegerProperty.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithIntegerProperty.class)); Object check = factory.getCheck(activeRule); assertThat(((CheckWithIntegerProperty) check).getMax()).isEqualTo(300); @@ -119,7 +119,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("max", "300"); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(ImplementedCheck.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(ImplementedCheck.class)); Object check = factory.getCheck(activeRule); assertThat(((ImplementedCheck) check).getMax()).isEqualTo(300); @@ -135,7 +135,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("max", "300"); - AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithUnsupportedPropertyType.class)); + AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithUnsupportedPropertyType.class)); } @Test @@ -146,7 +146,7 @@ public class AnnotationCheckFactoryTest { ActiveRule activeRule = profile.activateRule(rule, null); activeRule.setParameter("maximum", "300"); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithOverriddenPropertyKey.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithOverriddenPropertyKey.class)); Object check = factory.getCheck(activeRule); assertThat(((CheckWithOverriddenPropertyKey) check).getMax()).isEqualTo(300); @@ -160,9 +160,9 @@ public class AnnotationCheckFactoryTest { profile.activateRule(rule, null); profile.activateRule(clonedRule, null); - AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithKey.class)); + AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithKey.class)); - assertThat(factory.getChecks()).excludes(new Object[] {null}); + assertThat(factory.getChecks()).doesNotContain(new Object[] {null}); } /** diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java index 9805fd20907..5be33366643 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java @@ -30,7 +30,7 @@ import org.sonar.api.rule.RuleKey; import java.util.HashSet; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java b/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java index fddc541f307..f77fba190b1 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java @@ -21,7 +21,7 @@ package org.sonar.api.resources; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class JavaTest { diff --git a/sonar-deprecated/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java b/sonar-deprecated/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java index 151591226da..79b130ba3fc 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java @@ -28,7 +28,7 @@ import org.sonar.check.Priority; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class AnnotationRuleParserTest { diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationPredicatesTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationPredicatesTest.java index 146106b3442..923273b7fd2 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationPredicatesTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/DuplicationPredicatesTest.java @@ -23,7 +23,7 @@ import com.google.common.base.Predicate; import org.junit.Test; import org.sonar.duplications.index.CloneGroup; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DuplicationPredicatesTest { diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/SuffixTreeTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/SuffixTreeTest.java index 1b961c5e660..83d3d8db619 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/SuffixTreeTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/SuffixTreeTest.java @@ -27,7 +27,7 @@ import org.junit.runners.Parameterized.Parameters; import java.util.Arrays; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; @RunWith(Parameterized.class) public class SuffixTreeTest { diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java index bc1faa540c8..cf13cb4bb39 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java @@ -33,7 +33,7 @@ import java.io.File; import java.util.Collection; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PmdBridgeTest { diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/java/JavaStatementBuilderTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/java/JavaStatementBuilderTest.java index 5995290c307..a60c04e86d3 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/java/JavaStatementBuilderTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/java/JavaStatementBuilderTest.java @@ -34,7 +34,7 @@ import java.io.InputStreamReader; import java.io.Reader; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class JavaStatementBuilderTest { diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/token/BlackHoleTokenChannelTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/token/BlackHoleTokenChannelTest.java index fa845303942..07e2fa68f1f 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/token/BlackHoleTokenChannelTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/token/BlackHoleTokenChannelTest.java @@ -22,7 +22,7 @@ package org.sonar.duplications.token; import org.junit.Test; import org.sonar.channel.CodeReader; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verifyZeroInteractions; diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/utils/FastStringComparatorTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/utils/FastStringComparatorTest.java index 938c2318585..7d441cc8c09 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/utils/FastStringComparatorTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/utils/FastStringComparatorTest.java @@ -21,7 +21,7 @@ package org.sonar.duplications.utils; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FastStringComparatorTest { static int compare(String left, String right) { diff --git a/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java b/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java index c6dd4d7484d..486f6dd20c8 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java @@ -25,7 +25,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CycleDetectorTest { diff --git a/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java b/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java index 442ec092e72..b90e0cc32e0 100644 --- a/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java +++ b/sonar-graph/src/test/java/org/sonar/graph/CycleTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CycleTest { static List<Edge> AB_BA = list(new StringEdge("A", "B"), new StringEdge("B", "A")); diff --git a/sonar-home/src/test/java/org/sonar/home/cache/FileCacheBuilderTest.java b/sonar-home/src/test/java/org/sonar/home/cache/FileCacheBuilderTest.java index b134ce89872..22af2e52a73 100644 --- a/sonar-home/src/test/java/org/sonar/home/cache/FileCacheBuilderTest.java +++ b/sonar-home/src/test/java/org/sonar/home/cache/FileCacheBuilderTest.java @@ -25,7 +25,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FileCacheBuilderTest { @Rule diff --git a/sonar-home/src/test/java/org/sonar/home/cache/FileCacheTest.java b/sonar-home/src/test/java/org/sonar/home/cache/FileCacheTest.java index 2b2ee395820..2387a796ab7 100644 --- a/sonar-home/src/test/java/org/sonar/home/cache/FileCacheTest.java +++ b/sonar-home/src/test/java/org/sonar/home/cache/FileCacheTest.java @@ -31,7 +31,7 @@ import java.io.IOException; import java.net.URISyntaxException; import java.util.concurrent.ExecutionException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-home/src/test/java/org/sonar/home/cache/FileHashesTest.java b/sonar-home/src/test/java/org/sonar/home/cache/FileHashesTest.java index fce853ffda9..63209e39bb5 100644 --- a/sonar-home/src/test/java/org/sonar/home/cache/FileHashesTest.java +++ b/sonar-home/src/test/java/org/sonar/home/cache/FileHashesTest.java @@ -35,7 +35,7 @@ import java.io.InputStream; import java.math.BigInteger; import java.security.SecureRandom; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyInt; import static org.mockito.Mockito.mock; diff --git a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java index 900118963d1..81a8ecc76e7 100644 --- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java +++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java @@ -21,7 +21,7 @@ package org.sonar.markdown; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MarkdownTest { diff --git a/sonar-maven-plugin/pom.xml b/sonar-maven-plugin/pom.xml index 99644e4a4f4..49ee7be17e7 100644 --- a/sonar-maven-plugin/pom.xml +++ b/sonar-maven-plugin/pom.xml @@ -36,26 +36,6 @@ <artifactId>sonar-testing-harness</artifactId> <scope>test</scope> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> - <scope>test</scope> - </dependency> </dependencies> <build> diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml index 698996334ef..eb865b6817e 100644 --- a/sonar-plugin-api/pom.xml +++ b/sonar-plugin-api/pom.xml @@ -146,26 +146,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>xmlunit</groupId> <artifactId>xmlunit</artifactId> <scope>test</scope> diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java index 37ddbd24d94..cde014a9afa 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.*; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java index b15f8de538b..5139aa75edb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java @@ -25,7 +25,7 @@ import org.sonar.api.measures.Metric; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/InitializerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/InitializerTest.java index 12fe25c9e27..0bb738040b3 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/InitializerTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/InitializerTest.java @@ -22,7 +22,7 @@ package org.sonar.api.batch; import org.junit.Test; import org.sonar.api.resources.Project; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class InitializerTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java index 1b4908c728e..9599f16b550 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java @@ -25,7 +25,7 @@ import org.sonar.api.measures.Metric; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TimeMachineQueryTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java index f1a5abfe5e8..14faa2ec0a0 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java @@ -29,7 +29,7 @@ import java.io.IOException; import java.util.List; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/DebtRemediationFunctionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/DebtRemediationFunctionTest.java index dfbd2d2beef..d81198ba11d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/DebtRemediationFunctionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/DebtRemediationFunctionTest.java @@ -23,7 +23,7 @@ package org.sonar.api.batch.debt; import org.junit.Test; import org.sonar.api.utils.Duration; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DebtRemediationFunctionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtCharacteristicTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtCharacteristicTest.java index 2a09fe5bef9..0dd4dca7531 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtCharacteristicTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtCharacteristicTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultDebtCharacteristicTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtModelTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtModelTest.java index a5dfe422bf2..944c892ca72 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtModelTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/debt/internal/DefaultDebtModelTest.java @@ -23,7 +23,7 @@ package org.sonar.api.batch.debt.internal; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultDebtModelTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFilePredicatesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFilePredicatesTest.java index 3539bea9566..95a1775a822 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFilePredicatesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFilePredicatesTest.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.fs.internal; -import org.fest.assertions.Assertions; +import org.assertj.core.api.Assertions; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -33,7 +33,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultFilePredicatesTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFileSystemTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFileSystemTest.java index aacc7abfb9b..577ae843eb0 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFileSystemTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultFileSystemTest.java @@ -27,7 +27,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.nio.charset.Charset; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultFileSystemTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputDirTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputDirTest.java index 49157e92a44..ce4aa039897 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputDirTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputDirTest.java @@ -25,7 +25,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultInputDirTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java index e96f29e82e0..c474328c420 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java @@ -26,7 +26,7 @@ import org.sonar.api.batch.fs.InputFile; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultInputFileTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DeprecatedDefaultInputFileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DeprecatedDefaultInputFileTest.java index b1f07a138b1..5aebeb9c0d2 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DeprecatedDefaultInputFileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DeprecatedDefaultInputFileTest.java @@ -27,7 +27,7 @@ import org.sonar.api.batch.fs.InputFile; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DeprecatedDefaultInputFileTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java index 87f6aa3b245..ea893912661 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java @@ -26,7 +26,7 @@ import org.sonar.api.batch.fs.InputFile; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PathPatternTest { @Rule diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java index 98428019d17..1d6235f0866 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java @@ -25,7 +25,7 @@ import org.junit.Before; import org.junit.Test; import org.sonar.api.test.MavenTestUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MavenPluginTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java index 42f8d7f6654..2cb3c372f4d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java @@ -25,7 +25,7 @@ import org.sonar.api.batch.rule.internal.ActiveRulesBuilder; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.SonarException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CheckFactoryTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilderTest.java index 448880b9e4b..b3a7c4306f9 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/ActiveRulesBuilderTest.java @@ -25,8 +25,8 @@ import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class ActiveRulesBuilderTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java index 25e3649bbd1..6dcd026ef35 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/internal/RulesBuilderTest.java @@ -28,8 +28,8 @@ import org.sonar.api.rule.RuleStatus; import org.sonar.api.rule.Severity; import org.sonar.api.utils.Duration; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RulesBuilderTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/BlameLineTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/BlameLineTest.java index 4a5fb76eb24..82e8184a9b9 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/BlameLineTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/BlameLineTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class BlameLineTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/ScmProviderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/ScmProviderTest.java index f55ec0cc2e5..f424c03bd65 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/ScmProviderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/scm/ScmProviderTest.java @@ -23,7 +23,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ScmProviderTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/DuplicationGroupTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/DuplicationGroupTest.java index 8b920962495..1d969645fbb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/DuplicationGroupTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/DuplicationGroupTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DuplicationGroupTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/internal/DefaultDuplicationBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/internal/DefaultDuplicationBuilderTest.java index d586e6855eb..dd3f3989095 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/internal/DefaultDuplicationBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/duplication/internal/DefaultDuplicationBuilderTest.java @@ -26,7 +26,7 @@ import org.sonar.api.batch.sensor.duplication.DuplicationGroup.Block; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultDuplicationBuilderTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/TypeOfTextTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/TypeOfTextTest.java index 47ee1864f0f..214d127e91d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/TypeOfTextTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/TypeOfTextTest.java @@ -21,7 +21,7 @@ package org.sonar.api.batch.sensor.highlighting; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TypeOfTextTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java index fc91edc8ce1..5b890818f8a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/internal/DefaultSensorDescriptorTest.java @@ -24,7 +24,7 @@ import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor; import org.junit.Test; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.measures.CoreMetrics; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultSensorDescriptorTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java index 722f0948120..5580f881f1a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssueTest.java @@ -26,7 +26,7 @@ import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.sensor.SensorStorage; import org.sonar.api.rule.RuleKey; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java index 7fa5fbfc593..a4e5c4afb8e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/measure/internal/DefaultMeasureTest.java @@ -26,7 +26,7 @@ import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.sensor.SensorStorage; import org.sonar.api.measures.CoreMetrics; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultCoverageTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultCoverageTest.java index 1ff6e4bd6fe..b3c7003cfa4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultCoverageTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultCoverageTest.java @@ -29,7 +29,7 @@ import org.sonar.api.batch.sensor.measure.internal.DefaultMeasure; import org.sonar.api.batch.sensor.test.Coverage.CoverageType; import org.sonar.api.measures.CoreMetrics; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseCoverageTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseCoverageTest.java index 7f4d8001df7..e7d1fe8242e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseCoverageTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseCoverageTest.java @@ -27,7 +27,7 @@ import org.sonar.api.batch.fs.internal.DefaultInputFile; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTestCaseCoverageTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseExecutionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseExecutionTest.java index 01abb7965ff..2a5548061c7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseExecutionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/test/internal/DefaultTestCaseExecutionTest.java @@ -27,7 +27,7 @@ import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.sensor.test.TestCaseExecution.Status; import org.sonar.api.batch.sensor.test.TestCaseExecution.Type; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTestCaseExecutionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java index c6d9f3a733b..3a9fc4d29a2 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java @@ -21,7 +21,7 @@ package org.sonar.api.config; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CategoryTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java index bab21fc7c5f..46ff99670cb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java @@ -25,7 +25,7 @@ import org.sonar.api.CoreProperties; import org.sonar.api.config.EmailSettings; import org.sonar.api.config.Settings; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class EmailSettingsTest { EmailSettings emailSettings; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java index d6b7d83d77b..305132e5251 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java @@ -23,7 +23,7 @@ import org.apache.commons.codec.binary.Base64; import org.junit.Test; import org.sonar.api.utils.DateUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class LicenseTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java index 1451dcffbbe..52ed7d9f2d9 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java @@ -27,8 +27,8 @@ import org.sonar.api.PropertyType; import org.sonar.api.resources.Qualifiers; import org.sonar.api.utils.AnnotationUtils; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class PropertyDefinitionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java index 127e7ea2796..a5001781f22 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java @@ -27,7 +27,7 @@ import org.sonar.api.resources.Qualifiers; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PropertyDefinitionsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java index 0b86d29e14c..48140ec82c9 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/SettingsTest.java @@ -20,7 +20,7 @@ package org.sonar.api.config; import com.google.common.collect.ImmutableMap; -import org.fest.assertions.Delta; +import org.assertj.core.data.Offset; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -32,7 +32,7 @@ import org.sonar.api.utils.DateUtils; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SettingsTest { @@ -161,8 +161,8 @@ public class SettingsTest { Settings settings = new Settings(); settings.setProperty("from_double", 3.14159); settings.setProperty("from_string", "3.14159"); - assertThat(settings.getDouble("from_double")).isEqualTo(3.14159, Delta.delta(0.00001)); - assertThat(settings.getDouble("from_string")).isEqualTo(3.14159, Delta.delta(0.00001)); + assertThat(settings.getDouble("from_double")).isEqualTo(3.14159, Offset.offset(0.00001)); + assertThat(settings.getDouble("from_string")).isEqualTo(3.14159, Offset.offset(0.00001)); assertThat(settings.getDouble("unknown")).isNull(); } @@ -171,8 +171,8 @@ public class SettingsTest { Settings settings = new Settings(); settings.setProperty("from_float", 3.14159f); settings.setProperty("from_string", "3.14159"); - assertThat(settings.getDouble("from_float")).isEqualTo(3.14159f, Delta.delta(0.00001)); - assertThat(settings.getDouble("from_string")).isEqualTo(3.14159f, Delta.delta(0.00001)); + assertThat(settings.getDouble("from_float")).isEqualTo(3.14159f, Offset.offset(0.00001)); + assertThat(settings.getDouble("from_string")).isEqualTo(3.14159f, Offset.offset(0.00001)); assertThat(settings.getDouble("unknown")).isNull(); } diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java index 5205e9686b8..24547b68d06 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java @@ -24,7 +24,7 @@ import org.sonar.api.measures.CoreMetrics; import java.io.UnsupportedEncodingException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureModelTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/UserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/UserTest.java index 55bcb1bfff0..3e3228a81a6 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/UserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/UserTest.java @@ -21,7 +21,7 @@ package org.sonar.api.database.model; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UserTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java index 230660f0459..3e6618cb37b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java @@ -21,7 +21,7 @@ package org.sonar.api.design; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DependencyTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java index 0d3db820565..ddcaacbb992 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java @@ -30,7 +30,7 @@ import java.util.Set; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionTest.java index 8ae7bd58ce4..a2d1aef5eef 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionTest.java @@ -24,8 +24,8 @@ import org.junit.Test; import org.sonar.api.issue.condition.Condition; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionsTest.java index 75663b2ff29..898d1570458 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/action/ActionsTest.java @@ -22,7 +22,7 @@ package org.sonar.api.issue.action; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ActionsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasIssuePropertyConditionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasIssuePropertyConditionTest.java index 52654f0b895..f572534d50c 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasIssuePropertyConditionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasIssuePropertyConditionTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HasIssuePropertyConditionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasResolutionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasResolutionTest.java index 6ac1be5639e..fe0937fe1d4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasResolutionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasResolutionTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HasResolutionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasStatusTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasStatusTest.java index 641678ad023..ab9705a7068 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasStatusTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/HasStatusTest.java @@ -23,7 +23,7 @@ package org.sonar.api.issue.condition; import org.junit.Test; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HasStatusTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/IsUnResolvedTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/IsUnResolvedTest.java index ddff8f842b3..f626e00ed86 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/IsUnResolvedTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/IsUnResolvedTest.java @@ -23,7 +23,7 @@ package org.sonar.api.issue.condition; import org.junit.Test; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class IsUnResolvedTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/NotConditionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/NotConditionTest.java index fc369b77f91..52897dc7672 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/NotConditionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/condition/NotConditionTest.java @@ -24,7 +24,7 @@ import org.mockito.Mockito; import org.sonar.api.issue.Issue; import org.sonar.api.issue.internal.DefaultIssue; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java index 0f145f0f2c8..673aac868af 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/DefaultIssueTest.java @@ -30,9 +30,9 @@ import org.sonar.api.utils.Duration; import java.text.SimpleDateFormat; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; -import static org.fest.assertions.MapAssert.entry; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class DefaultIssueTest { @@ -68,8 +68,7 @@ public class DefaultIssueTest { .setCreationDate(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-19")) .setUpdateDate(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-20")) .setCloseDate(new SimpleDateFormat("yyyy-MM-dd").parse("2013-08-21")) - .setSelectedAt(1400000000000L) - ; + .setSelectedAt(1400000000000L); assertThat(issue.key()).isEqualTo("ABCD"); assertThat(issue.componentKey()).isEqualTo("org.sample.Sample"); @@ -107,8 +106,7 @@ public class DefaultIssueTest { .setCreationDate(null) .setUpdateDate(null) .setCloseDate(null) - .setSelectedAt(null) - ; + .setSelectedAt(null); assertThat(issue.creationDate()).isNull(); assertThat(issue.updateDate()).isNull(); @@ -133,12 +131,10 @@ public class DefaultIssueTest { assertThat(issue.attribute("1")).isEqualTo("one"); issue.setAttributes(ImmutableMap.of("2", "two")); - assertThat(issue.attributes()).hasSize(2); - assertThat(issue.attributes()).includes(entry("1", "one"), entry("2", "two")); + assertThat(issue.attributes()).containsOnly(entry("1", "one"), entry("2", "two")); issue.setAttributes(null); - assertThat(issue.attributes()).hasSize(2); - assertThat(issue.attributes()).includes(entry("1", "one"), entry("2", "two")); + assertThat(issue.attributes()).containsOnly(entry("1", "one"), entry("2", "two")); } @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/FieldDiffsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/FieldDiffsTest.java index be8025119cf..1e00d66167c 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/FieldDiffsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/internal/FieldDiffsTest.java @@ -21,7 +21,7 @@ package org.sonar.api.issue.internal; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FieldDiffsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageFormulaTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageFormulaTest.java index 1e2d56b88aa..405d4f9d696 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageFormulaTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageFormulaTest.java @@ -26,7 +26,7 @@ import org.sonar.api.resources.File; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java index d59d6e0ff16..9a33b01caab 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java @@ -26,7 +26,7 @@ import org.sonar.api.measures.Metric.ValueType; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RulePriority; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MeasureTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java index 1abaff43516..fa9e16112f4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java @@ -21,7 +21,7 @@ package org.sonar.api.measures; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java index b91276358d8..5bc69ab6684 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import java.util.Arrays; import java.util.Collections; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/notifications/NotificationDispatcherMetadataTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/notifications/NotificationDispatcherMetadataTest.java index 3782e2f7d4e..7acb3059132 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/notifications/NotificationDispatcherMetadataTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/notifications/NotificationDispatcherMetadataTest.java @@ -22,7 +22,7 @@ package org.sonar.api.notifications; import org.junit.Before; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NotificationDispatcherMetadataTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java index 1eb849b35e7..4135639a877 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentContainerTest.java @@ -30,10 +30,8 @@ import java.util.Arrays; import static junit.framework.Assert.assertTrue; import static junit.framework.Assert.fail; -import static org.fest.assertions.Assertions.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.verify; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; public class ComponentContainerTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentKeysTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentKeysTest.java index 219a8dd0e84..cb38cde6f6f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentKeysTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/platform/ComponentKeysTest.java @@ -22,7 +22,7 @@ package org.sonar.api.platform; import org.junit.Test; import org.slf4j.Logger; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.startsWith; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/platform/NewUserHandlerTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/platform/NewUserHandlerTest.java index 195b49665b6..9ae6ce9849f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/platform/NewUserHandlerTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/platform/NewUserHandlerTest.java @@ -23,7 +23,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class NewUserHandlerTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/platform/PicoUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/platform/PicoUtilsTest.java index 6f232a81ec6..d5b74341b8b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/platform/PicoUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/platform/PicoUtilsTest.java @@ -26,7 +26,7 @@ import org.picocontainer.PicoLifecycleException; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java index 9830c392a2c..2da636469fd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java @@ -24,8 +24,8 @@ import org.sonar.api.rules.Rule; import org.sonar.api.rules.RulePriority; import org.sonar.api.utils.MessageException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RulesProfileTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java index d8d60b25b5a..19f63f13b9b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java @@ -28,7 +28,7 @@ import org.sonar.api.rules.RuleFinder; import org.sonar.api.rules.RulePriority; import org.sonar.api.utils.ValidationMessages; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java index 7ee9583bf8e..ad6a547080a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java @@ -23,7 +23,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; public class AbstractLanguageTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java index 9717ea83ab8..c5db06856fe 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java @@ -25,7 +25,7 @@ import org.sonar.api.measures.Metric; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CoreMetricsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java index 27a88f14ed4..b73ddc3fd3c 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java @@ -25,7 +25,7 @@ import org.junit.rules.TemporaryFolder; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java index 28a897ecec0..630b9e6007c 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java @@ -38,7 +38,7 @@ import java.io.InputStream; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class InputFileUtilsTest { private static final File BASE_DIR = new File("target/tmp/InputFileUtilsTest"); diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java index 2def725405e..489143f51a7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java @@ -21,7 +21,7 @@ package org.sonar.api.resources; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java index b9fe96e849c..c91b964dd61 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java @@ -22,7 +22,7 @@ package org.sonar.api.resources; import org.junit.Test; import org.sonar.api.test.MavenTestUtils; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ProjectTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypeTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypeTest.java index fad67711d7f..97c1a4e6bec 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypeTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypeTest.java @@ -21,7 +21,7 @@ package org.sonar.api.resources; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResourceTypeTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypesTest.java index 8a3ee462a26..05353eeefda 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceTypesTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ResourceTypesTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java index 20edcc0c5f8..966c3d7e6c2 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java @@ -21,7 +21,7 @@ package org.sonar.api.resources; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java index d5190d941ae..85a43f7c105 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java @@ -21,8 +21,8 @@ package org.sonar.api.rule; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleKeyTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleStatusTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleStatusTest.java index 0707a4199e6..806253f44cb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleStatusTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleStatusTest.java @@ -21,7 +21,7 @@ package org.sonar.api.rule; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RuleStatusTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rule/SeverityTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rule/SeverityTest.java index cc67b1c237a..ab472eba523 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rule/SeverityTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rule/SeverityTest.java @@ -21,7 +21,7 @@ package org.sonar.api.rule; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SeverityTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java index 67636d095a1..bfd3d4fe565 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java @@ -22,7 +22,7 @@ package org.sonar.api.rules; import org.junit.Test; import org.sonar.check.Priority; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RulePriorityTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java index 4787c47f3ab..88f26e5a3a3 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java @@ -26,7 +26,7 @@ import org.sonar.api.utils.SonarException; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RuleTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java index 9f940d01a1a..0bd091773b7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.sonar.api.CoreProperties; import org.sonar.api.config.Settings; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FileExclusionsTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/PathResolverTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/PathResolverTest.java index ffec1df658b..05ab197db79 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/PathResolverTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/PathResolverTest.java @@ -29,7 +29,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class PathResolverTest { @Rule diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/security/DefaultGroupsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/security/DefaultGroupsTest.java index 34820cc677b..0a7fc3850d0 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/security/DefaultGroupsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/security/DefaultGroupsTest.java @@ -21,7 +21,7 @@ package org.sonar.api.security; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultGroupsTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/security/ExternalUsersProviderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/security/ExternalUsersProviderTest.java index b0fe10a0caf..7d85b493434 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/security/ExternalUsersProviderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/security/ExternalUsersProviderTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import javax.servlet.http.HttpServletRequest; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; public class ExternalUsersProviderTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/security/SecurityRealmTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/security/SecurityRealmTest.java index b225c3d4c69..b630f97d1dd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/security/SecurityRealmTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/security/SecurityRealmTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import javax.servlet.http.HttpServletRequest; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/DefaultDebtRemediationFunctionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/DefaultDebtRemediationFunctionTest.java index c51b635f2b4..e319b824eb0 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/DefaultDebtRemediationFunctionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/DefaultDebtRemediationFunctionTest.java @@ -23,8 +23,8 @@ package org.sonar.api.server.debt; import org.junit.Test; import org.sonar.api.server.debt.internal.DefaultDebtRemediationFunction; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class DefaultDebtRemediationFunctionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/internal/DefaultDebtCharacteristicTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/internal/DefaultDebtCharacteristicTest.java index f7d84cef57e..dadf72f3486 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/internal/DefaultDebtCharacteristicTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/debt/internal/DefaultDebtCharacteristicTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import java.util.Date; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultDebtCharacteristicTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleParamTypeTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleParamTypeTest.java index b2dc1ab160e..33cd1fe777e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleParamTypeTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleParamTypeTest.java @@ -21,7 +21,7 @@ package org.sonar.api.server.rule; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RuleParamTypeTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleTagFormatTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleTagFormatTest.java index fcc82e7ec7c..799df3a20c4 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleTagFormatTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RuleTagFormatTest.java @@ -21,8 +21,8 @@ package org.sonar.api.server.rule; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RuleTagFormatTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java index da45d7d5dea..d153eafa4ce 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java @@ -26,7 +26,7 @@ import org.sonar.api.rule.Severity; import org.sonar.api.server.rule.RulesDefinition.NewRule; import org.sonar.check.Priority; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RulesDefinitionAnnotationLoaderTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java index 5bea527e46d..ffe3aae54ad 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java @@ -22,7 +22,7 @@ package org.sonar.api.server.rule; import org.junit.Test; import org.sonar.api.i18n.RuleI18n; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java index 56bf1b1bf6a..2257a725c26 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java @@ -26,8 +26,8 @@ import org.sonar.api.server.debt.DebtRemediationFunction; import java.net.URL; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class RulesDefinitionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java index df6ff3bdc85..5f615298372 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java @@ -29,7 +29,7 @@ import org.sonar.api.rule.Severity; import java.io.InputStream; import java.io.UnsupportedEncodingException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class RulesDefinitionXmlLoaderTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java index ad7e00aea17..965419a7491 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java @@ -33,8 +33,8 @@ import javax.annotation.Nullable; import java.io.InputStream; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class RequestTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java index 133be1d0500..d12348d4a8d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/WebServiceTest.java @@ -27,8 +27,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; public class WebServiceTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java index 4ee4a6857e7..f05e6f6d30a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java @@ -21,7 +21,7 @@ package org.sonar.api.server.ws.internal; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class SimpleGetRequestTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/task/TaskDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/task/TaskDefinitionTest.java index 5332bb38db4..194340c1b86 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/task/TaskDefinitionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/task/TaskDefinitionTest.java @@ -23,7 +23,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TaskDefinitionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultCharacteristicTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultCharacteristicTest.java index e1792b73416..8ab6cec2010 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultCharacteristicTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultCharacteristicTest.java @@ -25,7 +25,7 @@ import org.sonar.api.rule.RuleKey; import java.text.SimpleDateFormat; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultCharacteristicTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultRequirementTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultRequirementTest.java index 2752d5b4ca0..70ee96ac98e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultRequirementTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/batch/internal/DefaultRequirementTest.java @@ -27,7 +27,7 @@ import org.sonar.api.utils.internal.WorkDuration; import java.text.SimpleDateFormat; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultRequirementTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/server/internal/DefaultCharacteristicTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/server/internal/DefaultCharacteristicTest.java index 3a63107d48a..98514fa2119 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/server/internal/DefaultCharacteristicTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/technicaldebt/server/internal/DefaultCharacteristicTest.java @@ -25,7 +25,7 @@ import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.WorkUnit; import org.sonar.api.utils.internal.WorkDuration; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultCharacteristicTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java index 27c89c81dae..49f2b1e8cee 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java @@ -21,7 +21,7 @@ package org.sonar.api.test; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestCaseTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java index ff723fb8f2d..5d9b7e6575d 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/user/UserQueryTest.java @@ -25,8 +25,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class UserQueryTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java index f3170d77534..99e91f84844 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java @@ -22,7 +22,7 @@ package org.sonar.api.utils; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class DurationTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationsTest.java index 13afe5e9050..b567da69803 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationsTest.java @@ -31,7 +31,7 @@ import org.sonar.api.i18n.I18n; import java.util.Locale; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java index 1746a6d982c..5cb04e0a61b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java @@ -29,7 +29,7 @@ import java.lang.reflect.Field; import java.util.List; import static com.google.common.collect.Lists.newArrayList; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FieldUtils2Test { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java index 3c7cbf1acec..9fa8037b6d5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java @@ -52,7 +52,7 @@ import java.util.Arrays; import java.util.Properties; import java.util.zip.GZIPOutputStream; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java index 7419017df25..40fdffbbca3 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java @@ -27,8 +27,8 @@ import java.io.IOException; import java.net.URL; import java.security.KeyManagementException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java index 0d8e537acc8..78eb2ed7eaa 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java @@ -25,7 +25,6 @@ import com.google.common.collect.Maps; import com.google.common.collect.Multiset; import com.google.common.collect.TreeMultiset; import org.apache.commons.collections.bag.TreeBag; -import org.fest.assertions.MapAssert; import org.junit.Assert; import org.junit.Test; import org.sonar.api.rules.RulePriority; @@ -36,7 +35,8 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.entry; import static org.hamcrest.Matchers.is; public class KeyValueFormatTest { @@ -172,11 +172,11 @@ public class KeyValueFormatTest { assertThat(KeyValueFormat.parseIntDate("1=2014-01-15")).hasSize(1); assertThat(KeyValueFormat.parseIntDateTime("1=2014-01-15T15:50:45+0100")).hasSize(1); assertThat(KeyValueFormat.parseIntDouble("1=3.14")).hasSize(1); - assertThat(KeyValueFormat.parseIntInt("1=10")).hasSize(1).includes(MapAssert.entry(1, 10)); - assertThat(KeyValueFormat.parseIntString("1=one")).hasSize(1).includes(MapAssert.entry(1, "one")); - assertThat(KeyValueFormat.parseIntString("1=\"escaped\"")).hasSize(1).includes(MapAssert.entry(1, "escaped")); - assertThat(KeyValueFormat.parseStringInt("one=1")).hasSize(1).includes(MapAssert.entry("one", 1)); - assertThat(KeyValueFormat.parseStringDouble("pi=3.14")).hasSize(1).includes(MapAssert.entry("pi", 3.14)); + assertThat(KeyValueFormat.parseIntInt("1=10")).containsOnly(entry(1, 10)); + assertThat(KeyValueFormat.parseIntString("1=one")).containsOnly(entry(1, "one")); + assertThat(KeyValueFormat.parseIntString("1=\"escaped\"")).containsOnly(entry(1, "escaped")); + assertThat(KeyValueFormat.parseStringInt("one=1")).containsOnly(entry("one", 1)); + assertThat(KeyValueFormat.parseStringDouble("pi=3.14")).containsOnly(entry("pi", 3.14)); } @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java index 2a891daa089..372ffea7d95 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java @@ -34,7 +34,7 @@ import java.util.jar.Attributes; import java.util.jar.JarOutputStream; import java.util.jar.Manifest; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ManifestUtilsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/MessageExceptionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/MessageExceptionTest.java index f1dba0a244f..562c95e3014 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/MessageExceptionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/MessageExceptionTest.java @@ -21,7 +21,7 @@ package org.sonar.api.utils; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class MessageExceptionTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/PagingTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/PagingTest.java index 7fbbce09534..658bdf38647 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/PagingTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/PagingTest.java @@ -22,8 +22,8 @@ package org.sonar.api.utils; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class PagingTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/PathUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/PathUtilsTest.java index 57a75e2437e..64ea02cbfe5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/PathUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/PathUtilsTest.java @@ -27,8 +27,8 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/System2Test.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/System2Test.java index d60c869c547..53f6544482a 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/System2Test.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/System2Test.java @@ -25,8 +25,8 @@ import org.junit.Test; import java.util.Map; import java.util.Properties; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; public class System2Test { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeUtilsTest.java index ea12cbcd339..8d5a09a44dd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeUtilsTest.java @@ -21,7 +21,7 @@ package org.sonar.api.utils; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TimeUtilsTest { @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/UriReaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/UriReaderTest.java index 0bd02b444ff..e42e8735e8f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/UriReaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/UriReaderTest.java @@ -28,7 +28,7 @@ import org.junit.rules.ExpectedException; import java.net.URI; import java.net.URISyntaxException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java index a69e4ab7edf..a00847874c8 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java @@ -22,7 +22,7 @@ package org.sonar.api.utils; import org.junit.Test; import org.slf4j.Logger; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WorkUnitTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WorkUnitTest.java index e34af9100bd..b0649bf5b3f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WorkUnitTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WorkUnitTest.java @@ -22,7 +22,7 @@ package org.sonar.api.utils; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class WorkUnitTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java index 43f8d44ab5e..f60e7fb8f53 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java @@ -30,7 +30,7 @@ import java.util.Iterator; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ZipUtilsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java index 7a1f4386312..f9b071cc929 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandExecutorTest.java @@ -32,7 +32,7 @@ import org.sonar.api.utils.System2; import java.io.File; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; public class CommandExecutorTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandTest.java index 79704677501..14d38fcc263 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/command/CommandTest.java @@ -28,7 +28,7 @@ import org.sonar.api.utils.System2; import java.io.File; import java.util.Arrays; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java index c09e02387b5..8f5aa566963 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java @@ -26,7 +26,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class DefaultTempFolderTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java index 70f11710d19..321624c2246 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/UuidsTest.java @@ -25,7 +25,7 @@ import org.sonar.test.TestUtils; import java.util.Set; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class UuidsTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java index 7b40ac3daac..43d4bff5977 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java @@ -22,7 +22,7 @@ package org.sonar.api.utils.internal; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class WorkDurationTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/CsvWriterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/CsvWriterTest.java index e9855dafea5..aed9cfb6f48 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/CsvWriterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/CsvWriterTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import java.io.*; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java index 41ae3399029..80c7fc65a2b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java @@ -32,8 +32,8 @@ import java.util.Date; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/XmlWriterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/XmlWriterTest.java index a3e212d47a1..daa4bc5cccf 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/XmlWriterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/XmlWriterTest.java @@ -25,7 +25,7 @@ import org.junit.rules.ExpectedException; import java.io.StringWriter; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class XmlWriterTest { @Rule diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java index 4cc31d2eab3..5b517039fea 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java @@ -25,7 +25,7 @@ import java.util.List; import org.junit.Test; import org.sonar.colorizer.Tokenizer; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class CodeColorizerFormatTest { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/FilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/FilterTest.java index 0b2251969ca..c5b1c249a9f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/web/FilterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/FilterTest.java @@ -23,7 +23,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class FilterTest { @Rule diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java index a1376c9dcd3..2d0cafb5628 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java @@ -31,7 +31,7 @@ import javax.servlet.ServletResponse; import java.io.IOException; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ServletFilterTest { @Rule diff --git a/sonar-testing-harness/pom.xml b/sonar-testing-harness/pom.xml index 4ac308f58ff..e646ec13a93 100644 --- a/sonar-testing-harness/pom.xml +++ b/sonar-testing-harness/pom.xml @@ -12,8 +12,8 @@ <dependencies> <dependency> - <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> </dependency> <dependency> <groupId>org.skyscreamer</groupId> diff --git a/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java b/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java index f8c28887553..f416c1bd033 100644 --- a/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java +++ b/sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import java.io.File; -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; import static org.sonar.test.TestUtils.getResource; public class TestUtilsTest { |