Package com.google.test.metric.report

Examples of com.google.test.metric.report.Source$Line


  public void testExample() throws Exception {
    IssuesReporter reporter = new IssuesReporter(new LinkedList<ClassIssues>(), costModel);
    ReportModel model = new AboutTestabilityReport(reporter, new SourceLoader(null) {
      @Override
      public Source load(String name) {
        return new Source(asList(
            new Line(1, "Copyright garbage!"),
            new Line(2, "package com.google.test.metric.example;"),
            new Line(3, "import java.util.List;"),
            new Line(4, "  "),
            new Line(5, "class SumOfPrimes {"),
View Full Code Here


    if (isInnerClass(className)) {
      return;
    }
   
    Source source = sourceLoader.load(className);
    if (source.getLines().isEmpty()) {
      throw new IllegalStateException("Failed to load source for class " + className);
    }
    ClassIssues issues = issuesReporter.determineIssues(classCost);
    String displayName = className;
    if (displayName.startsWith(PACKAGE_PREFIX)) {
View Full Code Here

        "position: absolute; width:100%; height:100%; left:0px; top:0px;");   
    Node n = document.appendChild(xhtmlDiv);
     
      // Convert the object itself to SVG
    Svg svg = oFactory.createSvg();
      Line line = oFactory.createLine();
      svg.getSVGDescriptionClassOrSVGAnimationClassOrSVGStructureClass().add(line);
     
      line.setX1(b.getOffset().getXAsString() );
      line.setY1(b.getOffset().getYAsString() );
     
      Point otherEnd = b.getOtherCorner();
     
      line.setX2( otherEnd.getXAsString() );
      line.setY2( otherEnd.getYAsString() );

      line.setStyle("stroke:rgb(99,99,99)");
      // You can't see the line in Midori, unless you specify the color.
      // width eg stroke-width:2 is optional
     
      Document d2 = XmlUtils.marshaltoW3CDomDocument(svg, jcSVG);  
      XmlUtils.treeCopy(d2, n);
View Full Code Here

TOP

Related Classes of com.google.test.metric.report.Source$Line

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.