]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Use assertj for testing
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Thu, 23 Feb 2017 08:59:31 +0000 (09:59 +0100)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Thu, 23 Feb 2017 15:01:57 +0000 (16:01 +0100)
pom.xml
src/test/java/org/sonarsource/scanner/cli/CliTest.java
src/test/java/org/sonarsource/scanner/cli/ConfTest.java
src/test/java/org/sonarsource/scanner/cli/MainTest.java
src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
src/test/java/org/sonarsource/scanner/cli/ScannerFactoryTest.java
src/test/java/org/sonarsource/scanner/cli/StatsTest.java
src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java

diff --git a/pom.xml b/pom.xml
index 1dfbd31153c518607f5859e38e70c2bbf309a567..09a505e244c01ebc505fe10037963f4cb83e0359 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -73,9 +73,9 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.easytesting</groupId>
-      <artifactId>fest-assert</artifactId>
-      <version>1.4</version>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <version>3.6.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <version>1.9.5</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>com.jayway.awaitility</groupId>
-      <artifactId>awaitility</artifactId>
-      <version>1.6.3</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <build>
index 7c649740d235dad1f6e0c86564444adefe5aefc6..5ed8922267cffcf43e20fa816f4ebb3193f457e3 100644 (file)
@@ -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;
 
index 4a1c0b746dfa8f0b2107d6bf37878a51b2b466c2..98782c3756f23dc0dff2a966fe4cfd632bdcd232 100644 (file)
@@ -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;
index 59da205bc84d63928247e9811b55fb11da241d2e..26e1a71d6f269df0da62638be681707eee5c98fb 100644 (file)
@@ -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);
index 659d4a86277e5670770e7e93fd558669bdb30099..cece2a02a2216c1e2efcae4197e7b914ee1d63b5 100644 (file)
@@ -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;
index 50f705ace15648ff86af8f7ce5c31eec0c8fe42d..fc583a9d7f0c2b9c1eddb857c2abf0c9c170ff93 100644 (file)
@@ -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;
index cd0bd9a7d55ba5917e253701a30a6f78780dad39..4cd5bfb9a864936015e1cb0e7a53ef23236231f9 100644 (file)
@@ -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);
index a421907ee70fdb658b8c332cbef30b2a22afe95f..e2c11ef60a28876b5823054e578ada67aebfd83c 100644 (file)
@@ -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;