|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.seventytwomiles.architecturerules.AbstractArchitectureRulesConfigurationTest
public abstract class AbstractArchitectureRulesConfigurationTest
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 programmatically in
addition to the xml configuration, or want to solely use programmatic
configuration, you may call getConfiguration which will return
Configuration that you may then add new Rule, or
SourceDirectory to.
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
protected |
AbstractArchitectureRulesConfigurationTest()
Upon instantiation, instances a new Configuration by reading the XML configuration file named architecture-rules.xml (by default) or by reading the XMl file name by the getConfigurationFileName
method. |
| Method Summary | |
|---|---|
protected boolean |
doTests()
Runs tests that are configured either programmatically, or by the XML configuration file that is loaded. |
protected Configuration |
getConfiguration()
Getter for property configuration. |
protected String |
getConfigurationFileName()
Get the name of the xml configuration file that is located in the classpath. |
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 |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
protected AbstractArchitectureRulesConfigurationTest()
getConfigurationFileName
method.
| Method Detail |
|---|
protected String getConfigurationFileName()
Get the name of the xml configuration file that is located in the classpath.
Recommend value, and the default value, is architecture-rules.xml
ConfigurationFactory.DEFAULT_CONFIGURATION_FILE_NAMEprotected Configuration getConfiguration()
configuration.
protected final boolean doTests()
Runs tests that are configured either programmatically, or by the XML configuration file that is loaded.
public abstract void testArchitecture()
Implement this method and call doTests()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||