Examples of subProjectId()


Examples of org.sonar.core.component.ComponentDto.subProjectId()

    ComponentDto result = dao.getNullableByUuid(session, "KLMN");
    assertThat(result).isNotNull();
    assertThat(result.uuid()).isEqualTo("KLMN");
    assertThat(result.moduleUuid()).isEqualTo("EFGH");
    assertThat(result.moduleUuidPath()).isEqualTo("ABCD.EFGH.");
    assertThat(result.subProjectId()).isEqualTo(2);
    assertThat(result.projectUuid()).isEqualTo("ABCD");
    assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.subProjectId()

    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
    assertThat(result.qualifier()).isEqualTo("FIL");
    assertThat(result.scope()).isEqualTo("FIL");
    assertThat(result.language()).isEqualTo("java");
    assertThat(result.subProjectId()).isEqualTo(2);

    assertThat(dao.getNullableByKey(session, "unknown")).isNull();
  }

  @Test
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.subProjectId()

    assertThat(result.name()).isEqualTo("Struts");
    assertThat(result.longName()).isEqualTo("Apache Struts");
    assertThat(result.qualifier()).isEqualTo("TRK");
    assertThat(result.scope()).isEqualTo("PRJ");
    assertThat(result.language()).isNull();
    assertThat(result.subProjectId()).isNull();
    assertThat(result.getAuthorizationUpdatedAt()).isEqualTo(DateUtils.parseDate("2014-06-18"));
  }

  @Test
  public void get_by_keys() {
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.subProjectId()

    addCharacteristics(rule, json);
  }

  private void addComponents(DbSession session, Issue issue, JsonWriter json) {
    ComponentDto component = dbClient.componentDao().getByUuid(session, issue.componentUuid());
    Long subProjectId = component.subProjectId();
    ComponentDto subProject = subProjectId != null ? dbClient.componentDao().getNullableById(subProjectId, session) : null;
    ComponentDto project = dbClient.componentDao().getByUuid(session, component.projectUuid());

    String projectName = project.longName() != null ? project.longName() : project.name();
    // Do not display sub project long name if sub project and project are the same
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.subProjectId()

    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
    assertThat(result.qualifier()).isEqualTo("FIL");
    assertThat(result.scope()).isEqualTo("FIL");
    assertThat(result.language()).isEqualTo("java");
    assertThat(result.subProjectId()).isEqualTo(2);

    assertThat(dao.getByKeys(session, "unknown")).isEmpty();
  }

  @Test
View Full Code Here

Examples of org.sonar.core.component.ComponentDto.subProjectId()

    ComponentDto result = results.get(0);
    assertThat(result).isNotNull();
    assertThat(result.uuid()).isEqualTo("KLMN");
    assertThat(result.moduleUuid()).isEqualTo("EFGH");
    assertThat(result.moduleUuidPath()).isEqualTo("ABCD.EFGH.");
    assertThat(result.subProjectId()).isEqualTo(2);
    assertThat(result.projectUuid()).isEqualTo("ABCD");
    assertThat(result.key()).isEqualTo("org.struts:struts-core:src/org/struts/RequestContext.java");
    assertThat(result.path()).isEqualTo("src/org/struts/RequestContext.java");
    assertThat(result.name()).isEqualTo("RequestContext.java");
    assertThat(result.longName()).isEqualTo("org.struts.RequestContext");
View Full Code Here

Examples of org.sonar.wsclient.component.Component.subProjectId()

    assertThat(component.key()).isEqualTo("struts:Action.java");
    assertThat(component.id()).isEqualTo(10L);
    assertThat(component.qualifier()).isEqualTo("CLA");
    assertThat(component.name()).isEqualTo("Action");
    assertThat(component.longName()).isEqualTo("org.struts.Action");
    assertThat(component.subProjectId()).isEqualTo(2L);
    assertThat(component.projectId()).isEqualTo(1L);

    assertThat(issues.componentByKey("struts:Action.java").key()).isEqualTo("struts:Action.java");
    assertThat(issues.componentById(10).key()).isEqualTo("struts:Action.java");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.