From a2db872cfc03a7e27aa4a5e1b09ed8a7ff40a3ed Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Thu, 23 Feb 2017 09:59:31 +0100 Subject: [PATCH] Use assertj for testing --- pom.xml | 12 +++--------- .../java/org/sonarsource/scanner/cli/CliTest.java | 2 +- .../java/org/sonarsource/scanner/cli/ConfTest.java | 2 +- .../java/org/sonarsource/scanner/cli/MainTest.java | 4 ++-- .../scanner/cli/PropertyResolverTest.java | 2 +- .../sonarsource/scanner/cli/ScannerFactoryTest.java | 2 +- .../java/org/sonarsource/scanner/cli/StatsTest.java | 3 ++- .../org/sonarsource/scanner/cli/SystemInfoTest.java | 2 +- 8 files changed, 12 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 1dfbd31..09a505e 100644 --- a/pom.xml +++ b/pom.xml @@ -73,9 +73,9 @@ test - org.easytesting - fest-assert - 1.4 + org.assertj + assertj-core + 3.6.2 test @@ -84,12 +84,6 @@ 1.9.5 test - - com.jayway.awaitility - awaitility - 1.6.3 - test - diff --git a/src/test/java/org/sonarsource/scanner/cli/CliTest.java b/src/test/java/org/sonarsource/scanner/cli/CliTest.java index 7c64974..5ed8922 100644 --- a/src/test/java/org/sonarsource/scanner/cli/CliTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/CliTest.java @@ -21,7 +21,7 @@ package org.sonarsource.scanner.cli; 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/src/test/java/org/sonarsource/scanner/cli/ConfTest.java b/src/test/java/org/sonarsource/scanner/cli/ConfTest.java index 4a1c0b7..98782c3 100644 --- a/src/test/java/org/sonarsource/scanner/cli/ConfTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/ConfTest.java @@ -19,7 +19,7 @@ */ package org.sonarsource.scanner.cli; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assume.assumeTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java index 59da205..26e1a71 100644 --- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java @@ -32,7 +32,7 @@ import org.sonar.api.utils.MessageException; import org.sonarsource.scanner.api.EmbeddedScanner; import org.sonarsource.scanner.api.ScanProperties; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; @@ -64,7 +64,7 @@ public class MainTest { when(runnerFactory.create(any(Properties.class))).thenReturn(runner); when(conf.properties()).thenReturn(properties); } - + @Test public void should_execute_runner() { Main main = new Main(exit, cli, conf, runnerFactory, logs); diff --git a/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java b/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java index 659d4a8..cece2a0 100644 --- a/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java @@ -19,7 +19,7 @@ */ package org.sonarsource.scanner.cli; -import static org.fest.assertions.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import java.util.HashMap; import java.util.Map; diff --git a/src/test/java/org/sonarsource/scanner/cli/ScannerFactoryTest.java b/src/test/java/org/sonarsource/scanner/cli/ScannerFactoryTest.java index 50f705a..fc583a9 100644 --- a/src/test/java/org/sonarsource/scanner/cli/ScannerFactoryTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/ScannerFactoryTest.java @@ -26,7 +26,7 @@ import org.sonarsource.scanner.api.EmbeddedScanner; import org.sonarsource.scanner.api.LogOutput; import org.sonarsource.scanner.api.LogOutput.Level; -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.reset; import static org.mockito.Mockito.verify; diff --git a/src/test/java/org/sonarsource/scanner/cli/StatsTest.java b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java index cd0bd9a..4cd5bfb 100644 --- a/src/test/java/org/sonarsource/scanner/cli/StatsTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java @@ -28,7 +28,8 @@ import java.io.UnsupportedEncodingException; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.mock; import org.junit.Test; -import static org.fest.assertions.Assertions.assertThat; + +import static org.assertj.core.api.Assertions.assertThat; public class StatsTest { private PrintStream stdOut = mock(PrintStream.class); diff --git a/src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java b/src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java index a421907..e2c11ef 100644 --- a/src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.sonarsource.scanner.cli.SystemInfo.System2; -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; -- 2.39.5