com.seventytwomiles.architecturerules
Class AbstractArchitectureRulesConfigurationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.seventytwomiles.architecturerules.AbstractArchitectureRulesConfigurationTest
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractArchitectureRulesConfigurationTest
extends junit.framework.TestCase

Abstract class that the users of this library will extend in order to create a unit test that asserts architecture.

Once extended, implement testArchitecture and call doTest(). Also override getConfigurationFileName() if you want to load an XML configuration file.

If you want to define the configuration programatically in addition to the xml configuration, or want to solely use programatic configuraiton, you may call getConfiguration which will return Configuration that you may then add new Rule, or SourceDirectory to.

Author:
mikenereson

Constructor Summary
protected AbstractArchitectureRulesConfigurationTest()
           
 
Method Summary
protected  boolean doTests()
           
protected  Configuration getConfiguration()
          Getter for property configuration.
protected  java.lang.String getConfigurationFileName()
          Get the name of the xml configuration file that is located in the classpath.
protected abstract  void testArchitecture()
          Implement this method and call doTests()
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, 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
 

Constructor Detail

AbstractArchitectureRulesConfigurationTest

protected AbstractArchitectureRulesConfigurationTest()
Method Detail

getConfiguration

protected Configuration getConfiguration()
Getter for property configuration.

Returns:
Value for property configuration.

doTests

protected final boolean doTests()

getConfigurationFileName

protected java.lang.String getConfigurationFileName()

Get the name of the xml configuration file that is located in the classpath.

Recommend architecture-rules.xml

Returns:
String name of the xml file including .xml

testArchitecture

protected abstract void testArchitecture()

Implement this method and call doTests()



Copyright © 2007. All Rights Reserved.