import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.sonar.api.utils.System2;
+import org.sonar.db.DbClient;
+import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
+import org.sonar.db.component.ComponentDto;
+import org.sonar.db.component.ComponentTesting;
+import org.sonar.db.component.SnapshotDto;
import org.sonar.test.DbTests;
import static com.google.common.collect.Lists.newArrayList;
@Rule
public DbTester db = DbTester.create(System2.INSTANCE);
- MeasureDao underTest = db.getDbClient().measureDao();
+ private DbClient dbClient = db.getDbClient();
+ private DbSession dbSession = db.getSession();
+
+ MeasureDao underTest = dbClient.measureDao();
@Test
public void get_value_by_key() {
db.prepareDbUnit(getClass(), "shared.xml");
- MeasureDto result = underTest.selectByComponentKeyAndMetricKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "ncloc");
+ MeasureDto result = underTest.selectByComponentKeyAndMetricKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "ncloc");
assertThat(result.getId()).isEqualTo(22);
assertThat(result.getValue()).isEqualTo(10d);
assertThat(result.getData()).isNull();
public void get_data_by_key() {
db.prepareDbUnit(getClass(), "shared.xml");
- MeasureDto result = underTest.selectByComponentKeyAndMetricKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "authors_by_line");
+ MeasureDto result = underTest.selectByComponentKeyAndMetricKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "authors_by_line");
assertThat(result.getId()).isEqualTo(20);
assertThat(result.getData()).isEqualTo("0123456789012345678901234567890123456789");
}
public void get_text_value_by_key() {
db.prepareDbUnit(getClass(), "shared.xml");
- MeasureDto result = underTest.selectByComponentKeyAndMetricKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "coverage_line_hits_data");
+ MeasureDto result = underTest.selectByComponentKeyAndMetricKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "coverage_line_hits_data");
assertThat(result.getId()).isEqualTo(21);
assertThat(result.getData()).isEqualTo("36=1;37=1;38=1;39=1;43=1;48=1;53=1");
}
public void select_by_component_key_and_metrics() {
db.prepareDbUnit(getClass(), "shared.xml");
- List<MeasureDto> results = underTest.selectByComponentKeyAndMetricKeys(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java",
+ List<MeasureDto> results = underTest.selectByComponentKeyAndMetricKeys(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java",
newArrayList("ncloc", "authors_by_line"));
assertThat(results).hasSize(2);
- results = underTest.selectByComponentKeyAndMetricKeys(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", newArrayList("ncloc"));
+ results = underTest.selectByComponentKeyAndMetricKeys(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", newArrayList("ncloc"));
assertThat(results).hasSize(1);
MeasureDto result = results.get(0);
public void select_by_snapshotId_and_metrics() {
db.prepareDbUnit(getClass(), "shared.xml");
- List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, ImmutableSet.of("ncloc", "authors_by_line"), db.getSession());
+ List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, ImmutableSet.of("ncloc", "authors_by_line"), dbSession);
assertThat(results).hasSize(2);
Optional<MeasureDto> optional = FluentIterable.from(results).filter(new Predicate<MeasureDto>() {
public void find_by_component_key_and_metric() {
db.prepareDbUnit(getClass(), "shared.xml");
- MeasureDto result = underTest.selectByComponentKeyAndMetricKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "ncloc");
+ MeasureDto result = underTest.selectByComponentKeyAndMetricKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "ncloc");
assertThat(result.getId()).isEqualTo(22);
assertThat(result.getValue()).isEqualTo(10d);
assertThat(result.getMetricKey()).isEqualTo("ncloc");
assertThat(result.getVariation(4)).isEqualTo(4d);
assertThat(result.getVariation(5)).isEqualTo(-5d);
- assertThat(underTest.selectByComponentKeyAndMetricKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "unknown")).isNull();
+ assertThat(underTest.selectByComponentKeyAndMetricKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "unknown")).isNull();
}
@Test
public void exists_by_key() {
db.prepareDbUnit(getClass(), "shared.xml");
- assertThat(underTest.existsByKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "ncloc")).isTrue();
- assertThat(underTest.existsByKey(db.getSession(), "org.struts:struts-core:src/org/struts/RequestContext.java", "unknown")).isFalse();
+ assertThat(underTest.existsByKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "ncloc")).isTrue();
+ assertThat(underTest.existsByKey(dbSession, "org.struts:struts-core:src/org/struts/RequestContext.java", "unknown")).isFalse();
}
@Test
public void select_past_measures_by_component_uuid_and_root_snapshot_id_and_metric_keys() {
db.prepareDbUnit(getClass(), "past_measures.xml");
- List<PastMeasureDto> fileMeasures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "CDEF", 1000L, ImmutableSet.of(1, 2));
+ List<PastMeasureDto> fileMeasures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "CDEF", 1000L, ImmutableSet.of(1, 2));
assertThat(fileMeasures).hasSize(2);
PastMeasureDto fileMeasure1 = fileMeasures.get(0);
assertThat(fileMeasure2.getValue()).isEqualTo(60d);
assertThat(fileMeasure2.getMetricId()).isEqualTo(2);
- List<PastMeasureDto> projectMeasures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "ABCD", 1000L, ImmutableSet.of(1, 2));
+ List<PastMeasureDto> projectMeasures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "ABCD", 1000L, ImmutableSet.of(1, 2));
assertThat(projectMeasures).hasSize(2);
PastMeasureDto projectMeasure1 = projectMeasures.get(0);
assertThat(projectMeasure2.getValue()).isEqualTo(80d);
assertThat(projectMeasure2.getMetricId()).isEqualTo(2);
- assertThat(underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "UNKNOWN", 1000L, ImmutableSet.of(1, 2))).isEmpty();
- assertThat(underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "CDEF", 987654L, ImmutableSet.of(1, 2))).isEmpty();
- assertThat(underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "CDEF", 1000L, ImmutableSet.of(123, 456))).isEmpty();
+ assertThat(underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "UNKNOWN", 1000L, ImmutableSet.of(1, 2))).isEmpty();
+ assertThat(underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "CDEF", 987654L, ImmutableSet.of(1, 2))).isEmpty();
+ assertThat(underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "CDEF", 1000L, ImmutableSet.of(123, 456))).isEmpty();
}
@Test
public void select_past_measures_on_rule_by_component_uuid_and_root_snapshot_id_and_metric_keys() {
db.prepareDbUnit(getClass(), "past_measures_with_rule_id.xml");
- db.getSession().commit();
+ dbSession.commit();
- List<PastMeasureDto> measures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "ABCD", 1000L, ImmutableSet.of(1));
+ List<PastMeasureDto> measures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "ABCD", 1000L, ImmutableSet.of(1));
assertThat(measures).hasSize(3);
Map<Long, PastMeasureDto> pastMeasuresById = pastMeasuresById(measures);
public void select_past_measures_on_characteristic_by_component_uuid_and_root_snapshot_id_and_metric_keys() {
db.prepareDbUnit(getClass(), "past_measures_with_characteristic_id.xml");
- List<PastMeasureDto> measures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "ABCD", 1000L, ImmutableSet.of(1));
+ List<PastMeasureDto> measures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "ABCD", 1000L, ImmutableSet.of(1));
assertThat(measures).hasSize(3);
Map<Long, PastMeasureDto> pastMeasuresById = pastMeasuresById(measures);
public void select_past_measures_ignore_measures_with_person_id() {
db.prepareDbUnit(getClass(), "past_measures_with_person_id.xml");
- List<PastMeasureDto> measures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(db.getSession(), "ABCD", 1000L, ImmutableSet.of(1));
+ List<PastMeasureDto> measures = underTest.selectByComponentUuidAndProjectSnapshotIdAndMetricIds(dbSession, "ABCD", 1000L, ImmutableSet.of(1));
assertThat(measures).hasSize(1);
Map<Long, PastMeasureDto> pastMeasuresById = pastMeasuresById(measures);
public void select_by_snapshot_and_metric_keys() throws Exception {
db.prepareDbUnit(getClass(), "select_by_snapshot_and_metric_keys.xml");
- List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc", "authors_by_line"), db.getSession());
+ List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc", "authors_by_line"), dbSession);
assertThat(results).hasSize(2);
- results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc"), db.getSession());
+ results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc"), dbSession);
assertThat(results).hasSize(1);
MeasureDto result = results.get(0);
assertThat(result.getVariation(4)).isEqualTo(4d);
assertThat(result.getVariation(5)).isEqualTo(-5d);
- assertThat(underTest.selectBySnapshotIdAndMetricKeys(123, newHashSet("ncloc"), db.getSession())).isEmpty();
- assertThat(underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, Collections.<String>emptySet(), db.getSession())).isEmpty();
+ assertThat(underTest.selectBySnapshotIdAndMetricKeys(123, newHashSet("ncloc"), dbSession)).isEmpty();
+ assertThat(underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, Collections.<String>emptySet(), dbSession)).isEmpty();
}
@Test
public void select_by_snapshot_and_metric_keys_return_measures_with_rule_id() throws Exception {
db.prepareDbUnit(getClass(), "select_by_snapshot_and_metric_keys_with_rule_id.xml");
- List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc"), db.getSession());
+ List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc"), dbSession);
assertThat(results).hasSize(3);
Map<Long, MeasureDto> measuresById = measuresById(results);
public void select_by_snapshot_and_metric_keys_return_measures_with_characteristic_id() throws Exception {
db.prepareDbUnit(getClass(), "select_by_snapshot_and_metric_keys_with_characteristic_id.xml");
- List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc"), db.getSession());
+ List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, newHashSet("ncloc"), dbSession);
assertThat(results).hasSize(3);
Map<Long, MeasureDto> measuresById = measuresById(results);
public void selectByDeveloperForSnapshotAndMetrics_when_there_is_no_measure_for_developer_returns_empty() {
db.prepareDbUnit(getClass(), "shared.xml");
- List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(dbSession,
DEVELOPER_ID, SNAPSHOT_ID,
ImmutableList.of(AUTHORS_BY_LINE_METRIC_ID, COVERAGE_LINE_HITS_DATA_METRIC_ID, NCLOC_METRIC_ID));
public void selectByDeveloperForSnapshotAndMetrics_returns_only_measures_for_developer() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(dbSession,
DEVELOPER_ID, SNAPSHOT_ID,
ImmutableList.of(AUTHORS_BY_LINE_METRIC_ID, COVERAGE_LINE_HITS_DATA_METRIC_ID, NCLOC_METRIC_ID));
public void selectByDeveloperForSnapshotAndMetrics_returns_only_measures_for_developer_and_specified_metric_id() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(dbSession,
DEVELOPER_ID, SNAPSHOT_ID,
ImmutableList.of(NCLOC_METRIC_ID));
public void selectBySnapshotAndMetrics_returns_empty_when_single_metric_id_does_not_exist() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectBySnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectBySnapshotAndMetrics(dbSession,
SNAPSHOT_ID,
ImmutableList.of(666));
public void selectBySnapshotAndMetrics_returns_only_measures_not_for_developer() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectBySnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectBySnapshotAndMetrics(dbSession,
SNAPSHOT_ID,
ImmutableList.of(AUTHORS_BY_LINE_METRIC_ID, COVERAGE_LINE_HITS_DATA_METRIC_ID, NCLOC_METRIC_ID));
public void selectBySnapshotAndMetrics_returns_only_measures_not_for_developer_and_with_specified_metric_id() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectBySnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectBySnapshotAndMetrics(dbSession,
SNAPSHOT_ID,
ImmutableList.of(NCLOC_METRIC_ID));
public void selectByDeveloperForSnapshotAndMetrics_returns_empty_when_single_metric_id_does_not_exist() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(dbSession,
DEVELOPER_ID, SNAPSHOT_ID,
ImmutableList.of(666));
public void selectByDeveloperForSnapshotAndMetrics_returns_empty_when_snapshotId_does_not_exist() {
db.prepareDbUnit(getClass(), "with_some_measures_for_developer.xml");
- List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(db.getSession(),
+ List<MeasureDto> measureDtos = underTest.selectByDeveloperForSnapshotAndMetrics(dbSession,
DEVELOPER_ID, 10,
ImmutableList.of(AUTHORS_BY_LINE_METRIC_ID, COVERAGE_LINE_HITS_DATA_METRIC_ID, NCLOC_METRIC_ID));
//TODO add test for selectBySnapshotIdsAndMetricIds
+ @Test
+ public void selectProjectMeasuresByDeveloperForMetrics_returns_empty_on_empty_db() {
+ assertThat(underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, DEVELOPER_ID, ImmutableList.of(NCLOC_METRIC_ID, AUTHORS_BY_LINE_METRIC_ID))).isEmpty();
+ }
+
+ @Test
+ public void selectProjectMeasuresByDeveloperForMetrics_returns_empty_when_no_measure_for_developer() {
+ long otherDeveloperId = 666l;
+
+ ComponentDto projectDto = insertProject("aa");
+ SnapshotDto snapshotDto = insertSnapshot(projectDto, true);
+ insertMeasure(snapshotDto, DEVELOPER_ID, NCLOC_METRIC_ID, 12d);
+
+ List<MeasureDto> measureDtos = underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, DEVELOPER_ID, ImmutableList.of(NCLOC_METRIC_ID));
+ assertThat(measureDtos).hasSize(1);
+ MeasureDto measureDto = measureDtos.iterator().next();
+ assertThat(measureDto.getId()).isNotNull();
+ assertThat(measureDto.getMetricId()).isEqualTo(NCLOC_METRIC_ID);
+ assertThat(measureDto.getSnapshotId()).isEqualTo(snapshotDto.getId());
+ assertThat(measureDto.getComponentId()).isEqualTo(projectDto.getId());
+ assertThat(measureDto.getDeveloperId()).isEqualTo(DEVELOPER_ID);
+
+ assertThat(underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, otherDeveloperId, ImmutableList.of(NCLOC_METRIC_ID))).isEmpty();
+ assertThat(underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, DEVELOPER_ID, ImmutableList.of(AUTHORS_BY_LINE_METRIC_ID))).isEmpty();
+ }
+
+ @Test
+ public void selectProjectMeasuresByDeveloperForMetrics_returns_ignores_measure_of_non_last_snapshot() {
+ long otherDeveloperId = 666l;
+
+ ComponentDto projectDto = insertProject("aa");
+ SnapshotDto nonLastSnapshotDto = insertSnapshot(projectDto, false);
+ insertMeasure(nonLastSnapshotDto, DEVELOPER_ID, NCLOC_METRIC_ID, 12d);
+ SnapshotDto lastSnapshotDto = insertSnapshot(projectDto, true);
+ insertMeasure(lastSnapshotDto, otherDeveloperId, NCLOC_METRIC_ID, 15d);
+
+ assertThat(underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, DEVELOPER_ID, ImmutableList.of(NCLOC_METRIC_ID))).hasSize(0);
+
+ List<MeasureDto> measureDtos = underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, otherDeveloperId, ImmutableList.of(NCLOC_METRIC_ID));
+ assertThat(measureDtos).hasSize(1);
+ MeasureDto measureDto = measureDtos.iterator().next();
+ assertThat(measureDto.getMetricId()).isEqualTo(NCLOC_METRIC_ID);
+ assertThat(measureDto.getSnapshotId()).isEqualTo(lastSnapshotDto.getId());
+ assertThat(measureDto.getComponentId()).isEqualTo(projectDto.getId());
+ assertThat(measureDto.getDeveloperId()).isEqualTo(otherDeveloperId);
+ assertThat(measureDto.getValue()).isEqualTo(15d);
+ }
+
+ @Test
+ public void selectProjectMeasuresByDeveloperForMetrics_returns_ignores_snapshots_of_any_component_but_project() {
+ ComponentDto projectDto = insertProject("aa");
+ insertSnapshot(projectDto, true);
+ ComponentDto moduleDto = insertComponent(ComponentTesting.newModuleDto(projectDto));
+ insertMeasure(insertSnapshot(moduleDto, true), DEVELOPER_ID, NCLOC_METRIC_ID, 15d);
+ ComponentDto dirDto = insertComponent(ComponentTesting.newDirectory(moduleDto, "toto"));
+ insertMeasure(insertSnapshot(dirDto, true), DEVELOPER_ID, NCLOC_METRIC_ID, 25d);
+ ComponentDto fileDto = insertComponent(ComponentTesting.newFileDto(moduleDto, "tutu"));
+ insertMeasure(insertSnapshot(fileDto, true), DEVELOPER_ID, NCLOC_METRIC_ID, 35d);
+
+ assertThat(underTest.selectProjectMeasuresByDeveloperForMetrics(dbSession, DEVELOPER_ID, ImmutableList.of(NCLOC_METRIC_ID))).isEmpty();
+ }
+
+ private ComponentDto insertComponent(ComponentDto moduleDto) {
+ dbClient.componentDao().insert(dbSession, moduleDto);
+ dbSession.commit();
+ return moduleDto;
+ }
+
+ private ComponentDto insertProject(String uuid) {
+ ComponentDto projectDto = ComponentTesting.newProjectDto(uuid);
+ return insertComponent(projectDto);
+ }
+
+ private SnapshotDto insertSnapshot(ComponentDto componentDto, boolean last) {
+ SnapshotDto snapshotDto = new SnapshotDto().setComponentId(componentDto.getId()).setLast(last).setQualifier(componentDto.qualifier()).setScope(componentDto.scope());
+ dbClient.snapshotDao().insert(dbSession, snapshotDto);
+ dbSession.commit();
+ return snapshotDto;
+ }
+
+ private MeasureDto insertMeasure(SnapshotDto snapshotDto, Long developerId, int metricId, double value) {
+ MeasureDto measureDto = new MeasureDto().setMetricId(metricId).setValue(value).setSnapshotId(snapshotDto.getId()).setDeveloperId(developerId);
+ dbClient.measureDao().insert(dbSession, measureDto);
+ dbSession.commit();
+ return measureDto;
+ }
+
@Test
public void insert() {
db.prepareDbUnit(getClass(), "empty.xml");
- underTest.insert(db.getSession(), new MeasureDto()
+ underTest.insert(dbSession, new MeasureDto()
.setSnapshotId(2L)
.setMetricId(3)
.setCharacteristicId(4)
.setAlertText("alert-text")
.setDescription("measure-description")
);
- db.getSession().commit();
+ dbSession.commit();
db.assertDbUnit(getClass(), "insert-result.xml", new String[]{"id"}, "project_measures");
}
public void insert_measures() {
db.prepareDbUnit(getClass(), "empty.xml");
- underTest.insert(db.getSession(), new MeasureDto()
+ underTest.insert(dbSession, new MeasureDto()
.setSnapshotId(2L)
.setMetricId(3)
.setComponentId(6L)
.setComponentId(6L)
.setValue(4.0d)
);
- db.getSession().commit();
+ dbSession.commit();
assertThat(db.countRowsOfTable("project_measures")).isEqualTo(2);
}