org.gmetrics.metric.coverage
Class CoberturaLineCoverageMetricTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by groovy.util.GroovyTestCase
              extended by org.gmetrics.test.AbstractTestCase
                  extended by org.gmetrics.metric.AbstractMetricTestCase
                      extended by org.gmetrics.metric.coverage.AbstractCoberturaMetricTestCase
                          extended by org.gmetrics.metric.coverage.CoberturaLineCoverageMetricTest
All Implemented Interfaces:
groovy.lang.GroovyObject, junit.framework.Test

public class CoberturaLineCoverageMetricTest
extends AbstractCoberturaMetricTestCase
implements groovy.lang.GroovyObject


Field Summary
 
Fields inherited from class org.gmetrics.metric.coverage.AbstractCoberturaMetricTestCase
CLASS_METRIC_RESULT, COBERTURA_XML_BAD_DTD, COBERTURA_XML_CLASSPATH_PREFIX, COBERTURA_XML_FILE_PREFIX, COBERTURA_XML_FILENAME, COBERTURA_XML_RELATIVE_PATH, COBERTURA_XML_RELATIVE_TO_CLASSPATH, PACKAGE_METRIC_RESULT
 
Fields inherited from class org.gmetrics.metric.AbstractMetricTestCase
CONSTRUCTOR_NAME, DEFAULT_CONSTRUCTOR, metric, RUN_METHOD, sourceCode
 
Fields inherited from class groovy.util.GroovyTestCase
log, TEST_SCRIPT_NAME_PREFIX
 
Constructor Summary
CoberturaLineCoverageMetricTest()
           
 
Method Summary
 groovy.lang.MetaClass getMetaClass()
           
static java.lang.Object getMetricClass()
           
 java.lang.Object getProperty(java.lang.String property)
           
 BigDecimal getRootPackageValue()
           
 BigDecimal getServicePackageValue()
           
 java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
static void setMetricClass(java.lang.Object value)
           
 void setProperty(java.lang.String property, java.lang.Object value)
           
 void setRootPackageValue(BigDecimal value)
           
 void setServicePackageValue(BigDecimal value)
           
 void testApplyToClass_ClassWithMethodThatHasNoCoverageInformation()
           
 void testApplyToClass_ClassWithNoMethods()
           
 void testApplyToClass_ClassWithOneMethod()
           
 void testApplyToClass_Constructor()
           
 void testApplyToClass_ContainsInnerClasses()
           
 void testApplyToClass_IgnoresAbstractMethods()
           
 void testApplyToClass_OverloadedConstructor()
           
 void testApplyToMethod_EnabledIsFalse_ReturnsNull()
           
 void testApplyToMethod()
           
 void testCalculate_Constructor()
           
 void testCalculate_MethodThatHasNoCoverageInformation()
           
 void testCalculate_ReturnsNullForAbstractMethodDeclaration()
           
 void testCalculate()
           
 void testGetCoverageRatioForClass_ClassContainingClosures()
           
 void testGetCoverageRatioForClass_EmptyClass()
           
 void testGetCoverageRatioForClass_NoSuchClass_ReturnsNull()
           
 void testGetCoverageRatioForClass()
           
 void testHasProperName()
           
 
Methods inherited from class org.gmetrics.metric.coverage.AbstractCoberturaMetricTestCase
assertRatio, setUp, testApplyToClass_CoberturaFileNotSet_ThrowsException, testApplyToClass_Enum_DoesNotLogWarningForMissingImplicitConstructorCoverageInformation, testApplyToClass_ReturnNullForInterface, testApplyToClosure_ThrowsUnsupportedOperationException, testApplyToPackage_AllowsWhitespaceAroundPackageNamePrefixes, testApplyToPackage_DoesNotMatchPackageNamePrefixes, testApplyToPackage_MultiplePrefixes_MatchesPackageNamePrefixes, testApplyToPackage_NoCoverageInformation_ForPackageWithClasses_LogsWarning, testApplyToPackage_NoCoverageInformation_ForPackageWithNoClasses_DoesNotLogWarning, testApplyToPackage_NoCoverageInformation, testApplyToPackage_NullPath_ReturnsOverallValue, testApplyToPackage_PackagePath, testApplyToPackage_PrefixHasTrailingSeparator_MatchesPackageNamePrefixes, testApplyToPackage_SinglePrefix_MatchesPackageNamePrefixes, testApplyToPackage, testBaseLevelIsMethod, testCalculate_EmptyMethodThatHasNoCoverageInformation_DoesNotLogWarning, testCalculate_NonEmptyMethodThatHasNoCoverageInformation_LogsWarning, testCanLoadCoberturaFileWithDTDSpecifyingUnreachableURI, testImplementsMethodMetricInterface, testLoadCoberturaFile_ClassPathResource, testLoadCoberturaFile_FileResource
 
Methods inherited from class org.gmetrics.metric.AbstractMetricTestCase
applyToClass, applyToClosure, applyToClosureValue, applyToMethod, applyToMethodValue, assertApplyToClass, assertApplyToClass, assertApplyToClass, assertApplyToPackage, assertApplyToPackage, assertApplyToPackage, assertCalculateForMethodReturnsNull, assertMetricForMetricResult, calculate, calculateForClosureField, calculateForConstructor, calculateForMethod, findFirstClosureExpression, findFirstField, findFirstMethod, findSyntheticMethod, metricResult, metricResultForClass, metricResultForPackage, parseClass, valueFromMetricResult
 
Methods inherited from class org.gmetrics.test.AbstractTestCase
assertBothAreFalseOrElseNeitherIs, assertContainsAll, assertContainsAllInOrder, assertEqualSets, captureLog4JMessages, captureSystemOut, classResultsNode, classResultsNode, containsAll, isNotGroovy15, log, methodResultsNode, packageResultsNode, packageResultsNode, scale, scale, shouldFailWithMessageContaining
 
Methods inherited from class groovy.util.GroovyTestCase
assertArrayEquals, assertContains, assertContains, assertEquals, assertEquals, assertEquals, assertInspect, assertLength, assertLength, assertLength, assertScript, assertToString, fixEOLs, getMethodName, getName, getTestClassName, notYetImplemented, notYetImplemented, shouldFail, shouldFail, shouldFailWithCause
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoberturaLineCoverageMetricTest

public CoberturaLineCoverageMetricTest()
Method Detail

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject
Overrides:
getMetaClass in class AbstractCoberturaMetricTestCase

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject
Overrides:
setMetaClass in class AbstractCoberturaMetricTestCase

invokeMethod

public java.lang.Object invokeMethod(java.lang.String method,
                                     java.lang.Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject
Overrides:
invokeMethod in class AbstractCoberturaMetricTestCase

getProperty

public java.lang.Object getProperty(java.lang.String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject
Overrides:
getProperty in class AbstractCoberturaMetricTestCase

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject
Overrides:
setProperty in class AbstractCoberturaMetricTestCase

getMetricClass

public static java.lang.Object getMetricClass()

setMetricClass

public static void setMetricClass(java.lang.Object value)

getRootPackageValue

public BigDecimal getRootPackageValue()
Specified by:
getRootPackageValue in class AbstractCoberturaMetricTestCase

setRootPackageValue

public void setRootPackageValue(BigDecimal value)

getServicePackageValue

public BigDecimal getServicePackageValue()
Specified by:
getServicePackageValue in class AbstractCoberturaMetricTestCase

setServicePackageValue

public void setServicePackageValue(BigDecimal value)

testHasProperName

public void testHasProperName()

testApplyToMethod_EnabledIsFalse_ReturnsNull

public void testApplyToMethod_EnabledIsFalse_ReturnsNull()

testApplyToMethod

public void testApplyToMethod()

testCalculate

public void testCalculate()

testCalculate_MethodThatHasNoCoverageInformation

public void testCalculate_MethodThatHasNoCoverageInformation()

testCalculate_ReturnsNullForAbstractMethodDeclaration

public void testCalculate_ReturnsNullForAbstractMethodDeclaration()

testCalculate_Constructor

public void testCalculate_Constructor()

testApplyToClass_ClassWithNoMethods

public void testApplyToClass_ClassWithNoMethods()

testApplyToClass_ClassWithOneMethod

public void testApplyToClass_ClassWithOneMethod()

testApplyToClass_ClassWithMethodThatHasNoCoverageInformation

public void testApplyToClass_ClassWithMethodThatHasNoCoverageInformation()

testApplyToClass_IgnoresAbstractMethods

public void testApplyToClass_IgnoresAbstractMethods()

testApplyToClass_Constructor

public void testApplyToClass_Constructor()

testApplyToClass_OverloadedConstructor

public void testApplyToClass_OverloadedConstructor()

testApplyToClass_ContainsInnerClasses

public void testApplyToClass_ContainsInnerClasses()

testGetCoverageRatioForClass

public void testGetCoverageRatioForClass()

testGetCoverageRatioForClass_ClassContainingClosures

public void testGetCoverageRatioForClass_ClassContainingClosures()

testGetCoverageRatioForClass_EmptyClass

public void testGetCoverageRatioForClass_EmptyClass()

testGetCoverageRatioForClass_NoSuchClass_ReturnsNull

public void testGetCoverageRatioForClass_NoSuchClass_ReturnsNull()


Copyright © 2012. All Rights Reserved.