summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-07-15 21:54:49 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-07-15 21:54:49 +0200
commit9f6f69e368d06a0ae064ad9fd6fded06307d0c99 (patch)
treea2093084eea754abce330c7c706c229d8d85af13 /sonar-plugin-api/src/test
parent3304cf145f064766b10f9e657d8b82f3e6f25465 (diff)
downloadsonarqube-9f6f69e368d06a0ae064ad9fd6fded06307d0c99.tar.gz
sonarqube-9f6f69e368d06a0ae064ad9fd6fded06307d0c99.zip
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api/src/test')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java
index f9fd0e10d33..0faaff16ecd 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java
@@ -21,9 +21,7 @@ package org.sonar.api.design;
import org.junit.Test;
-import static junit.framework.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.fest.assertions.Assertions.assertThat;
public class DependencyTest {
@@ -33,13 +31,13 @@ public class DependencyTest {
DependencyDto dep1Clone = new DependencyDto().setFromSnapshotId(10).setToSnapshotId(30);
DependencyDto dep2 = new DependencyDto().setFromSnapshotId(10).setToSnapshotId(31);
- assertFalse(dep1.equals(dep2));
- assertTrue(dep1.equals(dep1));
- assertTrue(dep1.equals(dep1Clone));
+ assertThat(dep1.equals(dep2)).isFalse();
+ assertThat(dep1.equals(dep1)).isTrue();
+ assertThat(dep1.equals(dep1Clone)).isTrue();
- assertEquals(dep1.hashCode(), dep1.hashCode());
- assertEquals(dep1.hashCode(), dep1Clone.hashCode());
- assertEquals(dep1.toString(), dep1.toString());
+ assertThat(dep1.hashCode()).isEqualTo(dep1.hashCode());
+ assertThat(dep1.hashCode()).isEqualTo(dep1Clone.hashCode());
+ assertThat(dep1.toString()).isEqualTo(dep1.toString());
}
@Test(expected = IllegalArgumentException.class)