Package org.sonar.api.batch

Examples of org.sonar.api.batch.TimeMachine


  @Test
  public void includeCurrentMeasures() throws ParseException {
    TendencyAnalyser analyser = mock(TendencyAnalyser.class);
    TimeMachineQuery query = new TimeMachineQuery(null).setMetrics(CoreMetrics.LINES, CoreMetrics.COVERAGE);
    TimeMachine timeMachine = mock(TimeMachine.class);

    when(timeMachine.getMeasuresFields(query)).thenReturn(Arrays.<Object[]>asList(
      new Object[] {date("2009-12-01"), CoreMetrics.LINES, 1200.0},
      new Object[] {date("2009-12-01"), CoreMetrics.COVERAGE, 80.5},
      new Object[] {date("2009-12-02"), CoreMetrics.LINES, 1300.0},
      new Object[] {date("2009-12-02"), CoreMetrics.COVERAGE, 79.6},
      new Object[] {date("2009-12-15"), CoreMetrics.LINES, 1150.0}
View Full Code Here


  @Test
  public void noTendencyIfNoCurrentMeasures() throws ParseException {
    TendencyAnalyser analyser = mock(TendencyAnalyser.class);
    TimeMachineQuery query = new TimeMachineQuery(null).setMetrics(CoreMetrics.LINES, CoreMetrics.COVERAGE);
    TimeMachine timeMachine = mock(TimeMachine.class);

    when(timeMachine.getMeasuresFields(query)).thenReturn(Arrays.<Object[]>asList(
      new Object[] {date("2009-12-01"), CoreMetrics.LINES, 1200.0},
      new Object[] {date("2009-12-02"), CoreMetrics.LINES, 1300.0}
    ));

    DecoratorContext context = mock(DecoratorContext.class);
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.TimeMachine

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.