]> source.dussan.org Git - sonarqube.git/commitdiff
Fix unit test
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 5 Mar 2014 17:55:08 +0000 (18:55 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 5 Mar 2014 17:55:08 +0000 (18:55 +0100)
sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QgateAppHandlerTest.java

index 3a7fdba6415a60e996bf4a8e770c0cbc61ee5139..6bc0243dce93a16727bb2d116574e8caef2817bf 100644 (file)
@@ -35,14 +35,15 @@ import org.sonar.api.server.ws.WsTester;
 import org.sonar.core.timemachine.Periods;
 import org.sonar.server.qualitygate.QualityGates;
 
-import java.util.*;
+import java.util.Collection;
+import java.util.Locale;
+import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Set;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 @RunWith(MockitoJUnitRunner.class)
 public class QgateAppHandlerTest {
@@ -88,7 +89,7 @@ public class QgateAppHandlerTest {
     Collection<Map> periods = (Collection<Map>) responseJson.get("periods");
     assertThat(periods).hasSize(3);
     Map messages = (Map) responseJson.get("messages");
-    assertThat(messages).isNotNull().isNotEmpty().hasSize(45);
+    assertThat(messages).isNotNull().isNotEmpty().hasSize(46);
     for (Entry message: (Set<Entry>) messages.entrySet()) {
       assertThat(message.getKey()).isEqualTo(message.getValue());
     }