Package com.google.test.metric

Examples of com.google.test.metric.ClassCost


  }

  public void testAddOneClassCostThenPrintIt() throws Exception {
    DrillDownReport printer =
      new DrillDownReport(new PrintStream(out), null, MAX_VALUE, 0);
    ClassCost classCost0 = new ClassCost("FAKE_classInfo0", new ArrayList<MethodCost>());
    printer.addClassCost(classCost0);
    printer.printFooter();
    assertStringEquals("\nTestability cost for FAKE_classInfo0 [ cost = 0 ] [ 0 TCC, 0 TGC ]\n",
        out.toString());
  }
View Full Code Here


  }

  public void testAddSeveralClassCostsAndPrintThem() throws Exception {
    DrillDownReport printer =
      new DrillDownReport(new PrintStream(out), null, MAX_VALUE, 0);
    ClassCost classCost0 = new ClassCost("FAKE_classInfo0", new ArrayList<MethodCost>());
    ClassCost classCost1 = new ClassCost("FAKE_classInfo1", new ArrayList<MethodCost>());
    ClassCost classCost2 = new ClassCost("FAKE_classInfo2", new ArrayList<MethodCost>());
    printer.addClassCost(classCost0);
    printer.addClassCost(classCost1);
    printer.addClassCost(classCost2);
    printer.printFooter();
    assertStringEquals("\nTestability cost for FAKE_classInfo0 [ cost = 0 ] [ 0 TCC, 0 TGC ]\n" +
View Full Code Here

      new DrillDownReport(new PrintStream(out), null, MAX_VALUE, 0);
    List<MethodCost> methodCosts1 = new ArrayList<MethodCost>();
    methodCosts1.add(methodCost1);
    List<MethodCost> methodCosts2 = new ArrayList<MethodCost>();
    methodCosts2.add(methodCost2);
    ClassCost classCost0 = new ClassCost("FAKE_classInfo0", new ArrayList<MethodCost>());
    ClassCost classCost1 = new ClassCost("FAKE_classInfo1", methodCosts1);
    ClassCost classCost2 = new ClassCost("FAKE_classInfo2", methodCosts2);
    classCost0.link(context);
    classCost1.link(context);
    classCost2.link(context);
    printer.addClassCost(classCost0);
    printer.addClassCost(classCost1);
    printer.addClassCost(classCost2);
    printer.printFooter();
    assertStringEquals("\nTestability cost for FAKE_classInfo2 [ cost = 2 ] [ 2 TCC, 0 TGC ]\n" +
View Full Code Here

TOP

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

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.