public void testGetPackageName() { var classCost0 = new ClassCost("com.a.b.c.Dee", new ArrayList<MethodCost> { methodCost0 }); Assert.AreEqual("com.a.b.c", classCost0.getPackageName()); classCost0 = new ClassCost("Dee", new ArrayList<MethodCost> { methodCost0 }); Assert.AreEqual("", classCost0.getPackageName()); }
public void SetUp() { methodCost1.addCostSource(new CyclomaticCost(0, Cost.Cyclomatic(1))); methodCost2.addCostSource(new CyclomaticCost(0, Cost.Cyclomatic(1))); methodCost2.addCostSource(new CyclomaticCost(0, Cost.Cyclomatic(1))); methodCost0.link(); methodCost1.link(); methodCost2.link(); classCost0 = new ClassCost("FAKE_classInfo0", new ArrayList<MethodCost> {methodCost0}); classCost1 = new ClassCost("FAKE_classInfo1", new ArrayList<MethodCost> {methodCost1}); classCost2 = new ClassCost("FAKE_classInfo2", new ArrayList<MethodCost> {methodCost2}); }