aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db/src/test/java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-01-23 23:18:36 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-01-24 09:39:42 +0100
commitd64a58b9177703e574f4214a7354b75407f61df8 (patch)
tree73e0031134023b224617896e130927993a18f1fc /sonar-db/src/test/java
parent23b6f858b1813d4d399ba9a1808fb880f9b96ce8 (diff)
downloadsonarqube-d64a58b9177703e574f4214a7354b75407f61df8.tar.gz
sonarqube-d64a58b9177703e574f4214a7354b75407f61df8.zip
Drop unused FileSourceDao#updateDateWhenUpdatedDateIsZero()
Diffstat (limited to 'sonar-db/src/test/java')
-rw-r--r--sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java21
1 files changed, 3 insertions, 18 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java b/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java
index d12cc86c0c0..76b260c7914 100644
--- a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java
@@ -19,11 +19,9 @@
*/
package org.sonar.db.source;
-import com.google.common.base.Function;
-import com.google.common.base.Throwables;
import java.io.IOException;
-import java.io.OutputStreamWriter;
import java.io.Reader;
+import java.util.function.Function;
import javax.annotation.Nullable;
import org.apache.commons.io.IOUtils;
import org.junit.Rule;
@@ -35,17 +33,15 @@ import org.sonar.db.source.FileSourceDto.Type;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
-import static org.assertj.core.api.Assertions.in;
-
public class FileSourceDaoTest {
@Rule
public DbTester dbTester = DbTester.create(System2.INSTANCE);
- DbSession session = dbTester.getSession();
+ private DbSession session = dbTester.getSession();
- FileSourceDao underTest = dbTester.getDbClient().fileSourceDao();
+ private FileSourceDao underTest = dbTester.getDbClient().fileSourceDao();
@Test
public void select() {
@@ -179,17 +175,6 @@ public class FileSourceDaoTest {
"project_uuid", "file_uuid", "data_hash", "line_hashes", "src_hash", "created_at", "updated_at", "data_type", "revision");
}
- @Test
- public void update_date_when_updated_date_is_zero() {
- dbTester.prepareDbUnit(getClass(), "update_date_when_updated_date_is_zero.xml");
-
- underTest.updateDateWhenUpdatedDateIsZero(dbTester.getSession(), "ABCD", 1500000000002L);
- dbTester.getSession().commit();
-
- dbTester.assertDbUnitTable(getClass(), "update_date_when_updated_date_is_zero-result.xml", "file_sources",
- "project_uuid", "file_uuid", "data_hash", "line_hashes", "src_hash", "created_at", "updated_at", "data_type", "revision");
- }
-
private static class ReaderToStringFunction implements Function<Reader, String> {
String result = null;