diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-01-10 07:15:03 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-01-10 07:15:08 +0100 |
commit | 2faaf7e16a03e69c4ff5f9c53805a387211a0872 (patch) | |
tree | fed31d45904142eff2e4b501883f08d5f07f0ce8 /sonar-batch | |
parent | 3167bed5685e9f4b87e3482cdde2ac95897c8cfd (diff) | |
download | sonarqube-2faaf7e16a03e69c4ff5f9c53805a387211a0872.tar.gz sonarqube-2faaf7e16a03e69c4ff5f9c53805a387211a0872.zip |
Replace fest-assert by assertJ
Diffstat (limited to 'sonar-batch')
131 files changed, 156 insertions, 166 deletions
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 { |