Package org.sonar.core.measure.db

Examples of org.sonar.core.measure.db.MeasureKey


    ComponentDto componentDto = new ComponentDto().setId(10L);
    when(componentDao.getNullableByKey(session, componentKey)).thenReturn(componentDto);

    String data = "{duplications}";
    MeasureKey measureKey = MeasureKey.of(componentKey, CoreMetrics.DUPLICATIONS_DATA_KEY);
    when(measureDao.getNullableByKey(session, measureKey)).thenReturn(
      MeasureDto.createFor(measureKey).setTextValue("{duplications}")
    );

    List<DuplicationsParser.Block> blocks = newArrayList(new DuplicationsParser.Block(newArrayList(new DuplicationsParser.Duplication(componentDto, 1, 2))));
View Full Code Here


    MockUserSession.set().addComponentPermission(UserRole.CODEVIEWER, "org.codehaus.sonar:sonar", componentKey);

    ComponentDto componentDto = new ComponentDto().setId(10L);
    when(componentDao.getNullableByKey(session, componentKey)).thenReturn(componentDto);

    MeasureKey measureKey = MeasureKey.of(componentKey, CoreMetrics.DUPLICATIONS_DATA_KEY);
    when(measureDao.getNullableByKey(session, measureKey)).thenReturn(null);

    WsTester.TestRequest request = tester.newGetRequest("api/duplications", "show").setParam("key", componentKey);
    request.execute();
View Full Code Here

TOP

Related Classes of org.sonar.core.measure.db.MeasureKey

Copyright © 2018 www.massapicom. 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.