diff options
author | David Gageot <david@gageot.net> | 2012-07-16 16:22:11 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-07-16 16:22:11 +0200 |
commit | 0b9545a8b74aca473cb776275be4dc93a327c363 (patch) | |
tree | 51eb211e79fc746712644a930ff7b18e948557fa /sonar-server | |
parent | af18bdc024a770f822ea39e458ec589a2e6c10e1 (diff) | |
download | sonarqube-0b9545a8b74aca473cb776275be4dc93a327c363.tar.gz sonarqube-0b9545a8b74aca473cb776275be4dc93a327c363.zip |
Remove warnings
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java b/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java index 67dd9290b6c..beef9e2db4d 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java @@ -19,10 +19,10 @@ */ package org.sonar.server.startup; +import com.google.common.collect.ImmutableMap; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.mockito.ArgumentMatcher; import org.sonar.api.CoreProperties; import org.sonar.api.platform.Server; import org.sonar.server.platform.PersistentSettings; @@ -30,10 +30,8 @@ import org.sonar.server.platform.PersistentSettings; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Map; import java.util.TimeZone; -import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -66,16 +64,10 @@ public class ServerMetadataPersisterTest { ServerMetadataPersister persister = new ServerMetadataPersister(server, persistentSettings); persister.start(); - verify(persistentSettings).saveProperties(argThat(new ArgumentMatcher<Map<String, String>>() { - @Override - public boolean matches(Object o) { - Map<String, String> map = (Map<String, String>) o; - return map.get(CoreProperties.SERVER_ID).equals("123") - && map.get(CoreProperties.SERVER_VERSION).equals("3.2") - && map.get(CoreProperties.SERVER_STARTTIME).equals("2010-05-18T17:59:00+0000") - && map.size() == 3; - } - })); + verify(persistentSettings).saveProperties(ImmutableMap.of( + CoreProperties.SERVER_ID, "123", + CoreProperties.SERVER_VERSION, "3.2", + CoreProperties.SERVER_STARTTIME, "2010-05-18T17:59:00+0000")); } } |