import org.sonar.server.dashboard.db.DashboardDao;
import org.sonar.server.dashboard.db.WidgetDao;
import org.sonar.server.dashboard.db.WidgetPropertyDao;
+import org.sonar.server.design.db.FileDependencyDao;
import org.sonar.server.event.db.EventDao;
import org.sonar.server.issue.db.IssueDao;
import org.sonar.server.measure.persistence.MeasureDao;
private final ComponentIndexDao componentIndexDao;
private final ComponentLinkDao componentLinkDao;
private final EventDao eventDao;
+ private final FileDependencyDao fileDependencyDao;
public DbClient(Database db, MyBatis myBatis, DaoComponent... daoComponents) {
this.db = db;
componentIndexDao = getDao(map, ComponentIndexDao.class);
componentLinkDao = getDao(map, ComponentLinkDao.class);
eventDao = getDao(map, EventDao.class);
+ fileDependencyDao = getDao(map, FileDependencyDao.class);
}
public Database database() {
return eventDao;
}
+ public FileDependencyDao fileDependencyDao() {
+ return fileDependencyDao;
+ }
+
private <K> K getDao(Map<Class, DaoComponent> map, Class<K> clazz) {
return (K) map.get(clazz);
}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.sonar.server.design.db;
+
+import org.sonar.api.ServerComponent;
+import org.sonar.core.design.FileDependencyDto;
+import org.sonar.core.design.FileDependencyMapper;
+import org.sonar.core.persistence.DaoComponent;
+import org.sonar.core.persistence.DbSession;
+
+import java.util.List;
+
+public class FileDependencyDao implements ServerComponent, DaoComponent {
+
+ public List<FileDependencyDto> selectFromParents(DbSession session, String fromParentUuid, String toParentUuid, Long projectId) {
+ return session.getMapper(FileDependencyMapper.class).selectFromParents(fromParentUuid, toParentUuid, projectId);
+ }
+
+ public void insert(DbSession session, FileDependencyDto dto) {
+ session.getMapper(FileDependencyMapper.class).insert(dto);
+ }
+
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.sonar.server.design.db;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.sonar.core.design.FileDependencyDto;
+import org.sonar.core.persistence.DbSession;
+import org.sonar.core.persistence.DbTester;
+import org.sonar.test.DbTests;
+
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+@Category(DbTests.class)
+public class FileDependencyDaoTest {
+
+ @ClassRule
+ public static DbTester dbTester = new DbTester();
+
+ DbSession session;
+
+ FileDependencyDao dao;
+
+ @Before
+ public void setup() throws Exception {
+ dbTester.truncateTables();
+ session = dbTester.myBatis().openSession(false);
+ dao = new FileDependencyDao();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ session.close();
+ }
+
+ @Test
+ public void select_from_parents() throws Exception {
+ dbTester.prepareDbUnit(getClass(), "shared.xml");
+
+ List<FileDependencyDto> dtos = dao.selectFromParents(session, "MNOP", "QRST", 1L);
+ assertThat(dtos).hasSize(1);
+
+ assertThat(dtos.get(0).getId()).isEqualTo(1);
+ assertThat(dtos.get(0).getFromComponentUuid()).isEqualTo("EFGH");
+ assertThat(dtos.get(0).getToComponentUuid()).isEqualTo("IJKL");
+ assertThat(dtos.get(0).getFromParentUuid()).isEqualTo("MNOP");
+ assertThat(dtos.get(0).getToParentUuid()).isEqualTo("QRST");
+ assertThat(dtos.get(0).getWeight()).isEqualTo(2);
+ assertThat(dtos.get(0).getRootProjectSnapshotId()).isEqualTo(10L);
+ assertThat(dtos.get(0).getCreatedAt()).isEqualTo(1000L);
+
+ assertThat(dao.selectFromParents(session, "MNOP", "QRST", 123L)).isEmpty();
+ }
+
+ @Test
+ public void insert() throws Exception {
+ dao.insert(session, new FileDependencyDto()
+ .setFromComponentUuid("ABCD")
+ .setToComponentUuid("EFGH")
+ .setFromParentUuid("IJKL")
+ .setToParentUuid("MNOP")
+ .setRootProjectSnapshotId(10L)
+ .setWeight(2)
+ .setCreatedAt(1000L)
+ );
+ session.commit();
+
+ dbTester.assertDbUnit(getClass(), "insert.xml", new String[]{"id"}, "dependencies");
+ }
+}
@Before
public void setup() throws Exception {
+ dbTester.truncateTables();
session = dbTester.myBatis().openSession(false);
dao = new EventDao();
}
--- /dev/null
+<dataset>
+
+ <dependencies id="1" from_component_uuid="ABCD" to_component_uuid="EFGH" from_parent_uuid="IJKL" to_parent_uuid="MNOP" dep_weight="2" root_project_snapshot_id="10" created_at="1000"
+ from_snapshot_id="[null]" to_snapshot_id="[null]" parent_dependency_id="[null]" project_snapshot_id="[null]" dep_usage="[null]" from_scope="[null]" to_scope="[null]" />
+
+</dataset>
--- /dev/null
+<dataset>
+
+ <!-- Two dependencies from current snapshot -->
+ <dependencies id="1" from_component_uuid="EFGH" to_component_uuid="IJKL" from_parent_uuid="MNOP" to_parent_uuid="QRST" dep_weight="2" root_project_snapshot_id="10" created_at="1000"
+ from_snapshot_id="[null]" to_snapshot_id="[null]" parent_dependency_id="[null]" project_snapshot_id="[null]" dep_usage="[null]" from_scope="[null]" to_scope="[null]" />
+
+ <dependencies id="2" from_component_uuid="UVWX" to_component_uuid="YZAB" from_parent_uuid="PONM" to_parent_uuid="TSRQ" dep_weight="3" root_project_snapshot_id="10" created_at="1000"
+ from_snapshot_id="[null]" to_snapshot_id="[null]" parent_dependency_id="[null]" project_snapshot_id="[null]" dep_usage="[null]" from_scope="[null]" to_scope="[null]" />
+
+ <!-- Dependency on previous snapshot -->
+ <dependencies id="3" from_component_uuid="EFGH" to_component_uuid="LKJI" from_parent_uuid="MNOP" to_parent_uuid="QRST" dep_weight="2" root_project_snapshot_id="11" created_at="1000"
+ from_snapshot_id="[null]" to_snapshot_id="[null]" parent_dependency_id="[null]" project_snapshot_id="[null]" dep_usage="[null]" from_scope="[null]" to_scope="[null]" />
+
+ <projects id="1" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."/>
+
+ <snapshots id="10" islast="[true]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"/>
+ <snapshots id="11" islast="[false]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"/>
+
+</dataset>
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.design;
-
-public final class DependencyDto {
- private Long id;
- private Long fromSnapshotId;
- private Long toSnapshotId;
- private String usage;
-
- public Long getId() {
- return id;
- }
-
- public DependencyDto setId(Long id) {
- this.id = id;
- return this;
- }
-
- public Long getFromSnapshotId() {
- return fromSnapshotId;
- }
-
- public DependencyDto setFromSnapshotId(Long fromSnapshotId) {
- this.fromSnapshotId = fromSnapshotId;
- return this;
- }
-
- public Long getToSnapshotId() {
- return toSnapshotId;
- }
-
- public DependencyDto setToSnapshotId(Long toSnapshotId) {
- this.toSnapshotId = toSnapshotId;
- return this;
- }
-
- public String getUsage() {
- return usage;
- }
-
- public DependencyDto setUsage(String usage) {
- this.usage = usage;
- return this;
- }
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.design;
-
-import org.apache.ibatis.session.ResultHandler;
-
-public interface DependencyMapper {
- void selectAll(ResultHandler handler);
-}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.sonar.core.design;
+
+public final class FileDependencyDto {
+
+ private Long id;
+ private String fromComponentUuid;
+ private String fromParentUuid;
+ private String toComponentUuid;
+ private String toParentUuid;
+ private Long rootProjectSnapshotId;
+ private Integer weight;
+ private Long createdAt;
+
+ public Long getId() {
+ return id;
+ }
+
+ public FileDependencyDto setId(Long id) {
+ this.id = id;
+ return this;
+ }
+
+ public String getFromComponentUuid() {
+ return fromComponentUuid;
+ }
+
+ public FileDependencyDto setFromComponentUuid(String fromComponentUuid) {
+ this.fromComponentUuid = fromComponentUuid;
+ return this;
+ }
+
+ public String getFromParentUuid() {
+ return fromParentUuid;
+ }
+
+ public FileDependencyDto setFromParentUuid(String fromParentUuid) {
+ this.fromParentUuid = fromParentUuid;
+ return this;
+ }
+
+ public Long getRootProjectSnapshotId() {
+ return rootProjectSnapshotId;
+ }
+
+ public FileDependencyDto setRootProjectSnapshotId(Long rootProjectSnapshotId) {
+ this.rootProjectSnapshotId = rootProjectSnapshotId;
+ return this;
+ }
+
+ public String getToComponentUuid() {
+ return toComponentUuid;
+ }
+
+ public FileDependencyDto setToComponentUuid(String toComponentUuid) {
+ this.toComponentUuid = toComponentUuid;
+ return this;
+ }
+
+ public String getToParentUuid() {
+ return toParentUuid;
+ }
+
+ public FileDependencyDto setToParentUuid(String toParentUuid) {
+ this.toParentUuid = toParentUuid;
+ return this;
+ }
+
+ public Integer getWeight() {
+ return weight;
+ }
+
+ public FileDependencyDto setWeight(Integer weight) {
+ this.weight = weight;
+ return this;
+ }
+
+ public Long getCreatedAt() {
+ return createdAt;
+ }
+
+ public FileDependencyDto setCreatedAt(Long createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.core.design;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface FileDependencyMapper {
+
+ List<FileDependencyDto> selectFromParents(@Param("fromParentUuid") String fromParentUuid, @Param("toParentUuid") String toParentUuid, @Param("projectId") Long projectId);
+
+ void insert(FileDependencyDto dto);
+
+}
import org.sonar.core.dashboard.WidgetMapper;
import org.sonar.core.dashboard.WidgetPropertyDto;
import org.sonar.core.dashboard.WidgetPropertyMapper;
-import org.sonar.core.design.DependencyDto;
-import org.sonar.core.design.DependencyMapper;
+import org.sonar.core.design.FileDependencyMapper;
import org.sonar.core.duplication.DuplicationMapper;
import org.sonar.core.duplication.DuplicationUnitDto;
import org.sonar.core.event.EventDto;
loadAlias(conf, "Component", ComponentDto.class);
loadAlias(conf, "ComponentLink", ComponentLinkDto.class);
loadAlias(conf, "Dashboard", DashboardDto.class);
- loadAlias(conf, "Dependency", DependencyDto.class);
loadAlias(conf, "DuplicationUnit", DuplicationUnitDto.class);
loadAlias(conf, "Graph", GraphDto.class);
loadAlias(conf, "Group", GroupDto.class);
loadMapper(conf, "org.sonar.core.permission.PermissionMapper");
Class<?>[] mappers = {ActivityMapper.class, ActiveDashboardMapper.class, AuthorMapper.class, DashboardMapper.class,
- DependencyMapper.class, DuplicationMapper.class, GraphDtoMapper.class,
+ FileDependencyMapper.class, DuplicationMapper.class, GraphDtoMapper.class,
IssueMapper.class, IssueChangeMapper.class, IssueFilterMapper.class, IssueFilterFavouriteMapper.class,
LoadedTemplateMapper.class, MeasureFilterMapper.class, Migration44Mapper.class, PermissionTemplateMapper.class, PropertiesMapper.class, PurgeMapper.class,
ResourceKeyUpdaterMapper.class, ResourceIndexerMapper.class, RoleMapper.class, RuleMapper.class,
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.core.design.DependencyMapper">
-
- <select id="selectAll" resultType="dependency" >
- SELECT id, from_snapshot_id as fromSnapshotId, to_snapshot_id as toSnapshotId, dep_usage as "usage" FROM dependencies
- </select>
-
-</mapper>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="org.sonar.core.design.FileDependencyMapper">
+
+ <sql id="fileDependenciesColumns">
+ d.id as id,
+ d.from_component_uuid as fromComponentUuid,
+ d.to_component_uuid as toComponentUuid,
+ d.from_parent_uuid as fromParentUuid,
+ d.to_parent_uuid as toParentUuid,
+ d.root_project_snapshot_id as rootProjectSnapshotId,
+ d.dep_weight as "weight",
+ d.created_at as "createdAt"
+ </sql>
+
+ <select id="selectFromParents" resultType="org.sonar.core.design.FileDependencyDto" >
+ SELECT <include refid="fileDependenciesColumns"/>
+ FROM dependencies d
+ INNER JOIN snapshots root_snapshot on root_snapshot.id=d.root_project_snapshot_id AND root_snapshot.project_id=#{projectId} AND root_snapshot.islast=${_true}
+ <where>
+ AND d.from_parent_uuid=#{fromParentUuid}
+ AND d.to_parent_uuid=#{toParentUuid}
+ </where>
+ </select>
+
+ <insert id="insert" parameterType="org.sonar.core.design.FileDependencyDto" useGeneratedKeys="false">
+ INSERT INTO dependencies (from_component_uuid, to_component_uuid, from_parent_uuid, to_parent_uuid, root_project_snapshot_id, dep_weight, created_at)
+ VALUES (#{fromComponentUuid,jdbcType=VARCHAR}, #{toComponentUuid,jdbcType=VARCHAR}, #{fromParentUuid,jdbcType=VARCHAR}, #{toParentUuid,jdbcType=BOOLEAN},
+ #{rootProjectSnapshotId,jdbcType=VARCHAR}, #{weight,jdbcType=VARCHAR}, #{createdAt,jdbcType=VARCHAR})
+ </insert>
+
+</mapper>
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.design;
-
-import com.google.common.collect.Lists;
-import org.apache.ibatis.session.ResultContext;
-import org.apache.ibatis.session.ResultHandler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.sonar.core.persistence.DbSession;
-import org.sonar.core.persistence.DbTester;
-
-import java.util.List;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class DependencyMapperTest {
-
- @ClassRule
- public static DbTester dbtester = new DbTester();
-
- DbSession session;
-
- @Before
- public void setUp() throws Exception {
- dbtester.truncateTables();
- session = dbtester.myBatis().openSession(false);
- }
-
- @After
- public void tearDown() throws Exception {
- session.close();
- }
-
- @Test
- public void select_all_dependencies() {
- dbtester.prepareDbUnit(getClass(), "fixture.xml");
-
- final List<DependencyDto> dependencies = Lists.newArrayList();
-
- session.getMapper(DependencyMapper.class).selectAll(new ResultHandler() {
- public void handleResult(ResultContext context) {
- dependencies.add((DependencyDto) context.getResultObject());
- }
- });
-
- assertThat(dependencies).hasSize(2);
-
- DependencyDto dep = dependencies.get(0);
- assertThat(dep.getId()).isEqualTo(1L);
- assertThat(dep.getFromSnapshotId()).isEqualTo(1000L);
- assertThat(dep.getToSnapshotId()).isEqualTo(1001L);
- assertThat(dep.getUsage()).isEqualTo("compile");
- }
-}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.sonar.core.design;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class FileDependencyDtoTest {
+
+ @Test
+ public void test_getters_and_setters() throws Exception {
+ FileDependencyDto dto = new FileDependencyDto()
+ .setId(1L)
+ .setFromComponentUuid("ABCD")
+ .setToComponentUuid("EFGH")
+ .setFromParentUuid("IJKL")
+ .setToParentUuid("MNOP")
+ .setRootProjectSnapshotId(10L)
+ .setWeight(2)
+ .setCreatedAt(1000L);
+
+ assertThat(dto.getId()).isEqualTo(1L);
+ assertThat(dto.getFromComponentUuid()).isEqualTo("ABCD");
+ assertThat(dto.getToComponentUuid()).isEqualTo("EFGH");
+ assertThat(dto.getFromParentUuid()).isEqualTo("IJKL");
+ assertThat(dto.getToParentUuid()).isEqualTo("MNOP");
+ assertThat(dto.getRootProjectSnapshotId()).isEqualTo(10L);
+ assertThat(dto.getWeight()).isEqualTo(2);
+ assertThat(dto.getCreatedAt()).isEqualTo(1000L);
+ }
+
+}
+++ /dev/null
-<dataset>
- <dependencies id="1" from_component_uuid="ABCD" to_component_uuid="EFGH" from_snapshot_id="1000" to_snapshot_id="1001" dep_usage="compile" dep_weight="1" />
- <dependencies id="2" from_component_uuid="DCBA" to_component_uuid="HGFE" from_snapshot_id="2000" to_snapshot_id="2001" dep_usage="provided" dep_weight="1" />
-</dataset>