use of com.sonarsource.governance.projectdump.protobuf.ProjectDump.Link in project sonarqube by SonarSource.
the class ExportLinksStepTest method test_all_fields.
@Test
public void test_all_fields() {
ProjectLinkDto link = db.componentLinks().insertCustomLink(PROJECT, l -> l.setName("name").setHref("href").setType("type"));
underTest.execute(new TestComputationStepContext());
Link reloaded = dumpWriter.getWrittenMessagesOf(DumpElement.LINKS).get(0);
assertThat(reloaded.getUuid()).isEqualTo(link.getUuid());
assertThat(reloaded.getName()).isEqualTo(link.getName());
assertThat(reloaded.getHref()).isEqualTo(link.getHref());
assertThat(reloaded.getType()).isEqualTo(link.getType());
}
Aggregations