Examples of Percentage


Examples of com.atlassian.clover.cfg.Percentage

        if (this.codeType != null) {
            cloverPassTask.setCodeType(codeType);
        }

        if (this.targetPercentage != null) {
            cloverPassTask.setTarget( new Percentage( this.targetPercentage ) );
            getLog().info( "Checking for coverage of [" + targetPercentage + "] for database [" + database + "]");
            if (this.methodPercentage != null)
            {
                cloverPassTask.setMethodTarget(new Percentage(this.methodPercentage));
                getLog().info("Checking for method coverage of [" + methodPercentage + "] for database [" + database + "]");
            }
            if (this.conditionalPercentage != null)
            {
                cloverPassTask.setConditionalTarget(new Percentage(this.conditionalPercentage));
                getLog().info("Checking for conditional coverage of [" + conditionalPercentage + "] for database [" + database + "]");
            }

            if (this.statementPercentage != null)
            {
                cloverPassTask.setStatementTarget(new Percentage(this.statementPercentage));
                getLog().info("Checking for statement coverage of [" + statementPercentage + "] for database [" + database + "]");
            }


        } else if (this.historyDir.exists() && this.historyDir.isDirectory()) {
            cloverPassTask.setHistorydir(this.historyDir);
            cloverPassTask.setThreshold(new Percentage(this.historyThreshold));
            getLog().info( "Checking coverage against historical data [" +
                            this.historyDir + " +/-" + this.historyThreshold +
                           " ] for database [" + database + "]");
        } else {
            getLog().warn("Skipping clover2:check as 'maven.clover.targetPercentage' is not defined " +
View Full Code Here

Examples of com.cenqua.clover.cfg.Percentage

        cloverPassTask.setInitString( database );
        cloverPassTask.setHaltOnFailure( true );
        cloverPassTask.setFailureProperty( "clovercheckproperty" );
       
        if (this.targetPercentage != null) {
            cloverPassTask.setTarget( new Percentage( this.targetPercentage ) );
            getLog().info( "Checking for coverage of [" + targetPercentage + "] for database [" + database + "]");           
        } else if (this.historyDir.exists() && this.historyDir.isDirectory()) {
            cloverPassTask.setHistorydir(this.historyDir);
            cloverPassTask.setThreshold(new Percentage(this.historyThreshold));
            getLog().info( "Checking coverage against historical data [" +
                            this.historyDir + " +/-" + this.historyThreshold +
                           " ] for database [" + database + "]");
        } else {
            getLog().warn("Skipping clover2:check as 'maven.clover.targetPercentage' is not defined " +
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertTrue( complies );
  }

  @Test
  public void testCompliesWithWidthSmallerThanMaxWidthPercentage() {
    MaxWidthCondition condition = new MaxWidthCondition( new Percentage( BigDecimal.valueOf( 50 ) ) );
    Bounds bounds = new Bounds( 10, 10, 100, 0 );
    Bounds referenceBounds = new Bounds( 10, 10, 200, 0 );

    boolean complies = condition.compliesWith( new UIEnvironmentImpl( bounds, referenceBounds, 16 ) );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertTrue( complies );
  }

  @Test
  public void testCompliesNotWithWidthBiggerThanMaxWidthPercentage() {
    MaxWidthCondition condition = new MaxWidthCondition( new Percentage( BigDecimal.valueOf( 40 ) ) );
    Bounds bounds = new Bounds( 10, 10, 100, 0 );
    Bounds referenceBounds = new Bounds( 10, 10, 200, 0 );

    boolean complies = condition.compliesWith( new UIEnvironmentImpl( bounds, referenceBounds, 16 ) );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertFalse( complies );
  }

  @Test
  public void testCompliesWithWidthBiggerThanMinWidthInPercentage() {
    MinWidthCondition condition = new MinWidthCondition( new Percentage( BigDecimal.valueOf( 10 ) ) );
    Bounds bounds = new Bounds( 10, 10, 11, 0 );
    Bounds referenceBounds = new Bounds( 10, 10, 100, 0 );

    boolean complies = condition.compliesWith( new UIEnvironmentImpl( bounds, referenceBounds, 16 ) );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertTrue( complies );
  }

  @Test
  public void testCompliesWithWidthSameThanMinWidthInPercentage() {
    MinWidthCondition condition = new MinWidthCondition( new Percentage( BigDecimal.valueOf( 10 ) ) );
    Bounds bounds = new Bounds( 10, 10, 10, 0 );
    Bounds referenceBounds = new Bounds( 10, 10, 100, 0 );

    boolean complies = condition.compliesWith( new UIEnvironmentImpl( bounds, referenceBounds, 16 ) );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertTrue( complies );
  }

  @Test
  public void testCompliesNotWithWidthSmallerThanMinWidthInPercentage() {
    MinWidthCondition condition = new MinWidthCondition( new Percentage( BigDecimal.valueOf( 10 ) ) );
    Bounds bounds = new Bounds( 10, 10, 9, 0 );
    Bounds referenceBounds = new Bounds( 10, 10, 100, 0 );

    boolean complies = condition.compliesWith( new UIEnvironmentImpl( bounds, referenceBounds, 16 ) );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertEquals( 80, bounds.getHeight() );
  }

  @Test
  public void testUsesPercentageToComputeMargins() {
    MarginInstruction instruction = new MarginInstruction( new Percentage( BigDecimal.valueOf( 10 ) ),
                                                                     new Percentage( BigDecimal.valueOf( 10 ) ),
                                                                     new Percentage( BigDecimal.valueOf( 10 ) ),
                                                                     new Percentage( BigDecimal.valueOf( 10 ) ) );

    Bounds bounds = instruction.computeBounds( new Bounds( 0, 0, 100, 100 ), 16 );

    assertEquals( 10, bounds.getX() );
    assertEquals( 10, bounds.getY() );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertEquals( 80, bounds.getHeight() );
  }

  @Test
  public void testUsesMixedUnitsToComputeMargins() {
    MarginInstruction instruction = new MarginInstruction( new Percentage( BigDecimal.valueOf( 10 ) ),
                                                                     new Em( BigDecimal.ONE ),
                                                                     new Percentage( BigDecimal.valueOf( 10 ) ),
                                                                     new Pixel( 10 ) );

    Bounds bounds = instruction.computeBounds( new Bounds( 0, 0, 100, 100 ), 10 );

    assertEquals( 10, bounds.getX() );
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

    assertEquals( 150, actualHeight );
  }

  @Test
  public void testCalculatesHeightWithPercentage() {
    HeightInstruction instruction = new HeightInstruction( new Percentage( BigDecimal.valueOf( 50 ) ) );

    int height = instruction.computeHeight( new Bounds( 0, 0, 100, 100 ), 16 );

    assertEquals( 50, height );
  }
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.