org.jboss.jsfunit.analysis
Class AbstractInterfaceTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.jsfunit.analysis.AbstractInterfaceTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ActionListenerTestCase, ApplicationFactoryTestCase, ComponentTestCase, ConverterTestCase, ElResolverTestCase, FacesContextFactoryTestCase, LifecycleFactoryTestCase, NavigationHandlerTestCase, PhaseListenerTestCase, PropertyResolverTestCase, RendererTestCase, RenderKitFactoryTestCase, RenderKitTestCase, StateManagerTestCase, ValidatorTestCase, VariableResolverTestCase, ViewHandlerTestCase

public abstract class AbstractInterfaceTestCase
extends junit.framework.TestCase

A TestCase for a single JSF element that needs to extend a certain class.

Version:
$$Revision: $$
Author:
Alexander Jesse

Field Summary
protected  Class<?> classClass
          class of the classClass
protected  String className
          name of the className
protected  String jsfElement
          name of the jsfElement
 
Constructor Summary
AbstractInterfaceTestCase(String name, String jsfElement, String className)
          Create a new AbstractClassExtensionTestCase.
 
Method Summary
protected abstract  Class<?> getClassToExtend()
          Return the class to be extended, this munst be implemented by the specific TestCase.
 void runTest()
          Call the individual test methods.
protected  void setClassName(String className)
          Accessor for the class name.
 void testClassLoadable()
          Assert that the configured class can be loaded from the classpath
 void testInterface()
          Assert that the class implements the desired interface as per JSF specification.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, setUp, 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, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

className

protected String className
name of the className


jsfElement

protected String jsfElement
name of the jsfElement


classClass

protected Class<?> classClass
class of the classClass

Constructor Detail

AbstractInterfaceTestCase

public AbstractInterfaceTestCase(String name,
                                 String jsfElement,
                                 String className)
Create a new AbstractClassExtensionTestCase.

Parameters:
name - The name of the test-case in the JUnit test-hierarchy
className - the name of the className to test
Method Detail

runTest

public void runTest()
Call the individual test methods.

Overrides:
runTest in class junit.framework.TestCase

testClassLoadable

public void testClassLoadable()
Assert that the configured class can be loaded from the classpath


testInterface

public void testInterface()
Assert that the class implements the desired interface as per JSF specification.


setClassName

protected void setClassName(String className)
Accessor for the class name.

Parameters:
className -

getClassToExtend

protected abstract Class<?> getClassToExtend()
Return the class to be extended, this munst be implemented by the specific TestCase.

Returns:
the class to be extended


Copyright © 2007-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.