org.gmetrics.metric
Class AbstractCommonMethodMetricTestCase

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.AbstractCommonMetricTestCase
                          extended by org.gmetrics.metric.AbstractCommonMethodMetricTestCase
All Implemented Interfaces:
groovy.lang.GroovyObject, junit.framework.Test
Direct Known Subclasses:
AbcMetric_CommonTest, CrapMetric_CommonTest, CyclomaticComplexityMetric_CommonTest, MethodLineCountMetric_CommonTest

public abstract class AbstractCommonMethodMetricTestCase
extends AbstractCommonMetricTestCase
implements groovy.lang.GroovyObject


Field Summary
 
Fields inherited from class org.gmetrics.metric.AbstractCommonMetricTestCase
SOURCE
 
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
AbstractCommonMethodMetricTestCase()
           
 
Method Summary
static java.lang.Object getDoesMetricTreatClosuresAsMethods()
           
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.Object getProperty(java.lang.String property)
           
 java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
           
static void setDoesMetricTreatClosuresAsMethods(java.lang.Object value)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(java.lang.String property, java.lang.Object value)
           
 void testApplyToClass_IncludeClosureFieldsIsFalse_ReturnsNull()
           
 void testApplyToClosure_EnabledIsFalse_ReturnsNull()
           
 void testApplyToMethod_EnabledIsFalse_ReturnsNull()
           
 void testCalculate_ClosureField_SetsLineNumber()
           
 void testCalculate_Method_SetsLineNumber()
           
 void testImplementsMethodMetricInterface()
           
 
Methods inherited from class org.gmetrics.metric.AbstractCommonMetricTestCase
testApplyToClass_SetsLineNumber, testEnabledFalse_ReturnsNullFor_ApplyToClass, testEnabledFalse_ReturnsNullFor_ApplyToPackage, testFunctions_DefaultsTo_TotalAndAverage, testImplementsMetricInterface
 
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, setUp, 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

AbstractCommonMethodMetricTestCase

public AbstractCommonMethodMetricTestCase()
Method Detail

getMetaClass

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

setMetaClass

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

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 AbstractCommonMetricTestCase

getProperty

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

setProperty

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

getDoesMetricTreatClosuresAsMethods

public static java.lang.Object getDoesMetricTreatClosuresAsMethods()

setDoesMetricTreatClosuresAsMethods

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

testImplementsMethodMetricInterface

public void testImplementsMethodMetricInterface()

testApplyToMethod_EnabledIsFalse_ReturnsNull

public void testApplyToMethod_EnabledIsFalse_ReturnsNull()

testApplyToClosure_EnabledIsFalse_ReturnsNull

public void testApplyToClosure_EnabledIsFalse_ReturnsNull()

testCalculate_Method_SetsLineNumber

public void testCalculate_Method_SetsLineNumber()

testCalculate_ClosureField_SetsLineNumber

public void testCalculate_ClosureField_SetsLineNumber()

testApplyToClass_IncludeClosureFieldsIsFalse_ReturnsNull

public void testApplyToClass_IncludeClosureFieldsIsFalse_ReturnsNull()


Copyright © 2012. All Rights Reserved.