Package org.sonar.core.component

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


    SqlSession session = getMyBatis().openSession(false);
    try {
      ComponentDto newProject = session.getMapper(ComponentMapper.class).selectByKey("foo");
      ComponentDto newDir = session.getMapper(ComponentMapper.class).selectByKey("foo:src/main/java/org/foo");
      assertThat(newDir.uuid()).isNotNull();
      assertThat(newDir.projectUuid()).isEqualTo(newProject.uuid());
      assertThat(newDir.moduleUuid()).isEqualTo(newProject.uuid());
      assertThat(newDir.moduleUuidPath()).isEqualTo(newProject.uuid());
    } finally {
      MyBatis.closeQuietly(session);
    }
View Full Code Here


    SqlSession session = getMyBatis().openSession(false);
    try {
      // FIXME selectByKey returns duplicates for libraries because of the join on snapshots table
      ComponentDto newLib = session.getMapper(ComponentMapper.class).findByKeys(Arrays.asList("junit:junit")).get(0);
      assertThat(newLib.uuid()).isNotNull();
      assertThat(newLib.projectUuid()).isEqualTo(newLib.uuid());
      assertThat(newLib.moduleUuid()).isNull();
      assertThat(newLib.moduleUuidPath()).isNull();
    } finally {
      MyBatis.closeQuietly(session);
    }
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.