Package com.google.test.metric

Examples of com.google.test.metric.JavaClassRepository


  private MetricComputerJavaDecorator decoratedComputer;

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    ClassRepository repo = new JavaClassRepository();
    MetricComputer toDecorate = new MetricComputerBuilder().withClassRepository(repo).build();
    decoratedComputer = new MetricComputerJavaDecorator(toDecorate, repo);
    HypotheticalCostModel hypotheticalCostModel = new HypotheticalCostModel(new CostModel());
    issuesReporter = new IssuesReporter(new LinkedList<ClassIssues>(), hypotheticalCostModel);
  }
View Full Code Here


  private HypotheticalCostModel costModel;

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    ClassRepository repo = new JavaClassRepository();
    MetricComputer toDecorate = new MetricComputerBuilder().withClassRepository(repo).build();
    decoratedComputer = new MetricComputerJavaDecorator(toDecorate, repo);
    costModel = new HypotheticalCostModel(new CostModel());
    issuesReporter = new IssuesReporter(new LinkedList<ClassIssues>(), this.costModel);
  }
View Full Code Here

      b = 2;
    }
  }

  private MethodInfo getMethod(String methodName, Class<?> clazz) {
    ClassRepository repo = new JavaClassRepository();
    repo.getClass(Object.class.getCanonicalName()); // pre-cache for easier debugging.
    ClassInfo classInfo = repo.getClass(clazz.getCanonicalName());
    return classInfo.getMethod(methodName);
  }
View Full Code Here

      }
    }
  }

  public void testForEach() throws Exception {
    ClassRepository repo = new JavaClassRepository();
    repo.getClass(Foreach.class.getCanonicalName()).getMethod("void method()");
  }
View Full Code Here

      assertEquals(error, expected, actualOps.remove(0).toString());
    }
  }

  private MethodInfo methodForClass(Class<?> clazz) {
    return new JavaClassRepository().getClass(clazz.getCanonicalName()).getMethod(clazz.getSimpleName() + "()");
  }
View Full Code Here

    ClassPath classPath =
        new ClassPathFactory().createFromPaths("src/test/java", "core/src/test/java");
    SourceLoader loader = new SourceLoader(classPath);
    report = new SourceReportGenerator(new GradeCategories(0, 0), loader, null, new CostModel(),
            new Date(), 10, new Configuration());
    computer = new MetricComputer(new JavaClassRepository(), null,
            new RegExpWhiteList(), 1);
  }
View Full Code Here

    }
  }

  public void testExperiment() throws Exception {
    JavaClassRepository repo = new JavaClassRepository();
    repo.getClass(TestClass.class.getCanonicalName());
  }
View Full Code Here

      for (String packageName : whitelistPackages) {
        whitelist.addPackage(packageName);
      }
     
      CostModel costModel = new CostModel(cyclomaticCost, globalCost, constructorMultiplier);
      JavaClassRepository classRepository = new JavaClassRepository(classPath);
      MetricComputer computer = new MetricComputer(classRepository, errorStream, whitelist, printDepth);
      HypotheticalCostModel hypotheticalCostModel = new HypotheticalCostModel(costModel);
      IssuesReporter issuesReporter = new IssuesReporter(
          new TriageIssuesQueue<ClassIssues>(maxAcceptableCost,
              maxClassesInReport, new ClassIssues.TotalCostComparator()), hypotheticalCostModel);
View Full Code Here

  MetricComputerJavaDecorator decoratedComputer;

  @Override
  protected void setUp() throws Exception {
    ClassRepository repo = new JavaClassRepository();
    MetricComputer toDecorate = new MetricComputerBuilder().withClassRepository(repo).build();
    decoratedComputer = new MetricComputerJavaDecorator(toDecorate, repo);
  }
View Full Code Here

  MetricComputerJavaDecorator decoratedComputer;

  @Override
  protected void setUp() throws Exception {
    ClassRepository repo = new JavaClassRepository();
    MetricComputer toDecorate = new MetricComputerBuilder().withClassRepository(repo).build();
    decoratedComputer = new MetricComputerJavaDecorator(toDecorate, repo);
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.JavaClassRepository

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.