use of org.sonar.db.component.ComponentLinkDto in project sonarqube by SonarSource.
the class DeleteActionTest method fail_if_anonymous.
@Test
public void fail_if_anonymous() {
userSession.anonymous();
ComponentDto project = insertProject();
ComponentLinkDto link = insertCustomLink(project.uuid());
expectedException.expect(ForbiddenException.class);
deleteLink(link.getId());
}
use of org.sonar.db.component.ComponentLinkDto in project sonarqube by SonarSource.
the class SearchActionTest method request_does_not_fail_when_link_has_no_name.
@Test
public void request_does_not_fail_when_link_has_no_name() throws IOException {
ComponentDto project = db.components().insertProject();
ComponentLinkDto foo = new ComponentLinkDto().setComponentUuid(project.uuid()).setHref("foo").setType("type");
insertLink(foo);
logInAsProjectAdministrator(project);
callByKey(project.key());
}
use of org.sonar.db.component.ComponentLinkDto in project sonarqube by SonarSource.
the class SearchActionTest method request_does_not_fail_when_link_has_no_type.
@Test
public void request_does_not_fail_when_link_has_no_type() throws IOException {
ComponentDto project = db.components().insertProject();
ComponentLinkDto foo = new ComponentLinkDto().setComponentUuid(project.uuid()).setHref("foo").setName("name");
insertLink(foo);
logInAsProjectAdministrator(project);
callByKey(project.key());
}
use of org.sonar.db.component.ComponentLinkDto in project sonarqube by SonarSource.
the class SearchActionTest method insertCustomLink.
private ComponentLinkDto insertCustomLink(String projectUuid) {
ComponentLinkDto link = new ComponentLinkDto().setComponentUuid(projectUuid).setName("Custom").setType("Custom").setHref("http://example.org/custom");
insertLink(link);
return link;
}
use of org.sonar.db.component.ComponentLinkDto in project sonarqube by SonarSource.
the class SearchActionTest method insertHomepageLink.
private ComponentLinkDto insertHomepageLink(String projectUuid) {
ComponentLinkDto link = new ComponentLinkDto().setComponentUuid(projectUuid).setName("Homepage").setType("homepage").setHref("http://example.org");
insertLink(link);
return link;
}
Aggregations